From 91ba1bb5339a1285d3ab61201d08d7b706047384 Mon Sep 17 00:00:00 2001 From: monerooo <102408599+monerooo@users.noreply.github.com> Date: Sat, 2 Apr 2022 11:21:09 +0200 Subject: [PATCH 1/3] Code cleaned up v1 --- _includes/footer.html | 4 +- _includes/menu.html | 18 +++--- _layouts/default.html | 105 ++++++++++++++++------------------ _layouts/page.html | 4 +- _layouts/post.html | 2 - _layouts/revuo-period.html | 113 ++++++++++++++++++------------------- _layouts/revuo-weekly.html | 103 ++++++++++++++++----------------- assets/css/main.css | 4 -- css/main.scss | 14 ++--- index.html | 20 +++---- js/main.js | 6 +- 11 files changed, 183 insertions(+), 210 deletions(-) delete mode 100644 assets/css/main.css diff --git a/_includes/footer.html b/_includes/footer.html index bd6c698..38de496 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1 +1,3 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/_includes/menu.html b/_includes/menu.html index 13c4922..d2087a8 100644 --- a/_includes/menu.html +++ b/_includes/menu.html @@ -3,19 +3,19 @@ Revuo Weekly - {% for page in site.pages %} - {% if page.layout == "page" %} - {{ page.title }} - {% endif %} - {% endfor %} + {% for page in site.pages %} + {% if page.layout == "page" %} + {{ page.title }} + {% endif %} + {% endfor %} - - + + {% if site.custom_nav_footer == true %} - {% include nav-footer-custom.html %} + {% include nav-footer-custom.html %} {% else %} - {% include nav-footer.html %} + {% include nav-footer.html %} {% endif %} diff --git a/_layouts/default.html b/_layouts/default.html index b508d70..a29fe19 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,70 +1,63 @@ - + {% include head.html %}
- - {% include menu.html %} - - - - - - - - {% if site.custom_header == true %} - {% include header-custom.html %} - {% else %} - {% include header.html %} - {% endif %} - - -
- -
- - {{ content }} - -
+ + {% include menu.html %} - - + +
+
+ {{ content }} +
+ + + + {% endif %} +
+
- - {% include script.html %} + + {% include footer.html %} -
+ + {% include script.html %} + + - + \ No newline at end of file diff --git a/_layouts/page.html b/_layouts/page.html index bed0e8a..5bdd36e 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -2,7 +2,5 @@ layout: revuo-period ---
- - {{ content }} - + {{ content }}
\ No newline at end of file diff --git a/_layouts/post.html b/_layouts/post.html index 27dad87..030877e 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -5,9 +5,7 @@ layout: default

{{ page.title }}

