Merge pull request #9 from monerooo/master

Code clean up & Style fix
This commit is contained in:
rottenstonks 2022-04-02 07:46:58 -05:00 committed by GitHub
commit eacbd48599
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 196 additions and 223 deletions

View File

@ -1 +1,3 @@
<footer class="footer"><span>2022 - Revuo Monero.</span></footer>
<footer class="footer">
<span>2022 - Revuo Monero.</span>
</footer>

View File

@ -14,5 +14,4 @@
<a href="{{ site.baseurl }}" class="wk">Weekly</a>
<a href="/periodicals/" class="pd">Periodical</a>
</div>
</header>

View File

@ -3,19 +3,19 @@
<a href="{{ site.baseurl }}">Revuo Weekly</a>
<!-- Nav pages -->
{% for page in site.pages %}
{% if page.layout == "page" %}
<a href="{% if site.baseurl == "/" %}{{ page.url }}{% else %}{{ page.url | prepend: site.baseurl }}{% endif %}" title="{{ page.title }}">{{ page.title }}</a>
{% endif %}
{% endfor %}
{% for page in site.pages %}
{% if page.layout == "page" %}
<a href="{% if site.baseurl == "/" %}{{ page.url }}{% else %}{{ page.url | prepend: site.baseurl }}{% endif %}" title="{{ page.title }}">{{ page.title }}</a>
{% endif %}
{% endfor %}
</div>
<!-- Nav footer -->
<!-- Nav footer -->
{% 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 %}
</nav>

View File

@ -1,70 +1,63 @@
<!DOCTYPE html>
<html>
<html lang="en">
{% include head.html %}
<body>
<div id="wrap">
<!-- Navigation -->
{% include menu.html %}
<!-- Icon menu -->
<a {% if site.reverse == true %}id="nav-menu-left"{% else %}id="nav-menu"{% endif %}>
<div id="menu"></div>
</a>
<!-- Header -->
{% if site.custom_header == true %}
{% include header-custom.html %}
{% else %}
{% include header.html %}
{% endif %}
<!-- Main content -->
<div id="container">
<main>
{{ content }}
</main>
<!-- Navigation -->
{% include menu.html %}
<!-- Pagination links -->
<div class="pagination">
{% if paginator.total_pages > 1 %}
<div class="page-numbers"><p>
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path}}" class="page-button prev">Prev</a>
{% endif %}
<!-- Icon menu -->
<a {% if site.reverse == true %}id="nav-menu-left"{% else %}id="nav-menu"{% endif %}>
<div id="menu"></div>
</a>
{% for page in (1..paginator.total_pages) %}
{% assign total = paginator.total_pages %}
{% if page == paginator.page %}
{{ page }} of {{total}}
{% endif %}
{% endfor %}
<!-- Header -->
{% if site.custom_header == true %}
{% include header-custom.html %}
{% else %}
{% include header.html %}
{% endif %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path}}" class="page-button next">Next</a>
{% endif %}
</p></div>
{% endif %}
</div>
<!-- Main content -->
<div id="container">
<main>
{{ content }}
</main>
<!-- Pagination links -->
<div class="pagination">
{% if paginator.total_pages > 1 %}
<div class="page-numbers">
<p>
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path}}" class="page-button prev">Prev</a>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% assign total = paginator.total_pages %}
{% if page == paginator.page %}
{{ page }} of {{total}}
{% endif %}
{% endfor %}
</div>
<!-- Footer -->
{% include footer.html %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path}}" class="page-button next">Next</a>
{% endif %}
</p>
</div>
{% endif %}
</div>
</div>
<!-- Script -->
{% include script.html %}
<!-- Footer -->
{% include footer.html %}
</div>
<!-- Script -->
{% include script.html %}
</div><!-- div#wrap -->
</body>
</html>
</html>

View File

@ -2,7 +2,5 @@
layout: revuo-period
---
<article id="page">
{{ content }}
{{ content }}
</article>

View File

@ -5,9 +5,7 @@ layout: default
<h2>{{ page.title }}</h2>
<time datetime="{{ page.date | date_to_xmlschema }}" class="by-line">{{ page.date | date_to_string }}</time>
<div class="content">
{{ content }}
</div>
</article>

View File

