From f7046e6094d50a9e22ce2746b3cbb5cf7e8825e6 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Tue, 31 May 2022 00:48:53 -0700 Subject: Paginator Macro, Fonts, Search, Whitespace Cleanup --- config.toml | 8 ++------ screenshot.png | Bin 190381 -> 206681 bytes static/android-chrome-192x192m.png | Bin 0 -> 152 bytes static/font/FiraCode-Bold.woff2 | Bin 87408 -> 0 bytes static/font/FiraCode-Regular.woff2 | Bin 82800 -> 0 bytes static/font/FiraCode.woff2 | Bin 0 -> 106344 bytes static/font/SourceCodePro.woff2 | Bin 0 -> 85924 bytes static/fonts.css | 15 +++++++++++++++ static/site.webmanifest | 8 +++++++- templates/index.html | 20 +------------------- templates/macros/head.html | 8 ++++++-- templates/macros/macros.html | 25 +++++++++++++++++++++++++ templates/macros/social.html | 2 +- 13 files changed, 57 insertions(+), 29 deletions(-) create mode 100644 static/android-chrome-192x192m.png delete mode 100644 static/font/FiraCode-Bold.woff2 delete mode 100644 static/font/FiraCode-Regular.woff2 create mode 100644 static/font/FiraCode.woff2 create mode 100644 static/font/SourceCodePro.woff2 create mode 100644 static/fonts.css 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 = '
' -#google = "Your Google Site verification code." -#bing = "Your Bing Site verification code." textlogo = 'Abridge' 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: #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 Binary files a/screenshot.png and b/screenshot.png differ diff --git a/static/android-chrome-192x192m.png b/static/android-chrome-192x192m.png new file mode 100644 index 0000000..65d0700 Binary files /dev/null and b/static/android-chrome-192x192m.png differ diff --git a/static/font/FiraCode-Bold.woff2 b/static/font/FiraCode-Bold.woff2 deleted file mode 100644 index 05eb043..0000000 Binary files a/static/font/FiraCode-Bold.woff2 and /dev/null differ diff --git a/static/font/FiraCode-Regular.woff2 b/static/font/FiraCode-Regular.woff2 deleted file mode 100644 index ab47287..0000000 Binary files a/static/font/FiraCode-Regular.woff2 and /dev/null differ diff --git a/static/font/FiraCode.woff2 b/static/font/FiraCode.woff2 new file mode 100644 index 0000000..edc7f74 Binary files /dev/null and b/static/font/FiraCode.woff2 differ diff --git a/static/font/SourceCodePro.woff2 b/static/font/SourceCodePro.woff2 new file mode 100644 index 0000000..a9fa832 Binary files /dev/null and b/static/font/SourceCodePro.woff2 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 @@ {%- endfor %} - {%- if paginator.previous or paginator.next %} - - {%- endif %} + {{- macros::pagination(paginator=paginator) }} {%- 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]?://") %} - + {%- else %} - + {%- endif %} {%- endfor %}{%- endif %} @@ -17,8 +17,12 @@ {%- endif %} {%- if config.build_search_index %} + {%- if config.extra.js_search_index %} + {%- endif %} + {%- if config.extra.js_search %} + {%- 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) %}