all repos — website @ 81b11dd0cc9103cbd69f3547c17b04fd30896b1b

personal website hosted at prithu.xyz, built using hugo

style: add highlight syntax.css

also,
- change width of the blog text area
- change border-bottom for links
Prithu Goswami pg@prithu.dev
Sun, 18 Feb 2024 23:04:08 +0530
commit

81b11dd0cc9103cbd69f3547c17b04fd30896b1b

parent

827ca1bf59403fde72d54af5692b1ebadaff8805

5 files changed, 101 insertions(+), 4 deletions(-)

jump to
M config.tomlconfig.toml

@@ -6,3 +6,8 @@

[author] name = "Prithu Goswami" email = "prithu@prithu.dev" + +[markup] + [markup.highlight] + noClasses = false +
M layouts/posts/single.htmllayouts/posts/single.html

@@ -1,7 +1,7 @@

{{ partial "head.html" . }} <body class="theme-auto"> {{ partial "nav.html" }} - <div class="bcontainer"> + <div class="bcontainer" style="max-width:720px"> <div class="bcontent"> <h1>{{ .Title }}</h1> <p class="post-date">{{ .Date.Format "02 January, 2006" }}</p>

@@ -10,6 +10,7 @@ {{ range .Params.tags }}

<div class=post-label>{{ . }}</div> {{ end }} </div> + {{ partial "toc.html" . }} <div class="post-text"> {{ .Content }} </div>
M static/css/blog.cssstatic/css/blog.css

@@ -1,7 +1,8 @@

