diff options
author | Valentin Popov <valentin@popov.link> | 2022-11-10 02:18:30 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2022-11-10 02:18:30 +0300 |
commit | 06e11038cac44178629ce41ffcc04c2060cc1f09 (patch) | |
tree | 056ed58ea516700a288b36897f8ccc14abfeedcc | |
parent | 2196ad61546f9f91340970c252158ef9dd440bea (diff) | |
download | popov.link-06e11038cac44178629ce41ffcc04c2060cc1f09.tar.xz popov.link-06e11038cac44178629ce41ffcc04c2060cc1f09.zip |
Added a project section
Signed-off-by: Valentin Popov <valentin@popov.link>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | config.toml | 6 | ||||
-rw-r--r-- | content/projects/_index.md | 6 | ||||
-rw-r--r-- | content/projects/beryl.md | 11 | ||||
-rw-r--r-- | sass/_framework.scss | 3 | ||||
-rw-r--r-- | sass/_projects.scss | 21 | ||||
-rw-r--r-- | sass/styles.scss | 3 | ||||
-rw-r--r-- | static/projects/beryl/preview.jpg | bin | 0 -> 28785 bytes | |||
-rw-r--r-- | templates/project.html | 10 | ||||
-rw-r--r-- | templates/projects.html | 30 |
10 files changed, 88 insertions, 3 deletions
@@ -1,3 +1,4 @@ +/static/processed_images /public /.vscode /.idea
\ No newline at end of file diff --git a/config.toml b/config.toml index 835c1dd..6212919 100644 --- a/config.toml +++ b/config.toml @@ -90,4 +90,8 @@ links = [ { title = "Nokia N900 archives", url = "https://disk.yandex.ru/d/L-NZ3c4qc7Uizw", description = "Official firmware, tools and images for N900." }, ] -navbar = [{ title = "Home", path = "/" }, { title = "Blog", path = "/blog" }] +navbar = [ + { title = "Home", path = "/" }, + { title = "Blog", path = "/blog" }, + { title = "Projects", path = "/projects" }, +] diff --git a/content/projects/_index.md b/content/projects/_index.md new file mode 100644 index 0000000..ded2022 --- /dev/null +++ b/content/projects/_index.md @@ -0,0 +1,6 @@ ++++ +page_template = "project.html" +sort_by = "date" +template = "projects.html" +title = "Projects" ++++ diff --git a/content/projects/beryl.md b/content/projects/beryl.md new file mode 100644 index 0000000..47ced4e --- /dev/null +++ b/content/projects/beryl.md @@ -0,0 +1,11 @@ ++++ +date = 2022-11-01 +title = "Beryl" + +[extra] +preview = "projects/beryl/preview.jpg" ++++ + +Beryl is a service created for a large regional internet provider. +<!-- more --> +TODO: Add a description😇
\ No newline at end of file diff --git a/sass/_framework.scss b/sass/_framework.scss index d03c17c..757de68 100644 --- a/sass/_framework.scss +++ b/sass/_framework.scss @@ -125,6 +125,7 @@ blockquote p { img, video { + display: block; height: auto; margin-bottom: 2.5rem; margin-top: 0; @@ -153,7 +154,7 @@ samp { white-space: pre-wrap; } -pre > code { +pre>code { background-color: transparent; font-size: 1em; padding: 0; diff --git a/sass/_projects.scss b/sass/_projects.scss new file mode 100644 index 0000000..ab0dc92 --- /dev/null +++ b/sass/_projects.scss @@ -0,0 +1,21 @@ +.projects { + display: grid; + gap: 30px; + grid-template-columns: repeat(3, 1fr); +} + +@media (max-width: 684px) { + .projects { + grid-template-columns: repeat(1, 1fr); + } +} + +.project { + a { + color: $color-text; + + &:visited { + color: $color-text; + } + } +}
\ No newline at end of file diff --git a/sass/styles.scss b/sass/styles.scss index 7f0aef9..9b520fc 100644 --- a/sass/styles.scss +++ b/sass/styles.scss @@ -15,4 +15,5 @@ $font-feature: "calt", "case", "liga", "locl", "ss01", "tnum", "zero"; $font-size-base: 1.8rem; @import "framework"; -@import "navbar";
\ No newline at end of file +@import "navbar"; +@import "projects";
\ No newline at end of file diff --git a/static/projects/beryl/preview.jpg b/static/projects/beryl/preview.jpg Binary files differnew file mode 100644 index 0000000..b942911 --- /dev/null +++ b/static/projects/beryl/preview.jpg diff --git a/templates/project.html b/templates/project.html new file mode 100644 index 0000000..c261549 --- /dev/null +++ b/templates/project.html @@ -0,0 +1,10 @@ +{% extends 'base.html' %} + +{% block content %} +<h1>{{ page.title | safe }}</h1> + +<section> + {{ page.content | safe }} +</section> + +{% endblock content %}
\ No newline at end of file diff --git a/templates/projects.html b/templates/projects.html new file mode 100644 index 0000000..b828415 --- /dev/null +++ b/templates/projects.html @@ -0,0 +1,30 @@ +{% extends 'base.html' %} + +{% block content %} +<h1>{{ section.title | safe }}</h1> + +{% for year, projects in section.pages | group_by(attribute='year') %} + +<section> + <h2>{{ year | safe }}</h2> + + <div class="projects"> + {% for project in projects %} + + <div class="project"> + <a href="{{ project.permalink | safe }}"> + {% set preview = resize_image(path=project.extra.preview, width=292, height=219, op='fit') %} + <img src="{{ preview.url | safe }}" alt="preview" width="292" height="219"> + </a> + + <a href="{{ project.permalink | safe }}"> + <div>{{ project.summary | safe }}</div> + </a> + </div> + + {% endfor %} + </div> +</section> +{% endfor %} + +{% endblock content %}
\ No newline at end of file |