Code cleaned up v1

This commit is contained in:
monerooo 2022-04-02 11:21:09 +02:00
parent aaaebfcccc
commit 91ba1bb533
11 changed files with 183 additions and 210 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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -45,7 +45,7 @@
--block-bg-color: #2f3234; --block-bg-color: #2f3234;
--block-bg-color-secondary: #444444; --block-bg-color-secondary: #444444;
--block-bg-color-heading: #333333; --block-bg-color-heading: #333333;
--table-color: #fff; --table-color: #ffffff;
--head-nav-bg-color: transparent; --head-nav-bg-color: transparent;
--head-nav-text-color: #888888; --head-nav-text-color: #888888;
} }
@ -81,16 +81,16 @@ h1 {
a { a {
color: var(--primary-color); color: var(--primary-color);
} }
.moneroversary-table, .moneroversary-table,
.price-table{ .price-table {
color: var(--table-color); 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); background-color: var(--head-nav-bg-color);
color: var(--head-nav-text-color); color: var(--head-nav-text-color);
} }

View File

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

View File

@ -19,10 +19,10 @@ function switchTheme(e) {
if (e.target.checked) { if (e.target.checked) {
document.documentElement.setAttribute('data-theme', 'dark'); document.documentElement.setAttribute('data-theme', 'dark');
localStorage.setItem('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); toggleSwitch.addEventListener('change', switchTheme, false);