aboutsummaryrefslogtreecommitdiffstats
path: root/_includes
diff options
context:
space:
mode:
author2024-06-21 21:59:53 +0530
committer2024-06-21 21:59:53 +0530
commita190ecdc3f0e06c35b0bfb3ba825a1b29b162f37 (patch)
tree8fef59a521ef25442d0c99c0e24c2e5bb97827d0 /_includes
parentHot fix (diff)
downloadsudomsg-a190ecdc3f0e06c35b0bfb3ba825a1b29b162f37.tar
sudomsg-a190ecdc3f0e06c35b0bfb3ba825a1b29b162f37.tar.gz
sudomsg-a190ecdc3f0e06c35b0bfb3ba825a1b29b162f37.tar.bz2
sudomsg-a190ecdc3f0e06c35b0bfb3ba825a1b29b162f37.tar.lz
sudomsg-a190ecdc3f0e06c35b0bfb3ba825a1b29b162f37.tar.xz
sudomsg-a190ecdc3f0e06c35b0bfb3ba825a1b29b162f37.tar.zst
sudomsg-a190ecdc3f0e06c35b0bfb3ba825a1b29b162f37.zip
Update deps and updated the about page.
On branch main Your branch is up to date with 'origin/main'. Changes to be committed: modified: 404.html modified: _includes/base.html new file: _includes/main.css modified: _includes/page.html modified: _includes/post.html modified: about.html deleted: assets/main.css deleted: atom.xml.njk modified: eleventy.config.js modified: index.html modified: package-lock.json modified: package.json modified: posts.html modified: posts/posts.11tydata.js
Diffstat (limited to '_includes')
-rw-r--r--_includes/base.html38
-rw-r--r--_includes/main.css112
-rw-r--r--_includes/page.html6
-rw-r--r--_includes/post.html22
4 files changed, 144 insertions, 34 deletions
diff --git a/_includes/base.html b/_includes/base.html
index 36d9821..0ca185f 100644
--- a/_includes/base.html
+++ b/_includes/base.html
@@ -4,41 +4,41 @@
}
---
<!doctype html>
-<html lang="{{ metadata.language }}">
+<html :lang="metadata.language">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="light dark">
- <meta name="generator" content="{{ eleventy.generator }}">
- <title property="og:title">{{ title or metadata.title }}</title>
- <meta property="og:locale" content="{{ metadata.language }}">
- <meta name="theme-color" content="{{ metadata.theme }}">
- <meta name="description" property="og:description" content="{{ description or metadata.description }}">
- <meta property="og:url" content="{{ page.url | htmlBaseUrl(metadata.url) }}">
- <link rel="canonical" href="{{ page.url | htmlBaseUrl(metadata.url) }}">
- <meta property="og:site_name" content="{{ metadata.title }}">
- <meta name="author" content="{{ metadata.author.name }}">
+ <meta name="generator" :content="eleventy.generator">
+ <title property="og:title" @text="title || metadata.title"></title>
+ <meta property="og:locale" :content="metadata.language">
+ <meta name="theme-color" :content="metadata.theme">
+ <meta name="description" :property="og:description" :content="description || metadata.description">
+ <meta property="og:url" :content="htmlBaseUrl(page.url, metadata.url)">
+ <link rel="canonical" href="htmlBaseUrl(page.url, metadata.url)">
+ <meta property="og:site_name" :content="metadata.title">
+ <meta name="author" :content="metadata.author.name">
<meta property="og:type" content="website">
<meta name="twitter:card" content="summary">
- <link rel="alternate" href="{{ metadata.feed.atom }}" type="application/atom+xml" title="{{ metadata.title }}">
+ <link rel="alternate" href="/atom.xml" type="application/atom+xml" :title="metadata.title">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
- {%- css %}{% include "assets/main.css" %}{% endcss %}
- <link rel="stylesheet" href="{% getBundleFileUrl 'css' %}">
+ <link rel="stylesheet" href="../node_modules/modern-normalize/modern-normalize.css" />
+ <link rel="stylesheet" href="../node_modules/prismjs/themes/prism-okaidia.css" />
+ <link rel="stylesheet" href="main.css" />
+ <link rel="stylesheet" :href="getBundleFileUrl('css')" webc:keep />
</head>
<body>
<header>
<nav>
<a href="#">Sudomsg</a>
- {%- for entry in collections.all | eleventyNavigation %}
- <a href="{{ entry.url }}">{{ entry.title }}</a>
- {%- endfor %}
+ <template webc:for="entry of eleventyNavigation(collections.all)" webc:nokeep>
+ <a :href="entry.url" @text="entry.title"></a>
+ </template>
</nav>
</header>
- <main>
- {{ content |safe }}
- </main>
+ <main @html="content"></main>
<footer>
Subscribe - <a href="/atom.xml">Atom</a>
</footer>
diff --git a/_includes/main.css b/_includes/main.css
new file mode 100644
index 0000000..0f94c46
--- /dev/null
+++ b/_includes/main.css
@@ -0,0 +1,112 @@
+html {
+ accent-color: darkred;
+ text-align: justify;
+}
+
+* :any-link {
+ color: inherit;
+ text-decoration: underline;
+}
+
+aside {
+ max-width: max(40%, 12rem);
+ background: darkred;
+ color: white;
+ float: right;
+ margin: 1rem;
+ padding: 0.5rem;
+}
+
+img,
+svg,
+video,
+canvas,
+audio,
+iframe,
+embed,
+object {
+ max-width: 100%;
+ width: fit-content;
+ padding: 1rem;
+ margin: auto;
+}
+
+img,
+svg,
+video,
+canvas {
+ height: auto;
+}
+
+picture {
+ display: contents;
+}
+
+@media screen {
+
+ * :any-link:hover,
+ * :any-link:active {
+ font-style: italic;
+ }
+
+ body {
+ max-width: min(100dvw, 58rem);
+ min-height: 100dvh;
+ padding: 0.5rem;
+ margin-left: auto;
+ margin-right: auto;
+ grid-template-columns: 1fr;
+ grid-template-rows: auto 1fr auto;
+ grid-template-areas:
+ 'header'
+ 'main'
+ 'footer';
+ display: grid;
+ }
+
+ :is(header, footer) {
+ padding: 1rem;
+ font-weight: bolder;
+ background-color: darkred;
+ }
+
+ :is(header, footer) *:any-link {
+ text-decoration: none;
+ }
+
+ header {
+ grid-area: header;
+ }
+
+ main {
+ grid-area: main;
+ }
+
+ footer {
+ align-self: end;
+ grid-area: footer;
+ }
+
+ nav>a {
+ margin-right: 0.5rem;
+ }
+}
+
+@media print {
+
+ header,
+ footer {
+ display: none;
+ }
+
+ section,
+ table {
+ orphans: 4;
+ break-inside: auto;
+ }
+
+ tr {
+ break-inside: avoid;
+ break-before: auto;
+ }
+}
diff --git a/_includes/page.html b/_includes/page.html
index 77f888b..2439e37 100644
--- a/_includes/page.html
+++ b/_includes/page.html
@@ -1,9 +1,9 @@
---json
{
-"layout": "base.html"
+"layout": "base"
}
---
<article>
- <h1>{{ title }}</h1>
- {{ content | safe }}
+ <h1 @text="title"></h1>
+ <template @html="content" webc:nokeep />
</article>
diff --git a/_includes/post.html b/_includes/post.html
index bbe28d9..baecde7 100644
--- a/_includes/post.html
+++ b/_includes/post.html
@@ -1,21 +1,19 @@
---json
{
-"layout": "base.html",
-"tags": [
-"post"
-]
+"layout": "base"
}
---
-<article itemscope itemtype={% schema "BlogPosting" %}>
- <h1>{{ title }}</h1>
+<article itemscope :itemtype="schema('BlogPosting')">
+ <h1 @text="title"></h1>
<small>
- <time datetime="{{ page.date | htmlDateString }}" itemprop="datePublished">{{ page.date | readableDate
- }}</time>
- - <span itemprop="author" itemscope itemtype="{% schema " Person" %}>
- <a href="{{metadata.author.url}}" rel="author" itemprop="url">
- <span itemprop="name">{{metadata.author.name}}</span>
+ <time :datetime="htmlDateString(page.date)" itemprop="datePublished"
+ @text="readableDate(page.date)"></time>
+ - <span itemprop="author" itemscope :itemtype="schema('Person')">
+ <a :href="metadata.author.url" rel="author" itemprop="url">
+ <span itemprop="name" @text="metadata.author.name"></span>
</a>
</span>
</small>
- <div temprop: "articleBody">{{ content | safe }}</div>
+ <p><small itemprop="abstract" @content="(description"></small></p>
+ <div itemprop="articleBody" @html="content" />
</article>