aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.toml3
-rw-r--r--sass/css/yaroslavps.scss46
-rw-r--r--templates/page.html4
-rw-r--r--templates/weblog.html4
4 files changed, 57 insertions, 0 deletions
diff --git a/config.toml b/config.toml
index 36a167d..0e2bcea 100644
--- a/config.toml
+++ b/config.toml
@@ -27,6 +27,7 @@ published = "Published"
published_on = "on"
edited = "Last edited"
also_read = "This text is also available in other languages: "
+not_published = "This text is a draft and will be published soon to the index page of "
[languages.es]
generate_feed = false
@@ -40,6 +41,7 @@ published = "Publicado el"
published_on = "en:"
edited = "Última edición: "
also_read = "Este texto está disponible en otros idiomas: "
+not_published = "Este texto es un borrador y pronto será publicado a la página principal del "
[languages.ru]
generate_feed = false
@@ -53,4 +55,5 @@ published = "Опубликовано"
published_on = "в: "
edited = "Отредакировано: "
also_read = "Данный текст также доступен на других языках: "
+not_published = "Текст является черновиком и вскоре будет опубликован на заглавной странице "
diff --git a/sass/css/yaroslavps.scss b/sass/css/yaroslavps.scss
index 723d3a5..1017f79 100644
--- a/sass/css/yaroslavps.scss
+++ b/sass/css/yaroslavps.scss
@@ -273,3 +273,49 @@ h2 > span.publish-date {
background-color: #00000000;
}
}
+
+@media print {
+ html,
+ body,
+ .main-container {
+ background-image: none;
+ background-color: #fff;
+ }
+
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6,
+ ul,
+ ol,
+ li,
+ p,
+ a[href],
+ sup,
+ sub {
+ color: #000;
+ font-family: $font_serif;
+ }
+
+ a[href] {
+ text-decoration: none;
+ }
+
+ .sidebar-container {
+ display: none;
+ }
+
+ .header-container,
+ .content-container {
+ grid-column-start: 1;
+ grid-column-end: 3;
+ }
+
+ .publish-date,
+ pre,
+ code {
+ color: #777;
+ }
+}
diff --git a/templates/page.html b/templates/page.html
index 54b049f..c7b6351 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -11,9 +11,13 @@
{% block header %}
<h1>{{ page.title }}</h1>
<p class="publish-date">
+{% if page.date %}
{{ trans(key="published", lang=lang) }}
{{ page.date | date(format="%Y-%m-%d %H:%M UTC") }}
{{ trans(key="published_on", lang=lang) }}
+{% else %}
+ {{ trans(key="not_published", lang=lang) }}
+{% endif %}
{% if page.permalink is containing("weblog") %}
<a href="{% if lang != "en" %}/{{ lang }}{% endif %}/weblog">
{{ trans(key="weblog_title", lang=lang) }}
diff --git a/templates/weblog.html b/templates/weblog.html
index 6638faf..855c0ed 100644
--- a/templates/weblog.html
+++ b/templates/weblog.html
@@ -48,15 +48,19 @@
{% block content %}
<div class="posts-list">
{% for post in paginator.pages %}
+ {% if post.date %}
<div class="post-container partial">
<h2>
<a href="{{ post.permalink }}">{{ post.title }}</a>
+ {% if post.date %}
<span class="publish-date">{{ post.date | date }}</span>
+ {% endif %}
</h2>
{% if post.summary %}
{{ post.summary | safe }}
{% endif %}
</div>
+ {% endif %}
{% endfor %}
</div>
{% if paginator %}