diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/assets/index.css | 24 | ||||
-rw-r--r-- | src/assets/manifest.njk | 19 | ||||
-rw-r--r-- | src/assets/prism.css | 193 | ||||
-rw-r--r-- | src/assets/sw.mjs | 20 | ||||
-rw-r--r-- | src/layouts/base.njk | 6 |
5 files changed, 158 insertions, 104 deletions
diff --git a/src/assets/index.css b/src/assets/index.css index 3d04fb2..bd17057 100644 --- a/src/assets/index.css +++ b/src/assets/index.css @@ -14,19 +14,19 @@ main { flex-grow: 1; } - :any-link { + * :any-link { color: inherit; text-decoration: underline; } - :any-link:hover, - :any-link:active { + * :any-link:hover, + * :any-link:active { font-style: italic; } .topnav { - background: darkred; + background: rgb(139, 0, 0); text-decoration: none; font-weight: bold; - color: white; + color: rgb(255, 255, 255); padding: 1rem; font-size: 1rem; } @@ -36,9 +36,7 @@ padding-left: 0rem; padding-right: 0rem; } - .topnav :any-link { - text-decoration: none; - } + .topnav :any-link, .topnav :any-link:hover { text-decoration: none; } @@ -58,18 +56,18 @@ } } .err { - color: darkred; + color: rgb(139, 0, 0); } @media (prefers-color-scheme: dark) { :root { - background: black; - color: white; + background: rgb(0, 0, 0); + color: rgb(255, 255, 255); } #menu nav { - background: red; + background: rgb(255, 0, 0); } .err { - color: red; + color: rgb(255, 0, 0); } } } diff --git a/src/assets/manifest.njk b/src/assets/manifest.njk index 3942d06..350c7af 100644 --- a/src/assets/manifest.njk +++ b/src/assets/manifest.njk @@ -10,20 +10,29 @@ permalink: /app.webmanifest "id": "{{ '/' | url }}", "scope": "{{ '/' | url }}", "display": "minimal-ui", - "background_color": "red", - "theme_color": "red", + "background_color": "#8b0000", + "theme_color": "#8b0000", "description": "{{ metadata.description }}", "icons": [ { "src": "{{ '/favicon.ico' | url }}", - "sizes": "256x256", + "sizes": "any", "type": "image/vnd.microsoft.icon" }, { - "src": "{{ '/favicon.svg' | url }}", + "src": "{{ '/favicon/icon.svg' | url }}", "sizes": "any", "type": "image/svg+xml" + }, + { + "src": "{{ '/favicon/192.png' | url }}", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "{{ '/favicon/512.png' | url }}", + "type": "image/png", + "sizes": "512x512" } ] - } diff --git a/src/assets/prism.css b/src/assets/prism.css index 431fe8a..0dd88c2 100644 --- a/src/assets/prism.css +++ b/src/assets/prism.css @@ -1,130 +1,175 @@ -code[class*="language-"],pre[class*="language-"] { - color: #f8f8f2; - background: none; - text-shadow: 0 1px rgba(0, 0, 0, 0.3); - font-family: monospace; - font-size: 1em; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - tab-size: 4; - hyphens: none; +code[class*="language-"], +pre[class*="language-"] { + color: rgb(248, 248, 242); + background: none; + text-shadow: 0 1px rgba(0, 0, 0, 0.3); + font-family: monospace; + font-size: 1em; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + tab-size: 4; + hyphens: none; } + /* Code blocks */ + pre[class*="language-"] { - padding: 1em; - margin: .5em 0; - overflow: auto; - border-radius: 0.3em; + padding: 1em; + margin: .5em 0; + overflow: auto; + border-radius: 0.3em; } -:not(pre) > code[class*="language-"],pre[class*="language-"] { - background: #272822; +:not(pre)>code[class*="language-"], +pre[class*="language-"] { + background: rgb(39, 40, 34); } + /* Inline code */ -:not(pre) > code[class*="language-"] { - padding: .1em; - border-radius: .3em; - white-space: normal; + +:not(pre)>code[class*="language-"] { + padding: .1em; + border-radius: .3em; + white-space: normal; } -.token.comment,.token.prolog,.token.doctype,.token.cdata { - color: #8292a2; +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: rgb(130, 146, 162); } .token.punctuation { - color: #f8f8f2; + color: rgb(248, 248, 242); } .token.namespace { - opacity: .7; + opacity: .7; } -.token.property,.token.tag,.token.constant,.token.symbol,.token.deleted { - color: #f92672; +.token.property, +.token.tag, +.token.constant, +.token.symbol, +.token.deleted { + color: rgb(249, 38, 114); } -.token.boolean,.token.number { - color: #ae81ff; +.token.boolean, +.token.number { + color: rgb(174, 129, 255); } -.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted { - color: #a6e22e; +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: rgb(166, 226, 46); } -.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string,.token.variable { - color: #f8f8f2; +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string, +.token.variable { + color: rgb(248, 248, 242); } -.token.atrule,.token.attr-value,.token.function,.token.class-name { - color: #e6db74; +.token.atrule, +.token.attr-value, +.token.function, +.token.class-name { + color: rgb(230, 219, 116); } .token.keyword { - color: #66d9ef; + color: rgb(102, 217, 239); } -.token.regex,.token.important { - color: #fd971f; +.token.regex, +.token.important { + color: rgb(253, 151, 31); } .token.important, .token.bold { - font-weight: bold; + font-weight: bold; } + .token.italic { - font-style: italic; + font-style: italic; } .token.entity { cursor: help; } -@media screen and (prefers-color-scheme: dark){ - code[class*="language-"],pre[class*="language-"] { - color: black; - text-shadow: 0 1px white; +@media screen and (prefers-color-scheme: dark) { + code[class*="language-"], + pre[class*="language-"] { + color: #000000; + text-shadow: 0 1px #ffffff; } - - :not(pre) > code[class*="language-"], pre[class*="language-"] { - background: #f5f2f0; + :not(pre)>code[class*="language-"], + pre[class*="language-"] { + background: rgb(245, 242, 240); } - - .token.comment,.token.prolog,.token.doctype,.token.cdata { - color: slategray; + .token.comment, + .token.prolog, + .token.doctype, + .token.cdata { + color: rgb(112, 128, 144); } - .token.punctuation { - color: #999; + color: rgb(153, 153, 153); } - - .token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol,.token.deleted { - color: #905; + .token.property, + .token.tag, + .token.boolean, + .token.number, + .token.constant, + .token.symbol, + .token.deleted { + color: rgb(153, 0, 85); } - - .token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted { - color: #690; + .token.selector, + .token.attr-name, + .token.string, + .token.char, + .token.builtin, + .token.inserted { + color: rgb(102, 153, 0); } - - .token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string { - color: #9a6e3a; - background: hsla(0, 0%, 100%, .5); + .token.operator, + .token.entity, + .token.url, + .language-css .token.string, + .style .token.string { + color: rgb(154, 110, 58); + background: rgba(255, 255, 255, 0.5); } - - .token.atrule,.token.attr-value,.token.keyword { - color: #07a; + .token.atrule, + .token.attr-value, + .token.keyword { + color: rgb(0, 118, 168); } - - .token.function,.token.class-name { - color: #DD4A68; + .token.function, + .token.class-name { + color: rgb(221, 75, 104); } - - .token.regex,.token.important,.token.variable { - color: #e90; + .token.regex, + .token.important, + .token.variable { + color: rgb(238, 153, 0); } }
\ No newline at end of file diff --git a/src/assets/sw.mjs b/src/assets/sw.mjs index 2359e0f..78d659a 100644 --- a/src/assets/sw.mjs +++ b/src/assets/sw.mjs @@ -4,7 +4,7 @@ const sw_cache = { "/index.css", "/prism.css", "/index.js", - "/favicon.svg", + "/favicon/icon.svg", "/offline.html", "/" ], @@ -16,7 +16,7 @@ self.addEventListener('install', event => { self.skipWaiting() event.waitUntil((async() => { const cache = await self.caches.open(sw_cache.store) - cache.addAll(sw_cache.default) + return cache.addAll(sw_cache.default) })()) }) @@ -32,16 +32,16 @@ self.addEventListener('activate', event => { }) self.addEventListener('fetch', event => { - if (event.request.method != 'GET') { - return - } + event.respondWith((async() => { + if (event.request.method != 'GET') { + return fetch(event.request) + } - const req_url = new URL(event.request.url) - if (req_url.origin != self.location.origin) { - return - } + const req_url = new URL(event.request.url) + if (req_url.origin != self.location.origin) { + return fetch(event.request) + } - event.respondWith((async() => { const cacheres = await self.caches.match(event.request) return cacheres || (async() => { try { diff --git a/src/layouts/base.njk b/src/layouts/base.njk index 98b9c37..66492a3 100644 --- a/src/layouts/base.njk +++ b/src/layouts/base.njk @@ -15,10 +15,12 @@ <meta name="twitter:card" content="summary"></meta> <meta property="og:url" content="{{ page.url | url | absoluteUrl(metadata.url) }}"/> <link rel="canonical" href="{{ page.url | url | absoluteUrl(metadata.url) }}"/> - <link async rel="icon" href="{{ '/favicon.svg' | url }}" type="image/svg+xml"> <link rel="alternate" href="{{ metadata.feed | url }}" type="application/atom+xml" title="{{ metadata.title }}"> + <link rel="icon" href="{{ '/favicon.ico' | url }}" sizes="any"> + <link rel="icon" href="{{ '/favicon/icon.svg' | url }}" type="image/svg+xml"> + <link rel="apple-touch-icon" href="{{ '/favicon/192.png' | url }}"> <link rel="manifest" href="{{ '/app.webmanifest' | url }}" crossorigin="use-credentials"> - <meta name="theme-color" content"darkred"> + <meta name="theme-color" content"#8b0000"> <link as="style" href="{{ '/index.css' | url }}" rel="stylesheet"/> {% if syntaxhighlight %}<link as="style" href="{{ '/prism.css' | url }}" rel="stylesheet"/>{% endif %} <script type="module" src="{{ '/index.js' | url }}"></script> |