diff --git a/exampleSite/content/posts/first_post.md b/exampleSite/content/posts/first_post.md index e33e573..b8130b1 100644 --- a/exampleSite/content/posts/first_post.md +++ b/exampleSite/content/posts/first_post.md @@ -15,10 +15,15 @@ Yo yo yo - a - list +1. This +2. is +3. a +4. numbered +5. list + ```py Codeblocks look like this def print(): print('Hello world!') - ``` diff --git a/exampleSite/content/posts/second_post.md b/exampleSite/content/posts/second_post.md index a3a5d0b..06b93b6 100644 --- a/exampleSite/content/posts/second_post.md +++ b/exampleSite/content/posts/second_post.md @@ -20,5 +20,4 @@ Codeblocks look like this def print(): print('Hello world!') - ``` diff --git a/exampleSite/content/posts/third_post.md b/exampleSite/content/posts/third_post.md index 4e0f2d1..6ab9c0e 100644 --- a/exampleSite/content/posts/third_post.md +++ b/exampleSite/content/posts/third_post.md @@ -20,5 +20,4 @@ Codeblocks look like this def print(): print('Hello world!') - ``` diff --git a/themes/gokarna/static/css/dark.css b/themes/gokarna/static/css/dark.css index b7958e5..ab80284 100644 --- a/themes/gokarna/static/css/dark.css +++ b/themes/gokarna/static/css/dark.css @@ -1,10 +1,13 @@ html { - background: #171717 !important; - color: white !important; + background: #121212 !important; + color: #e2e2e2 !important; } -.header { - background-color: #1b1c1d !important; - color: white !important; + +.header, +code, +pre { + background-color: #1f1f1f !important; + color: #e2e2e2 !important; } /* TODO: Check if this is needed or not */ diff --git a/themes/gokarna/static/css/main.css b/themes/gokarna/static/css/main.css index 3fba361..8982a21 100644 --- a/themes/gokarna/static/css/main.css +++ b/themes/gokarna/static/css/main.css @@ -6,7 +6,8 @@ html { /* HEADER */ .header { - background-color: #bbb; + background-color: rgb(238, 238, 238); + box-shadow: rgba(0, 0, 0, 0.5) 0px 1px 2px 0px; color: black; height: 70px; left: 0; @@ -86,6 +87,7 @@ html { cursor: pointer; } +/** COMMON **/ /* TAGS */ .post-tags { list-style-type: none; @@ -105,6 +107,24 @@ html { text-decoration: none; } +/* CODE BLOCKS */ +code, +pre { + background-color: #eee !important; + box-sizing: border-box; +} + +pre { + font-size: 0.95rem; + padding: 20px; +} + +code { + box-decoration-break: clone; + padding: 0 3px; + word-wrap: break-word; +} + /* SINGLE */ #content { width: 810px; diff --git a/themes/gokarna/static/js/main.js b/themes/gokarna/static/js/main.js index f6bd33a..0a3aaf2 100644 --- a/themes/gokarna/static/js/main.js +++ b/themes/gokarna/static/js/main.js @@ -12,9 +12,8 @@ function ready() { toggleIcon = document.querySelector('#dark-theme-toggle span'); darkThemeCss = document.getElementById("dark-theme"); - // TODO: Fetch programatically by user's system preference const savedTheme = localStorage.getItem(THEME_PREF_STORAGE_KEY) || - window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark': 'light'; + (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark': 'light'); setTheme(savedTheme); document.getElementById('dark-theme-toggle').addEventListener('click', () => { if (toggleIcon.className === THEME_TO_ICON_CLASS.dark) {