@import url('https://rsms.me/inter/inter.css'); +@import url('syntax.css'); .bcontainer{ - max-width: 720px; + max-width: 664px; width: 100%; margin: 2rem auto; justify-content: center;

@@ -134,7 +135,11 @@ margin-bottom: 1rem;

} .post-text a { - border-bottom: 2px solid #008aff80; + border-bottom: 2.7px solid #008aff80; +} + +.post-text a code { + border-bottom: 1.7px solid #008aff80; } .post-text a:hover {
M static/css/main.cssstatic/css/main.css

@@ -16,7 +16,7 @@ color: var(--text-primary);

} ::selection { - background-color: var(--text); + background-color: #008aff; color: var(--bg); }
A static/css/syntax.css

@@ -0,0 +1,86 @@

+/* Background */ .bg { color: #e6edf3; background-color: #0d1117; } +/* PreWrapper */ .post-text .chroma { color: #e6edf3; background-color: #0d1117; } +/* Other */ .chroma .x { } +/* Error */ .chroma .err { color: #f85149 } +/* CodeLine */ .chroma .cl { } +/* 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: #6e7681 } +/* 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: #737679 } +/* 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: #6e7681 } +/* Line */ .chroma .line { display: flex; } +/* Keyword */ .chroma .k { color: #ff7b72 } +/* KeywordConstant */ .chroma .kc { color: #79c0ff } +/* KeywordDeclaration */ .chroma .kd { color: #ff7b72 } +/* KeywordNamespace */ .chroma .kn { color: #ff7b72 } +/* KeywordPseudo */ .chroma .kp { color: #79c0ff } +/* KeywordReserved */ .chroma .kr { color: #ff7b72 } +/* KeywordType */ .chroma .kt { color: #ff7b72 } +/* Name */ .chroma .n { } +/* NameAttribute */ .chroma .na { } +/* NameBuiltin */ .chroma .nb { } +/* NameBuiltinPseudo */ .chroma .bp { } +/* NameClass */ .chroma .nc { color: #f0883e; font-weight: bold } +/* NameConstant */ .chroma .no { color: #79c0ff; font-weight: bold } +/* NameDecorator */ .chroma .nd { color: #d2a8ff; font-weight: bold } +/* NameEntity */ .chroma .ni { color: #ffa657 } +/* NameException */ .chroma .ne { color: #f0883e; font-weight: bold } +/* NameFunction */ .chroma .nf { color: #7aa5e8; font-weight: bold } +/* NameFunctionMagic */ .chroma .fm { } +/* NameLabel */ .chroma .nl { color: #79c0ff; font-weight: bold } +/* NameNamespace */ .chroma .nn { color: #ff7b72 } +/* NameOther */ .chroma .nx { } +/* NameProperty */ .chroma .py { color: #79c0ff } +/* NameTag */ .chroma .nt { color: #7ee787 } +/* NameVariable */ .chroma .nv { color: #79c0ff } +/* NameVariableClass */ .chroma .vc { } +/* NameVariableGlobal */ .chroma .vg { } +/* NameVariableInstance */ .chroma .vi { } +/* NameVariableMagic */ .chroma .vm { } +/* Literal */ .chroma .l { color: #a5d6ff } +/* LiteralDate */ .chroma .ld { color: #79c0ff } +/* LiteralString */ .chroma .s { color: #ffcec9 } +/* LiteralStringAffix */ .chroma .sa { color: #79c0ff } +/* LiteralStringBacktick */ .chroma .sb { color: #a5d6ff } +/* LiteralStringChar */ .chroma .sc { color: #a5d6ff } +/* LiteralStringDelimiter */ .chroma .dl { color: #79c0ff } +/* LiteralStringDoc */ .chroma .sd { color: #a5d6ff } +/* LiteralStringDouble */ .chroma .s2 { color: #a5d6ff } +/* LiteralStringEscape */ .chroma .se { color: #79c0ff } +/* LiteralStringHeredoc */ .chroma .sh { color: #79c0ff } +/* LiteralStringInterpol */ .chroma .si { color: #a5d6ff } +/* LiteralStringOther */ .chroma .sx { color: #a5d6ff } +/* LiteralStringRegex */ .chroma .sr { color: #79c0ff } +/* LiteralStringSingle */ .chroma .s1 { color: #a5d6ff } +/* LiteralStringSymbol */ .chroma .ss { color: #a5d6ff } +/* LiteralNumber */ .chroma .m { color: #a5d6ff } +/* LiteralNumberBin */ .chroma .mb { color: #a5d6ff } +/* LiteralNumberFloat */ .chroma .mf { color: #a5d6ff } +/* LiteralNumberHex */ .chroma .mh { color: #a5d6ff } +/* LiteralNumberInteger */ .chroma .mi { color: #a5d6ff } +/* LiteralNumberIntegerLong */ .chroma .il { color: #a5d6ff } +/* LiteralNumberOct */ .chroma .mo { color: #a5d6ff } +/* Operator */ .chroma .o { color: #b7dbfb; font-weight: bold } +/* OperatorWord */ .chroma .ow { color: #b7dbfb; font-weight: bold } +/* Punctuation */ .chroma .p { } +/* Comment */ .chroma .c { color: #8b949e; font-style: italic } +/* CommentHashbang */ .chroma .ch { color: #8b949e; font-style: italic } +/* CommentMultiline */ .chroma .cm { color: #8b949e; font-style: italic } +/* CommentSingle */ .chroma .c1 { color: #8b949e; font-style: italic } +/* CommentSpecial */ .chroma .cs { color: #8b949e; font-weight: bold; font-style: italic } +/* CommentPreproc */ .chroma .cp { color: #8b949e; font-weight: bold; font-style: italic } +/* CommentPreprocFile */ .chroma .cpf { color: #8b949e; font-weight: bold; font-style: italic } +/* Generic */ .chroma .g { } +/* GenericDeleted */ .chroma .gd { color: #ffa198; background-color: #490202 } +/* GenericEmph */ .chroma .ge { font-style: italic } +/* GenericError */ .chroma .gr { color: #ffa198 } +/* GenericHeading */ .chroma .gh { color: #79c0ff; font-weight: bold } +/* GenericInserted */ .chroma .gi { color: #56d364; background-color: #0f5323 } +/* GenericOutput */ .chroma .go { color: #8b949e } +/* GenericPrompt */ .chroma .gp { color: #8b949e } +/* GenericStrong */ .chroma .gs { font-weight: bold } +/* GenericSubheading */ .chroma .gu { color: #79c0ff } +/* GenericTraceback */ .chroma .gt { color: #ff7b72 } +/* GenericUnderline */ .chroma .gl { text-decoration: underline } +/* TextWhitespace */ .chroma .w { color: #6e7681 }