aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJieiku2022-05-31 00:48:53 -0700
committerJieiku2022-05-31 00:48:53 -0700
commitf7046e6094d50a9e22ce2746b3cbb5cf7e8825e6 (patch)
tree686de16190d29a8874f345d0f894cc94005c3599
parent7fbb144cf8cbe007a108a6b9271bfa86fe20aee2 (diff)
downloadabridge-f7046e6094d50a9e22ce2746b3cbb5cf7e8825e6.tar.gz
abridge-f7046e6094d50a9e22ce2746b3cbb5cf7e8825e6.tar.bz2
abridge-f7046e6094d50a9e22ce2746b3cbb5cf7e8825e6.zip
Paginator Macro, Fonts, Search, Whitespace Cleanup
-rw-r--r--config.toml8
-rw-r--r--screenshot.pngbin190381 -> 206681 bytes
-rw-r--r--static/android-chrome-192x192m.pngbin0 -> 152 bytes
-rw-r--r--static/font/FiraCode-Bold.woff2bin87408 -> 0 bytes
-rw-r--r--static/font/FiraCode-Regular.woff2bin82800 -> 0 bytes
-rw-r--r--static/font/FiraCode.woff2bin0 -> 106344 bytes
-rw-r--r--static/font/SourceCodePro.woff2bin0 -> 85924 bytes
-rw-r--r--static/fonts.css15
-rw-r--r--static/site.webmanifest8
-rw-r--r--templates/index.html20
-rw-r--r--templates/macros/head.html8
-rw-r--r--templates/macros/macros.html25
-rw-r--r--templates/macros/social.html2
13 files changed, 57 insertions, 29 deletions
diff --git a/config.toml b/config.toml
index 4218c27..8aeb578 100644
--- a/config.toml
+++ b/config.toml
@@ -38,8 +38,6 @@ recent = true
recent_items = 9
footer_credit = true
#footer_credit_override = '<p>Powered by <a href="https://www.getzola.org/">Zola</a> &#38; <a href="https://github.com/Jieiku/abridge/">Abridge</a></p>'
-#google = "Your Google Site verification code."
-#bing = "Your Bing Site verification code."
textlogo = '<font color="#f90">A</font>bridge'
sitedesc = false # enables or disables the display of the site description below the logo.
@@ -76,10 +74,8 @@ stylesheet = "abridge.css" # location and file to use for stylesheet:
# For externally loaded fonts make sure the include the FULL url including the http/https prefix
fonts_load = false
fonts = [
- {url = "https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Source+Code+Pro"},
- {url = "https://fonts.googleapis.com/css?family=Merriweather:300,400|Montserrat:400,700"},
- {url = "font/FiraCode-Bold.woff2"},
- {url = "font/FiraCode-Regular.woff2"},
+ {url = "https://fonts.googleapis.com/css?family=Merriweather|Montserrat"},
+ {url = "fonts.css"},
]
# Uncomment below line to load fontawesome, eg: <i class="fa-solid fa-heart"></i>
#fontawesome = "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.1/css/all.min.css"
diff --git a/screenshot.png b/screenshot.png
index 55bd732..0d37465 100644
--- a/screenshot.png
+++ b/screenshot.png
Binary files differ
diff --git a/static/android-chrome-192x192m.png b/static/android-chrome-192x192m.png
new file mode 100644
index 0000000..65d0700
--- /dev/null
+++ b/static/android-chrome-192x192m.png
Binary files differ
diff --git a/static/font/FiraCode-Bold.woff2 b/static/font/FiraCode-Bold.woff2
deleted file mode 100644
index 05eb043..0000000
--- a/static/font/FiraCode-Bold.woff2
+++ /dev/null
Binary files differ
diff --git a/static/font/FiraCode-Regular.woff2 b/static/font/FiraCode-Regular.woff2
deleted file mode 100644
index ab47287..0000000
--- a/static/font/FiraCode-Regular.woff2
+++ /dev/null
Binary files differ
diff --git a/static/font/FiraCode.woff2 b/static/font/FiraCode.woff2
new file mode 100644
index 0000000..edc7f74
--- /dev/null
+++ b/static/font/FiraCode.woff2
Binary files differ
diff --git a/static/font/SourceCodePro.woff2 b/static/font/SourceCodePro.woff2
new file mode 100644
index 0000000..a9fa832
--- /dev/null
+++ b/static/font/SourceCodePro.woff2
Binary files differ
diff --git a/static/fonts.css b/static/fonts.css
new file mode 100644
index 0000000..74fb10c
--- /dev/null
+++ b/static/fonts.css
@@ -0,0 +1,15 @@
+@font-face {
+ font-family: "FiraCode";
+ font-style: normal;
+ font-weight: 400;
+ src: url("/font/FiraCode.woff2") format("woff2");
+ font-display: swap;
+}
+
+@font-face {
+ font-family: "SourceCodePro";
+ font-style: normal;
+ font-weight: 400;
+ src: url("/font/SourceCodePro.woff2") format("woff2");
+ font-display: swap;
+}
diff --git a/static/site.webmanifest b/static/site.webmanifest
index b20abb7..630552d 100644
--- a/static/site.webmanifest
+++ b/static/site.webmanifest
@@ -11,7 +11,13 @@
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
- }
+ },
+ {
+ "src": "/android-chrome-192x192m.png",
+ "sizes": "192x192",
+ "type": "image/png",
+ "purpose": "maskable"
+ },
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
diff --git a/templates/index.html b/templates/index.html
index c17ee63..9c25da9 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -40,25 +40,7 @@
</p>
</article>
{%- endfor %}
- {%- if paginator.previous or paginator.next %}
- <nav>
- <div>{%- if paginator.previous %}<a href="{{ paginator.previous | safe }}">&#60; Previous</a> {% endif %} </div>
- <div>
- <ul>
- {%- for pager in range(start=1, end=paginator.number_pagers+1) %}
- <li>
- {%- if pager == 1 %}
- <a class="pag {% if paginator.current_index == pager %}cnav{% endif %}" href='{{ get_url(path="/", trailing_slash=true) }}'>{{pager}}</a>
- {%- else %}
- <a class="pag {% if paginator.current_index == pager %}cnav{% endif %}" href='{{ paginator.base_url }}{{pager}}'>{{pager}}</a>
- {%- endif %}
- </li>
- {%- endfor %}
- </ul>
- </div>
- <div>{%- if paginator.next %}<a href="{{ paginator.next | safe }}">Next &#62;</a>{% endif %} </div>
- </nav>
- {%- endif %}
+ {{- macros::pagination(paginator=paginator) }}
</div>
{%- set section_item = get_section(path="_index.md") %}
{%- if config.extra.recent | default(value=true) %}
diff --git a/templates/macros/head.html b/templates/macros/head.html
index 6216830..0107b83 100644
--- a/templates/macros/head.html
+++ b/templates/macros/head.html
@@ -6,9 +6,9 @@
{%- macro resource() %}
{%- if config.extra.fonts_load and config.extra.fonts %}{%- for i in config.extra.fonts %}
{%- if i.url is matching("^http[s]?://") %}
- <link rel="preload" as="style" href="{{ i.url | safe }}">
+ <link rel="preload" href="{{ i.url | safe }}" as="style" onload="this.onload=null;this.rel='stylesheet'" crossorigin="anonymous">
{%- else %}
- <link rel="preload" as="font" href="{{ get_url(path=i.url, trailing_slash=false, cachebust=true) }}">
+ <link rel="preload" href="{{ get_url(path=i.url, trailing_slash=false) }}" as="style" onload="this.onload=null;this.rel='stylesheet'" crossorigin="anonymous">
{%- endif %}
{%- endfor %}{%- endif %}
@@ -17,8 +17,12 @@
{%- endif %}
{%- if config.build_search_index %}
+ {%- if config.extra.js_search_index %}
<script defer type="text/javascript" src="{{ get_url(path=config.extra.js_search_index, trailing_slash=false, cachebust=true) | safe }}"></script>
+ {%- endif %}
+ {%- if config.extra.js_search %}
<script defer type="text/javascript" src="{{ get_url(path=config.extra.js_search, trailing_slash=false, cachebust=true) | safe }}"></script>
+ {%- endif %}
{%- endif %}
{%- if config.generate_feed %}
diff --git a/templates/macros/macros.html b/templates/macros/macros.html
index 82e856a..a639a73 100644
--- a/templates/macros/macros.html
+++ b/templates/macros/macros.html
@@ -19,3 +19,28 @@
{%- macro footer(page) %}
<h3><a href="#">Back to top</a></h3>
{%- endmacro footer %}
+
+
+{%- macro pagination(paginator)%}
+ {%- if paginator.number_pagers > 1 %}
+ <nav>
+ <div>{%- if paginator.previous %}<a href="{{ paginator.previous | safe }}">&#60; Previous</a> {% endif %} </div>
+ <div>
+ <ul>
+ {%- for i in range(start=1, end=paginator.number_pagers+1) %}
+ <li>
+ {%- if i == paginator.current_index %}
+ <a class="cnav" href="#">{{i}}</a>
+ {%- elif i > 1 %}
+ <a href="{{paginator.base_url | safe }}{{i ~ '/'}}">{{i}}</a>
+ {%- else %}
+ <a href="{{paginator.first | safe }}">{{i}}</a>
+ {%- endif %}
+ </li>
+ {%- endfor %}
+ </ul>
+ </div>
+ <div>{%- if paginator.next %}<a href="{{ paginator.next | safe }}">Next &#62;</a>{% endif %} </div>
+ </nav>
+ {%- endif %}
+{%- endmacro %}
diff --git a/templates/macros/social.html b/templates/macros/social.html
index 05eeb82..37c66af 100644
--- a/templates/macros/social.html
+++ b/templates/macros/social.html
@@ -40,7 +40,7 @@
{%- if social_config.youtube %}
<a href="https://www.youtube.com/channel/{{ social_config.youtube }}/" target="_blank"><span class="svg youtube" title="YouTube"></span></a>{% endif %}
{%- if social_config.buymeacoffee %}
- <a href="https://www.buymeacoffee.com/{{ social_config.buymeacoffee }}" target="_blank"><span class="svg buymeacoffee" title="Buy Me A Coffee"></span></a>{% endif %}
+ <a href="https://www.buymeacoffee.com/{{ social_config.buymeacoffee }}/" target="_blank"><span class="svg buymeacoffee" title="Buy Me A Coffee"></span></a>{% endif %}
{%- if social_config.github_sponsor %}
<a href="https://github.com/sponsors/{{ social_config.github_sponsor }}/" target="_blank"><span class="svg github-sponsor" title="GitHub Sponsor"></span></a>{% endif %}
</span>