Skip to content

Instantly share code, notes, and snippets.

@jneidel
Last active March 30, 2024 07:56
Show Gist options
  • Save jneidel/dd475fc7346dea569993da94aa8c607c to your computer and use it in GitHub Desktop.
Save jneidel/dd475fc7346dea569993da94aa8c607c to your computer and use it in GitHub Desktop.
Various often used building blocks

HTML

Basic Page:

<html>
<head>
  <meta charset="UTF-8">
  <title></title>
  <link rel="icon" href="">
  <link rel="stylesheet" media="print" onload="this.media='all'" href=".css">
  <!--
    Undeferred css loading:
    <link rel="stylesheet" type="text/css" href=".css">

    To load links with priority use:
    <link rel="preload">
  -->
  <script defer type="text/javascript" src=""></script>
  <!--
    For only downloading in the background (not non-blocking):
    <script async src="">
  -->
</head>
<body>

  <script src=""></script>
</body>
</html>

Markdown

Table of Contents:

<details>
<summary><strong>Table of Contents</strong></summary>

<!-- toc -->

<!-- tocstop -->

</details>

Function Description:

<table><tr>
  <td>Type: <code>function</code></td>
  <td>Param: <code>path</code></td>
  <td>Return: <code>name</code></td>
</tr></table>

CSS

Media Queries:

@media screen and (orientation:portait) {}
@media screen and (orientation:landscape) {}

Adding custom fonts:

@font-face {
  font-family: Bigbang;
  font-weight: bold;
  src: url( fonts/Bigbang.ttf );
}

@font-face {
  font-family: Bigbang;
  font-weight: bold;
  src: url( "fonts/Bigbang.otf" ) format( "opentype" );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment