diff --git a/assets/scss/_syntax.scss b/assets/scss/_syntax.scss new file mode 100644 index 0000000..7fdbfbb --- /dev/null +++ b/assets/scss/_syntax.scss @@ -0,0 +1,86 @@ +/* Background */ .bg { background-color: #f8f8f8; } +/* PreWrapper */ .chroma { background-color: #f8f8f8; padding: 16px; border-radius: 4px;} +/* Other */ .chroma .x { } +/* Error */ .chroma .err { } +/* 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 { background-color: #dfdfdf } +/* 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: #7f7f7f } +/* 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: #7f7f7f } +/* Line */ .chroma .line { display: flex; } +/* Keyword */ .chroma .k { color: #aa22ff; font-weight: bold } +/* KeywordConstant */ .chroma .kc { color: #aa22ff; font-weight: bold } +/* KeywordDeclaration */ .chroma .kd { color: #aa22ff; font-weight: bold } +/* KeywordNamespace */ .chroma .kn { color: #aa22ff; font-weight: bold } +/* KeywordPseudo */ .chroma .kp { color: #aa22ff } +/* KeywordReserved */ .chroma .kr { color: #aa22ff; font-weight: bold } +/* KeywordType */ .chroma .kt { color: #00bb00; font-weight: bold } +/* Name */ .chroma .n { } +/* NameAttribute */ .chroma .na { color: #bb4444 } +/* NameBuiltin */ .chroma .nb { color: #aa22ff } +/* NameBuiltinPseudo */ .chroma .bp { } +/* NameClass */ .chroma .nc { color: #0000ff } +/* NameConstant */ .chroma .no { color: #880000 } +/* NameDecorator */ .chroma .nd { color: #aa22ff } +/* NameEntity */ .chroma .ni { color: #999999; font-weight: bold } +/* NameException */ .chroma .ne { color: #d2413a; font-weight: bold } +/* NameFunction */ .chroma .nf { color: #00a000 } +/* NameFunctionMagic */ .chroma .fm { } +/* NameLabel */ .chroma .nl { color: #a0a000 } +/* NameNamespace */ .chroma .nn { color: #0000ff; font-weight: bold } +/* NameOther */ .chroma .nx { } +/* NameProperty */ .chroma .py { } +/* NameTag */ .chroma .nt { color: #008000; font-weight: bold } +/* NameVariable */ .chroma .nv { color: #b8860b } +/* NameVariableClass */ .chroma .vc { } +/* NameVariableGlobal */ .chroma .vg { } +/* NameVariableInstance */ .chroma .vi { } +/* NameVariableMagic */ .chroma .vm { } +/* Literal */ .chroma .l { } +/* LiteralDate */ .chroma .ld { } +/* LiteralString */ .chroma .s { color: #bb4444 } +/* LiteralStringAffix */ .chroma .sa { color: #bb4444 } +/* LiteralStringBacktick */ .chroma .sb { color: #bb4444 } +/* LiteralStringChar */ .chroma .sc { color: #bb4444 } +/* LiteralStringDelimiter */ .chroma .dl { color: #bb4444 } +/* LiteralStringDoc */ .chroma .sd { color: #bb4444; font-style: italic } +/* LiteralStringDouble */ .chroma .s2 { color: #bb4444 } +/* LiteralStringEscape */ .chroma .se { color: #bb6622; font-weight: bold } +/* LiteralStringHeredoc */ .chroma .sh { color: #bb4444 } +/* LiteralStringInterpol */ .chroma .si { color: #bb6688; font-weight: bold } +/* LiteralStringOther */ .chroma .sx { color: #008000 } +/* LiteralStringRegex */ .chroma .sr { color: #bb6688 } +/* LiteralStringSingle */ .chroma .s1 { color: #bb4444 } +/* LiteralStringSymbol */ .chroma .ss { color: #b8860b } +/* LiteralNumber */ .chroma .m { color: #666666 } +/* LiteralNumberBin */ .chroma .mb { color: #666666 } +/* LiteralNumberFloat */ .chroma .mf { color: #666666 } +/* LiteralNumberHex */ .chroma .mh { color: #666666 } +/* LiteralNumberInteger */ .chroma .mi { color: #666666 } +/* LiteralNumberIntegerLong */ .chroma .il { color: #666666 } +/* LiteralNumberOct */ .chroma .mo { color: #666666 } +/* Operator */ .chroma .o { color: #666666 } +/* OperatorWord */ .chroma .ow { color: #aa22ff; font-weight: bold } +/* Punctuation */ .chroma .p { } +/* Comment */ .chroma .c { color: #008800; font-style: italic } +/* CommentHashbang */ .chroma .ch { color: #008800; font-style: italic } +/* CommentMultiline */ .chroma .cm { color: #008800; font-style: italic } +/* CommentSingle */ .chroma .c1 { color: #008800; font-style: italic } +/* CommentSpecial */ .chroma .cs { color: #008800; font-weight: bold } +/* CommentPreproc */ .chroma .cp { color: #008800 } +/* CommentPreprocFile */ .chroma .cpf { color: #008800 } +/* Generic */ .chroma .g { } +/* GenericDeleted */ .chroma .gd { color: #a00000 } +/* GenericEmph */ .chroma .ge { font-style: italic } +/* GenericError */ .chroma .gr { color: #ff0000 } +/* GenericHeading */ .chroma .gh { color: #000080; font-weight: bold } +/* GenericInserted */ .chroma .gi { color: #00a000 } +/* GenericOutput */ .chroma .go { color: #888888 } +/* GenericPrompt */ .chroma .gp { color: #000080; font-weight: bold } +/* GenericStrong */ .chroma .gs { font-weight: bold } +/* GenericSubheading */ .chroma .gu { color: #800080; font-weight: bold } +/* GenericTraceback */ .chroma .gt { color: #0044dd } +/* GenericUnderline */ .chroma .gl { text-decoration: underline } +/* TextWhitespace */ .chroma .w { color: #bbbbbb } diff --git a/assets/scss/style.scss b/assets/scss/style.scss index c98fc03..e4778bf 100644 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -1,3 +1,5 @@ +@import "_syntax.scss"; + #page { height: 100vh; margin: 0 @@ -9,11 +11,11 @@ flex-direction: column; align-items: start; justify-content: space-between; - max-width: 400px; + max-width: 720px; margin: auto; font-size: 1.5rem; - @media (max-width: 448px) { + @media (max-width: 768px) { margin-left: 24px; } } @@ -170,7 +172,7 @@ } #site-footer { - width: 400px; + width: 100%; user-select: none; #copyright { @@ -180,7 +182,6 @@ } } - #home-footer { width: 400px; } @@ -196,3 +197,7 @@ } } } + +.content { + max-width: 720px; +} diff --git a/config.toml b/config.toml index f3bde3b..905d9f4 100644 --- a/config.toml +++ b/config.toml @@ -11,6 +11,21 @@ rssLimit = 10 # Maximum number of items in the RSS feed. enableEmoji = true paginate = 5 +[markup] + [markup.highlight] + anchorLineNos = false + codeFences = true + guessSyntax = false + hl_Lines = '' + hl_inline = false + lineAnchors = '' + lineNoStart = 1 + lineNos = false + lineNumbersInTable = true + noClasses = true + style = 'emacs' + tabWidth = 4 + [languages] [languages.tr] disabled = false @@ -51,7 +66,7 @@ paginate = 5 code_copy_button = true # Turn on/off the code-copy-button for code-fields # Add custom css - # customCSS = ["css/foo.css", "css/bar.css"] + # customCSS = ["css/syntax.css"] [params.author] name = "Furkan Erdem" diff --git a/content/posts/goisforlovers.en.md b/content/posts/goisforlovers.en.md index 76668cd..a5d639d 100644 --- a/content/posts/goisforlovers.en.md +++ b/content/posts/goisforlovers.en.md @@ -8,10 +8,9 @@ tags = [ "development", ] date = "2014-04-02" -toc = true +++ -Hugo uses the excellent [Go][] [html/template][gohtmltemplate] library for +Hugo and uses the excellent [Go][] [html/template][gohtmltemplate] library for its template engine. It is an extremely lightweight engine that provides a very small amount of logic. In our experience that it is just the right amount of logic to be able to create a good static website. If you have used other @@ -40,7 +39,9 @@ functions. Accessing a predefined variable "foo": - {{ foo }} +```go +{{ foo }} asdadasdasad +``` **Parameters are separated using spaces** diff --git a/content/posts/goisforlovers.md b/content/posts/goisforlovers.md index 76668cd..7ef92a5 100644 --- a/content/posts/goisforlovers.md +++ b/content/posts/goisforlovers.md @@ -40,7 +40,15 @@ functions. Accessing a predefined variable "foo": - {{ foo }} +```go +package main + +import "fmt" + +func main() { + fmt.Println("hello world") +} +``` **Parameters are separated using spaces** diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 7bc1621..fdd40d2 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -40,7 +40,6 @@ - {{ $main := resources.Get "js/main.js" -}} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index bcf91a3..7b99f8f 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -8,9 +8,6 @@ {{ if (or .Params.images .Params.featuredImg) -}} {{- end }} - {{- with .Params.toc -}} - - {{- end }} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index d221abb..b6028d1 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -19,8 +19,16 @@
-

{{ .Title }}

+ + {{- with .Params.tags }} +

+ + {{- range . -}} + {{.}} + {{- end }} +

+ {{- end }}
{{ .Content | replaceRE "()" `${1}${3}` | safeHTML }} @@ -33,14 +41,6 @@ {{- with $.Param "author" }}

{{ . }}

{{- end }} - {{- with .Params.tags }} -

- - {{- range . -}} - {{.}} - {{- end }} -

- {{- end }}

{{ i18n "wordCount" . }}

{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}

{{- if and .GitInfo .Site.Params.gitUrl }} diff --git a/resources/_gen/assets/scss/scss/style.scss_871e1d33253f63f556fbcaa4227752be.content b/resources/_gen/assets/scss/scss/style.scss_871e1d33253f63f556fbcaa4227752be.content index 5d4eb6c..353f3e7 100644 --- a/resources/_gen/assets/scss/scss/style.scss_871e1d33253f63f556fbcaa4227752be.content +++ b/resources/_gen/assets/scss/scss/style.scss_871e1d33253f63f556fbcaa4227752be.content @@ -1 +1 @@ -#page{height:100vh;margin:0}#spotlight{display:flex;min-height:100vh;flex-direction:column;align-items:start;justify-content:space-between;max-width:400px;margin:auto;font-size:1.5rem}@media(max-width:448px){#spotlight{margin-left:24px}}#home-center{display:flex;flex-direction:column;flex-grow:1;align-items:flex-start;margin-top:10vh}#home-title{color:#202020;font-family:Inter;font-size:48px;font-style:normal;font-weight:500;line-height:normal}#home-nav{display:flex;flex-direction:column}#home-nav a{color:#252525;font-family:Inter;font-size:40px;font-style:normal;font-weight:400;line-height:150%;text-decoration-line:underline}.post-item .post-day,.post-item a{color:#252525;font-family:Inter;font-size:40px;font-style:normal;font-weight:400;line-height:150%;text-decoration-line:underline}#site-footer,#home-footer{width:100%}#site-footer p,#home-footer p{color:#5c5c5c;font-family:Inter;font-size:20px;font-style:normal;font-weight:300;line-height:normal;display:flex;gap:8px;justify-content:center}#site-footer a,#home-footer a{color:#5c5c5c;font-family:Inter;font-size:20px;font-style:normal;font-weight:300;line-height:normal;display:flex;gap:8px;justify-content:center;text-decoration:none}#site-footer a:hover,#home-footer a:hover{text-decoration:underline}.posts-group{width:400px}.back-title{font-family:Inter;font-size:20px;font-style:normal;font-weight:400}.back-title a{text-decoration:none;color:#252525}.back-title a:hover{text-decoration:underline;color:#151515}.post-item{display:flex;justify-content:space-between;align-items:center;width:100%}.post-item a{font-size:30px}.post-item .post-day{font-size:30px;text-decoration:none;color:#787878}.pagination{display:flex;list-style:none;padding:0;margin:0;justify-content:center;align-items:center;font-family:Inter}.pagination a{text-decoration:none;color:#252525}.pagination .page-item{margin:0}.pagination .page-link{display:block;padding:5px 10px;margin:0 2px}#site-footer{width:400px;user-select:none}#site-footer #copyright{display:flex;align-items:center;justify-content:center}#home-footer{width:400px}[aria-disabled=true]{text-decoration:none!important}.page-item.active a{text-decoration:none!important} \ No newline at end of file +.bg{background-color:#f8f8f8}.chroma{background-color:#f8f8f8;padding:16px;border-radius:4px}.chroma .lnlinks{outline:none;text-decoration:none;color:inherit}.chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}.chroma .lntable{border-spacing:0;padding:0;margin:0;border:0}.chroma .hl{background-color:#dfdfdf}.chroma .lnt{white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f}.chroma .ln{white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f}.chroma .line{display:flex}.chroma .k{color:#a2f;font-weight:700}.chroma .kc{color:#a2f;font-weight:700}.chroma .kd{color:#a2f;font-weight:700}.chroma .kn{color:#a2f;font-weight:700}.chroma .kp{color:#a2f}.chroma .kr{color:#a2f;font-weight:700}.chroma .kt{color:#0b0;font-weight:700}.chroma .na{color:#b44}.chroma .nb{color:#a2f}.chroma .nc{color:#00f}.chroma .no{color:#800}.chroma .nd{color:#a2f}.chroma .ni{color:#999;font-weight:700}.chroma .ne{color:#d2413a;font-weight:700}.chroma .nf{color:#00a000}.chroma .nl{color:#a0a000}.chroma .nn{color:#00f;font-weight:700}.chroma .nt{color:green;font-weight:700}.chroma .nv{color:#b8860b}.chroma .s{color:#b44}.chroma .sa{color:#b44}.chroma .sb{color:#b44}.chroma .sc{color:#b44}.chroma .dl{color:#b44}.chroma .sd{color:#b44;font-style:italic}.chroma .s2{color:#b44}.chroma .se{color:#b62;font-weight:700}.chroma .sh{color:#b44}.chroma .si{color:#b68;font-weight:700}.chroma .sx{color:green}.chroma .sr{color:#b68}.chroma .s1{color:#b44}.chroma .ss{color:#b8860b}.chroma .m{color:#666}.chroma .mb{color:#666}.chroma .mf{color:#666}.chroma .mh{color:#666}.chroma .mi{color:#666}.chroma .il{color:#666}.chroma .mo{color:#666}.chroma .o{color:#666}.chroma .ow{color:#a2f;font-weight:700}.chroma .c{color:#080;font-style:italic}.chroma .ch{color:#080;font-style:italic}.chroma .cm{color:#080;font-style:italic}.chroma .c1{color:#080;font-style:italic}.chroma .cs{color:#080;font-weight:700}.chroma .cp{color:#080}.chroma .cpf{color:#080}.chroma .gd{color:#a00000}.chroma .ge{font-style:italic}.chroma .gr{color:red}.chroma .gh{color:navy;font-weight:700}.chroma .gi{color:#00a000}.chroma .go{color:#888}.chroma .gp{color:navy;font-weight:700}.chroma .gs{font-weight:700}.chroma .gu{color:purple;font-weight:700}.chroma .gt{color:#04d}.chroma .gl{text-decoration:underline}.chroma .w{color:#bbb}#page{height:100vh;margin:0}#spotlight{display:flex;min-height:100vh;flex-direction:column;align-items:start;justify-content:space-between;max-width:720px;margin:auto;font-size:1.5rem}@media(max-width:768px){#spotlight{margin-left:24px}}#home-center{display:flex;flex-direction:column;flex-grow:1;align-items:flex-start;margin-top:10vh}#home-title{color:#202020;font-family:Inter;font-size:48px;font-style:normal;font-weight:500;line-height:normal}#home-nav{display:flex;flex-direction:column}#home-nav a{color:#252525;font-family:Inter;font-size:40px;font-style:normal;font-weight:400;line-height:150%;text-decoration-line:underline}.post-item .post-day,.post-item a{color:#252525;font-family:Inter;font-size:40px;font-style:normal;font-weight:400;line-height:150%;text-decoration-line:underline}#site-footer,#home-footer{width:100%}#site-footer p,#home-footer p{color:#5c5c5c;font-family:Inter;font-size:20px;font-style:normal;font-weight:300;line-height:normal;display:flex;gap:8px;justify-content:center}#site-footer a,#home-footer a{color:#5c5c5c;font-family:Inter;font-size:20px;font-style:normal;font-weight:300;line-height:normal;display:flex;gap:8px;justify-content:center;text-decoration:none}#site-footer a:hover,#home-footer a:hover{text-decoration:underline}.posts-group{width:400px}.back-title{font-family:Inter;font-size:20px;font-style:normal;font-weight:400}.back-title a{text-decoration:none;color:#252525}.back-title a:hover{text-decoration:underline;color:#151515}.post-item{display:flex;justify-content:space-between;align-items:center;width:100%}.post-item a{font-size:30px}.post-item .post-day{font-size:30px;text-decoration:none;color:#787878}.pagination{display:flex;list-style:none;padding:0;margin:0;justify-content:center;align-items:center;font-family:Inter}.pagination a{text-decoration:none;color:#252525}.pagination .page-item{margin:0}.pagination .page-link{display:block;padding:5px 10px;margin:0 2px}#site-footer{width:100%;user-select:none}#site-footer #copyright{display:flex;align-items:center;justify-content:center}#home-footer{width:400px}[aria-disabled=true]{text-decoration:none!important}.page-item.active a{text-decoration:none!important}.content{max-width:720px} \ No newline at end of file diff --git a/resources/_gen/assets/scss/scss/style.scss_871e1d33253f63f556fbcaa4227752be.json b/resources/_gen/assets/scss/scss/style.scss_871e1d33253f63f556fbcaa4227752be.json index 9ed3fc8..9b0691f 100644 --- a/resources/_gen/assets/scss/scss/style.scss_871e1d33253f63f556fbcaa4227752be.json +++ b/resources/_gen/assets/scss/scss/style.scss_871e1d33253f63f556fbcaa4227752be.json @@ -1 +1 @@ -{"Target":"css/style.min.d94259078fcaba762f125ab49e299e6b28e6e0f25357161fa02e5e5146f41260.css","MediaType":"text/css","Data":{"Integrity":"sha256-2UJZB4/KunYvElq0nimeayjm4PJTVxYfoC5eUUb0EmA="}} \ No newline at end of file +{"Target":"css/style.min.7c30431c941fd683f6909898424496e6ad0fee9bd65dfcd9cbf840011ff84aad.css","MediaType":"text/css","Data":{"Integrity":"sha256-fDBDHJQf1oP2kJiYQkSW5q0P7pvWXfzZy/hAAR/4Sq0="}} \ No newline at end of file