Compare commits

...

10 commits

11 changed files with 137 additions and 68 deletions

View file

@ -1,5 +1 @@
<time datetime="{{ definedDate | getDatetime }}"> <time datetime="{{ definedDate | getDatetime }}">{{ definedDate | toFullDate }}</time>
{{
definedDate | toFullDate
}}
</time>

View file

@ -2,39 +2,19 @@
<footer> <footer>
<nav id="footernav" aria-label="Footer"> <nav id="footernav" aria-label="Footer">
<ul>
{% year %} <a href="/" {% if activePage === '/' %} aria-current="page" {% endif %}>{{ meta.siteName }}</a> {% for item in navigation.bottom %}
<li><a
{% for item in navigation.bottom %} href="{{ item.url }}"
{{
<a helpers.getLinkActiveState(item.url,
href="{{ item.url }}" page.url)
{{ |
helpers.getLinkActiveState(item.url, safe
page.url) }}
| >{{ item.text }}</a
safe ></li>
}} {% endfor %}
>{{ item.text }}</a </ul>
>
{% endfor %}
</nav>
<nav id="social" aria-label="Social links">
{% for item in social %}
{% if item.platform == "rss" %}
<a href="{{ meta.url }}/{{ locale }}{{ item.url }}" rel="alternate" type="application/rss+xml">
{% else %}
<a href="{{ item.url }}" rel="me">
{% endif %}
<span class="sr-only">{{ item.platform }}</span>
<div aria-hidden="true">{% include 'icons/social-' + item.icon %}</div>
</a
>
{% endfor %}
</nav> </nav>
</footer> </footer>

View file

@ -1,5 +1,6 @@
<a href="#main" class="skip-link">{{ meta.skipContent }}</a> <a href="#main" class="skip-link">{{ meta.skipContent }}</a>
<header> <header>
<div></div>
{% include "partials/menu.njk" %} {% include "partials/menu.njk" %}
</header> </header>

View file

@ -0,0 +1,9 @@
{% if postslist %}
<ul role="list">
{% asyncEach post in postslist %}
<li>{% set definedDate = post.date %}
<a href="{{ post.url | url }}">{{ post.data.title }} ({% include "partials/date.njk" %})</a>
</li>
{% endeach %}
</ul>
{% endif %}

View file

@ -6,7 +6,6 @@
<a href="{{ post.url | url }}">{{ post.data.title }}</a> <a href="{{ post.url | url }}">{{ post.data.title }}</a>
</h2> </h2>
{% set definedDate = post.date %} {% include "partials/date.njk" %} {% set definedDate = post.date %} {% include "partials/date.njk" %}
{% set definedTags = post.data.tags %} {% include "partials/tags.njk" %}
<p>{{ post.data.description }}</p> <p>{{ post.data.description }}</p>
</li> </li>
{% endeach %} {% endeach %}

View file

@ -12,6 +12,6 @@ layout: base
{{ content | safe }} {{ content | safe }}
{% set postslist = collections.posts %} {% include "partials/posts.njk" %} {% set postslist = collections.posts %} {% include "partials/posts-light.njk" %}
</article> </article>

View file

@ -1,23 +1,14 @@
--- ---
layout: base layout: base
--- ---
<div>
<header>
<h1>{{ title }}</h1> <h1>{{ title }}</h1>
</header>
<article>
{{ content | safe }} {{ content | safe }}
</article> </div>
<article> <article>
<h2>{{ blog.title }}</h2> <h2>{{ blog.title }}</h2>
<!-- blog intro text is optional. -->
{% if blog.intro %}
<p>{{ blog.intro }}</p>
{% endif %}
</div>
{% set postslist = collections.posts.slice(0, 4) %} {% include "partials/posts.njk" %} {% set postslist = collections.posts.slice(0, 4) %} {% include "partials/posts-light.njk" %}
</article> </article>

View file

