Upgrade JS and Go deps versions (#517)

This commit is contained in:
Thomas Miceli
2025-10-07 16:59:37 +02:00
committed by GitHub
parent f0a596aed0
commit f653179cbf
81 changed files with 2487 additions and 6227 deletions

View File

@@ -1,74 +0,0 @@
.chroma:not(.markdown) { color: #4c4f69 }
/* Error */ .chroma .err { color: #d20f39 }
/* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
/* LineHighlight */ .chroma .hl { color: #bcc0cc }
/* LineNumbersTable */ .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #8c8fa1 }
/* LineNumbers */ .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #8c8fa1 }
/* Line */ .chroma .line { display: flex; }
/* Keyword */ .chroma .k { color: #8839ef }
/* KeywordConstant */ .chroma .kc { color: #fe640b }
/* KeywordDeclaration */ .chroma .kd { color: #d20f39 }
/* KeywordNamespace */ .chroma .kn { color: #179299 }
/* KeywordPseudo */ .chroma .kp { color: #8839ef }
/* KeywordReserved */ .chroma .kr { color: #8839ef }
/* KeywordType */ .chroma .kt { color: #d20f39 }
/* NameAttribute */ .chroma .na { color: #1e66f5 }
/* NameBuiltin */ .chroma .nb { color: #04a5e5 }
/* NameBuiltinPseudo */ .chroma .bp { color: #04a5e5 }
/* NameClass */ .chroma .nc { color: #df8e1d }
/* NameConstant */ .chroma .no { color: #df8e1d }
/* NameDecorator */ .chroma .nd { color: #1e66f5; font-weight: bold }
/* NameEntity */ .chroma .ni { color: #179299 }
/* NameException */ .chroma .ne { color: #fe640b }
/* NameFunction */ .chroma .nf { color: #1e66f5 }
/* NameFunctionMagic */ .chroma .fm { color: #1e66f5 }
/* NameLabel */ .chroma .nl { color: #04a5e5 }
/* NameNamespace */ .chroma .nn { color: #fe640b }
/* NameProperty */ .chroma .py { color: #fe640b }
/* NameTag */ .chroma .nt { color: #8839ef }
/* NameVariable */ .chroma .nv { color: #dc8a78 }
/* NameVariableClass */ .chroma .vc { color: #dc8a78 }
/* NameVariableGlobal */ .chroma .vg { color: #dc8a78 }
/* NameVariableInstance */ .chroma .vi { color: #dc8a78 }
/* NameVariableMagic */ .chroma .vm { color: #dc8a78 }
/* LiteralString */ .chroma .s { color: #40a02b }
/* LiteralStringAffix */ .chroma .sa { color: #d20f39 }
/* LiteralStringBacktick */ .chroma .sb { color: #40a02b }
/* LiteralStringChar */ .chroma .sc { color: #40a02b }
/* LiteralStringDelimiter */ .chroma .dl { color: #1e66f5 }
/* LiteralStringDoc */ .chroma .sd { color: #9ca0b0 }
/* LiteralStringDouble */ .chroma .s2 { color: #40a02b }
/* LiteralStringEscape */ .chroma .se { color: #1e66f5 }
/* LiteralStringHeredoc */ .chroma .sh { color: #9ca0b0 }
/* LiteralStringInterpol */ .chroma .si { color: #40a02b }
/* LiteralStringOther */ .chroma .sx { color: #40a02b }
/* LiteralStringRegex */ .chroma .sr { color: #179299 }
/* LiteralStringSingle */ .chroma .s1 { color: #40a02b }
/* LiteralStringSymbol */ .chroma .ss { color: #40a02b }
/* LiteralNumber */ .chroma .m { color: #fe640b }
/* LiteralNumberBin */ .chroma .mb { color: #fe640b }
/* LiteralNumberFloat */ .chroma .mf { color: #fe640b }
/* LiteralNumberHex */ .chroma .mh { color: #fe640b }
/* LiteralNumberInteger */ .chroma .mi { color: #fe640b }
/* LiteralNumberIntegerLong */ .chroma .il { color: #fe640b }
/* LiteralNumberOct */ .chroma .mo { color: #fe640b }
/* Operator */ .chroma .o { color: #04a5e5; font-weight: bold }
/* OperatorWord */ .chroma .ow { color: #04a5e5; font-weight: bold }
/* Comment */ .chroma .c { color: #9ca0b0; font-style: italic }
/* CommentHashbang */ .chroma .ch { color: #9ca0b0; font-style: italic }
/* CommentMultiline */ .chroma .cm { color: #9ca0b0; font-style: italic }
/* CommentSingle */ .chroma .c1 { color: #9ca0b0; font-style: italic }
/* CommentSpecial */ .chroma .cs { color: #9ca0b0; font-style: italic }
/* CommentPreproc */ .chroma .cp { color: #9ca0b0; font-style: italic }
/* CommentPreprocFile */ .chroma .cpf { color: #9ca0b0; font-weight: bold; font-style: italic }
/* GenericDeleted */ .chroma .gd { color: #d20f39; background-color: #ccd0da }
/* GenericEmph */ .chroma .ge { font-style: italic }
/* GenericError */ .chroma .gr { color: #d20f39 }
/* GenericHeading */ .chroma .gh { color: #fe640b; font-weight: bold }
/* GenericInserted */ .chroma .gi { color: #40a02b; background-color: #ccd0da }
/* GenericStrong */ .chroma .gs { font-weight: bold }
/* GenericSubheading */ .chroma .gu { color: #fe640b; font-weight: bold }
/* GenericTraceback */ .chroma .gt { color: #d20f39 }
/* GenericUnderline */ .chroma .gl { text-decoration: underline }

View File

@@ -1,74 +0,0 @@
.chroma:not(.markdown) { color: #cad3f5 }
/* Error */ .chroma .err { color: #f38ba8 }
/* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
/* LineHighlight */ .chroma .hl { color: #45475a }
/* LineNumbersTable */ .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f849c }
/* LineNumbers */ .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f849c }
/* Line */ .chroma .line { display: flex; }
/* Keyword */ .chroma .k { color: #cba6f7 }
/* KeywordConstant */ .chroma .kc { color: #fab387 }
/* KeywordDeclaration */ .chroma .kd { color: #f38ba8 }
/* KeywordNamespace */ .chroma .kn { color: #94e2d5 }
/* KeywordPseudo */ .chroma .kp { color: #cba6f7 }
/* KeywordReserved */ .chroma .kr { color: #cba6f7 }
/* KeywordType */ .chroma .kt { color: #f38ba8 }
/* NameAttribute */ .chroma .na { color: #89b4fa }
/* NameBuiltin */ .chroma .nb { color: #89dceb }
/* NameBuiltinPseudo */ .chroma .bp { color: #89dceb }
/* NameClass */ .chroma .nc { color: #f9e2af }
/* NameConstant */ .chroma .no { color: #f9e2af }
/* NameDecorator */ .chroma .nd { color: #89b4fa; font-weight: bold }
/* NameEntity */ .chroma .ni { color: #94e2d5 }
/* NameException */ .chroma .ne { color: #fab387 }
/* NameFunction */ .chroma .nf { color: #89b4fa }
/* NameFunctionMagic */ .chroma .fm { color: #89b4fa }
/* NameLabel */ .chroma .nl { color: #89dceb }
/* NameNamespace */ .chroma .nn { color: #fab387 }
/* NameProperty */ .chroma .py { color: #fab387 }
/* NameTag */ .chroma .nt { color: #cba6f7 }
/* NameVariable */ .chroma .nv { color: #f5e0dc }
/* NameVariableClass */ .chroma .vc { color: #f5e0dc }
/* NameVariableGlobal */ .chroma .vg { color: #f5e0dc }
/* NameVariableInstance */ .chroma .vi { color: #f5e0dc }
/* NameVariableMagic */ .chroma .vm { color: #f5e0dc }
/* LiteralString */ .chroma .s { color: #a6e3a1 }
/* LiteralStringAffix */ .chroma .sa { color: #f38ba8 }
/* LiteralStringBacktick */ .chroma .sb { color: #a6e3a1 }
/* LiteralStringChar */ .chroma .sc { color: #a6e3a1 }
/* LiteralStringDelimiter */ .chroma .dl { color: #89b4fa }
/* LiteralStringDoc */ .chroma .sd { color: #6c7086 }
/* LiteralStringDouble */ .chroma .s2 { color: #a6e3a1 }
/* LiteralStringEscape */ .chroma .se { color: #89b4fa }
/* LiteralStringHeredoc */ .chroma .sh { color: #6c7086 }
/* LiteralStringInterpol */ .chroma .si { color: #a6e3a1 }
/* LiteralStringOther */ .chroma .sx { color: #a6e3a1 }
/* LiteralStringRegex */ .chroma .sr { color: #94e2d5 }
/* LiteralStringSingle */ .chroma .s1 { color: #a6e3a1 }
/* LiteralStringSymbol */ .chroma .ss { color: #a6e3a1 }
/* LiteralNumber */ .chroma .m { color: #fab387 }
/* LiteralNumberBin */ .chroma .mb { color: #fab387 }
/* LiteralNumberFloat */ .chroma .mf { color: #fab387 }
/* LiteralNumberHex */ .chroma .mh { color: #fab387 }
/* LiteralNumberInteger */ .chroma .mi { color: #fab387 }
/* LiteralNumberIntegerLong */ .chroma .il { color: #fab387 }
/* LiteralNumberOct */ .chroma .mo { color: #fab387 }
/* Operator */ .chroma .o { color: #89dceb; font-weight: bold }
/* OperatorWord */ .chroma .ow { color: #89dceb; font-weight: bold }
/* Comment */ .chroma .c { color: #6c7086; font-style: italic }
/* CommentHashbang */ .chroma .ch { color: #6c7086; font-style: italic }
/* CommentMultiline */ .chroma .cm { color: #6c7086; font-style: italic }
/* CommentSingle */ .chroma .c1 { color: #6c7086; font-style: italic }
/* CommentSpecial */ .chroma .cs { color: #6c7086; font-style: italic }
/* CommentPreproc */ .chroma .cp { color: #6c7086; font-style: italic }
/* CommentPreprocFile */ .chroma .cpf { color: #6c7086; font-weight: bold; font-style: italic }
/* GenericDeleted */ .chroma .gd { color: #f38ba8; background-color: #313244 }
/* GenericEmph */ .chroma .ge { font-style: italic }
/* GenericError */ .chroma .gr { color: #f38ba8 }
/* GenericHeading */ .chroma .gh { color: #fab387; font-weight: bold }
/* GenericInserted */ .chroma .gi { color: #a6e3a1; background-color: #313244 }
/* GenericStrong */ .chroma .gs { font-weight: bold }
/* GenericSubheading */ .chroma .gu { color: #fab387; font-weight: bold }
/* GenericTraceback */ .chroma .gt { color: #f38ba8 }
/* GenericUnderline */ .chroma .gl { text-decoration: underline }

2
public/css/auto.css vendored Normal file
View File

@@ -0,0 +1,2 @@
@import "./light.css" (prefers-color-scheme: light);
@import "./dark.css" (prefers-color-scheme: dark);

251
public/css/catppuccin-latte.css vendored Normal file
View File

@@ -0,0 +1,251 @@
.chroma .cl {
color: #4c4f69;
}
.chroma .err {
color: #d20f39;
}
.chroma .x {
color: #4c4f69;
}
.chroma .hl {
background-color: #bcc0cc;
}
.chroma .lnt {
color: #8c8fa1;
}
.chroma .ln {
color: #8c8fa1;
}
.chroma .k {
color: #8839ef;
}
.chroma .kr {
color: #8839ef;
}
.chroma .kp {
color: #8839ef;
}
.chroma .kc {
color: #fe640b;
}
.chroma .kd {
color: #d20f39;
}
.chroma .kn {
color: #179299;
}
.chroma .kt {
color: #d20f39;
}
.chroma .n {
color: #4c4f69;
}
.chroma .nc {
color: #df8e1d;
}
.chroma .no {
color: #df8e1d;
}
.chroma .nd {
color: #1e66f5;
font-weight: bold;
}
.chroma .ni {
color: #179299;
}
.chroma .ne {
color: #fe640b;
}
.chroma .nf {
color: #1e66f5;
}
.chroma .fm {
color: #1e66f5;
}
.chroma .nl {
color: #04a5e5;
}
.chroma .nn {
color: #fe640b;
}
.chroma .py {
color: #fe640b;
}
.chroma .nt {
color: #8839ef;
}
.chroma .nv {
color: #dc8a78;
}
.chroma .vc {
color: #dc8a78;
}
.chroma .vg {
color: #dc8a78;
}
.chroma .vi {
color: #dc8a78;
}
.chroma .vm {
color: #dc8a78;
}
.chroma .na {
color: #1e66f5;
}
.chroma .nb {
color: #04a5e5;
}
.chroma .bp {
color: #04a5e5;
}
.chroma .nx {
color: #4c4f69;
}
.chroma .l {
color: #4c4f69;
}
.chroma .ld {
color: #4c4f69;
}
.chroma .s {
color: #40a02b;
}
.chroma .sc {
color: #40a02b;
}
.chroma .s1 {
color: #40a02b;
}
.chroma .s2 {
color: #40a02b;
}
.chroma .sb {
color: #40a02b;
}
.chroma .sx {
color: #40a02b;
}
.chroma .ss {
color: #40a02b;
}
.chroma .si {
color: #40a02b;
}
.chroma .sa {
color: #d20f39;
}
.chroma .dl {
color: #1e66f5;
}
.chroma .se {
color: #1e66f5;
}
.chroma .sr {
color: #179299;
}
.chroma .sd {
color: #9ca0b0;
}
.chroma .sh {
color: #9ca0b0;
}
.chroma .m {
color: #fe640b;
}
.chroma .mb {
color: #fe640b;
}
.chroma .mh {
color: #fe640b;
}
.chroma .mi {
color: #fe640b;
}
.chroma .mf {
color: #fe640b;
}
.chroma .il {
color: #fe640b;
}
.chroma .mo {
color: #fe640b;
}
.chroma .o {
color: #04a5e5;
font-weight: bold;
}
.chroma .ow {
color: #04a5e5;
font-weight: bold;
}
.chroma .c {
color: #9ca0b0;
font-style: italic;
}
.chroma .c1 {
color: #9ca0b0;
font-style: italic;
}
.chroma .cm {
color: #9ca0b0;
font-style: italic;
}
.chroma .cs {
color: #9ca0b0;
font-style: italic;
}
.chroma .ch {
color: #acb0be;
font-style: italic;
}
.chroma .cp {
color: #9ca0b0;
font-style: italic;
}
.chroma .cpf {
color: #9ca0b0;
font-weight: bold;
}
.chroma .g {
color: #4c4f69;
}
.chroma .gi {
color: #40a02b;
background-color: #ccd0da;
}
.chroma .gd {
color: #d20f39;
background-color: #ccd0da;
}
.chroma .ge {
color: #4c4f69;
font-style: italic;
}
.chroma .gs {
color: #4c4f69;
font-weight: bold;
}
.chroma .gl {
color: #4c4f69;
text-decoration: underline;
}
.chroma .gh {
color: #fe640b;
font-weight: bold;
}
.chroma .gu {
color: #fe640b;
font-weight: bold;
}
.chroma .go {
color: #4c4f69;
}
.chroma .gp {
color: #4c4f69;
}
.chroma .gr {
color: #d20f39;
}
.chroma .gt {
color: #d20f39;
}

251
public/css/catppuccin-macchiato.css vendored Normal file
View File

@@ -0,0 +1,251 @@
.chroma .cl {
color: #cad3f5;
}
.chroma .err {
color: #ed8796;
}
.chroma .x {
color: #cad3f5;
}
.chroma .hl {
background-color: #494d64;
}
.chroma .lnt {
color: #8087a2;
}
.chroma .ln {
color: #8087a2;
}
.chroma .k {
color: #c6a0f6;
}
.chroma .kr {
color: #c6a0f6;
}
.chroma .kp {
color: #c6a0f6;
}
.chroma .kc {
color: #f5a97f;
}
.chroma .kd {
color: #ed8796;
}
.chroma .kn {
color: #8bd5ca;
}
.chroma .kt {
color: #ed8796;
}
.chroma .n {
color: #cad3f5;
}
.chroma .nc {
color: #eed49f;
}
.chroma .no {
color: #eed49f;
}
.chroma .nd {
color: #8aadf4;
font-weight: bold;
}
.chroma .ni {
color: #8bd5ca;
}
.chroma .ne {
color: #f5a97f;
}
.chroma .nf {
color: #8aadf4;
}
.chroma .fm {
color: #8aadf4;
}
.chroma .nl {
color: #91d7e3;
}
.chroma .nn {
color: #f5a97f;
}
.chroma .py {
color: #f5a97f;
}
.chroma .nt {
color: #c6a0f6;
}
.chroma .nv {
color: #f4dbd6;
}
.chroma .vc {
color: #f4dbd6;
}
.chroma .vg {
color: #f4dbd6;
}
.chroma .vi {
color: #f4dbd6;
}
.chroma .vm {
color: #f4dbd6;
}
.chroma .na {
color: #8aadf4;
}
.chroma .nb {
color: #91d7e3;
}
.chroma .bp {
color: #91d7e3;
}
.chroma .nx {
color: #cad3f5;
}
.chroma .l {
color: #cad3f5;
}
.chroma .ld {
color: #cad3f5;
}
.chroma .s {
color: #a6da95;
}
.chroma .sc {
color: #a6da95;
}
.chroma .s1 {
color: #a6da95;
}
.chroma .s2 {
color: #a6da95;
}
.chroma .sb {
color: #a6da95;
}
.chroma .sx {
color: #a6da95;
}
.chroma .ss {
color: #a6da95;
}
.chroma .si {
color: #a6da95;
}
.chroma .sa {
color: #ed8796;
}
.chroma .dl {
color: #8aadf4;
}
.chroma .se {
color: #8aadf4;
}
.chroma .sr {
color: #8bd5ca;
}
.chroma .sd {
color: #6e738d;
}
.chroma .sh {
color: #6e738d;
}
.chroma .m {
color: #f5a97f;
}
.chroma .mb {
color: #f5a97f;
}
.chroma .mh {
color: #f5a97f;
}
.chroma .mi {
color: #f5a97f;
}
.chroma .mf {
color: #f5a97f;
}
.chroma .il {
color: #f5a97f;
}
.chroma .mo {
color: #f5a97f;
}
.chroma .o {
color: #91d7e3;
font-weight: bold;
}
.chroma .ow {
color: #91d7e3;
font-weight: bold;
}
.chroma .c {
color: #6e738d;
font-style: italic;
}
.chroma .c1 {
color: #6e738d;
font-style: italic;
}
.chroma .cm {
color: #6e738d;
font-style: italic;
}
.chroma .cs {
color: #6e738d;
font-style: italic;
}
.chroma .ch {
color: #5b6078;
font-style: italic;
}
.chroma .cp {
color: #6e738d;
font-style: italic;
}
.chroma .cpf {
color: #6e738d;
font-weight: bold;
}
.chroma .g {
color: #cad3f5;
}
.chroma .gi {
color: #a6da95;
background-color: #363a4f;
}
.chroma .gd {
color: #ed8796;
background-color: #363a4f;
}
.chroma .ge {
color: #cad3f5;
font-style: italic;
}
.chroma .gs {
color: #cad3f5;
font-weight: bold;
}
.chroma .gl {
color: #cad3f5;
text-decoration: underline;
}
.chroma .gh {
color: #f5a97f;
font-weight: bold;
}
.chroma .gu {
color: #f5a97f;
font-weight: bold;
}
.chroma .go {
color: #cad3f5;
}
.chroma .gp {
color: #cad3f5;
}
.chroma .gr {
color: #ed8796;
}
.chroma .gt {
color: #ed8796;
}

4
public/css/dark.css vendored Normal file
View File

@@ -0,0 +1,4 @@
@import "highlight.js/styles/github-dark.css";
@import "@catppuccin/highlightjs/css/catppuccin-macchiato.css";
@import "github-markdown-css/github-markdown-dark.css";
@import './catppuccin-macchiato.css';

53
public/css/embed.css vendored Normal file
View File

@@ -0,0 +1,53 @@
@plugin "@tailwindcss/typography";
@plugin "@tailwindcss/forms";
@custom-variant dark (&:where(.dark, .dark *));
@source "../../templates/pages/gist_embed.html";
@theme {
/* Custom gray palette */
--color-gray-50: #EEEFF1;
--color-gray-100: #DEDFE3;
--color-gray-200: #BABCC5;
--color-gray-300: #999CA8;
--color-gray-400: #75798A;
--color-gray-500: #585B68;
--color-gray-600: #464853;
--color-gray-700: #363840;
--color-gray-800: #232429;
--color-gray-900: #131316;
/* Primary color palette */
--color-primary-50: #d6e1ff;
--color-primary-100: #d1dfff;
--color-primary-200: #b9d2fe;
--color-primary-300: #84b1fb;
--color-primary-400: #74a4f6;
--color-primary-500: #588fee;
--color-primary-600: #3c79e2;
--color-primary-700: #356fc0;
--color-primary-800: #2b5da3;
--color-primary-900: #1f4b8c;
--color-primary-950: #192b57;
/* Border width extension */
--border-width-1: 1px;
}
.opengist-embed {
@import "tailwindcss";
@layer base {
ul, ol {
list-style: revert;
}
button:not(:disabled),
[role="button"]:not(:disabled) {
cursor: pointer;
}
@import './ipynb.css';
@import "./style.css";
}
}

View File

@@ -1,3 +1,5 @@
@import "katex/dist/katex.min.css";
.jupyter.notebook {
padding: 0.5rem;
}

4
public/css/light.css vendored Normal file
View File

@@ -0,0 +1,4 @@
@import "highlight.js/styles/github.min.css";
@import "@catppuccin/highlightjs/css/catppuccin-latte.css";
@import "github-markdown-css/github-markdown.css";
@import './catppuccin-latte.css';

View File

@@ -1,15 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@config "./tailwind.config.js";
@layer base {
ul, ol {
list-style: revert;
}
}
:root {
--red-diff: rgba(255, 0, 0, .1);
--green-diff: rgba(0, 255, 128, .1);
@@ -20,10 +8,6 @@ html {
@apply bg-gray-50 dark:bg-gray-800;
}
a {
@apply text-primary-500;
}
p a:hover, h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
@apply underline;
}
@@ -33,7 +17,7 @@ input {
}
:not(pre) > code[class*="language-"], pre[class*="language-"] {
@apply bg-white dark:bg-gray-900 mt-1 pt-1 !important;
@apply bg-white dark:bg-gray-900 mt-1 pt-1;
}
pre {
@@ -50,6 +34,11 @@ pre {
vertical-align: top;
}
code.hljs {
background: transparent !important;
}
.red-diff {
background-color: var(--red-diff);
}
@@ -60,24 +49,23 @@ pre {
.gray-diff {
background-color: var(--git-diff);
@apply py-4 !important
@apply py-4;
}
#logged-button:hover .username {
@apply hidden !important
@apply hidden;
}
#logged-button:hover .logout {
@apply block !important
@apply block;
}
.cm-line, .cm-gutter {
@apply bg-white dark:bg-gray-900 dark:caret-white caret-slate-700 !important;
padding: 0 !important;
@apply bg-white dark:bg-gray-900 dark:caret-white caret-slate-700 px-1;
}
.cm-activeLine, .cm-activeLineGutter {
@apply bg-gray-50 dark:bg-gray-800 !important;
@apply bg-gray-50 dark:bg-gray-800;
}
.cm-gutters {
@@ -85,7 +73,7 @@ pre {
}
.cm-gutterElement {
@apply text-gray-700 dark:text-gray-300 px-4 !important
@apply text-gray-700 dark:text-gray-300 px-4;
}
.code td {
@@ -118,7 +106,7 @@ pre {
}
.line-code {
@apply pl-2;
@apply pl-2 dark:text-slate-300 text-slate-700;
background: none !important;
}
@@ -159,27 +147,27 @@ dl.dl-config dd {
}
.markdown-body {
@apply dark:bg-gray-900 !important;
@apply dark:bg-gray-900;
}
.markdown-body pre {
@apply flex relative items-start p-0 !important;
@apply flex relative items-start p-0;
}
.markdown-body .code-div {
@apply p-4 max-w-full overflow-x-auto !important;
@apply p-4 max-w-full overflow-x-auto;
}
.markdown-body code {
@apply overflow-auto whitespace-pre !important;
@apply overflow-auto whitespace-pre;
}
.markdown-body img {
@apply bg-transparent dark:bg-transparent !important;
@apply bg-transparent dark:bg-transparent;
}
.chroma.preview.markdown pre code {
@apply p-4 !important;
@apply p-4;
}
.mermaid {
@@ -187,7 +175,7 @@ dl.dl-config dd {
}
.hidden-important {
@apply hidden !important;
@apply hidden;
}
/*
@@ -196,10 +184,9 @@ dl.dl-config dd {
* Jupyter usually outputs images with transparent or light backgrounds.
*/
.dark .jupyter-output img {
background-color: #888;
background-color: #888;
}
.pdfobject-container {
@apply min-h-[700px] h-[700px] !important;
@apply min-h-[700px] h-[700px];
}

57
public/css/tailwind.css vendored Normal file
View File

@@ -0,0 +1,57 @@
@import "tailwindcss";
@import './ipynb.css';
@plugin "@tailwindcss/typography";
@plugin "@tailwindcss/forms";
@custom-variant dark (&:where(.dark, .dark *));
@source "../../templates/**/*.html";
@theme {
/* Custom gray palette */
--color-gray-50: #EEEFF1;
--color-gray-100: #DEDFE3;
--color-gray-200: #BABCC5;
--color-gray-300: #999CA8;
--color-gray-400: #75798A;
--color-gray-500: #585B68;
--color-gray-600: #464853;
--color-gray-700: #363840;
--color-gray-800: #232429;
--color-gray-900: #131316;
/* Primary color palette */
--color-primary-50: #d6e1ff;
--color-primary-100: #d1dfff;
--color-primary-200: #b9d2fe;
--color-primary-300: #84b1fb;
--color-primary-400: #74a4f6;
--color-primary-500: #588fee;
--color-primary-600: #3c79e2;
--color-primary-700: #356fc0;
--color-primary-800: #2b5da3;
--color-primary-900: #1f4b8c;
--color-primary-950: #192b57;
/* Border width extension */
--border-width-1: 1px;
}
@layer base {
ul, ol {
list-style: revert;
}
a {
@apply text-primary-500;
}
button:not(:disabled),
[role="button"]:not(:disabled) {
cursor: pointer;
}
@import "./style.css";
}

116
public/embed.scss vendored
View File

@@ -1,116 +0,0 @@
@import "github-markdown-css/github-markdown-light";
@import './catppuccin-latte';
.dark {
@import "github-markdown-css/github-markdown-dark";
@import './catppuccin-macchiato';
}
@tailwind base;
@tailwind components;
@tailwind utilities;
@config "./tailwind-embed.config.js";
.html {
-webkit-text-size-adjust: 100%;
font-feature-settings: normal;
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
font-variation-settings: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4
}
ol, ul {
list-style: revert;
}
.code {
font-family: Menlo, Consolas, Liberation Mono, monospace;
}
.code .line-num {
width: 4%;
text-align: right;
}
.code td {
padding-top: 0 !important;
padding-bottom: 0 !important;
}
.code tbody {
line-height: 18.2px;
}
.line-code {
@apply pl-2;
background: none !important;
}
.line-num {
@apply cursor-pointer text-slate-600 dark:text-slate-400 hover:text-black dark:hover:text-white;
}
table.csv-table {
@apply w-full whitespace-pre text-xs text-slate-300;
}
table.csv-table thead {
text-align: left;
}
table.csv-table thead tr {
@apply bg-slate-100 dark:bg-slate-800;
}
table.csv-table tbody tr {
@apply bg-gray-500 dark:bg-gray-900;
}
table.csv-table thead tr th {
@apply border py-2 px-1 border-slate-300 dark:border-slate-700;
}
table.csv-table tbody td {
@apply border py-1.5 px-1 border-slate-200 dark:border-slate-800;
}
dl.dl-config {
@apply grid grid-cols-3 text-sm;
}
dl.dl-config dt {
@apply col-span-1 text-gray-700 dark:text-slate-300 font-bold;
}
dl.dl-config dd {
@apply ml-1 col-span-2 break-words;
}
.markdown-body {
@apply dark:bg-gray-900;
}
.markdown-body pre {
@apply flex relative items-start p-0;
}
.markdown-body .code-div {
@apply p-4 max-w-full overflow-x-auto;
}
.markdown-body code {
@apply overflow-auto whitespace-pre;
}
.markdown-body img {
@apply bg-transparent dark:bg-transparent;
}
.chroma.preview.markdown pre code {
@apply p-4;
}

View File

@@ -1 +0,0 @@
import "./embed.scss"

View File

@@ -4,5 +4,5 @@ package public
import "embed"
//go:embed manifest.json assets/*.js assets/*.css assets/*.svg assets/*.png assets/*.ttf assets/*.woff assets/*.woff2
//go:embed .vite/manifest.json assets/*.js assets/*.css assets/*.svg assets/*.png assets/*.ttf assets/*.woff assets/*.woff2
var Files embed.FS

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -1,12 +0,0 @@
module.exports = {
plugins: {
'postcss-import': {},
'tailwindcss/nesting': {},
tailwindcss: {
config: "./public/tailwind.config.js",
},
autoprefixer: {},
'postcss-selector-namespace': {namespace() {return (process.env.EMBED) ? '.opengist-embed' : '';}},
cssnano: {},
},
}

16
public/style.scss vendored
View File

@@ -1,16 +0,0 @@
@import "katex/dist/katex.min.css";
:root {
@import "highlight.js/scss/github";
@import "github-markdown-css/github-markdown-light";
@import './catppuccin-latte';
@import './ipynb';
}
.dark {
@import "highlight.js/scss/github-dark";
@import "github-markdown-css/github-markdown-dark";
@import './catppuccin-macchiato';
}
@import "style.css";

View File

@@ -1,50 +0,0 @@
const colors = require('tailwindcss/colors')
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./templates/pages/gist_embed.html",
],
theme: {
colors: {
transparent: 'transparent',
current: 'currentColor',
white: colors.white,
black: colors.black,
gray: {
50: "#EEEFF1",
100: "#DEDFE3",
200: "#BABCC5",
300: "#999CA8",
400: "#75798A",
500: "#585B68",
600: "#464853",
700: "#363840",
800: "#232429",
900: "#131316"
},
primary: {
50: '#d6e1ff',
100: '#d1dfff',
200: '#b9d2fe',
300: '#84b1fb',
400: '#74a4f6',
500: '#588fee',
600: '#3c79e2',
700: '#356fc0',
800: '#2b5da3',
900: '#1f4b8c',
950: '#192b57'
},
slate: colors.slate
},
extend: {
borderWidth: {
'1': '1px',
}
},
},
plugins: [],
darkMode: 'class',
}

View File

@@ -1,52 +0,0 @@
const colors = require('tailwindcss/colors')
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./templates/**/*.html",
],
theme: {
colors: {
transparent: 'transparent',
current: 'currentColor',
white: colors.white,
black: colors.black,
yellow: colors.yellow,
gray: {
50: "#EEEFF1",
100: "#DEDFE3",
200: "#BABCC5",
300: "#999CA8",
400: "#75798A",
500: "#585B68",
600: "#464853",
700: "#363840",
800: "#232429",
900: "#131316"
},
rose: colors.rose,
primary: {
50: '#d6e1ff',
100: '#d1dfff',
200: '#b9d2fe',
300: '#84b1fb',
400: '#74a4f6',
500: '#588fee',
600: '#3c79e2',
700: '#356fc0',
800: '#2b5da3',
900: '#1f4b8c',
950: '#192b57'
},
slate: colors.slate
},
extend: {
borderWidth: {
'1': '1px',
}
},
},
plugins: [require("@tailwindcss/typography"),require('@tailwindcss/forms')],
darkMode: 'class',
}

1
public/ts/auto.ts Normal file
View File

@@ -0,0 +1 @@
import '../css/auto.css'

1
public/ts/dark.ts Normal file
View File

@@ -0,0 +1 @@
import '../css/dark.css'

1
public/ts/embed.ts Normal file
View File

@@ -0,0 +1 @@
import "../css/embed.css"

View File

@@ -1,4 +1,4 @@
import './ipynb';
import '../ts/ipynb.ts';
import PDFObject from 'pdfobject';
document.querySelectorAll<HTMLElement>('.table-code').forEach((el) => {

View File

@@ -1,6 +1,6 @@
import hljs from 'highlight.js';
import latex from './latex';
import showdown from 'showdown';
import { marked } from 'marked';
class IPynb {
private element: HTMLElement;
@@ -90,9 +90,8 @@ class IPynb {
switch (cell.cell_type) {
case 'markdown':
const converter = new showdown.Converter();
cellElement.classList.add('markdown-cell');
cellElement.innerHTML = `<div class="markdown-body">${converter.makeHtml(latex.render(source))}</div>`;
cellElement.innerHTML = `<div class="markdown-body">${marked.parse(latex.render(source))}</div>`;
break;
case 'code':
cellElement.classList.add('code-cell');

1
public/ts/light.ts Normal file
View File

@@ -0,0 +1 @@
import '../css/light.css'

View File

@@ -1,43 +1,13 @@
import './style.scss';
import './favicon-32.png';
import './opengist.svg';
import '../css/tailwind.css';
import '../img/favicon-32.png';
import '../img/opengist.svg';
import jdenticon from 'jdenticon/standalone';
jdenticon.update("[data-jdenticon-value]")
document.addEventListener('DOMContentLoaded', () => {
const themeMenu = document.getElementById('theme-menu')!;
document.getElementById('light-mode')!.onclick = (e) => {
e.stopPropagation()
localStorage.theme = 'light';
themeMenu.classList.toggle('hidden');
// @ts-ignore
checkTheme()
}
document.getElementById('dark-mode')!.onclick = (e) => {
e.stopPropagation()
localStorage.theme = 'dark';
themeMenu.classList.toggle('hidden');
// @ts-ignore
checkTheme()
}
document.getElementById('system-mode')!.onclick = (e) => {
e.stopPropagation()
localStorage.removeItem('theme');
themeMenu.classList.toggle('hidden');
// @ts-ignore
checkTheme();
}
document.getElementById('theme-btn')!.onclick = () => {
themeMenu.classList.toggle('hidden');
}
document.getElementById('user-btn')?.addEventListener("click" , () => {
document.getElementById('user-menu').classList.toggle('hidden');
document.getElementById('user-menu')!.classList.toggle('hidden');
})
document.querySelectorAll('form').forEach((form: HTMLFormElement) => {

View File

@@ -1,12 +1,9 @@
{
"compilerOptions": {
"esModuleInterop": true
"esModuleInterop": true,
},
"files": [
"main.ts",
"editor.ts",
"admin.ts",
"gist.ts",
"embed.ts",
"include": [
"**/*.ts",
],
}

27
public/vite.config.js vendored
View File

@@ -1,8 +1,16 @@
import { defineConfig } from 'vite'
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
root: './public',
plugins: [
tailwindcss(),
],
server: {
cors: {
origin: 'http://localhost:6157',
},
},
build: {
// generate manifest.json in outDir
outDir: '',
@@ -10,13 +18,16 @@ export default defineConfig({
manifest: true,
rollupOptions: {
input: [
'./public/main.ts',
'./public/editor.ts',
'./public/admin.ts',
'./public/gist.ts',
'./public/embed.ts',
'./public/webauthn.ts',
'./public/style_preferences.ts'
'./public/ts/admin.ts',
'./public/ts/auto.ts',
'./public/ts/dark.ts',
'./public/ts/editor.ts',
'./public/ts/embed.ts',
'./public/ts/gist.ts',
'./public/ts/light.ts',
'./public/ts/main.ts',
'./public/ts/style_preferences.ts',
'./public/ts/webauthn.ts',
]
},
assetsInlineLimit: 0,