Fix minor issues

- fixed indentation
- moved navbars and policy popup to "partials"
- fixed broken image if website icon wasn't set
This commit is contained in:
Bea 2020-11-04 23:29:55 +01:00
parent 3cf0c72092
commit eefd3de659
13 changed files with 109 additions and 107 deletions

1
.gitignore vendored
View File

@ -23,3 +23,4 @@ projectFilesBackup
.DS_Store .DS_Store
dist/ dist/
install.ignore

View File

@ -1,24 +1,22 @@
{{!< default}} {{!< default}}
<div class="mind-post-header unselectable"> <div class="mind-post-header unselectable">
{{#post}} {{#post}}
<div> <div>
<h1>{{title}}</h1> <h1>{{title}}</h1>
</div> </div>
{{/post}} {{/post}}
<i class="mind-global-header_arrow-down mind-global-header_arrow-down-mid"></i> <i class="mind-global-header_arrow-down mind-global-header_arrow-down-mid"></i>
</div> </div>
<main> <main>
<nav class="mind-global-navbar_secondary unselectable"> {{!< navbar}}
{{navigation type="secondary"}} <div class="mind-content_main">
</nav> <div class="mind-tag-content_main">
<div class="mind-content_main"> {{#get 'tags' limit='all' include='count.posts' order='count.posts desc'}}
<div class="mind-tag-content_main"> {{#foreach tags}}
{{#get 'tags' limit='all' include='count.posts' order='count.posts desc'}} {{> "tag-card-big"}}
{{#foreach tags}} {{/foreach}}
{{> "tag-card-big"}} {{/get}}
{{/foreach}} </div>
{{/get}}
</div> </div>
</div>
</main> </main>

View File

@ -1,74 +1,62 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{@site.lang}}"> <html lang="{{@site.lang}}">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="{{asset "css/screen.css"}}" /> <link rel="stylesheet" type="text/css" href="{{asset "css/screen.css"}}" />
<!-- Scripts Begin --> <!-- Scripts Begin -->
<script src="{{asset "js/jquery-3.5.1.js"}}"></script> <script src="{{asset "js/jquery-3.5.1.js"}}"></script>
<script src="{{asset "js/policy-popup.js"}}"></script> <script src="{{asset "js/policy-popup.js"}}"></script>
<script src="{{asset "js/arrow-fade.js"}}" async></script> <script src="{{asset "js/arrow-fade.js"}}" async></script>
<script src="{{asset "js/scroll-navbar-color.js"}}"></script> <script src="{{asset "js/scroll-navbar-color.js"}}"></script>
<!-- TODO: REMOVE ON PRODUCTION! --> {{!-- TODO: REMOVE ON PRODUCTION! --}}
<script type="text/javascript" src="http://livejs.com/live.js"></script> <script type="text/javascript" src="http://livejs.com/live.js"></script>
<!-- Scripts End --> {{!-- Scripts End --}}
<!-- Begin Page-specific code --> {{!-- Begin Page-specific code --}}
{{#is "post"}} {{#is "post"}}
<script src="{{asset "js/remark42-comments.js"}}"></script> <script src="{{asset "js/remark42-comments.js"}}"></script>
{{/is}} {{/is}}
{{#is "index"}} {{#is "index"}}
<title>{{@site.title}}</title> <title>{{@site.title}}</title>
{{/is}} {{/is}}
{{# is "post, page, tag"}} {{# is "post, page, tag"}}
<title>{{meta_title}} {{@site.title}}</title> <title>{{meta_title}} {{@site.title}}</title>
{{/is}} {{/is}}
<!-- End Page-specific code --> {{!-- End Page-specific code --}}
{{ghost_head}} {{ghost_head}}
{{!-- Outputs important meta data and settings, should always be in <head> --}} {{!-- Outputs important meta data and settings, should always be in <head> --}}
</head> </head>
<body class="{{body_class}}" onload="openPolicyPopup()"> <body class="{{body_class}}" onload="openPolicyPopup()">
<nav id="mind-global-navbar_primary" class="mind-global-navbar_primary unselectable"> {{> "navbar-primary"}}
<a href="/">
<img src="{{img_url @site.icon size="xxs"}}" />
</a>
{{navigation}}
</nav>
<div class="mind-policy-popup" id="mind-policy-popup"> {{> "policy-popup"}}
<h4>This website uses cookies.</h4>
<p>We use cookies to ensure you the best experience.
<br>
By visiting our website, you agree with our <a href="/policy" target="_blank">Privacy Policy</a>.
</p>
<button onclick="agreePolicyPopup()">Ok, understood</button>
</div>
{{{body}}} {{{body}}}
{{!-- All content gets inserted here, index.hbs, post.hbs, etc --}} {{!-- All content gets inserted here, index.hbs, post.hbs, etc --}}
<footer class="mind-site-footer_main unselectable"> <footer class="mind-site-footer_main unselectable">
<div> <div>
<p>Copyright © 2019-20 ― Lorenzo Dellacà</p> <p>Copyright © 2019-20 ― Lorenzo Dellacà</p>
</div> </div>
<nav class="mind-site-footer_nav"> <nav class="mind-site-footer_nav">
<a href="/policy/">Privacy Policy</a> <a href="/policy/">Privacy Policy</a>
</nav> </nav>
</footer> </footer>
{{!-- <foot> --}} {{!-- <foot> --}}
{{ghost_foot}} {{ghost_foot}}
{{!-- Outputs important scripts - should always be included before closing body tag --}} {{!-- Outputs important scripts - should always be included before closing body tag --}}
</body> </body>
</html> </html>

View File

@ -7,18 +7,16 @@
<main> <main>
<nav class="mind-global-navbar_secondary unselectable"> {{> "navbar-secondary"}}
{{navigation type="secondary"}} <div class="mind-content_main">
</nav> <div class="mind-feed-content_main">
<div class="mind-content_main">
<div class="mind-feed-content_main">
<!-- Looping through every post --> <!-- Looping through every post -->
{{#foreach posts}} {{#foreach posts}}
{{> "post-card-big"}} {{> "post-card-big"}}
{{/foreach}} {{/foreach}}
</div>
</div> </div>
</div>
</main> </main>
<!-- Vanta.JS Scripts to make the background cool, but disabled on mobile --> <!-- Vanta.JS Scripts to make the background cool, but disabled on mobile -->

View File

@ -1,24 +1,22 @@
{{!< default}} {{!< default}}
<div class="mind-index-header_main unselectable" id="vantajs"> <div class="mind-index-header_main unselectable" id="vantajs">
<h1>{{@site.title}}</h1> <h1>{{@site.title}}</h1>
<i class="mind-global-header_arrow-down mind-global-header_arrow-down-big"></i> <i class="mind-global-header_arrow-down mind-global-header_arrow-down-big"></i>
</div> </div>
<main> <main>
<nav class="mind-global-navbar_secondary unselectable"> {{> "navbar-secondary"}}
{{navigation type="secondary"}} <div class="mind-content_main">
</nav> <div class="mind-feed-content_main">
<div class="mind-content_main">
<div class="mind-feed-content_main">
<!-- Looping through every post --> <!-- Looping through every post -->
{{#foreach posts}} {{#foreach posts}}
{{> "post-card-big"}} {{> "post-card-big"}}
{{/foreach}} {{/foreach}}
</div>
</div> </div>
</div>
</main> </main>
<!-- Vanta.JS Scripts to make the background cool, but disabled on mobile --> <!-- Vanta.JS Scripts to make the background cool, but disabled on mobile -->

View File

@ -9,16 +9,16 @@
</div> </div>
<main> <main>
<div class="mind-content_main"> <div class="mind-content_main">
<div class="mind-post_main"> <div class="mind-post_main">
{{#post}} {{#post}}
<div class="mind-post_content"> <div class="mind-post_content">
<div class="mind-post_content-header"> <div class="mind-post_content-header">
<img class="mind-post_feature-image" src="{{img_url feature_image size="l"}}"/> <img class="mind-post_feature-image" src="{{img_url feature_image size="l"}}" alt="Feature Image"/>
</div>
{{content}}
</div>
{{/post}}
</div> </div>
{{content}}
</div>
{{/post}}
</div> </div>
</div>
</main> </main>

View File

@ -0,0 +1,8 @@
<nav id="mind-global-navbar_primary" class="mind-global-navbar_primary unselectable">
<a href="/">
{{#if @site.icon}}
<img src="{{img_url @site.icon size="xxs"}}" alt="Website Logo"/>
{{/if}}
</a>
{{navigation}}
</nav>

View File

@ -0,0 +1,3 @@
<nav class="mind-global-navbar_secondary unselectable">
{{navigation type="secondary"}}
</nav>

View File

@ -0,0 +1,8 @@
<div class="mind-policy-popup" id="mind-policy-popup">
<h4>This website uses cookies.</h4>
<p>We use cookies to ensure you the best experience.
<br>
By visiting our website, you agree with our <a href="/policy" target="_blank">Privacy Policy</a>.
</p>
<button onclick="agreePolicyPopup()">Ok, understood</button>
</div>

View File

@ -1,6 +1,6 @@
<article class="{{post_class}}"> <article class="{{post_class}}">
<a class="mind-post-card-big_main" href="{{url}}"> <a class="mind-post-card-big_main" href="{{url}}">
<img class="mind-post-card-big_feature-image" src="{{img_url feature_image size="m"}}" /> <img class="mind-post-card-big_feature-image" src="{{img_url feature_image size="m"}}" alt="Feature Image"/>
<header class="mind-post-card-big_header"> <header class="mind-post-card-big_header">
<p class="mind-post-card-big_meta"><span class="mind-post-card-big_tag">{{primary_tag.name}}</span> <p class="mind-post-card-big_meta"><span class="mind-post-card-big_tag">{{primary_tag.name}}</span>
• <time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time></p> • <time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time></p>

View File

@ -3,7 +3,7 @@
{{#foreach related}} {{#foreach related}}
<article class="{{post_class}}"> <article class="{{post_class}}">
<a class="mind-post-card-sidebar_main" href="{{url}}"> <a class="mind-post-card-sidebar_main" href="{{url}}">
<img class="mind-post-card-sidebar_feature-image" src="{{img_url feature_image size="s"}}" /> <img class="mind-post-card-sidebar_feature-image" src="{{img_url feature_image size="s"}}" alt="Feature Image"/>
<header class="mind-post-card-sidebar_header"> <header class="mind-post-card-sidebar_header">
<p class="mind-post-card-sidebar_meta"><span class="mind-post-card-sidebar_tag">{{primary_tag.name}}</span> • <time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time></p> <p class="mind-post-card-sidebar_meta"><span class="mind-post-card-sidebar_tag">{{primary_tag.name}}</span> • <time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time></p>
<h5>{{title}}</h5> <h5>{{title}}</h5>

View File

@ -1,6 +1,6 @@
<article class="{{post_class}}"> <article class="{{post_class}}">
<a class="mind-tag-card_main" href="{{url}}"> <a class="mind-tag-card_main" href="{{url}}">
<img class="mind-tag-card_feature-image" src="{{img_url feature_image size="s"}}" /> <img class="mind-tag-card_feature-image" src="{{img_url feature_image size="s"}}" alt="Feature Image"/>
<header class="mind-tag-card_header"> <header class="mind-tag-card_header">
<h4>{{name}}</h4> <h4>{{name}}</h4>
</header> </header>

View File

@ -18,7 +18,7 @@
{{#post}} {{#post}}
<div class="mind-post_content"> <div class="mind-post_content">
<div class="mind-post_content-header"> <div class="mind-post_content-header">
<img class="mind-post_feature-image" src="{{img_url feature_image size="l"}}"/> <img class="mind-post_feature-image" src="{{img_url feature_image size="l"}}" alt="Feature Image"/>
</div> </div>
{{content}} {{content}}
<hr> <hr>