From e381d335429d86dfdf0ef97ae9e01a095bcc0e96 Mon Sep 17 00:00:00 2001 From: Avijit Gupta Date: Tue, 7 Sep 2021 19:40:35 +0200 Subject: [PATCH] Update dark theme (#72) * Add gitignore and static icons * Add social icons bar * Add more social icons, fix styling for header * Fix dark theme bug * Remove AWS icon * Add math typesetting to readme features * Templatize social icons * Add documentation and fix menu icon * Add more icons in example site * Fix lang in code blocks * Fix codeblocks lang and use twitch icon * Reduce spacing around and between social icons * Fix icon sizing * Hard code width and height * Fix language in code blocks * Update language * Update Readme * Add screenshot * Update screenshots * Update dark theme primary color * Fixes related to dark theme Co-authored-by: Yash Mehrotra --- exampleSite/content/posts/markdown-syntax.md | 13 ------------- .../content/posts/theme-documentation-advanced.md | 12 ++++++------ static/css/dark.css | 12 +++++++++--- static/css/main.css | 3 ++- 4 files changed, 17 insertions(+), 23 deletions(-) diff --git a/exampleSite/content/posts/markdown-syntax.md b/exampleSite/content/posts/markdown-syntax.md index 80427f6..956acf7 100644 --- a/exampleSite/content/posts/markdown-syntax.md +++ b/exampleSite/content/posts/markdown-syntax.md @@ -125,16 +125,3 @@ Tables aren't part of the core Markdown spec, but Hugo supports them out-of-the- * Dairy * Milk * Cheese - -## Other Elements — abbr, sub, sup, kbd, mark - -GIF is a bitmap image format. - -H2O - -Xn + Yn = Zn - -Press CTRL+ALT+Delete to end the session. - -Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. - diff --git a/exampleSite/content/posts/theme-documentation-advanced.md b/exampleSite/content/posts/theme-documentation-advanced.md index aba24b8..9acf6ea 100644 --- a/exampleSite/content/posts/theme-documentation-advanced.md +++ b/exampleSite/content/posts/theme-documentation-advanced.md @@ -112,10 +112,10 @@ Add your own JavaScript or CSS by putting them in the `static/` folder and impor ```toml [params] - customHeadHTML = """ + customHeadHTML = ''' - """ + ''' ``` ### Analytics @@ -128,9 +128,9 @@ Giving users the freedom to add anything in the HTML via config.toml seemed like ```toml [params] - customHeadHTML = """ + customHeadHTML = ''' - """ + ''' ``` ### Katex @@ -139,7 +139,7 @@ Katex is a math typesetting library for the web which lets you write beautiful e ```toml [params] - customHeadHTML = """ + customHeadHTML = ''' @@ -148,7 +148,7 @@ Katex is a math typesetting library for the web which lets you write beautiful e - """ + ''' ``` > Note: Make sure you use the latest version of katex and use the correct script tags as described in [their documentation](https://katex.org/docs/browser.html) diff --git a/static/css/dark.css b/static/css/dark.css index 66b871e..cb99fce 100644 --- a/static/css/dark.css +++ b/static/css/dark.css @@ -1,7 +1,8 @@ :root { - --dark-primary-color: 32, 32, 32; + --dark-primary-color: 34, 39, 46; + --dark-secondary-color: #2d333b; + --dark-tertiary-color: #646464; --dark-text-color: white; - --dark-secondary-color: #555; } html { @@ -67,8 +68,13 @@ table th { border-bottom-color: var(--dark-secondary-color); } -:not(pre) > code { +code, +pre { background-color: var(--dark-secondary-color) !important; +} + +:not(pre) > code { + background-color: var(--dark-tertiary-color) !important; color: var(--dark-text-color); } diff --git a/static/css/main.css b/static/css/main.css index 1530dd8..ed2696d 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -3,6 +3,7 @@ --light-primary-color: 255, 255, 255; --light-secondary-color: #dddddd; + --light-tertiary-color: #272822; --light-text-color: black; } @@ -230,7 +231,7 @@ a:hover .feather-sun { /* CODE BLOCKS */ code, pre { - background-color: #272822 !important; + background-color: var(--light-tertiary-color); box-sizing: border-box; color: white; }