aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2023-05-08 20:33:46 -0400
committertdro <tdro@noreply.example.com>2023-06-01 19:39:07 -0400
commit93cb45a3d815c193ae9386de2834e6a1214c7e20 (patch)
tree3f71c21ec447b0db0c08061a5d72a4e5e0c1d188
parent93cd009b142782d138fbf746b1145dcb362b0c54 (diff)
downloadcanory-93cb45a3d815c193ae9386de2834e6a1214c7e20.tar.gz
canory-93cb45a3d815c193ae9386de2834e6a1214c7e20.tar.bz2
canory-93cb45a3d815c193ae9386de2834e6a1214c7e20.zip
themes/default/layouts/_default: Add single embed
-rw-r--r--Makefile4
-rw-r--r--config.json7
-rw-r--r--config.toml6
-rw-r--r--config.yaml4
-rw-r--r--static/icons/feather/code.svg14
-rw-r--r--static/icons/tabler/code.svg8
-rw-r--r--static/icons/tabler/square-letter-m.svg7
-rw-r--r--themes/default/layouts/_default/single.embed.html1
-rw-r--r--themes/default/layouts/partials/meta-context-menu.html6
-rw-r--r--themes/default/layouts/partials/meta-markdown.html2
10 files changed, 40 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index 01a8247..f7c39f3 100644
--- a/Makefile
+++ b/Makefile
@@ -70,7 +70,6 @@ icons:
curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/calendar.svg --output-dir static/icons/feather
curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/circle.svg --output-dir static/icons/feather
curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/clock.svg --output-dir static/icons/feather
- curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/code.svg --output-dir static/icons/feather
curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/copy.svg --output-dir static/icons/feather
curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/edit.svg --output-dir static/icons/feather
curl --silent --remote-name https://raw.githubusercontent.com/feathericons/feather/master/icons/external-link.svg --output-dir static/icons/feather
@@ -92,7 +91,8 @@ icons:
curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/LICENSE --output-dir static/icons/tabler
curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/book-2.svg --output-dir static/icons/tabler
curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/clock.svg --output-dir static/icons/tabler
+ curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/code.svg --output-dir static/icons/tabler
curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/pinned.svg --output-dir static/icons/tabler
curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/robot.svg --output-dir static/icons/tabler
- curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/robot.svg --output-dir static/icons/tabler
+ curl --silent --remote-name https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/square-letter-m.svg --output-dir static/icons/tabler
git add -f static/icons
diff --git a/config.json b/config.json
index 06fd3c7..df980d9 100644
--- a/config.json
+++ b/config.json
@@ -184,6 +184,10 @@
"baseName": "index",
"mediaType": "text/html"
},
+ "embed": {
+ "baseName": "embed",
+ "mediaType": "text/html"
+ },
"plain": {
"baseName": "index",
"mediaType": "text/plain"
@@ -275,7 +279,8 @@
],
"page": [
"html",
- "plain"
+ "plain",
+ "embed"
]
},
"caches": {
diff --git a/config.toml b/config.toml
index 13466fe..a5deead 100644
--- a/config.toml
+++ b/config.toml
@@ -131,6 +131,10 @@ enableRobotsTXT = true
baseName = "index"
mediaType = "text/html"
+ [outputFormats.embed]
+ baseName = "embed"
+ mediaType = "text/html"
+
[outputFormats.plain]
baseName = "index"
mediaType = "text/plain"
@@ -195,7 +199,7 @@ enableRobotsTXT = true
section = ["html", "rss", "gallery", "following", "webring"]
taxonomy = ["html", "rss"]
term = ["html", "rss"]
- page = ["html", "plain"]
+ page = ["html", "plain", "embed"]
[caches]
diff --git a/config.yaml b/config.yaml
index e202889..63436dd 100644
--- a/config.yaml
+++ b/config.yaml
@@ -118,6 +118,9 @@ outputFormats:
html:
baseName: index
mediaType: text/html
+ embed:
+ baseName: embed
+ mediaType: text/html
plain:
baseName: index
mediaType: text/plain
@@ -192,6 +195,7 @@ outputs:
page:
- html
- plain
+ - embed
caches:
assets:
diff --git a/static/icons/feather/code.svg b/static/icons/feather/code.svg
deleted file mode 100644
index da0f522..0000000
--- a/static/icons/feather/code.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<svg
- xmlns="http://www.w3.org/2000/svg"
- width="24"
- height="24"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- stroke-width="2"
- stroke-linecap="round"
- stroke-linejoin="round"
->
- <polyline points="16 18 22 12 16 6" />
- <polyline points="8 6 2 12 8 18" />
-</svg>
diff --git a/static/icons/tabler/code.svg b/static/icons/tabler/code.svg
new file mode 100644
index 0000000..3a18207
--- /dev/null
+++ b/static/icons/tabler/code.svg
@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-code" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
+ <path d="M7 8l-4 4l4 4" />
+ <path d="M17 8l4 4l-4 4" />
+ <path d="M14 4l-4 16" />
+</svg>
+
+
diff --git a/static/icons/tabler/square-letter-m.svg b/static/icons/tabler/square-letter-m.svg
new file mode 100644
index 0000000..07486bc
--- /dev/null
+++ b/static/icons/tabler/square-letter-m.svg
@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-square-letter-m" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
+ <path d="M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z" />
+ <path d="M9 16v-8l3 5l3 -5v8" />
+</svg>
+
+
diff --git a/themes/default/layouts/_default/single.embed.html b/themes/default/layouts/_default/single.embed.html
new file mode 100644
index 0000000..8ae6521
--- /dev/null
+++ b/themes/default/layouts/_default/single.embed.html
@@ -0,0 +1 @@
+{{- .Render "summary" -}}
diff --git a/themes/default/layouts/partials/meta-context-menu.html b/themes/default/layouts/partials/meta-context-menu.html
index 977f938..fb249be 100644
--- a/themes/default/layouts/partials/meta-context-menu.html
+++ b/themes/default/layouts/partials/meta-context-menu.html
@@ -17,6 +17,12 @@
<span>plaintext</span>
</a>
</micro-metadata-plain>
+ <micro-metadata-embed>
+ <a href="{{ print $href "embed.html" }}">
+ {{- safeHTML (readFile (print (partial "function-paths.html").static "/icons/tabler/code.svg")) -}}
+ <span>embed</span>
+ </a>
+ </micro-metadata-embed>
{{- partial "meta-permalink.html" . -}}
<micro-metadata-datetime>
<a title="{{ .Date.Local | time.Format "15:04 Jan 2 2006" -}}" href="{{ $href }}">
diff --git a/themes/default/layouts/partials/meta-markdown.html b/themes/default/layouts/partials/meta-markdown.html
index 5300af5..e678923 100644
--- a/themes/default/layouts/partials/meta-markdown.html
+++ b/themes/default/layouts/partials/meta-markdown.html
@@ -6,7 +6,7 @@
<micro-metadata-source>
<a href="{{ $href }}" title="{{ $title }}">
- {{- safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/code.svg")) -}}
+ {{- safeHTML (readFile (print (partial "function-paths.html").static "/icons/tabler/square-letter-m.svg")) -}}
<span>markdown</span>
</a>
</micro-metadata-source>