- {{ content }} -
diff --git a/_layouts/revuo-period.html b/_layouts/revuo-period.html index ffcd101..5649181 100644 --- a/_layouts/revuo-period.html +++ b/_layouts/revuo-period.html @@ -1,73 +1,70 @@ - + {% include head.html %}
-
- - - {% include menu.html %} +
+ + + {% include menu.html %} - - - - + + + + - - {% if site.custom_header == true %} - {% include header-custom.html %} - {% else %} - {% include header.html %} - {% endif %} + + {% if site.custom_header == true %} + {% include header-custom.html %} + {% else %} + {% include header.html %} + {% endif %} - -
- -
- - {{ content }} - -
+ +
+
+ {{ content }} +
- - {% if paginator.total_pages > 1 %} - - {% endif %} + + {% if paginator.total_pages > 1 %} + + {% for page in (1..paginator.total_pages) %} + {% if page == paginator.page %} + {{ page }} + {% elsif page == 1 %} + {{ page }} + {% else %} + {{ page }} + {% endif %} + {% endfor %} + + {% if paginator.next_page %} + » + {% else %} + » + {% endif %} +
+ {% endif %} + +
- - {% include footer.html %} + + {% include footer.html %} - - {% include script.html %} -
-
+ + {% include script.html %} +
+ \ No newline at end of file diff --git a/_layouts/revuo-weekly.html b/_layouts/revuo-weekly.html index 639023b..0188854 100644 --- a/_layouts/revuo-weekly.html +++ b/_layouts/revuo-weekly.html @@ -1,71 +1,64 @@ - + {% include head.html %}
-
- - - {% include menu.html %} - - - - - +
- - {% if site.custom_header == true %} - {% include header-custom.html %} - {% else %} - {% include header.html %} - {% endif %} + + {% include menu.html %} - -
- -
+ + + + - {{ content }} + + {% if site.custom_header == true %} + {% include header-custom.html %} + {% else %} + {% include header.html %} + {% endif %} -
- - - + {% if paginator.next_page %} + + {% endif %} +
+ {% endif %} +
+ +
+ + + {% include footer.html %} + + + {% include script.html %} +
+ \ No newline at end of file diff --git a/assets/css/main.css b/assets/css/main.css deleted file mode 100644 index 8a3d282..0000000 --- a/assets/css/main.css +++ /dev/null @@ -1,4 +0,0 @@ - --- - --- - @import "minima"; - diff --git a/css/main.scss b/css/main.scss index a7d12de..6c0ab8f 100644 --- a/css/main.scss +++ b/css/main.scss @@ -45,7 +45,7 @@ --block-bg-color: #2f3234; --block-bg-color-secondary: #444444; --block-bg-color-heading: #333333; - --table-color: #fff; + --table-color: #ffffff; --head-nav-bg-color: transparent; --head-nav-text-color: #888888; } @@ -81,16 +81,16 @@ h1 { a { color: var(--primary-color); } + .moneroversary-table, -.price-table{ +.price-table { color: var(--table-color); } -#weekly .revuo-classes a.wk { - background-color: var(--head-nav-bg-color); - color: var(--head-nav-text-color); -} -#periodical .revuo-classes a.pd, #wrap.periodical .revuo-classes a.pd:active, #wrap.periodical .revuo-classes a.pd:focus { +#weekly .revuo-classes a.wk, +#periodical .revuo-classes a.pd, +#wrap.periodical .revuo-classes a.pd:active, +#wrap.periodical .revuo-classes a.pd:focus { background-color: var(--head-nav-bg-color); color: var(--head-nav-text-color); } diff --git a/index.html b/index.html index ab15c20..bd76f85 100644 --- a/index.html +++ b/index.html @@ -5,15 +5,11 @@ image: /img/revuo-monero.png --- +{% for post in paginator.posts %} +
  • +

    {{ post.title }}

    + +

    {{ post.excerpt }}

    +
  • +{% endfor %} + \ No newline at end of file diff --git a/js/main.js b/js/main.js index 6a4cd7f..eb7d802 100644 --- a/js/main.js +++ b/js/main.js @@ -19,10 +19,10 @@ function switchTheme(e) { if (e.target.checked) { document.documentElement.setAttribute('data-theme', 'dark'); localStorage.setItem('theme', 'dark'); + } else { + document.documentElement.setAttribute('data-theme', 'light'); + localStorage.setItem('theme', 'light'); } - else { document.documentElement.setAttribute('data-theme', 'light'); - localStorage.setItem('theme', 'light'); - } } toggleSwitch.addEventListener('change', switchTheme, false); From 2c39dffbeb74468bb4c352c469aa17d009f2df01 Mon Sep 17 00:00:00 2001 From: monerooo <102408599+monerooo@users.noreply.github.com> Date: Sat, 2 Apr 2022 11:27:36 +0200 Subject: [PATCH 2/3] clean up --- _includes/header-custom.html | 1 - js/main.js | 22 +++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/_includes/header-custom.html b/_includes/header-custom.html index 47c3f56..4a91700 100644 --- a/_includes/header-custom.html +++ b/_includes/header-custom.html @@ -14,5 +14,4 @@ Weekly Periodical - diff --git a/js/main.js b/js/main.js index eb7d802..f2be28d 100644 --- a/js/main.js +++ b/js/main.js @@ -8,21 +8,21 @@ const toggleSwitch = document.querySelector('.switch input[type="checkbox"]'); const currentTheme = localStorage.getItem('theme'); if (currentTheme) { - document.documentElement.setAttribute('data-theme', currentTheme); - - if (currentTheme === 'dark') { - toggleSwitch.checked = true; - } + document.documentElement.setAttribute('data-theme', currentTheme); + + if (currentTheme === 'dark') { + toggleSwitch.checked = true; + } } function switchTheme(e) { - if (e.target.checked) { - document.documentElement.setAttribute('data-theme', 'dark'); - localStorage.setItem('theme', 'dark'); - } else { + if (e.target.checked) { + document.documentElement.setAttribute('data-theme', 'dark'); + localStorage.setItem('theme', 'dark'); + } else { document.documentElement.setAttribute('data-theme', 'light'); - localStorage.setItem('theme', 'light'); - } + localStorage.setItem('theme', 'light'); + } } toggleSwitch.addEventListener('change', switchTheme, false); From fe07162d8bb80d617a81305c48ecd632f4a125fe Mon Sep 17 00:00:00 2001 From: monerooo <102408599+monerooo@users.noreply.github.com> Date: Sat, 2 Apr 2022 11:34:14 +0200 Subject: [PATCH 3/3] Style Fix --- css/main.scss | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/css/main.scss b/css/main.scss index 6c0ab8f..45522c4 100644 --- a/css/main.scss +++ b/css/main.scss @@ -36,6 +36,7 @@ //background-color: lightblue; //} +// Default Style (Dark) :root { --primary-color: #888888; --secondary-color: #666666; @@ -45,11 +46,11 @@ --block-bg-color: #2f3234; --block-bg-color-secondary: #444444; --block-bg-color-heading: #333333; - --table-color: #ffffff; + --table-color: #cecece; --head-nav-bg-color: transparent; - --head-nav-text-color: #888888; + --head-nav-text-color: #d56f2a; } - +// Was entered incorrectly.. Dark = Light [data-theme="dark"] { --primary-color: #666666; --secondary-color: #555555; @@ -59,7 +60,7 @@ --block-bg-color: #d7d7d7; --block-bg-color-secondary: #c0c0c0; --block-bg-color-heading: #a5a5a5; - --table-color: #cecece; + --table-color: #ffffff; --head-nav-bg-color: transparent; --head-nav-text-color: #d56f2a; }