diff options
| author | Jieiku | 2023-07-21 10:37:56 -0700 |
|---|---|---|
| committer | Jieiku | 2023-07-21 10:37:56 -0700 |
| commit | 3f5f755694eb6dfa18a9548af5f8c1c89ffa859b (patch) | |
| tree | 0c1a24e6816065a77a70008381926e2399442e9c | |
| parent | cd71559564732e4f2b4752560ff1b6de6f737a79 (diff) | |
| download | abridge-3f5f755694eb6dfa18a9548af5f8c1c89ffa859b.tar.gz abridge-3f5f755694eb6dfa18a9548af5f8c1c89ffa859b.tar.bz2 abridge-3f5f755694eb6dfa18a9548af5f8c1c89ffa859b.zip | |
svg favicon, archive reverse
| -rw-r--r-- | config.toml | 2 | ||||
| -rw-r--r-- | static/favicon.svg (renamed from static/logo.svg) | 0 | ||||
| -rw-r--r-- | templates/archive.html | 15 | ||||
| -rw-r--r-- | templates/macros/head.html | 4 |
4 files changed, 21 insertions, 0 deletions
diff --git a/config.toml b/config.toml index 46acb10..3d5addf 100644 --- a/config.toml +++ b/config.toml @@ -126,6 +126,7 @@ title_size_index = "s85" # size: s95, s90, s85, s80, s75, s70, false(full size) footer_size = "s90" # size: s95, s90, s85, s80, s75, s70, false(full size) footer_credit = true #footer_credit_override = '<p class="s90">Powered by <a href="https://www.getzola.org/" target="_blank">Zola</a> & <a href="https://github.com/Jieiku/abridge/" target="_blank">Abridge</a></p>' +#archive_reverse = true # Set to True to sort posts chronologically per year instead of newest first on the archive page: example.com/archive/ ### Uncomment one of the below lines, or neither, depending on which type of logo you want to use: #logo = { file="logo.svg", width="32", height="32", alt="Abridge", text="bridge" } @@ -227,6 +228,7 @@ favicon_ms_color = "#333333" favicon_webmanifest = "site.webmanifest" # Used for android-chrome-512x512.png and android-chrome-192x192.png favicon_mask = "safari-pinned-tab.svg" # safari-pinned-tab.svg favicon_mask_color = "#ff9900" +favicon_svg = "favicon.svg" # favicon.svg favicon180 = "apple-touch-icon.png" # apple-touch-icon.png favicon32 = "favicon-32x32.png" # favicon-32x32.png favicon16 = "favicon-16x16.png" # favicon-16x16.png diff --git a/static/logo.svg b/static/favicon.svg index 02f7d64..02f7d64 100644 --- a/static/logo.svg +++ b/static/favicon.svg diff --git a/templates/archive.html b/templates/archive.html index fdbb5e8..eff70a9 100644 --- a/templates/archive.html +++ b/templates/archive.html @@ -52,6 +52,20 @@ This Template can also be used as the rendering template for Sections, eg: examp <h2>{{ section_item.title }}</h2> {%- endif %} {{- section_item.content | safe }} + {%- if config.extra.archive_reverse %} + {%- for year, posts in section_item.pages | sort(attribute="year") | reverse | group_by(attribute="year") %} + {%- if not hide_section_dates %} + {%- if section_item.title %} + <h3>{{ year }}</h3> + {%- else %} + <h2>{{ year }}</h2> + {%- endif %} + {%- endif %} + {%- for post in posts %} + <p><a href="{{ post.permalink | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ post.title }}</a>{%- if not hide_section_dates %} - <time datetime="{{ post.date }}">{{ post.date | date(format="%F") }}</time>{%- endif %}</p> + {%- endfor %} + {%- endfor %} + {%- else %} {%- for year, posts in section_item.pages | group_by(attribute="year") %} {%- if not hide_section_dates %} {%- if section_item.title %} @@ -64,5 +78,6 @@ This Template can also be used as the rendering template for Sections, eg: examp <p><a href="{{ post.permalink | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ post.title }}</a>{%- if not hide_section_dates %} - <time datetime="{{ post.date }}">{{ post.date | date(format="%F") }}</time>{%- endif %}</p> {%- endfor %} {%- endfor %} + {%- endif %} </div> {%- endblock content %} diff --git a/templates/macros/head.html b/templates/macros/head.html index 25e981d..603c341 100644 --- a/templates/macros/head.html +++ b/templates/macros/head.html @@ -228,6 +228,10 @@ <link rel="mask-icon" href="{{ get_url(path=config.extra.favicon_mask, trailing_slash=false) | safe }}" color="{{ config.extra.favicon_mask_color }}" /> {%- endif %} + {%- if config.extra.favicon_svg %} + <link rel="icon" type="image/svg+xml" href="{{ get_url(path=config.extra.favicon_svg, trailing_slash=false) | safe }}" /> + {%- endif %} + {%- if config.extra.favicon180 %} <link rel="apple-touch-icon" sizes="180x180" href="{{ get_url(path=config.extra.favicon180, trailing_slash=false) | safe }}" /> {%- endif %} |
