feat: Adds pocket id authentication to caddy, adds server management article.
All checks were successful
CI / release (push) Successful in 6m31s
All checks were successful
CI / release (push) Successful in 6m31s
This commit is contained in:
@@ -97,25 +97,38 @@ func renderArticle(context: ItemRenderingContext<ArticleMetadata>) -> Node {
|
||||
title: context.item.title,
|
||||
extraHeader: generateHeader(.article(context.item))
|
||||
) {
|
||||
article(class: "pt-8") {
|
||||
h1 { context.item.title }
|
||||
div {
|
||||
renderArticleInfo(context.item)
|
||||
}
|
||||
// Only index the body of the articles for search.
|
||||
div(customAttributes: ["data-pagefind-body": ""]) {
|
||||
Node.raw(context.item.body)
|
||||
article(class: "pt-8 mx-10") {
|
||||
div(class: "bg-slate-800 py-10") {
|
||||
div(class: "mx-10") {
|
||||
h1 { context.item.title }
|
||||
div {
|
||||
renderArticleInfo(context.item)
|
||||
}
|
||||
// Only index the body of the articles for search.
|
||||
div(customAttributes: ["data-pagefind-body": ""]) {
|
||||
Node.raw(context.item.body)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div(class: "border-t border-light pt-8 mt-16", id: "recents") {
|
||||
div(class: "border-t border-light p-10 mt-16", id: "recents") {
|
||||
div(class: "grid lg:grid-cols-2") {
|
||||
h4(class: "text-3xl text-amber-500 font-extrabold mb-8") { otherArticles.title }
|
||||
if let tag = otherArticles.tag {
|
||||
a(href: "/articles/tag/\(tag)") {
|
||||
div(class: " [&:hover]:border-b border-orange px-5 flex flex-row gap-5") {
|
||||
img(src: "/static/img/tag.svg", width: "40")
|
||||
span(class: "text-4xl font-extrabold text-orange") { tag }
|
||||
div(class: " [&:hover]:border-b border-green-500 px-5 flex flex-row gap-5") {
|
||||
img(class: "-mt-2", src: "/static/img/tag.svg", width: "40")
|
||||
div(class: "block") {
|
||||
div(class: "block") {
|
||||
span(class: "mt-2 text-4xl font-extrabold text-orange") { tag }
|
||||
}
|
||||
div(class: "block") {
|
||||
span(class: "text-sm text-orange-400") {
|
||||
"View related articles with this tag."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -137,16 +150,18 @@ func renderArticle(context: ItemRenderingContext<ArticleMetadata>) -> Node {
|
||||
}
|
||||
}
|
||||
|
||||
func renderArticleForGrid(article: Item<ArticleMetadata>) -> Node {
|
||||
section {
|
||||
h3(class: "post-title text-2xl font-bold mb-2") {
|
||||
a(class: "[&:hover]:border-b border-orange-400", href: article.url) { article.title }
|
||||
}
|
||||
renderArticleInfo(article)
|
||||
p {
|
||||
a(href: article.url) {
|
||||
div {
|
||||
article.summary
|
||||
func renderArticleForGrid(article: Item<ArticleMetadata>, border: Bool = true) -> Node {
|
||||
div(class: "bg-slate-800\(border ? " border border-slate-400 rounded-lg" : "")") {
|
||||
section(class: "m-4") {
|
||||
h3(class: "post-title text-2xl font-bold mb-2") {
|
||||
a(class: "[&:hover]:border-b border-green-500", href: article.url) { article.title }
|
||||
}
|
||||
renderArticleInfo(article)
|
||||
p {
|
||||
a(href: article.url) {
|
||||
div {
|
||||
article.summary
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user