From e4e7e0e76d4ca0a146bcef8a46033e4fa52a1910 Mon Sep 17 00:00:00 2001 From: Evgenii Akentev Date: Mon, 21 Feb 2022 23:09:02 +0500 Subject: [PATCH] Add feedback footnote --- config.toml | 4 +- .../implementations-of-the-handle-pattern.md | 2 +- ...houghts-on-backpack-modules-and-records.md | 2 +- static/CNAME | 1 - themes/theme/layouts/_default/single.html | 3 + themes/theme/layouts/partials/footer.html | 4 - themes/theme/layouts/partials/header.html | 2 +- themes/theme/layouts/partials/math.html | 3 - themes/theme/static/css/stylesheet.css | 18 +--- themes/theme/static/css/syntax.css | 82 +++++++++++++++++++ 10 files changed, 94 insertions(+), 27 deletions(-) delete mode 100644 static/CNAME delete mode 100644 themes/theme/layouts/partials/math.html create mode 100644 themes/theme/static/css/syntax.css diff --git a/config.toml b/config.toml index 19da133..77f120f 100644 --- a/config.toml +++ b/config.toml @@ -1,4 +1,4 @@ -baseURL = "http://ak3n.com/" +baseURL = "https://ak3n.com/" languageCode = "en-us" title = "ak3n.com" theme = "theme" @@ -16,6 +16,6 @@ theme = "theme" lineNoStart = 1 lineNos = true lineNumbersInTable = true - noClasses = true + noClasses = false style = "vs" tabWidth = 4 \ No newline at end of file diff --git a/content/posts/implementations-of-the-handle-pattern.md b/content/posts/implementations-of-the-handle-pattern.md index 5dd6a77..a3e6599 100644 --- a/content/posts/implementations-of-the-handle-pattern.md +++ b/content/posts/implementations-of-the-handle-pattern.md @@ -4,7 +4,7 @@ date: 2021-01-31 draft: false --- -In ["Monad Transformers and Effects with Backpack"](https://blog.ocharles.org.uk/posts/2020-12-23-monad-transformers-and-effects-with-backpack.html), [@acid2](https://twitter.com/acid2) presented how to apply Backpack to monad transformers. There is a less-popular approach to deal with effects — [Handle](https://jaspervdj.be/posts/2018-03-08-handle-pattern.html) ([Service](https://www.schoolofhaskell.com/user/meiersi/the-service-pattern)) pattern. I recommend reading both posts at first since they answer many questions regarding the design decisions behind the Handle pattern (why `IO`, why not type classes, etc). In this post, I want to show different implementations of the Handle pattern and compare them. All examples described below are available [in this repository](https://sr.ht/~ak3n/handle-examples/). +In ["Monad Transformers and Effects with Backpack"](https://blog.ocharles.org.uk/posts/2020-12-23-monad-transformers-and-effects-with-backpack.html) [@acid2](https://twitter.com/acid2) presented how to apply Backpack to monad transformers. There is a less-popular approach to deal with effects — [Handle](https://jaspervdj.be/posts/2018-03-08-handle-pattern.html) ([Service](https://www.schoolofhaskell.com/user/meiersi/the-service-pattern)) pattern. I recommend reading both posts at first since they answer many questions regarding the design decisions behind the Handle pattern (why `IO`, why not type classes, etc). In this post, I want to show different implementations of the Handle pattern and compare them. All examples described below are available [in this repository](https://sr.ht/~ak3n/handle-examples/). ### When you might need the Handle pattern [[simple](https://git.sr.ht/~ak3n/handle-examples/tree/main/item/simple)] diff --git a/content/posts/thoughts-on-backpack-modules-and-records.md b/content/posts/thoughts-on-backpack-modules-and-records.md index 22ee0dd..1a4631a 100644 --- a/content/posts/thoughts-on-backpack-modules-and-records.md +++ b/content/posts/thoughts-on-backpack-modules-and-records.md @@ -4,7 +4,7 @@ date: 2021-01-31 draft: false --- -In ["Implementations of the Handle pattern"](/implementations-of-the-handle-pattern), I have explored how Backpack might be used for the Handle pattern. It helped me to take a better look at Backpack and reflect a bit on modules and records in Haskell. +In ["Implementations of the Handle pattern"](/implementations-of-the-handle-pattern) I have explored how Backpack might be used for the Handle pattern. It helped me to take a better look at Backpack and reflect a bit on modules and records in Haskell. ### What's wrong with Backpack? diff --git a/static/CNAME b/static/CNAME deleted file mode 100644 index e45682d..0000000 --- a/static/CNAME +++ /dev/null @@ -1 +0,0 @@ -ak3n.com \ No newline at end of file diff --git a/themes/theme/layouts/_default/single.html b/themes/theme/layouts/_default/single.html index 6544323..1d1f062 100644 --- a/themes/theme/layouts/_default/single.html +++ b/themes/theme/layouts/_default/single.html @@ -8,6 +8,9 @@
{{ partial "headline.html" .Content }}
+
+ If you have a comment or feedback you may send an email to ~ak3n/ak3n.com@lists.sr.ht. +
{{ partial "footer.html" . }} diff --git a/themes/theme/layouts/partials/footer.html b/themes/theme/layouts/partials/footer.html index e6e24df..b317cc2 100644 --- a/themes/theme/layouts/partials/footer.html +++ b/themes/theme/layouts/partials/footer.html @@ -1,6 +1,2 @@ - - {{ if or .Params.math .Site.Params.math }} - {{ partial "math.html" . }} - {{ end }} \ No newline at end of file diff --git a/themes/theme/layouts/partials/header.html b/themes/theme/layouts/partials/header.html index 0e1c21c..6f4d059 100644 --- a/themes/theme/layouts/partials/header.html +++ b/themes/theme/layouts/partials/header.html @@ -3,9 +3,9 @@ - {{.Title}} +
diff --git a/themes/theme/layouts/partials/math.html b/themes/theme/layouts/partials/math.html deleted file mode 100644 index e078d13..0000000 --- a/themes/theme/layouts/partials/math.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/themes/theme/static/css/stylesheet.css b/themes/theme/static/css/stylesheet.css index 912d84e..055fae2 100644 --- a/themes/theme/static/css/stylesheet.css +++ b/themes/theme/static/css/stylesheet.css @@ -1,5 +1,5 @@ body { - font-family: 'Ubuntu', sans-serif; + font-family: sans-serif; color: black; margin: auto; max-width: 50em; @@ -63,20 +63,10 @@ ul li h4 { line-height: 1.5; } -.blog-post-content code { +.blog-post-feedback { + padding: .5em .5em; background-color: rgba(27,31,35,.05); - padding: .2em .4em; - margin: 0; - line-height: 1; -} - -.blog-post-content pre { - background-color: rgba(27,31,35,.05); -} - -.blog-post-content pre code { - background-color: transparent; - padding: 0; + margin: 3em 0 3em 0; } .headline-hash { diff --git a/themes/theme/static/css/syntax.css b/themes/theme/static/css/syntax.css new file mode 100644 index 0000000..e13ae8b --- /dev/null +++ b/themes/theme/static/css/syntax.css @@ -0,0 +1,82 @@ +/* Background */ .chroma { background-color: #ffffff } +/* Other */ .chroma .x { } +/* Error */ .chroma .err { } +/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } +/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } +/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } +/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* Keyword */ .chroma .k { color: #0000ff } +/* KeywordConstant */ .chroma .kc { color: #0000ff } +/* KeywordDeclaration */ .chroma .kd { color: #0000ff } +/* KeywordNamespace */ .chroma .kn { color: #0000ff } +/* KeywordPseudo */ .chroma .kp { color: #0000ff } +/* KeywordReserved */ .chroma .kr { color: #0000ff } +/* KeywordType */ .chroma .kt { color: #2b91af } +/* Name */ .chroma .n { } +/* NameAttribute */ .chroma .na { } +/* NameBuiltin */ .chroma .nb { } +/* NameBuiltinPseudo */ .chroma .bp { } +/* NameClass */ .chroma .nc { color: #2b91af } +/* NameConstant */ .chroma .no { } +/* NameDecorator */ .chroma .nd { } +/* NameEntity */ .chroma .ni { } +/* NameException */ .chroma .ne { } +/* NameFunction */ .chroma .nf { } +/* NameFunctionMagic */ .chroma .fm { } +/* NameLabel */ .chroma .nl { } +/* NameNamespace */ .chroma .nn { } +/* NameOther */ .chroma .nx { } +/* NameProperty */ .chroma .py { } +/* NameTag */ .chroma .nt { } +/* NameVariable */ .chroma .nv { } +/* NameVariableClass */ .chroma .vc { } +/* NameVariableGlobal */ .chroma .vg { } +/* NameVariableInstance */ .chroma .vi { } +/* NameVariableMagic */ .chroma .vm { } +/* Literal */ .chroma .l { } +/* LiteralDate */ .chroma .ld { } +/* LiteralString */ .chroma .s { color: #a31515 } +/* LiteralStringAffix */ .chroma .sa { color: #a31515 } +/* LiteralStringBacktick */ .chroma .sb { color: #a31515 } +/* LiteralStringChar */ .chroma .sc { color: #a31515 } +/* LiteralStringDelimiter */ .chroma .dl { color: #a31515 } +/* LiteralStringDoc */ .chroma .sd { color: #a31515 } +/* LiteralStringDouble */ .chroma .s2 { color: #a31515 } +/* LiteralStringEscape */ .chroma .se { color: #a31515 } +/* LiteralStringHeredoc */ .chroma .sh { color: #a31515 } +/* LiteralStringInterpol */ .chroma .si { color: #a31515 } +/* LiteralStringOther */ .chroma .sx { color: #a31515 } +/* LiteralStringRegex */ .chroma .sr { color: #a31515 } +/* LiteralStringSingle */ .chroma .s1 { color: #a31515 } +/* LiteralStringSymbol */ .chroma .ss { color: #a31515 } +/* LiteralNumber */ .chroma .m { } +/* LiteralNumberBin */ .chroma .mb { } +/* LiteralNumberFloat */ .chroma .mf { } +/* LiteralNumberHex */ .chroma .mh { } +/* LiteralNumberInteger */ .chroma .mi { } +/* LiteralNumberIntegerLong */ .chroma .il { } +/* LiteralNumberOct */ .chroma .mo { } +/* Operator */ .chroma .o { } +/* OperatorWord */ .chroma .ow { color: #0000ff } +/* Punctuation */ .chroma .p { } +/* Comment */ .chroma .c { color: #008000 } +/* CommentHashbang */ .chroma .ch { color: #008000 } +/* CommentMultiline */ .chroma .cm { color: #008000 } +/* CommentSingle */ .chroma .c1 { color: #008000 } +/* CommentSpecial */ .chroma .cs { color: #008000 } +/* CommentPreproc */ .chroma .cp { color: #0000ff } +/* CommentPreprocFile */ .chroma .cpf { color: #0000ff } +/* Generic */ .chroma .g { } +/* GenericDeleted */ .chroma .gd { } +/* GenericEmph */ .chroma .ge { font-style: italic } +/* GenericError */ .chroma .gr { } +/* GenericHeading */ .chroma .gh { font-weight: bold } +/* GenericInserted */ .chroma .gi { } +/* GenericOutput */ .chroma .go { } +/* GenericPrompt */ .chroma .gp { font-weight: bold } +/* GenericStrong */ .chroma .gs { font-weight: bold } +/* GenericSubheading */ .chroma .gu { font-weight: bold } +/* GenericTraceback */ .chroma .gt { } +/* GenericUnderline */ .chroma .gl { } +/* TextWhitespace */ .chroma .w { } -- 2.50.1