@ -3,11 +3,12 @@
--light-2: #ddd; --light-2: #ddd;
--light-3: #fed; --light-3: #fed;
--dark-1: #333; --dark-1: #333;
--dark-2: #123; --dark-2: #212121;
--light-transparent-1: rgba(125,125,125, 0.75); --light-transparent-1: rgba(125,125,125, 0.75);
--dark-transparent-1: rgba(200,195,190,0.15); --dark-transparent-1: rgba(200,195,190,0.15);
--color-1: #5bf; --color-1: #5bf;
--color-2: #4396cd;
--background-color: var(--light-1); --background-color: var(--light-1);
--text-color: var(--dark-1); --text-color: var(--dark-1);
@ -21,7 +22,8 @@
--text-color: var(--light-2); --text-color: var(--light-2);
--link-color: var(--color-1); --link-color: var(--color-1);
--link-focus: var(--light-3); --link-focus: var(--light-3);
}
body {
a{color:var(--link-color);} a{color:var(--link-color);}
a:focus{outline-color:var(--link-focus);} a:focus{outline-color:var(--link-focus);}
} }
@ -32,15 +34,17 @@ body{
background-color: var(--background-color); background-color: var(--background-color);
font-size: 18px; font-size: 18px;
font: 1.2rem/1.5 Century Gothic, sans-serif; font: 1.2rem/1.5 Century Gothic, sans-serif;
max-width: 600px; margin: 0;
max-width: 55ch; padding: 0;
margin: 0 auto; // max-width: 600px;
padding: 2.5rem 1.75rem; // max-width: 55ch;
} // margin: 0 auto;
header{ // padding: 2.5rem 1.75rem;
outline: 2px solid var(--light-2);
outline-offset: 1rem;
} }
// header{
// outline: 2px solid var(--light-2);
// outline-offset: 1rem;
// }
h1,h2,h3,h4,h5,h6{ h1,h2,h3,h4,h5,h6{
line-height: 1.2; line-height: 1.2;
font-family: Arial, serif; font-family: Arial, serif;
@ -107,4 +111,90 @@ dt:target{
color: var(--text-color); color: var(--text-color);
padding: .2rem .4rem; padding: .2rem .4rem;
line-height: 1; line-height: 1;
}
/* Body */
body {
display: flex;
flex-direction: column;
}
/* Header */
header {
display: flex;
justify-content: space-between;
padding: .4rem 1rem;
nav {
padding: 0 1rem;
}
ul {
margin: 0;
padding: 0;
list-style-type: none;
display: flex;
flex-wrap: wrap;
gap: .6rem;
li {
padding: .6rem .4rem;
}
a {
color: var(--text-color);
text-decoration: none;
border-bottom: 2px solid var(--link-color);
padding-bottom: .1rem;
&:focus, &:hover {
padding-bottom: 0;
}
}
}
}
footer {
display: flex;
justify-content: center;
padding: .4rem 1rem;
margin: 0;
nav {
padding: 0 1rem;
}
ul {
margin: 0;
padding: 0;
list-style-type: none;
display: inline-flex;
flex-wrap: wrap;
gap: .6rem;
li {
padding: .6rem .4rem;
}
a {
color: var(--text-color);
text-decoration: none;
border-bottom: 2px solid var(--link-color);
padding-bottom: .1rem;
&:focus, &:hover {
padding-bottom: 0;
}
}
}
}
/* Main */
main {
max-width: 600px;
max-width: 55ch;
margin: 0 auto;
padding: 2.5rem 1.75rem;
flex: auto;
} }

View file

@ -1,12 +1,15 @@
--- ---
permalink: /index.html permalink: /index.html
title: ' Eleventy Excellent' title: 'Welcome to my blog !'
description: 'Eleventy starter using modern CSS, fluid type, fluid spacing, flexible layout and progressive enhancement.' description: 'Eleventy starter using modern CSS, fluid type, fluid spacing, flexible layout and progressive enhancement.'
layout: 'home' layout: 'home'
blog:
title: "Latest post from the blog"
--- ---
## Eleventy demo Hey ! This is the home page !<br>
Have fun !
Hey ! This is a demo page ! Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Have fun ! Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.