Repos / s4g / 765cfd6d7d
commit 765cfd6d7d10004e1a5cb082c29375c2cf2531cc
Author: Nhân <hi@imnhan.com>
Date: Wed Jul 12 21:18:40 2023 +0700
yakshave home template: reponsives
diff --git a/docs/_theme/home.tmpl b/docs/_theme/home.tmpl
index 37d93ba..fdc3cd8 100644
--- a/docs/_theme/home.tmpl
+++ b/docs/_theme/home.tmpl
@@ -28,8 +28,9 @@
{{- range .ArticlesInFeed}}
{{- if not .IsDraft}}
<li>
- {{.PostedAt.Local.Format "2006-01-02"}} —
+ <span class="time-prefix">{{.PostedAt.Local.Format "2006-01-02"}} — </span>
<a href="{{.WebPath}}">{{.Title}}</a>
+ <span class="time-suffix">({{.PostedAt.Local.Format "2006-01-02"}})</span>
</li>
{{- end}}
{{- end}}
@@ -59,9 +60,28 @@ hr {
ul {
padding: 0;
- list-style-type: none;
+ list-style: none;
/*font-size: 1.1rem;*/
}
+
+.time-suffix {
+ display: none;
+}
+
+@media (max-width: 30rem) {
+ .time-suffix {
+ display: inline;
+ }
+ .time-prefix {
+ display: none;
+ }
+ li {
+ margin-bottom: 0.5rem;
+ }
+ li::before {
+ content: '❖';
+ }
+}
</style>
{{template "footer" .}}
diff --git a/docs/index.html b/docs/index.html
index 8144f02..36b2cbc 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -34,12 +34,14 @@ <h1 class="site-title">CoolZone</h1>
<ul>
<li>
- 2023-04-05 —
+ <span class="time-prefix">2023-04-05 — </span>
<a href="/webmaker2000/mfws.html">This is a motherfucking website.</a>
+ <span class="time-suffix">(2023-04-05)</span>
</li>
<li>
- 2008-04-24 —
+ <span class="time-prefix">2008-04-24 — </span>
<a href="/webmaker2000/scale/">I'm Going To Scale My Foot Up Your Ass</a>
+ <span class="time-suffix">(2008-04-24)</span>
</li>
</ul>
@@ -67,9 +69,28 @@ <h1 class="site-title">CoolZone</h1>
ul {
padding: 0;
- list-style-type: none;
+ list-style: none;
}
+
+.time-suffix {
+ display: none;
+}
+
+@media (max-width: 30rem) {
+ .time-suffix {
+ display: inline;
+ }
+ .time-prefix {
+ display: none;
+ }
+ li {
+ margin-bottom: 0.5rem;
+ }
+ li::before {
+ content: '❖';
+ }
+}
</style>
<footer>
diff --git a/theme/home.tmpl b/theme/home.tmpl
index 37d93ba..fdc3cd8 100644
--- a/theme/home.tmpl
+++ b/theme/home.tmpl
@@ -28,8 +28,9 @@
{{- range .ArticlesInFeed}}
{{- if not .IsDraft}}
<li>
- {{.PostedAt.Local.Format "2006-01-02"}} —
+ <span class="time-prefix">{{.PostedAt.Local.Format "2006-01-02"}} — </span>
<a href="{{.WebPath}}">{{.Title}}</a>
+ <span class="time-suffix">({{.PostedAt.Local.Format "2006-01-02"}})</span>
</li>
{{- end}}
{{- end}}
@@ -59,9 +60,28 @@ hr {
ul {
padding: 0;
- list-style-type: none;
+ list-style: none;
/*font-size: 1.1rem;*/
}
+
+.time-suffix {
+ display: none;
+}
+
+@media (max-width: 30rem) {
+ .time-suffix {
+ display: inline;
+ }
+ .time-prefix {
+ display: none;
+ }
+ li {
+ margin-bottom: 0.5rem;
+ }
+ li::before {
+ content: '❖';
+ }
+}
</style>
{{template "footer" .}}