@ -1,73 +1,70 @@
<!DOCTYPE html>
<html>
<html lang="en">
{% include head.html %}
<body>
<div id="wrap">
<div id="periodical">
<!-- Navigation -->
{% include menu.html %}
<div id="periodical">
<!-- Navigation -->
{% include menu.html %}
<!-- Icon menu -->
<a {% if site.reverse == true %}id="nav-menu-left"{% else %}id="nav-menu"{% endif %}>
<div id="menu"></div>
</a>
<!-- Icon menu -->
<a {% if site.reverse == true %}id="nav-menu-left"{% else %}id="nav-menu"{% endif %}>
<div id="menu"></div>
</a>
<!-- Header -->
{% if site.custom_header == true %}
{% include header-custom.html %}
{% else %}
{% include header.html %}
{% endif %}
<!-- Header -->
{% if site.custom_header == true %}
{% include header-custom.html %}
{% else %}
{% include header.html %}
{% endif %}
<!-- Main content -->
<div id="container">
<main>
{{ content }}
</main>
<!-- Main content -->
<div id="container">
<main>
{{ content }}
</main>
<!-- Pagination links -->
{% if paginator.total_pages > 1 %}
<div class="pagination">
{% if paginator.previous_page == 1 %}
<a href="{{ '/' | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">&laquo;</a>
{% elsif paginator.previous_page%}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">&laquo;</a>
{% else %}
<span class="page-item">&laquo;</span>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<span class="page-item">{{ page }}</span>
{% elsif page == 1 %}
<a href="{{ '/' | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">{{ page }}</a>
{% else %}
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}" class="page-item">{{ page }}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">&raquo;</a>
{% else %}
<span class="page-item">&raquo;</span>
{% endif %}
</div>
{% endif %}
<!-- Pagination links -->
{% if paginator.total_pages > 1 %}
<div class="pagination">
{% if paginator.previous_page == 1 %}
<a href="{{ '/' | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">&laquo;</a>
{% elsif paginator.previous_page%}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">&laquo;</a>
{% else %}
<span class="page-item">&laquo;</span>
{% endif %}
</div>
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<span class="page-item">{{ page }}</span>
{% elsif page == 1 %}
<a href="{{ '/' | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">{{ page }}</a>
{% else %}
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}" class="page-item">{{ page }}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">&raquo;</a>
{% else %}
<span class="page-item">&raquo;</span>
{% endif %}
</div>
{% endif %}
</div><!-- div#container -->
<!-- Footer -->
{% include footer.html %}
<!-- Footer -->
{% include footer.html %}
<!-- Script -->
{% include script.html %}
</div>
</div>
<!-- Script -->
{% include script.html %}
</div><!-- div#periodical -->
</div><!-- div#wrap -->
</body>
</html>

View File

@ -1,71 +1,64 @@
<!DOCTYPE html>
<html>
<html lang="en">
{% include head.html %}
<body>
<div id="wrap">
<div id="weekly">
<!-- Navigation -->
{% include menu.html %}
<!-- Icon menu -->
<a {% if site.reverse == true %}id="nav-menu-left"{% else %}id="nav-menu"{% endif %}>
<div id="menu"></div>
</a>
<div id="weekly">
<!-- Header -->
{% if site.custom_header == true %}
{% include header-custom.html %}
{% else %}
{% include header.html %}
{% endif %}
<!-- Navigation -->
{% include menu.html %}
<!-- Main content -->
<div id="container">
<main>
<!-- Icon menu -->
<a {% if site.reverse == true %}id="nav-menu-left"{% else %}id="nav-menu"{% endif %}>
<div id="menu"></div>
</a>
{{ content }}
<!-- Header -->
{% if site.custom_header == true %}
{% include header-custom.html %}
{% else %}
{% include header.html %}
{% endif %}
</main>
<!-- Pagination links -->
<div class="pagination">
{% if paginator.total_pages > 1 %}
<div class="page-numbers">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path}}" class="page-item prev">«</a>
{% endif %}
<!-- Main content -->
<div id="container">
{% for page in (1..paginator.total_pages) %}
{% assign total = paginator.total_pages %}
{% if page == paginator.page %}
<p class="page-numbers-display">{{ page }} of {{total}}</p>
{% endif %}
{% endfor %}
<main>
{{ content }}
</main>
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path}}" class="page-item next">»</a>
{% endif %}
</div>
{% endif %}
</div>
<!-- Pagination links -->
<div class="pagination">
{% if paginator.total_pages > 1 %}
<div class="page-numbers">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path}}" class="page-item prev">«</a>
{% endif %}
</div>
<!-- Footer -->
{% include footer.html %}
{% for page in (1..paginator.total_pages) %}
{% assign total = paginator.total_pages %}
{% if page == paginator.page %}
<p class="page-numbers-display">{{ page }} of {{total}}</p>
{% endif %}
{% endfor %}
<!-- Script -->
{% include script.html %}
</div>
</div>
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path}}" class="page-item next">»</a>
{% endif %}
</div>
{% endif %}
</div>
</div><!-- div#container -->
<!-- Footer -->
{% include footer.html %}
<!-- Script -->
{% include script.html %}
</div><!-- div#weekly -->
</div><!-- div#wrap -->
</body>
</html>

View File

@ -1,4 +0,0 @@
---
---
@import "minima";

View File

@ -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: #fff;
--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;
}
@ -81,16 +82,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);
}

View File

@ -5,15 +5,11 @@ image: /img/revuo-monero.png
---
<!-- Posts -->
<ul id="posts">
{% for post in paginator.posts %}
<li class="post">
<h2><a href="{% if site.baseurl == "/" %}{{ post.url }}{% else %}{{ post.url | prepend: site.baseurl }}{% endif %}.html">{{ post.title }}</a></h2>
<time datetime="{{ post.date | date_to_xmlschema }}" class="by-line">{{ post.date | date_to_string }}</time>
<p>{{ post.excerpt }}</p>
</li>
{% endfor %}
</ul>
{% for post in paginator.posts %}
<li class="post">
<h2><a href="{% if site.baseurl == "/" %}{{ post.url }}{% else %}{{ post.url | prepend: site.baseurl }}{% endif %}.html">{{ post.title }}</a></h2>
<time datetime="{{ post.date | date_to_xmlschema }}" class="by-line">{{ post.date | date_to_string }}</time>
<p>{{ post.excerpt }}</p>
</li>
{% endfor %}
</ul>

View File

@ -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 { document.documentElement.setAttribute('data-theme', 'light');
localStorage.setItem('theme', 'light');
}
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');
}
}
toggleSwitch.addEventListener('change', switchTheme, false);