began structuring index page. posts now show correctly on a 1920x1080 screen.
This commit is contained in:
parent
359e6108c9
commit
3b02a75451
67
assets/css/home-style.css
Normal file → Executable file
67
assets/css/home-style.css
Normal file → Executable file
@ -24,17 +24,68 @@ h1 {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mind-articles-container {
|
.mind-feed {
|
||||||
width: 100%;
|
/* todo: move to generic class */
|
||||||
text-align: center;
|
margin: auto;
|
||||||
|
width: 1260px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
max-width: 100%;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
|
grid-gap: 30px;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-card {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
padding: 20px;
|
||||||
|
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* Style */
|
||||||
|
background-color: rgb(50, 50, 50);
|
||||||
|
border: 1px solid;
|
||||||
|
border-color: transparent;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: 0 1px 1px black, 0 2px 4px black;
|
||||||
|
transition: 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-card:hover {
|
||||||
|
transform:translate3d(0,-5px,0);
|
||||||
|
box-shadow: 1px 3px 15px 2px black;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.post-card {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.post-card:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer.post-meta {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
article {
|
article {
|
||||||
display: inline-block;
|
box-sizing: border-box;
|
||||||
width: 500px;
|
}
|
||||||
margin: 2%;
|
|
||||||
vertical-align: top;
|
.post-card_profile-image {
|
||||||
text-align: left;
|
border-radius: 20%;
|
||||||
|
margin-left: 10px;
|
||||||
|
max-width: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-card_feature-image {
|
||||||
|
border-radius: 5px;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ANIMATED GRADIENT BACKGROUND */
|
/* ANIMATED GRADIENT BACKGROUND */
|
||||||
|
12
assets/css/page-style.css
Normal file → Executable file
12
assets/css/page-style.css
Normal file → Executable file
@ -26,18 +26,6 @@ h1 {
|
|||||||
bottom: 10%;
|
bottom: 10%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* COLORED TEXT SELECTION */
|
|
||||||
::selection {
|
|
||||||
color: #2d0670;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
We need RGBA because Chrome forces it to be semi-trasparent, making white look like grey.
|
|
||||||
By setting it to 99.5% opacity, we can override this. 100% does not work, however.
|
|
||||||
*/
|
|
||||||
background: rgba(255, 255, 255, 0.995);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ANIMATED GRADIENT BACKGROUND */
|
/* ANIMATED GRADIENT BACKGROUND */
|
||||||
@keyframes gradient {
|
@keyframes gradient {
|
||||||
0% {background-position: 0%}
|
0% {background-position: 0%}
|
||||||
|
62
assets/css/screen.css
Normal file → Executable file
62
assets/css/screen.css
Normal file → Executable file
@ -2,12 +2,26 @@
|
|||||||
/* CSS Document */
|
/* CSS Document */
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
font-family: 'Raleway', sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 1.6;
|
||||||
|
color: white;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: paleturquoise;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
@ -43,6 +57,10 @@ h4 {
|
|||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
display: block;
|
||||||
|
background-color: #151515;
|
||||||
|
}
|
||||||
.nav {
|
.nav {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
@ -61,6 +79,16 @@ h4 {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
|
transition: 1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-colored {
|
||||||
|
background: rgba(0, 0, 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-transparent {
|
||||||
|
background: rgba(0, 0, 0, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar li {
|
.navbar li {
|
||||||
@ -90,14 +118,6 @@ h4 {
|
|||||||
|
|
||||||
/* Begin Content */
|
/* Begin Content */
|
||||||
.mind-content {
|
.mind-content {
|
||||||
font-family: 'Raleway', sans-serif;
|
|
||||||
font-weight: 300;
|
|
||||||
background-color: #151515;
|
|
||||||
font-size: 22px;
|
|
||||||
line-height: 1.6;
|
|
||||||
color: white;
|
|
||||||
width: 100%;
|
|
||||||
text-align: left;
|
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
@ -105,16 +125,11 @@ h4 {
|
|||||||
padding-right: 20%;
|
padding-right: 20%;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mind-content a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: paleturquoise;
|
|
||||||
}
|
|
||||||
/* End Content */
|
/* End Content */
|
||||||
|
|
||||||
/* Begin footer */
|
/* Begin footer */
|
||||||
/* .mind-fullscreen-title is only used by pages (no homepage), however other pages have the footer too. */
|
/* .mind-fullscreen-title is only used by pages (no homepage), however other pages have the footer too. */
|
||||||
.mind-fullscreen-title, footer {
|
.mind-fullscreen-title, footer.mind-site-footer {
|
||||||
background: linear-gradient(45deg, #067062, #063d70, #2d0670, #4e0670, #700667);
|
background: linear-gradient(45deg, #067062, #063d70, #2d0670, #4e0670, #700667);
|
||||||
background-size: 1000%, 100%;
|
background-size: 1000%, 100%;
|
||||||
animation: gradient 7s linear infinite;
|
animation: gradient 7s linear infinite;
|
||||||
@ -219,8 +234,8 @@ h4 {
|
|||||||
|
|
||||||
.kg-gallery-container {
|
.kg-gallery-container {
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
.kg-gallery-image {
|
.kg-gallery-image {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -279,6 +294,17 @@ h4 {
|
|||||||
-o-user-select: none;
|
-o-user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* COLORED TEXT SELECTION */
|
||||||
|
::selection {
|
||||||
|
color: #2d0670;
|
||||||
|
|
||||||
|
/*
|
||||||
|
We need RGBA because Chrome forces it to be semi-trasparent, making white look like grey.
|
||||||
|
By setting it to 99.5% opacity, we can override this. 100% does not work, however.
|
||||||
|
*/
|
||||||
|
background: rgba(255, 255, 255, 0.995);
|
||||||
|
}
|
||||||
|
|
||||||
/* Begin media queries for elements size */
|
/* Begin media queries for elements size */
|
||||||
@media (min-width: 0px) and (max-width:200px) {
|
@media (min-width: 0px) and (max-width:200px) {
|
||||||
|
|
||||||
@ -559,11 +585,11 @@ h4 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Raleway';
|
font-family: 'Roboto';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url(https://fonts.gstatic.com/s/raleway/v17/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVuEorCIPrE.woff2) format('woff2');
|
src: local('Roboto Light'), local('Roboto-Light'), url(https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmSU5fBBc4.woff2) format('woff2');
|
||||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||||
}
|
}
|
||||||
/* End fonts */
|
/* End fonts */
|
||||||
|
0
assets/js/arrow-fade.js
Normal file → Executable file
0
assets/js/arrow-fade.js
Normal file → Executable file
0
assets/js/jquery-3.5.1.js
vendored
Normal file → Executable file
0
assets/js/jquery-3.5.1.js
vendored
Normal file → Executable file
0
assets/js/policy-popup.js
Normal file → Executable file
0
assets/js/policy-popup.js
Normal file → Executable file
45
assets/js/scroll-navbar-color.js
Executable file
45
assets/js/scroll-navbar-color.js
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
var scroll_pos = 0;
|
||||||
|
var transparent = true;
|
||||||
|
var offset = 100;
|
||||||
|
|
||||||
|
function makeTransparent()
|
||||||
|
{
|
||||||
|
$("#navbar").removeClass('navbar-colored').addClass('navbar-transparent');
|
||||||
|
transparent = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function makeOpaque()
|
||||||
|
{
|
||||||
|
$("#navbar").removeClass('navbar-transparent').addClass('navbar-colored');
|
||||||
|
transparent = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
scroll_pos = $(this).scrollTop();
|
||||||
|
if(scroll_pos > offset)
|
||||||
|
{
|
||||||
|
makeOpaque();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
makeTransparent();
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).scroll(function() {
|
||||||
|
scroll_pos = $(this).scrollTop();
|
||||||
|
if(transparent)
|
||||||
|
{
|
||||||
|
if(scroll_pos > offset)
|
||||||
|
{
|
||||||
|
makeOpaque();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(scroll_pos <= offset)
|
||||||
|
{
|
||||||
|
makeTransparent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
15
default.hbs
Normal file → Executable file
15
default.hbs
Normal file → Executable file
@ -11,7 +11,12 @@
|
|||||||
<!-- 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>
|
||||||
|
|
||||||
|
<!-- TODO: REMOVE ON PRODUCTION! -->
|
||||||
|
<script type="text/javascript" src="http://livejs.com/live.js"></script>
|
||||||
|
|
||||||
<!-- Scripts End -->
|
<!-- Scripts End -->
|
||||||
|
|
||||||
<!-- Begin Posts & Pages only code -->
|
<!-- Begin Posts & Pages only code -->
|
||||||
@ -32,12 +37,16 @@
|
|||||||
{{/is}}
|
{{/is}}
|
||||||
<!-- End Index only code -->
|
<!-- End Index only 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()">
|
||||||
|
|
||||||
|
<div id="navbar" class="navbar unselectable">
|
||||||
|
{{navigation}}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="mind-policy-popup" id="mind-policy-popup">
|
<div class="mind-policy-popup" id="mind-policy-popup">
|
||||||
<h4>This website uses cookies.</h4>
|
<h4>This website uses cookies.</h4>
|
||||||
<p>We use cookies to ensure you the best experience.
|
<p>We use cookies to ensure you the best experience.
|
||||||
@ -51,7 +60,7 @@
|
|||||||
{{!-- All content gets inserted here, index.hbs, post.hbs, etc --}}
|
{{!-- All content gets inserted here, index.hbs, post.hbs, etc --}}
|
||||||
|
|
||||||
|
|
||||||
<footer class="unselectable">
|
<footer class="mind-site-footer unselectable">
|
||||||
<h4>Copyright © 2019-20 ― Lorenzo Dellacà</h4>
|
<h4>Copyright © 2019-20 ― Lorenzo Dellacà</h4>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
36
index.hbs
Normal file → Executable file
36
index.hbs
Normal file → Executable file
@ -1,7 +1,4 @@
|
|||||||
{{!< default}}
|
{{!< default}}
|
||||||
<div class="navbar unselectable">
|
|
||||||
{{navigation}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mind-site-title unselectable" id="vantajs">
|
<div class="mind-site-title unselectable" id="vantajs">
|
||||||
<h1>{{@site.title}}</h1>
|
<h1>{{@site.title}}</h1>
|
||||||
@ -9,29 +6,28 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<main>
|
<main class="mind-index">
|
||||||
<div class="mind-content">
|
<h2>Last posts</h2>
|
||||||
<h2>Last posts</h2>
|
<div class="mind-feed">
|
||||||
|
|
||||||
<div class="mind-articles-container">
|
|
||||||
<!-- Looping through every post -->
|
<!-- Looping through every post -->
|
||||||
{{#foreach posts}}
|
{{#foreach posts}}
|
||||||
<article class="{{post_class}}">
|
<article class="{{post_class}}">
|
||||||
<header class="post-header">
|
<a class="post-card" href="{{url}}">
|
||||||
<h3><a href="{{url}}">{{title}}</a></h3>
|
<header class="post-header">
|
||||||
</header>
|
<img class="post-card_feature-image" src="{{feature_image}}" />
|
||||||
<section class="post-excerpt">
|
<h3>{{title}}</h3>
|
||||||
<p>{{excerpt words="26"}} <a class="read-more" href="{{url}}">...</a></p>
|
</header>
|
||||||
</section>
|
<section class="post-excerpt">
|
||||||
<footer class="post-meta">
|
<p>{{excerpt words="26"}}</p>
|
||||||
{{#if primary_author.profile_image}}<img src="{{primary_author.profile_image}}" alt="Author image" />{{/if}}
|
</section>
|
||||||
{{primary_author}}
|
<footer class="post-meta">
|
||||||
{{tags prefix=" on "}}
|
{{primary_author.name}}
|
||||||
<time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time>
|
{{#if primary_author.profile_image}}<img class="post-card_profile-image" src="{{primary_author.profile_image}}" alt="Author image" />{{/if}}
|
||||||
</footer>
|
</footer>
|
||||||
|
</a>
|
||||||
</article>
|
</article>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
0
package.json
Normal file → Executable file
0
package.json
Normal file → Executable file
3
page.hbs
Normal file → Executable file
3
page.hbs
Normal file → Executable file
@ -1,8 +1,5 @@
|
|||||||
{{!< default}}
|
{{!< default}}
|
||||||
{{#post}}
|
{{#post}}
|
||||||
<div class="navbar unselectable">
|
|
||||||
{{navigation}}
|
|
||||||
</div>
|
|
||||||
<div class="mind-fullscreen-title unselectable">
|
<div class="mind-fullscreen-title unselectable">
|
||||||
<h1>{{title}}</h1>
|
<h1>{{title}}</h1>
|
||||||
<i class="arrow-down"></i>
|
<i class="arrow-down"></i>
|
||||||
|
3
post.hbs
Normal file → Executable file
3
post.hbs
Normal file → Executable file
@ -1,8 +1,5 @@
|
|||||||
{{!< default}}
|
{{!< default}}
|
||||||
{{#post}}
|
{{#post}}
|
||||||
<div class="navbar unselectable">
|
|
||||||
{{navigation}}
|
|
||||||
</div>
|
|
||||||
<div class="mind-fullscreen-title unselectable">
|
<div class="mind-fullscreen-title unselectable">
|
||||||
<h1>{{title}}</h1>
|
<h1>{{title}}</h1>
|
||||||
<i class="arrow-down"></i>
|
<i class="arrow-down"></i>
|
||||||
|
Loading…
Reference in New Issue
Block a user