aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2022-11-10 02:18:30 +0300
committerValentin Popov <valentin@popov.link>2022-11-10 02:18:30 +0300
commit06e11038cac44178629ce41ffcc04c2060cc1f09 (patch)
tree056ed58ea516700a288b36897f8ccc14abfeedcc
parent2196ad61546f9f91340970c252158ef9dd440bea (diff)
downloadpopov.link-06e11038cac44178629ce41ffcc04c2060cc1f09.tar.xz
popov.link-06e11038cac44178629ce41ffcc04c2060cc1f09.zip
Added a project section
Signed-off-by: Valentin Popov <valentin@popov.link>
-rw-r--r--.gitignore1
-rw-r--r--config.toml6
-rw-r--r--content/projects/_index.md6
-rw-r--r--content/projects/beryl.md11
-rw-r--r--sass/_framework.scss3
-rw-r--r--sass/_projects.scss21
-rw-r--r--sass/styles.scss3
-rw-r--r--static/projects/beryl/preview.jpgbin0 -> 28785 bytes
-rw-r--r--templates/project.html10
-rw-r--r--templates/projects.html30
10 files changed, 88 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 984ea9b..34e2001 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
new file mode 100644
index 0000000..b942911
--- /dev/null
+++ b/static/projects/beryl/preview.jpg
Binary files differ
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