diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..14e01bf --- /dev/null +++ b/content/_index.md @@ -0,0 +1,5 @@ ++++ +title = "Accueil" ++++ + +Contenu \ No newline at end of file diff --git a/content/a-propos.md b/content/a-propos.md new file mode 100644 index 0000000..6d61c69 --- /dev/null +++ b/content/a-propos.md @@ -0,0 +1,6 @@ ++++ +title = "À propos" +template = "about.html" ++++ + +A propos de ce site \ No newline at end of file diff --git a/sass/parts/_index.scss b/sass/parts/_index.scss new file mode 100644 index 0000000..1ca5b17 --- /dev/null +++ b/sass/parts/_index.scss @@ -0,0 +1,9 @@ +section.last-articles { + margin-top: 4rem; + + h1 { + border-bottom-width: .1rem; + border-bottom-style: solid; + border-bottom-color: var(--surface0); + } +} \ No newline at end of file diff --git a/sass/styles.scss b/sass/styles.scss index f42cd56..5f0b538 100644 --- a/sass/styles.scss +++ b/sass/styles.scss @@ -3,6 +3,7 @@ @use 'shortcodes/callout'; @use 'parts/anchor'; @use 'parts/articles'; +@use 'parts/index'; @use 'parts/code'; @use 'parts/footnote'; @use 'parts/misc'; diff --git a/templates/about.html b/templates/about.html new file mode 100644 index 0000000..c9ef304 --- /dev/null +++ b/templates/about.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block content %} +

+ {{ page.title }} +

+
+
+ {{ page.content | safe }} +
+
+{% endblock content %} \ No newline at end of file diff --git a/templates/blog.html b/templates/blog.html index f09a58e..4030285 100644 --- a/templates/blog.html +++ b/templates/blog.html @@ -4,21 +4,5 @@

{{ section.title }}

- +{%- include "partials/articles.html" -%} {% endblock content %} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 5b14ef8..42cf49d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,8 +1,13 @@ {% extends "base.html" %} {% block content %} -

- This is my blog made with Zola. -

-

Posts.

+
+{{ section.content | safe }} +
+
+

Derniers articles

+{%- set section = get_section(path="articles/_index.md") -%} +{%- set max_articles = 3 -%} +{%- include "partials/articles.html" -%} +
{% endblock content %} \ No newline at end of file diff --git a/templates/partials/articles.html b/templates/partials/articles.html new file mode 100644 index 0000000..76387cb --- /dev/null +++ b/templates/partials/articles.html @@ -0,0 +1,18 @@ + \ No newline at end of file