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] 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 }}
{{ page.date | date_to_string }}
-
{{ 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.date | date_to_string }}
- {{ post.excerpt }}
-
-
- {% endfor %}
-
-
+{% for post in paginator.posts %}
+
+
+ {{ post.date | date_to_string }}
+ {{ 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);