diff --git a/.eleventy.js b/.eleventy.js index faf343e..eaff208 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -41,28 +41,32 @@ module.exports = function(config) { // Custom collections const livePosts = post => post.date <= now && !post.data.draft; + const newsPosts = post => post.data.type === 'news'; + const eventPosts = post => post.data.type === 'event'; + config.addCollection('posts', collection => { return [ - ...collection.getFilteredByGlob('./src/posts/*.md').filter(livePosts) + ...collection.getFilteredByGlob('./src/posts/*.md') ].reverse(); }); - - config.addCollection('postFeed', collection => { - return [...collection.getFilteredByGlob('./src/posts/*.md').filter(livePosts)] - .reverse() - .slice(0, site.maxPostsPerPage); + config.addCollection('news', collection => { + return [ + ...collection.getFilteredByGlob('./src/posts/*.md').filter(newsPosts) + ].reverse(); + }); + config.addCollection('events', collection => { + return [ + ...collection.getFilteredByGlob('./src/posts/*.md').filter(eventPosts) + ].reverse(); }); config.addCollection('newsFeed', collection => { return [...collection.getFilteredByGlob('./src/posts/*.md').filter(livePosts)] .reverse() .slice(0, site.maxNewsPerPage); }); - - // const teamMembers = member; config.addCollection('members', collection => { return [...collection.getFilteredByGlob("./src/members/*.md")]; }); - config.addCollection('profiles', collection => { return [...collection.getFilteredByGlob("./src/members/*.md")] .slice(0, site.maxProfilePreview); diff --git a/src/_data/navigation.json b/src/_data/navigation.json index 2e0ef6b..51574ca 100644 --- a/src/_data/navigation.json +++ b/src/_data/navigation.json @@ -1,23 +1,23 @@ { "items": [ + { + "text": "Actualité", + "url": "/posts/", + "external": false + }, { "text": "Comprendre la CAE", - "url": "/comprendre-la-cae", + "url": "/comprendre-la-cae/", "external": false }, { "text": "Nous rejoindre", - "url": "/nous-rejoindre", + "url": "/nous-rejoindre/", "external": false }, { "text": "L'équipe", - "url": "/equipe", - "external": false - }, - { - "text": "Actualité", - "url": "/actualite", + "url": "/equipe/", "external": false }, { diff --git a/src/_includes/layouts/home.njk b/src/_includes/layouts/home.njk index f960436..d66d47c 100644 --- a/src/_includes/layouts/home.njk +++ b/src/_includes/layouts/home.njk @@ -7,7 +7,7 @@ {% block content %}
{% include "partials/components/intro.njk" %} - {% include "partials/components/news-list.njk" %} + {% include "partials/components/posts-list-home.njk" %} {% include "partials/components/post-list.njk" %} {% include "partials/components/presentation.njk" %} {% include "partials/components/sponsor.njk" %} diff --git a/src/_includes/layouts/post.njk b/src/_includes/layouts/post.njk index f7cfd2d..39b9b8b 100644 --- a/src/_includes/layouts/post.njk +++ b/src/_includes/layouts/post.njk @@ -1,47 +1,17 @@ {% extends 'layouts/base.njk' %} -{# Intro content #} -{% set introHeading = title %} -{% set introSummary %} -

- {% if date %} - - {% endif %} - — {{ helpers.getReadingTime(content) }} minute read -

-{% endset %} - {% block content %}
-
- {% include "partials/components/intro.njk" %} -
+
+
+

{{ title }}

+ {% if illustration %} + illustration de l'article + {% endif %} {{ content | safe }} + Voir toute l'actualité
- {% if site.enableThirdPartyComments %} -
- - {% endif %} - {% if tags %} -
-
- -
-
- {% endif %}
+ {% include "partials/components/contact-form.njk" %}
{% endblock %} - -{{ content | safe }} diff --git a/src/_includes/layouts/posts-events.njk b/src/_includes/layouts/posts-events.njk new file mode 100644 index 0000000..d2d9855 --- /dev/null +++ b/src/_includes/layouts/posts-events.njk @@ -0,0 +1,24 @@ +{% extends 'layouts/base.njk' %} + +{% set newsListItems = collections.events %} + +{% block content %} +
+
+

{{ pageHeading }}

+ +
+ {% include "partials/components//posts-list.njk" %} + {% include "partials/components/contact-form.njk" %} +
+{% endblock %} diff --git a/src/_includes/layouts/posts-news.njk b/src/_includes/layouts/posts-news.njk new file mode 100644 index 0000000..7cdad84 --- /dev/null +++ b/src/_includes/layouts/posts-news.njk @@ -0,0 +1,24 @@ +{% extends 'layouts/base.njk' %} + +{% set newsListItems = collections.news %} + +{% block content %} +
+
+

{{ pageHeading }}

+ +
+ {% include "partials/components//posts-list.njk" %} + {% include "partials/components/contact-form.njk" %} +
+{% endblock %} diff --git a/src/_includes/layouts/posts.njk b/src/_includes/layouts/posts.njk new file mode 100644 index 0000000..710800e --- /dev/null +++ b/src/_includes/layouts/posts.njk @@ -0,0 +1,27 @@ +{% extends 'layouts/base.njk' %} + +{% set newsListItems = collections.posts %} + +{% block content %} +
+
+

{{ pageHeading }}

+ +
+
+ {% include "partials/components/posts-list.njk" %} +
+ + {% include "partials/components/contact-form.njk" %} +
+{% endblock %} diff --git a/src/_includes/partials/components/nav.njk b/src/_includes/partials/components/nav.njk index a101c23..01388a5 100644 --- a/src/_includes/partials/components/nav.njk +++ b/src/_includes/partials/components/nav.njk @@ -13,8 +13,12 @@ {% set currentAttribute = ' aria-current="page"' %} {% endif %} + {% if page.url == item.url %} + {% endfor %} diff --git a/src/_includes/partials/components/news-list.njk b/src/_includes/partials/components/news-list.njk deleted file mode 100644 index 488ae99..0000000 --- a/src/_includes/partials/components/news-list.njk +++ /dev/null @@ -1,25 +0,0 @@ -{% if newsListItems.length %} -
- -
-
-

{{ newsListHeading }}

-
    - {% for item in newsListItems %} - {% if item.date.getTime() <= global.now %} -
  1. -

    - {{ item.data.title }} -

    -

    - -

    -
  2. - {% endif %} - {% endfor %} -
- Voir tout -
-
-
-{% endif %} diff --git a/src/_includes/partials/components/posts-list-home.njk b/src/_includes/partials/components/posts-list-home.njk new file mode 100644 index 0000000..16f51a7 --- /dev/null +++ b/src/_includes/partials/components/posts-list-home.njk @@ -0,0 +1,10 @@ +
+ +
+
+

{{ newsListHeading }}

+ {% include "partials/components/posts-list.njk" %} + Voir tout +
+
+
diff --git a/src/_includes/partials/components/posts-list.njk b/src/_includes/partials/components/posts-list.njk new file mode 100644 index 0000000..7e8e613 --- /dev/null +++ b/src/_includes/partials/components/posts-list.njk @@ -0,0 +1,16 @@ +{% if newsListItems.length %} +
    + {% for item in newsListItems %} + {% if item.date.getTime() <= global.now %} +
  1. +

    + {{ item.data.title }} +

    +

    + +

    +
  2. + {% endif %} + {% endfor %} +
+{% endif %} diff --git a/src/images/reunion-24-06-2020.jpeg b/src/images/reunion-24-06-2020.jpeg new file mode 100644 index 0000000..b5c979b Binary files /dev/null and b/src/images/reunion-24-06-2020.jpeg differ diff --git a/src/pages/posts-events.md b/src/pages/posts-events.md new file mode 100644 index 0000000..6babb53 --- /dev/null +++ b/src/pages/posts-events.md @@ -0,0 +1,8 @@ +--- +title: 'Actualité & Évènements' +permalink: '/posts-events/index.html' +layout: 'layouts/posts-events.njk' +pageHeading: 'Actualité & Évènements' +--- + + diff --git a/src/pages/posts-news.md b/src/pages/posts-news.md new file mode 100644 index 0000000..32e7e00 --- /dev/null +++ b/src/pages/posts-news.md @@ -0,0 +1,8 @@ +--- +title: 'Actualité & Évènements' +permalink: '/posts-news/index.html' +layout: 'layouts/posts-news.njk' +pageHeading: 'Actualité & Évènements' +--- + + diff --git a/src/pages/posts.md b/src/pages/posts.md new file mode 100644 index 0000000..a7557b2 --- /dev/null +++ b/src/pages/posts.md @@ -0,0 +1,8 @@ +--- +title: 'Actualité & Évènements' +permalink: '/posts/index.html' +layout: 'layouts/posts.njk' +pageHeading: 'Actualité & Évènements' +--- + + diff --git a/src/posts/a-post-with-code-samples.md b/src/posts/a-post-with-code-samples.md index 0a91b94..46ee4bd 100644 --- a/src/posts/a-post-with-code-samples.md +++ b/src/posts/a-post-with-code-samples.md @@ -1,6 +1,7 @@ --- title: A post with code samples date: '2019-12-18' +type: 'news' tags: - demo-content - code diff --git a/src/posts/a-post-with-figures-and-video.md b/src/posts/a-post-with-figures-and-video.md index 1a6a798..53c5622 100644 --- a/src/posts/a-post-with-figures-and-video.md +++ b/src/posts/a-post-with-figures-and-video.md @@ -1,6 +1,7 @@ --- title: A post with figures and video date: '2019-04-18' +type: 'news' tags: - demo-content - blog diff --git a/src/posts/a-scheduled-post.md b/src/posts/a-scheduled-post.md index 71d9d5d..3d971ea 100644 --- a/src/posts/a-scheduled-post.md +++ b/src/posts/a-scheduled-post.md @@ -1,6 +1,7 @@ --- title: A scheduled post date: '2022-06-18' +type: 'news' tags: - demo-content - simple-post diff --git a/src/posts/a-simple-post copy.md b/src/posts/a-simple-post copy.md new file mode 100644 index 0000000..bbea1b2 --- /dev/null +++ b/src/posts/a-simple-post copy.md @@ -0,0 +1,29 @@ +--- +title: A simple post +date: '2019-05-18' +type: 'news' +tags: + - demo-content + - simple-post + - blog +--- +A simple post to demonstrate how a normal blog post looks on Hylia. Content is all set in the “Body” field as markdown and Eleventy transforms it into a proper HTML post. You can also edit the markdown file directly if you prefer not to use the CMS. + +How about a `
`? + +> Maecenas faucibus mollis interdum. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vitae elit libero, a pharetra augue. + +A list of stuff: + +- Sed posuere consectetur est at lobortis +- Aenean lacinia bibendum nulla sed consectetur +- Sed posuere consectetur est at lobortis + +How about an ordered list of stuff: + +1. Sed posuere consectetur est at lobortis +2. Aenean lacinia bibendum nulla sed consectetur +3. Sed posuere consectetur est at lobortis + + +Hopefully, this has demonstrated how simple it is to make a nice looking blog with Hylia. diff --git a/src/posts/a-simple-post.md b/src/posts/a-simple-post.md index a7ed564..700dc29 100644 --- a/src/posts/a-simple-post.md +++ b/src/posts/a-simple-post.md @@ -1,28 +1,10 @@ --- -title: A simple post -date: '2019-05-18' +title: A simpler post +date: '2019-05-19' +type: 'news' tags: - demo-content - simple-post - blog --- A simple post to demonstrate how a normal blog post looks on Hylia. Content is all set in the “Body” field as markdown and Eleventy transforms it into a proper HTML post. You can also edit the markdown file directly if you prefer not to use the CMS. - -How about a `
`? - -> Maecenas faucibus mollis interdum. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vitae elit libero, a pharetra augue. - -A list of stuff: - -- Sed posuere consectetur est at lobortis -- Aenean lacinia bibendum nulla sed consectetur -- Sed posuere consectetur est at lobortis - -How about an ordered list of stuff: - -1. Sed posuere consectetur est at lobortis -2. Aenean lacinia bibendum nulla sed consectetur -3. Sed posuere consectetur est at lobortis - - -Hopefully, this has demonstrated how simple it is to make a nice looking blog with Hylia. diff --git a/src/posts/evenement-12-06-20.md b/src/posts/evenement-12-06-20.md index d851484..f66176c 100644 --- a/src/posts/evenement-12-06-20.md +++ b/src/posts/evenement-12-06-20.md @@ -2,6 +2,7 @@ title: Réunion d'information Astrolabe date: '2020-06-12' time: '19:00' +type: 'event' tags: - évenement - réunion diff --git a/src/posts/evenement-24-06-20.md b/src/posts/evenement-24-06-20.md new file mode 100644 index 0000000..f7cca05 --- /dev/null +++ b/src/posts/evenement-24-06-20.md @@ -0,0 +1,16 @@ +--- +title: Réunion d'information Astrolabe +date: '2020-06-24' +time: '19:00' +type: 'event' +illustration: '/images/reunion-24-06-2020.jpeg' +layout: 'layouts/post.njk' +--- +Vous vous demandez ce qu'est une #SCOP #CAE ? Le statut d'entrepreneur salarié #CESA est-il fait pour vous ? + +Venez nous rencontrer lors de notre réunion d'information : + +- Date : 24 Juin 19H +- Lieu : Visio-conférence + +[Formulaire d'inscription](https://framaforms.org/reunion-dinformation-scop-astrolabe-cae-du-24-juin-a-19h-en-visio-1591805443) diff --git a/src/scss/_theme.scss b/src/scss/_theme.scss index 1bb6812..721133d 100644 --- a/src/scss/_theme.scss +++ b/src/scss/_theme.scss @@ -60,5 +60,21 @@ a:visited { &.highlight { background-color: var(--color-primary); + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } +} + +.return-link { + align-self: flex-end; + font-size: 1.125rem; + font-weight: 700; + margin-top: 2rem; + + &:visited { + color: inherit; } } diff --git a/src/scss/components/_nav.scss b/src/scss/components/_nav.scss index 89f3e4b..e21bfc7 100644 --- a/src/scss/components/_nav.scss +++ b/src/scss/components/_nav.scss @@ -29,5 +29,10 @@ text-decoration: none; } } + + &.active a { + text-decoration: underline; + cursor: default; + } } } diff --git a/src/scss/components/_post.scss b/src/scss/components/_post.scss index cfb6452..b80555d 100644 --- a/src/scss/components/_post.scss +++ b/src/scss/components/_post.scss @@ -1,32 +1,23 @@ .post { - padding-bottom: 8rem; + margin-bottom: 8rem; &__body { - // --flow-space: #{get-size(800)}; + display: flex; + flex-direction: column; - /** - * Generic HTML styles - */ - h1 { - margin-top: 8rem; + h1 { + margin: 8rem 0 4rem; } - - // h2 + *, - // h3 + * { - // --flow-space: #{get-size(500)}; - // } h2, h3 { @include apply-utility('leading', 'tight'); position: relative; - /*display: flex;*/ } - - p { font-size: 1.125rem; + margin-bottom: 1rem; } a:not([class]) { @@ -75,6 +66,7 @@ ol:not([class]), ul:not([class]) { margin-left: get-size(800); + margin-bottom: 1rem; li + li { margin-top: get-size(300); @@ -101,12 +93,6 @@ position: relative; } - figure img, - pre > code, - .video-player { - // box-shadow: 0 10px 30px rgba(0, 0, 0, .15); - } - figure img { position: relative; z-index: 1; @@ -120,6 +106,11 @@ padding: 0 get-size(500); } + .post-pic { + align-self: center; + margin-bottom: 3rem; + } + pre > code { display: block; background: var(--color-dark); @@ -134,7 +125,6 @@ grid-template-rows: auto; grid-column-gap: 1.5rem; grid-row-gap: 0; - margin-top: 4rem; .video-player > iframe { height: 89%; @@ -237,7 +227,7 @@ .process-cae { max-width: 34.875rem; - margin: 8rem auto 0; + margin: 0 auto; &.split { max-width: 100%; diff --git a/src/scss/components/_news-list.scss b/src/scss/components/_posts-list.scss similarity index 78% rename from src/scss/components/_news-list.scss rename to src/scss/components/_posts-list.scss index 24d8d5a..232fce6 100644 --- a/src/scss/components/_news-list.scss +++ b/src/scss/components/_posts-list.scss @@ -1,23 +1,9 @@ .news-list { - margin-top: 8rem; - margin-bottom: 24rem; - position: relative; - - // > svg { - // position: absolute; - // z-index: -1; - // top: -18rem; - // } - .wrapper { - // display: flex; - // flex-direction: column; position: relative; } &__inner { - position: absolute; - top: -9rem; display: flex; flex-direction: column; } @@ -33,7 +19,7 @@ grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr; grid-column-gap: 1.5rem; - grid-row-gap: 0; + grid-row-gap: 2rem; } &__item { @@ -43,6 +29,10 @@ color: var(--color-dark); border-radius: 1rem; + &.event { + background-color: #97dffc; + } + &-heading { font-size: 1.125rem; font-weight: 600; @@ -78,16 +68,16 @@ align-self: flex-end; margin-top: 3rem; padding: .875rem 1.5rem; - - &, - &:visited { - color: var(--color-dark); - } - - &:hover { - background-color: var(--color-primary); - border-radius: 1.5rem; - text-decoration: none; - } + } +} + +.home .news-list { + margin-top: 8rem; + margin-bottom: 24rem; + position: relative; + + &__inner { + position: absolute; + top: -9rem; } } diff --git a/src/scss/components/_posts.scss b/src/scss/components/_posts.scss new file mode 100644 index 0000000..3fb1a0b --- /dev/null +++ b/src/scss/components/_posts.scss @@ -0,0 +1,28 @@ +.posts { + .wrapper:first-child { + display: flex; + flex-direction: column; + } + + .post-filter { + align-self: flex-end; + margin-bottom: 2rem; + list-style: none; + display: flex; + + li { + display: inline-block; + margin-left: 1.5rem; + + a { + font-weight: 600; + text-decoration: none; + } + + &.active a { + text-decoration: underline; + cursor: default; + } + } + } +} diff --git a/src/scss/global.scss b/src/scss/global.scss index a15ee35..c8efbad 100644 --- a/src/scss/global.scss +++ b/src/scss/global.scss @@ -68,11 +68,12 @@ img { @import 'components/intro'; @import 'components/nav'; @import 'components/pagination'; +@import 'components/posts'; @import 'components/post'; @import 'components/post-list'; @import 'components/member'; @import 'components/member-list'; -@import 'components/news-list'; +@import 'components/posts-list'; @import 'components/presentation'; @import 'components/site-head'; @import 'components/site-foot';