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
dist/
install.ignore

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
{{#foreach related}}
<article class="{{post_class}}">
<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">
<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>

View File

@ -1,6 +1,6 @@
<article class="{{post_class}}">
<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">
<h4>{{name}}</h4>
</header>

View File

@ -18,7 +18,7 @@
{{#post}}
<div class="mind-post_content">
<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}}
<hr>