summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-clike.min.js
blob: aebeff96249fb9645a565a2a5a69f544700f47a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Prism.languages.clike = {
  comment: [
    { pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 },
    { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 },
  ],
  string: {
    pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
    greedy: !0,
  },
  'class-name': {
    pattern:
      /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
    lookbehind: !0,
    inside: { punctuation: /[.\\]/ },
  },
  keyword:
    /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
  boolean: /\b(?:false|true)\b/,
  function: /\b\w+(?=\()/,
  number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
  operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
  punctuation: /[{}[\];(),.:]/,
};
no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
@use "@styles/abstracts/functions" as fun;
@use "@styles/abstracts/variables" as var;

h1 {
  font-size: var(--font-size-3xl);
}

h2 {
  padding-bottom: fun.convert-px(3);
  background: linear-gradient(
      to top,
      var(--color-primary-dark) 0.3rem,
      transparent 0.3rem
    )
    0 0 / 3rem 100% no-repeat;
  font-size: var(--font-size-2xl);
  text-shadow: fun.convert-px(1) fun.convert-px(1) 0 var(--color-shadow-light);
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
}

h5 {
  font-size: var(--font-size-md);
  font-weight: 600;
}

h6 {
  font-size: var(--font-size-md);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-primary-dark);
  font-family: var(--font-family-secondary);
  font-weight: 500;
  letter-spacing: 0.01ex;
  margin: 0 0 var(--spacing-sm);

  * + {
    h2,
    h3,
    h4,
    h5,
    h6 {
      margin-top: var(--spacing-md);
    }
  }
}

p {
  font-size: var(--font-size-md);
  margin: 0 0 var(--spacing-sm);
}

small {
  font-size: var(--font-size-sm);
}

ol {
  list-style-type: none;
  counter-reset: li;
  padding: 0;

  > li {
    display: table;
    counter-increment: li;

    &::before {
      content: counters(li, ".") ". ";
      color: var(--color-secondary);
      display: table-cell;
      padding-right: var(--spacing-2xs);
    }
  }

  li ol > li::before {
    content: counters(li, ".") ". ";
  }
}

ul,
ol {
  li {
    margin-bottom: var(--spacing-2xs);

    &:last-child {
      margin-bottom: 0;
    }
  }

  ::marker {
    color: var(--color-primary-dark);
  }
}

ul {
  padding-left: var(--spacing-sm);
}

dl {
  display: flex;
  flex-flow: row wrap;
  gap: var(--spacing-2xs);
}

ul,
ol,
dl {
  margin: var(--spacing-md) 0;

  & & {
    margin: var(--spacing-2xs) 0 0;
  }
}

dt {
  flex: 0 0 max-content;
  font-weight: 600;
}

dd {
  flex: 0 0 auto;
  margin: 0;
}

a {
  background: linear-gradient(to top, var(--color-primary) 50%, transparent 50%)
    0 0 / 100% 200% no-repeat;
  color: var(--color-primary);
  text-decoration-thickness: 13%;
  text-underline-offset: 20%;
  transition: all 0.3s linear 0s, text-decoration 0.18s ease-in-out 0s;

  &:hover {
    color: var(--color-primary-light);
    text-decoration-thickness: 23%;
  }

  &:focus {
    background-position: 0 100%;
    color: var(--color-fg-inverted);
  }

  &:active {
    background-position: 0 0;
    color: var(--color-primary-dark);
    text-decoration-thickness: 18%;
  }

  &.external {
    &::after {
      display: inline-block;
      content: "\0000a0"url(fun.encode-svg('<svg width="13" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="#{var.$light-theme_blue}" d="M100 0 59.543 5.887l20.8 6.523-51.134 51.134 7.249 7.248L87.59 19.66l6.522 20.798z"/><path fill="#{var.$light-theme_blue}" d="M4 10a4 4 0 0 0-4 4v82a4 4 0 0 0 4 4h82a4 4 0 0 0 4-4V62.314h-8V92H8V18h29.686v-8z"/></svg>'));
    }

    &:focus:not(:active)::after {
      content: "\0000a0"url(fun.encode-svg('<svg width="13" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="#{var.$light-theme_white}" d="M100 0 59.543 5.887l20.8 6.523-51.134 51.134 7.249 7.248L87.59 19.66l6.522 20.798z"/><path fill="#{var.$light-theme_white}" d="M4 10a4 4 0 0 0-4 4v82a4 4 0 0 0 4 4h82a4 4 0 0 0 4-4V62.314h-8V92H8V18h29.686v-8z"/></svg>'));
    }
  }

  &[hreflang] {
    &::after {
      display: inline-block;
      content: "\0000a0["attr(hreflang) "]";
      font-size: var(--font-size-sm);
    }

    &.external {
      &::after {
        content: "\0000a0["attr(hreflang) "]\0000a0"url(fun.encode-svg(
            '<svg width="13" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="#{var.$light-theme_blue}" d="M100 0 59.543 5.887l20.8 6.523-51.134 51.134 7.249 7.248L87.59 19.66l6.522 20.798z"/><path fill="#{var.$light-theme_blue}" d="M4 10a4 4 0 0 0-4 4v82a4 4 0 0 0 4 4h82a4 4 0 0 0 4-4V62.314h-8V92H8V18h29.686v-8z"/></svg>'
          ));
      }

      &:focus:not(:active)::after {
        content: "\0000a0["attr(hreflang) "]\0000a0"url(fun.encode-svg(
            '<svg width="13" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="#{var.$light-theme_white}" d="M100 0 59.543 5.887l20.8 6.523-51.134 51.134 7.249 7.248L87.59 19.66l6.522 20.798z"/><path fill="#{var.$light-theme_white}" d="M4 10a4 4 0 0 0-4 4v82a4 4 0 0 0 4 4h82a4 4 0 0 0 4-4V62.314h-8V92H8V18h29.686v-8z"/></svg>'
          ));
      }
    }
  }
}

button,
input,
optgroup,
select,
textarea {
  line-height: var(--line-height);
}

code,
kbd,
pre,
var {
  font-family: var(--font-family-mono);
}

:not(pre) > code,
kbd,
var,
samp {
  background: var(--color-bg-code);
  border: fun.convert-px(1) solid var(--color-border);
  border-radius: fun.convert-px(3);
  color: var(--color-primary-darker);
  font-style: normal;
  padding: fun.convert-px(2) fun.convert-px(5) fun.convert-px(1)
    fun.convert-px(5);
}

kbd {
  box-shadow: fun.convert-px(1) fun.convert-px(1) 0 fun.convert-px(1)
    var(--color-shadow);
}

pre {
  display: block;
  max-width: 100%;
  overflow: auto;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
}

figure {
  margin: var(--spacing-md) 0;
}

figcaption {
  margin-top: var(--spacing-xs);
  font-size: var(--font-size-sm);
  text-align: center;
}