1
0
Fork 0

2023-06-30

This commit is contained in:
Gennadiy 2023-12-17 07:54:22 +03:00
parent 4eafaa5538
commit cac9ccdc06
40 changed files with 974 additions and 0 deletions

1
.gitattributes vendored
View file

@ -0,0 +1 @@
jekyll_theme/assets/resources/** linguist-vendored=true

3
.gitignore vendored
View file

@ -1,2 +1,5 @@
.idea .idea
*.iml *.iml
*.gem
*.lock
.repo_*.sh

56
DIRECTORY-TREE.md Normal file
View file

@ -0,0 +1,56 @@
## Дерево каталогов
<pre>
.
├─ <a href='jekyll_theme'>jekyll_theme</a>
│ ├─ <a href='jekyll_theme/_includes'>_includes</a>
│ │ ├─ <a href='jekyll_theme/_includes/article_brief.html'>article_brief.html</a>
│ │ ├─ <a href='jekyll_theme/_includes/collapsed_block.html'>collapsed_block.html</a>
│ │ ├─ <a href='jekyll_theme/_includes/counters_body.html'>counters_body.html</a>
│ │ ├─ <a href='jekyll_theme/_includes/counters_head.html'>counters_head.html</a>
│ │ ├─ <a href='jekyll_theme/_includes/image_svg.html'>image_svg.html</a>
│ │ ├─ <a href='jekyll_theme/_includes/main_page.html'>main_page.html</a>
│ │ ├─ <a href='jekyll_theme/_includes/page_footer.html'>page_footer.html</a>
│ │ ├─ <a href='jekyll_theme/_includes/page_header.html'>page_header.html</a>
│ │ ├─ <a href='jekyll_theme/_includes/page_toolbar.html'>page_toolbar.html</a>
│ │ ├─ <a href='jekyll_theme/_includes/picture.html'>picture.html</a>
│ │ └─ <a href='jekyll_theme/_includes/seo.html'>seo.html</a>
│ ├─ <a href='jekyll_theme/_layouts'>_layouts</a>
│ │ └─ <a href='jekyll_theme/_layouts/default.html'>default.html</a>
│ ├─ <a href='jekyll_theme/assets'>assets</a>
│ │ ├─ <a href='jekyll_theme/assets/css'>css</a>
│ │ │ ├─ <a href='jekyll_theme/assets/css/code-highlighting.css'>code-highlighting.css</a>
│ │ │ ├─ <a href='jekyll_theme/assets/css/font_face_jb_mono.css'>font_face_jb_mono.css</a>
│ │ │ ├─ <a href='jekyll_theme/assets/css/font_face_roboto.css'>font_face_roboto.css</a>
│ │ │ └─ <a href='jekyll_theme/assets/css/older-tomato.css'>older-tomato.css</a>
│ │ ├─ <a href='jekyll_theme/assets/img'>img</a>
│ │ │ ├─ <a href='jekyll_theme/assets/img/older-tomato.ico'>older-tomato.ico</a>
│ │ │ ├─ <a href='jekyll_theme/assets/img/older-tomato.jpg'>older-tomato.jpg</a>
│ │ │ ├─ <a href='jekyll_theme/assets/img/older-tomato.png'>older-tomato.png</a>
│ │ │ ├─ <a href='jekyll_theme/assets/img/older-tomato.svg'>older-tomato.svg</a>
│ │ │ └─ <a href='jekyll_theme/assets/img/typewriter.svg'>typewriter.svg</a>
│ │ ├─ <a href='jekyll_theme/assets/resources'>resources</a>
│ │ │ └─ <a href='jekyll_theme/assets/resources/fonts'>fonts</a>
│ │ │ ├─ <a href='jekyll_theme/assets/resources/fonts/JBMono'>JBMono</a>
│ │ │ │ ├─ <a href='jekyll_theme/assets/resources/fonts/JBMono/JetBrainsMono-Bold.woff'>JetBrainsMono-Bold.woff</a>
│ │ │ │ ├─ <a href='jekyll_theme/assets/resources/fonts/JBMono/JetBrainsMono-Italic.woff'>JetBrainsMono-Italic.woff</a>
│ │ │ │ ├─ <a href='jekyll_theme/assets/resources/fonts/JBMono/JetBrainsMono-Medium.woff'>JetBrainsMono-Medium.woff</a>
│ │ │ │ └─ <a href='jekyll_theme/assets/resources/fonts/JBMono/JetBrainsMono-Regular.woff'>JetBrainsMono-Regular.woff</a>
│ │ │ └─ <a href='jekyll_theme/assets/resources/fonts/Roboto'>Roboto</a>
│ │ │ ├─ <a href='jekyll_theme/assets/resources/fonts/Roboto/Roboto-Bold.woff'>Roboto-Bold.woff</a>
│ │ │ ├─ <a href='jekyll_theme/assets/resources/fonts/Roboto/Roboto-Italic.woff'>Roboto-Italic.woff</a>
│ │ │ ├─ <a href='jekyll_theme/assets/resources/fonts/Roboto/Roboto-Medium.woff'>Roboto-Medium.woff</a>
│ │ │ └─ <a href='jekyll_theme/assets/resources/fonts/Roboto/Roboto-Regular.woff'>Roboto-Regular.woff</a>
│ │ ├─ <a href='jekyll_theme/assets/404.html'>404.html</a>
│ │ ├─ <a href='jekyll_theme/assets/favicon.ico'>favicon.ico</a>
│ │ └─ <a href='jekyll_theme/assets/pagesmap.xml'>pagesmap.xml</a>
│ ├─ <a href='jekyll_theme/Gemfile'>Gemfile</a>
│ ├─ <a href='jekyll_theme/install.sh'>install.sh</a>
│ └─ <a href='jekyll_theme/older-tomato-theme.gemspec'>older-tomato-theme.gemspec</a>
├─ <a href='CONTRIBUTING.md'>CONTRIBUTING.md</a>
├─ <a href='DIRECTORY-TREE.md'>DIRECTORY-TREE.md</a>
├─ <a href='LICENSE.md'>LICENSE.md</a>
├─ <a href='OPEN_LICENSE.txt'>OPEN_LICENSE.txt</a>
├─ <a href='README.en.md'>README.en.md</a>
└─ <a href='README.md'>README.md</a>
</pre>

180
README.en.md Normal file
View file

@ -0,0 +1,180 @@
# [Older tomato](README.md)
Two Jekyll themes to decorate static websites. The color variant was written earlier
using AngularJS and Material, this was the design of the previous version of my blog.
Then a lightweight single-color variant was written using only HTML and CSS, the
appearance resembles the default design theme on GitHub Pages. Both themes supplement
each other and are similar to each other, commonalities and differences between them
are marked in the list of features.
- [Color tomato](https://hub.mos.ru/golovin.gg/color-tomato-theme/blob/master/README.en.md) — color selection during the build.
- Older tomato — lightweight decoration theme.
- [Pomodori](https://hub.mos.ru/golovin.gg/pomodoro/blob/master/README.en.md) — series of static websites.
### Features
- [x] Responsive layout.
- [x] User JS and CSS files in the head block of HTML pages.
- [x] SEO-markup using JSON-LD and Open Graph.
- [x] Switch between two languages and two tomato themes.
- [x] Map of site pages with their translations in XML format.
- [x] Simple 404 page for non-existing URLs.
- [x] Fonts: Roboto for text and JBMono for code blocks.
- [x] Tomatoes: PNG, JPG 120x120, SVG 64x64, ICO 32x32.
- [ ] Color selection during the build, green is the default color.
- [ ] Scroll-to-top button in Material style.
### Site structure
The folder with the Jekyll site should contain two mandatory files with dependencies
and parameters — all other files are the site content itself. This theme is written
with the expectation, that the site contents is separated into two sub-folders by
language and consist of articles and main pages, where the main pages are lists of
articles with short descriptions.
```
jekyll-site
├ ru
│ ├ . . . - articles
│ └ index.md - main page
├ en
│ ├ . . . - articles
│ └ index.md - main page
├ . . .
├ Gemfile - dependencies
└ _config.yml - parameters
```
### Dependencies
`Gemfile` — a list of packages *ruby gems* to use, including locally installed ones.
```ruby
source "https://rubygems.org"
gem "jekyll"
gem "older-tomato-theme"
```
### Installation
Run the script from the theme folder, build the *gem* package and install it.
```bash
rm older-tomato-theme-0.1.0.gem
gem build older-tomato-theme.gemspec
sudo gem install --local older-tomato-theme-0.1.0.gem
```
### Site parameters
`_config.yml` — a list of common parameters for the site, including parameters for the build.
```yaml
# site name for caption in footer
name: "Код с комментариями"
# footer caption for translated pages
name_translated: "Code with comments"
# URL of the site including protocol
url: "https://pomodoro.example.ru"
# subfolder of this build for relative URLs
baseurl: ""
# weblink in the top-left of the main pages
homepage_url: "https://hub.mos.ru/tolstoy.ln"
# representation of the weblink
homepage_name: "HUB.MOS.RU"
# subfolder of the alternative build,
# can be omitted, if not used
color_tomato_baseurl: "/color"
# time zone for ISO-8601 date format
timezone: "Europe/Moscow"
# language parameters should be specified either
# everywhere, or only on pages with translations
lang: "ru" # default, can be omitted
# author's name for SEO-markup and footer caption
author: "Толстой Л.Н."
# transliteration of the name for translated pages
author_translated: "Tolstoy L.N."
# addition to footer caption for translated pages
translation_caption: "translation from Russian"
# design theme and default layout for the build
theme: older-tomato-theme
defaults:
- scope:
path: ""
values:
layout: default
```
### Page parameters
List of individual parameters of site pages to specify in the Front matter of the page.
```yaml
---
# page title in the page language
title: Вращаем пространственный крест
# preferably 150-160 characters in the page language
description: ниасилил, многабукаф
# comma-separated list of sections of a page in its language
sections: [Объёмные фигуры,Матрица поворота,Экспериментальная модель]
# comma-separated list of tags of a page in its language
tags: [javascript,canvas,геометрия,матрица,графика,изображение,куб]
# comma-separated list of scripts for
# this page, can be omitted, if not used
scripts: [/js/classes.js,/js/script1.js,/js/script2.js]
# comma-separated list of styles for
# this page, can be omitted, if not used
styles: [/css/pomodoro1.css,/css/pomodoro2.css]
# canonical URL of this page
canonical_url: /ru/2023/01/15/spinning-spatial-cross.html
# URL of translated page for original pages,
# or the original page for translated pages
url_translated: /en/2023/01/16/spinning-spatial-cross.html
# title of translated page for original pages,
# or the original page for translated pages
title_translated: Spinning spatial cross
# date parameters should be specified only on article
# pages and should not be specified on main pages,
# main pages display the date the site was last built
date: 2023.01.15
# language parameters should be specified either
# everywhere, or only on pages with translations
lang: "ru" # default, can be omitted
# author's name in the page language
author: "Толстой Л.Н."
# transliteration of the author's name for original
# pages, or original author name for translated pages
author_translated: "Tolstoy L.N."
# addition to footer caption for translated pages
translation_caption: "translation from Russian"
---
```
### After build
The site can be built using the `jekyll build` command. After that, we get the `_site` folder with the
generated pages and the `assets` subfolder from the theme. We move the contents of this subfolder back
to the `_site` folder — we get shorter links, that are used in the theme. After that we bypass HTML
pages and optimize some tags also for shortness and for correctness. The script is designed for this.
```bash
echo "Optimization of gathered content."
cd _site || exit
cp -r assets/* .
rm -r assets
find . -type f -name '*.html' | sort -r | while read -r file; do
sed -i 's/ class="language-plaintext highlighter-rouge"//g' "$file"
sed -i 's/ class="language-java highlighter-rouge"//g' "$file"
sed -i 's/ class="language-html highlighter-rouge"//g' "$file"
sed -i 's/ class="language-js highlighter-rouge"//g' "$file"
sed -i 's/<div><div class="highlight"><pre class="highlight">/<div class="highlight"><pre class="highlight">/g' "$file"
sed -i 's/<\/code><\/pre><\/div><\/div>/<\/code><\/pre><\/div>/g' "$file"
sed -i 's/<hr \/>/<hr>/g' "$file"
sed -i -r 's/<input(.+) \/>/<input\1>/g' "$file"
sed -i -r 's/<img(.+) \/>/<img\1>/g' "$file"
done
```
---
©Golovin G.G.,Code with comments,translation from Russian,2021-2023

179
README.md Normal file
View file

@ -0,0 +1,179 @@
# [Старый помидор](README.en.md)
Две темы Jekyll для оформления статических сайтов. Цветной вариант был написан раньше
с использованием AngularJS и Material, таким было оформление предыдущей версии моего
блога. Затем был написан облегчённый одноцветный вариант с использованием только HTML
и CSS, внешний вид напоминает тему оформления по умолчанию на GitHub Pages. Обе темы
дополняют друг друга и похожи друг на друга, общие черты и различия между ними отмечены
в списке свойств.
- [Цветной помидор](https://hub.mos.ru/golovin.gg/color-tomato-theme/blob/master/README.md) — выбор цвета во время сборки.
- Старый помидор — легковесная тема оформления.
- [Помидоры](https://hub.mos.ru/golovin.gg/pomodoro/blob/master/README.md) — серия статических вёб-сайтов.
### Свойства
- [x] Адаптивная вёрстка или Responsive layout.
- [x] Файлы пользователя JS и CSS в блоке head страниц HTML.
- [x] SEO-разметка с использованием JSON-LD и Open Graph.
- [x] Переключение между двумя языками и помидорными темами.
- [x] Карта страниц сайта с их переводами в формате XML.
- [x] Простая страница 404 для несуществующих URL-адресов.
- [x] Шрифты: Roboto для текста и JBMono для блоков кода.
- [x] Помидоры: PNG, JPG 120x120, SVG 64x64, ICO 32x32.
- [ ] Выбор цвета во время сборки, зелёный цвет по умолчанию.
- [ ] Кнопка прокрутки вверх в стиле Material.
### Структура каталогов
Папка с сайтом на Jekyll должна содержать два обязательных файла с зависимостями и
параметрами, все остальные файлы — это содержимое самого сайта. Эта тема написана с
расчётом, что содержимое сайта разделено на две подпапки по языкам и состоит из статей
и заглавных страниц, где заглавные страницы — это списки статей с краткими описаниями.
```
jekyll-site
├ ru
│ ├ . . . - статьи
│ └ index.md - заглавная страница
├ en
│ ├ . . . - статьи
│ └ index.md - заглавная страница
├ . . .
├ Gemfile - зависимости
└ _config.yml - параметры
```
### Зависимости
`Gemfile` — список пакетов *ruby gems*, включая установленные локально.
```ruby
source "https://rubygems.org"
gem "jekyll"
gem "older-tomato-theme"
```
### Установка
Запускаем скрипт из папки с темой, собираем пакет *gem* и устанавливаем его.
```bash
rm older-tomato-theme-0.1.0.gem
gem build older-tomato-theme.gemspec
sudo gem install --local older-tomato-theme-0.1.0.gem
```
### Параметры сайта
`_config.yml` — список общих параметров для сайта, включая параметры для сборки.
```yaml
# название сайта для подписи в футере
name: "Код с комментариями"
# подпись в футере для переведённых страниц
name_translated: "Code with comments"
# URL адрес сайта, включая протокол
url: "https://pomodoro.example.ru"
# подпапка этой сборки для относительных URLs
baseurl: ""
# ссылка в верхнем левом углу заглавных страниц
homepage_url: "https://hub.mos.ru/tolstoy.ln"
# представление ссылки
homepage_name: "HUB.MOS.RU"
# подпапка альтернативной сборки, можно
# не указывать, если не используется
color_tomato_baseurl: "/color"
# часовой пояс для формата даты ISO-8601
timezone: "Europe/Moscow"
# языковые параметры должны быть указаны либо
# везде, либо только на страницах с переводами
lang: "ru" # по умолчанию, можно не указывать
# имя автора для SEO-разметки и подписи в футере
author: "Толстой Л.Н."
# транслитерация имени автора для переведённых страниц
author_translated: "Tolstoy L.N."
# дополнение к подписи в футере для переведённых страниц
translation_caption: "translation from Russian"
# тема оформления и макет по умолчанию для сборки
theme: older-tomato-theme
defaults:
- scope:
path: ""
values:
layout: default
```
### Параметры страниц
Список индивидуальных параметров страниц сайта для указания в шапке страницы Front matter.
```yaml
---
# заголовок страницы на языке страницы
title: Вращаем пространственный крест
# предпочтительно 150-160 символов на языке страницы
description: ниасилил, многабукаф
# разделённый запятыми список секций страницы на её языке
sections: [Объёмные фигуры,Матрица поворота,Экспериментальная модель]
# разделённый запятыми список тегов страницы на её языке
tags: [javascript,canvas,геометрия,матрица,графика,изображение,куб]
# разделённый запятыми список скриптов для этой
# страницы, можно не указывать, если не используются
scripts: [/js/classes.js,/js/script1.js,/js/script2.js]
# разделённый запятыми список стилей для этой
# страницы, можно не указывать, если не используются
styles: [/css/pomodoro1.css,/css/pomodoro2.css]
# канонический URL адрес этой страницы
canonical_url: /ru/2023/01/15/spinning-spatial-cross.html
# URL адрес переведённой страницы для оригинальных страниц,
# или оригинальной страницы для переведённых страниц
url_translated: /en/2023/01/16/spinning-spatial-cross.html
# заголовок переведённой страницы для оригинальных страниц,
# или оригинальной страницы для переведённых страниц
title_translated: Spinning spatial cross
# дата должна быть указана только на страницах статей,
# и не должна быть указана на заглавных страницах,
# заглавные страницы отображают дату последней сборки сайта
date: 2023.01.15
# языковые параметры должны быть указаны либо
# везде, либо только на страницах с переводами
lang: "ru" # по умолчанию, можно не указывать
# имя автора на языке этой страницы
author: "Толстой Л.Н."
# транслитерация имени автора для оригинальных страниц,
# или оригинальное имя автора для переведённых страниц
author_translated: "Tolstoy L.N."
# дополнение к подписи в футере для переведённых страниц
translation_caption: "translation from Russian"
---
```
### После сборки
Сборка сайта выполняется командой `jekyll build`. После этого мы получаем папку `_site` с собранными
страницами и подпапку `assets` из темы. Перемещаем содержимое этой подпапки обратно в папку `_site`
получаем короткие ссылки, которые используются в теме. После этого обходим страницы HTML и оптимизируем
некоторые теги также для краткости и для корректности. Скрипт предназначен для этого.
```bash
echo "Оптимизация собранного контента."
cd _site || exit
cp -r assets/* .
rm -r assets
find . -type f -name '*.html' | sort -r | while read -r file; do
sed -i 's/ class="language-plaintext highlighter-rouge"//g' "$file"
sed -i 's/ class="language-java highlighter-rouge"//g' "$file"
sed -i 's/ class="language-html highlighter-rouge"//g' "$file"
sed -i 's/ class="language-js highlighter-rouge"//g' "$file"
sed -i 's/<div><div class="highlight"><pre class="highlight">/<div class="highlight"><pre class="highlight">/g' "$file"
sed -i 's/<\/code><\/pre><\/div><\/div>/<\/code><\/pre><\/div>/g' "$file"
sed -i 's/<hr \/>/<hr>/g' "$file"
sed -i -r 's/<input(.+) \/>/<input\1>/g' "$file"
sed -i -r 's/<img(.+) \/>/<img\1>/g' "$file"
done
```
---
© Головин Г.Г., Код с комментариями,2021-2023

2
jekyll_theme/Gemfile Normal file
View file

@ -0,0 +1,2 @@
source "https://rubygems.org"
gemspec

View file

@ -0,0 +1,9 @@
<!-- begin article_brief template -->
<p class="caption">{{ include.page.date | date: '%d.%m.%Y' }}</p>
<p class="headline">
<a href="{{ include.page.canonical_url | relative_url }}">{{ include.page.title }}</a>
</p>
<p>{{ include.page.sections | join: ' • ' }}</p>
{{- include.brief | markdownify -}}
{% unless include.last %}<hr>{% endunless -%}
<!-- end article_brief template -->

View file

@ -0,0 +1,11 @@
<!-- begin collapsed_block template -->
<div style="width: 100%;">
<details {% if include.open %}open{%- endif %}>
<summary>{{ include.summary }}</summary>
{%- if include.title %}
<p class="headline">{{ include.title }}</p>
{%- endif %}
{{- include.content | markdownify -}}
</details>
</div>
<!-- end collapsed_block template -->

View file

@ -0,0 +1,2 @@
<!-- begin counters_body template -->
<!-- end counters_body template -->

View file

@ -0,0 +1,2 @@
<!-- begin counters_head template -->
<!-- end counters_head template -->

View file

@ -0,0 +1 @@
<img src="{{ include.src }}" style="{{ include.style }}" alt="{{ include.alt }}">

View file

@ -0,0 +1,14 @@
<!-- begin main_page template -->
{%- for item in include.articles %}
{%- assign step = forloop.index0 | modulo: 2 %}
{%- if step == 0 %}
{%- assign article_title = item %}
{%- else %}
{%- for page in site.pages %}
{%- if page.title == article_title %}
{%- include article_brief.html brief=item page=page last=forloop.parentloop.last %}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- endfor -%}
<!-- end main_page template -->

View file

@ -0,0 +1,14 @@
<!-- begin page_footer template -->
<hr>
<p>
{%- if page.lang == site.lang -%}
{{ page.author | default: site.author | prepend: '© ' }}
{{- site.name | prepend: ',' }}
{%- else -%}
{{ page.author | default: site.author_translated | prepend: '© ' }}
{{- site.name_translated | prepend: ',' }}
{{- page.translation_caption | default: site.translation_caption | prepend: ',' }}
{%- endif %}
{{- page.date | default: site.time | date: '%Y' | prepend: ',' -}}
</p>
<!-- end page_footer template -->

View file

@ -0,0 +1,22 @@
<!-- begin page_header template -->
<div class="container padding16w margin14h">
<div style="display: flex; flex-direction: row; align-items: center;">
<!-- older tomato -->
<div class="hide-xs" style="margin-right: 16px; height: 80px;">
<img src="/img/older-tomato.svg" width="80" height="80" alt="older-tomato">
</div>
<!-- title -->
<div style="display: flex; flex-direction: column; flex: 1;">
<h1>{{ page.title }}</h1>
<div style="display: flex; flex-direction: row;">
<span>{{ page.sections | join: ' • ' }}</span>
<span style="flex: 1;"></span>
{%- if page.date %}
<span style="align-self: flex-end;">{{ page.date | date: '%d.%m.%Y' }}</span>
{%- endif %}
</div>
</div>
</div>
<hr>
</div>
<!-- end page_header template -->

View file

@ -0,0 +1,38 @@
<!-- begin page_toolbar template -->
<div class="toolbar padding16w margin14h">
<div style="display: flex; flex-direction: row;">
{%- if page.date %}
<!-- main page -->
<a href="{{ page.lang | default: 'ru' | append: '/' | relative_url }}">
<b>{% if page.lang != site.lang %}MAIN{% else %}ГЛАВНАЯ{% endif %}</b>
</a>
{%- else %}
<!-- home page -->
<a href="{{ site.homepage_url }}">
<b>{{ site.homepage_name }}</b>
</a>
{%- endif %}
<!-- divider -->
<span style="flex: 1;"></span>
{%- if page.url_translated %}
<!-- switch language -->
<a href="{{ page.url_translated | relative_url }}" style="margin: 0 17px;">
<b>{{ page.lang | default: 'ru' | upcase }}</b>
</a>
{%- else %}
<!-- page language -->
<b style="color: #aaa; margin: 0 17px;">{{ page.lang | default: 'ru' | upcase }}</b>
{%- endif %}
{%- if site.color_tomato_baseurl %}
<!-- color tomato -->
<a href="{{ site.color_tomato_baseurl | append: page.canonical_url }}" style="height: 30px; margin: 2px 0 0 16px;">
<img src="/img/typewriter.svg" width="30" height="30" alt="typewriter">
</a>
{%- else %}
<!-- typewriter -->
<img src="/img/typewriter.svg" width="30" height="30" alt="typewriter" style="margin: 2px 0 0 16px;">
{%- endif %}
</div>
<hr>
</div>
<!-- end page_toolbar template -->

View file

@ -0,0 +1,9 @@
<div {% if include.id %}id="{{ include.id }}"{%- endif %}>
<img src="{{ include.src }}" style="{% if include.size100 %}width: 100%; height: 100%;{%- endif %}{% if include.background %} background-color: #888;{%- endif %}"
alt="{{ include.alt }}" {% if include.title %}title="{{ include.title }}"{%- endif %}>
{%- if include.caption %}
<div>
<span class="caption">{{ include.caption }}</span>
</div>
{%- endif %}
</div>

View file

@ -0,0 +1,67 @@
<!-- begin seo template -->
<title>{{ page.title }}</title>
<meta name="description" content="{{ page.description }}">
{%- if page.tags %}
<meta name="keywords" content="{{ page.tags | join: ',' }}">
{%- endif %}
<link rel="canonical" href="{{ site.url | append: page.canonical_url }}">
<meta property="og:type" content="{% if page.date %}article{% else %}website{% endif %}">
<meta property="og:title" content="{{ page.title }}">
<meta property="og:locale" content="{{ page.lang | default: 'ru' }}">
<meta property="og:description" content="{{ page.description }}">
<meta property="og:url" content="{{ site.url | append: page.canonical_url }}">
<meta property="og:image" content="{{ site.url | append: '/img/older-tomato.jpg' }}">
<script type="application/ld+json">
{
"@context":"https://schema.org",
"@type":"{% if page.date %}BlogPosting{% else %}Blog{% endif %}",
"headline":"{{ page.title }}",
"description":"{{ page.description }}",
"url":"{{ site.url | append: page.canonical_url }}",
"image":"{{ site.url | append: '/img/older-tomato.jpg' }}",
"keywords":"{{ page.tags | join: ','}}",
{%- if page.date %}
"articleSection":"{{ page.sections | join: ','}}",
"dateCreated":"{{ page.date | date_to_xmlschema }}",
"datePublished":"{{ page.date | date_to_xmlschema }}",
{%- endif %}
"dateModified":"{{ site.time | date_to_xmlschema }}",
"inLanguage":"{{ page.lang | default: 'ru' }}",
{%- if page.lang == site.lang %}
"author": {
"@type":"Person",
"name":"{{ page.author | default: site.author }}",
"url":"{{ site.homepage_url }}"
},
"workTranslation": {
"@type":"{% if page.date %}BlogPosting{% else %}Blog{% endif %}",
"@id":"{{ site.url | append: page.url_translated }}",
"headline":"{{ page.title_translated }}",
"image":"{{ site.url | append: '/img/older-tomato.jpg' }}",
"inLanguage":"{{ page.lang | default: 'en' }}",
"author": {
"@type":"Person",
"name":"{{ page.author_translated | default: site.author_translated }}",
"url":"{{ site.homepage_url }}"
}
{%- else %}
"author": {
"@type":"Person",
"name":"{{ page.author | default: site.author_translated }}",
"url":"{{ site.homepage_url }}"
},
"translationOfWork": {
"@type":"{% if page.date %}BlogPosting{% else %}Blog{% endif %}",
"@id":"{{ site.url | append: page.url_translated }}",
"headline":"{{ page.title_translated }}",
"image":"{{ site.url | append: '/img/older-tomato.jpg' }}",
"inLanguage":"{{ site.lang | default: 'ru' }}",
"author": {
"@type":"Person",
"name":"{{ page.author_translated | default: site.author }}",
"url":"{{ site.homepage_url }}"
}
{%- endif %}
}
}</script>
<!-- end seo template -->

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="{{ page.lang | default: 'ru' }}">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="/img/older-tomato.svg" type="image/svg+xml">
<link rel="icon" href="/img/older-tomato.png" type="image/png">
<link rel="shortcut icon" href="/img/older-tomato.ico">
<link rel="stylesheet" href="/css/code-highlighting.css">
<link rel="stylesheet" href="/css/font_face_jb_mono.css">
<link rel="stylesheet" href="/css/font_face_roboto.css">
<link rel="stylesheet" href="/css/older-tomato.css">
{% if page.styles -%}
{% for style in page.styles -%}
<link rel="stylesheet" href="{{ style }}">
{% endfor -%}
{% endif -%}
{% if page.scripts -%}
{% for script in page.scripts -%}
<script src="{{ script }}" defer></script>
{% endfor -%}
{% endif -%}
{% include seo.html -%}
{% include counters_head.html -%}
</head>
<body>
{% include counters_body.html -%}
{% include page_toolbar.html -%}
{% include page_header.html -%}
<div class="container padding16w margin14h">
<!-- begin page content -->
{{ content -}}
<!-- end page content -->
{% include page_footer.html -%}
</div>
</body>
</html>

View file

@ -0,0 +1,16 @@
---
layout: null
permalink: 404.html
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>404 - Not Found</title>
<meta name="description" content="404 - Not Found">
</head>
<body>
<h1>404 - Not Found</h1>
</body>
</html>

View file

@ -0,0 +1,20 @@
/* font without ligatures */
pre, code { font-family: JBMono, monospace; font-variant: none; }
/* keyword */
.k, .kc, .kd, .kt, .kn { color: #2452bc; }
/* keyword */
.na, .nb { color: #5f2d6e; }
/* keyword */
.nl, .nt, .cp, .m { color: #0550ae; }
/* keyword */
.nf, .no { color: #277a8e; }
/* punctuation */
.o, .p { color: #474747; }
/* literal */
.n, .nc, .nd, .nn, .nx { color: #474747; }
/* number */
.mi, .mf { color: #3866ee; }
/* string */
.s, .s1, .s2, .dl { color: #080; }
/* comment */
.c, .c1, .cm { color: #9e9e9e; }

View file

@ -0,0 +1,31 @@
@font-face {
font-family: 'JBMono';
font-style: italic;
font-weight: 400;
src: local('JBMono Italic'), local('JBMono-Italic'), url(/resources/fonts/JBMono/JetBrainsMono-Italic.woff) format('woff');
font-display: swap;
}
@font-face {
font-family: 'JBMono';
font-style: normal;
font-weight: 400;
src: local('JBMono'), local('JBMono-Regular'), url(/resources/fonts/JBMono/JetBrainsMono-Regular.woff) format('woff');
font-display: swap;
}
@font-face {
font-family: 'JBMono';
font-style: normal;
font-weight: 500;
src: local('JBMono Medium'), local('JBMono-Medium'), url(/resources/fonts/JBMono/JetBrainsMono-Medium.woff) format('woff');
font-display: swap;
}
@font-face {
font-family: 'JBMono';
font-style: normal;
font-weight: 700;
src: local('JBMono Bold'), local('JBMono-Bold'), url(/resources/fonts/JBMono/JetBrainsMono-Bold.woff) format('woff');
font-display: swap;
}

View file

@ -0,0 +1,31 @@
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 400;
src: local('Roboto Italic'), local('Roboto-Italic'), url(/resources/fonts/Roboto/Roboto-Italic.woff) format('woff');
font-display: swap;
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/resources/fonts/Roboto/Roboto-Regular.woff) format('woff');
font-display: swap;
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/resources/fonts/Roboto/Roboto-Medium.woff) format('woff');
font-display: swap;
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/resources/fonts/Roboto/Roboto-Bold.woff) format('woff');
font-display: swap;
}

View file

@ -0,0 +1,164 @@
* {
box-sizing: border-box;
}
body {
font-family: Roboto, Helvetica Neue, sans-serif;
font-size: 18px;
margin: 0;
line-height: 1.5;
word-wrap: break-word;
}
body, a {
color: #222;
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.toolbar a > b {
font-size: 22px;
font-weight: 500;
}
.container a {
color: #444;
}
.container {
max-width: 1012px;
margin-right: auto;
margin-left: auto;
}
.padding16w {
padding-right: 16px;
padding-left: 16px;
}
.margin14h {
margin-top: 14px;
margin-bottom: 14px;
}
img {
max-width: 100%;
box-sizing: content-box;
background-color: #fff;
}
code {
padding: 0.2em 0.4em;
margin: 0;
font-size: 85%;
background-color: #f0f0f0;
border-radius: 3px;
}
pre > code {
display: inline;
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
overflow: visible;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
pre.highlight {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f9f9f9;
border: 1px solid #ececec;
border-radius: 3px;
}
div.highlight:last-child {
margin: 0 0 -16px 0;
}
details {
margin: 14px 0;
padding: 16px;
border: 1px solid #ececec;
border-radius: 3px;
}
summary:hover {
cursor: pointer;
}
details[open] summary ~ * {
animation: slide .3s ease-in-out;
}
@keyframes slide {
0% {opacity: 0; margin-top: -10px}
100% {opacity: 1; margin-top: 0px}
}
h1, h2, h3, h4, h5 {
margin-top: 24px;
margin-bottom: 16px;
font-weight: 500;
line-height: 1.25;
word-break: break-word;
}
h1 {
margin-top: 0;
margin-bottom: 8px;
font-size: 2em;
}
h2 {
padding-bottom: 0.3em;
font-size: 1.5em;
border-bottom: 1px solid #ececec;
}
h3 {
font-size: 1.25em;
}
.headline {
margin: -16px 0;
font-weight: 500;
font-size: 1.5em;
line-height: 1.25;
word-break: break-word;
}
details > .headline {
margin: 0 0 -8px 0;
}
.caption {
font-size: smaller;
}
hr {
height: 4px;
padding: 0;
margin: 16px 0;
background-color: #e1e1e1;
border: 0;
}
@media (max-width: 599px) {
.hide-xs {
display: none;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View file

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="64" height="64" viewBox="-1 -1 18 18">
<g stroke-width="0.1">
<path fill="#222" stroke="#222" d="M8.5,5C8.3,5,8.1,4.9,8,4.7c-0.1-0.3-0.9-3,0.1-4.4C8.3,0,8.6-0.1,8.8,0.1C9,0.3,9.1,0.6,8.9,0.8 C8.3,1.6,8.8,3.7,9,4.3C9.1,4.6,8.9,4.9,8.7,5C8.6,5,8.6,5,8.5,5z"/>
<path fill="#fff" stroke="#fff" d="M8,15.5c-4.1,0-7.5-3.1-7.5-6.9C0.5,4.4,3,2.2,8,2.2s7.5,2.1,7.5,6.4C15.5,12.4,12.1,15.5,8,15.5z"/>
<path fill="#222" stroke="#222" d="M8,2.7c4.7,0,7,1.9,7,5.9c0,3.5-3.1,6.4-7,6.4s-7-2.9-7-6.4C1,4.6,3.3,2.7,8,2.7 M8,1.7 c-4.4,0-8,1.7-8,6.9C0,12.7,3.6,16,8,16s8-3.3,8-7.4C16,3.4,12.4,1.7,8,1.7L8,1.7z"/>
<path fill="#fff" stroke="#fff" d="M8.7,7C8,6.6,7.5,6.2,7.3,5.2L7.2,4.7L6.7,4.8c-0.3,0.1-0.7,0.1-1,0.1c-0.7,0-1.2-0.1-1.6-0.3 c0.3-0.5,0.8-1.1,1.2-1.4L5.6,3L5.4,2.6C5.1,2,5.1,1.4,5.3,1.1c0.1,0,0.2,0,0.2,0c0.8,0,1.7,0.4,2.4,1l0.3,0.3l0.3-0.2 c0.8-0.6,1.6-0.6,2.3-0.6c0.2,0,0.4,0,0.6,0C11.4,2,11.1,2.4,11,2.7l-0.2,0.3l0.3,0.3c0.4,0.4,0.7,1.1,0.8,1.5 C11.6,4.9,11.2,5,10.7,5l0,0c-0.2,0-0.4,0-0.6-0.1L9.7,4.8L9.5,5.6C9.3,6.1,9.2,6.5,8.7,7z"/>
<path fill="#222" stroke="#222" d="M5.7,1.6c0.7,0,1.4,0.4,1.9,0.8L8.2,3l0.7-0.4c0.7-0.5,1.4-0.5,2-0.6c-0.1,0.2-0.2,0.4-0.3,0.5 l-0.4,0.7l0.6,0.5c0.2,0.2,0.4,0.5,0.5,0.8c-0.2,0-0.3,0.1-0.5,0.1c-0.2,0-0.3,0-0.4-0.1L9.4,4.2L9.1,5.1L9,5.4 C8.9,5.8,8.8,6.1,8.6,6.4C8.2,6.1,8,5.8,7.8,5.1l-0.2-1l-1,0.2C6.3,4.4,6,4.4,5.7,4.4c-0.3,0-0.6,0-0.8-0.1C5.2,4,5.4,3.8,5.5,3.7 l0.7-0.5L5.9,2.4C5.7,2.1,5.6,1.8,5.7,1.6 M5.5,0.6c-0.2,0-0.4,0-0.5,0.1C4.6,1.1,4.5,1.9,5,2.9c-0.8,0.5-1.6,2-1.6,2 s1,0.5,2.4,0.5c0.4,0,0.7,0,1.1-0.1c0.3,1.4,1,1.9,2,2.3c0.9-0.9,1-1.3,1.2-2.2c0.2,0.1,0.5,0.1,0.7,0.1c0.9,0,1.8-0.4,1.8-0.4 S12.2,3.7,11.4,3c0.2-0.4,0.6-1,0.6-2c-0.3,0-0.7,0-1.1,0c-0.8,0-1.7,0.1-2.6,0.7C7.5,1,6.5,0.6,5.5,0.6L5.5,0.6z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -0,0 +1,14 @@
---
layout: null
---
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="30" height="30" viewBox="0 0 30 30">
{%- if site.color_tomato_baseurl %}
<g fill="#222" stroke="#222" stroke-width="0.1">
{%- else %}
<g fill="#aaa" stroke="#aaa" stroke-width="0.1">
{%- endif %}
<path d="M 8 3 A 1.0001 1.0001 0 0 0 7 4 L 7 11 L 9 11 L 9 5 L 21 5 L 21 11 L 23 11 L 23 4 A 1.0001 1.0001 0 0 0 22 3 L 8 3 z M 6 13 C 4.895 13 4 13.895 4 15 L 3 15 A 1.0001 1.0001 0 1 0 3 17 L 4 17 L 4 24 C 4 25.657 5.343 27 7 27 L 23 27 C 24.657 27 26 25.657 26 24 L 26 17 L 27 17 A 1.0001 1.0001 0 1 0 27 15 L 26 15 C 26 13.895 25.105 13 24 13 L 17 13 C 16.448 13 16 13.448 16 14 C 16 14.552 16.448 15 17 15 L 19 15 C 19.552 15 20 15.448 20 16 C 20 16.552 19.552 17 19 17 L 11 17 C 10.448 17 10 16.552 10 16 C 10 15.448 10.448 15 11 15 L 13 15 C 13.552 15 14 14.552 14 14 C 14 13.448 13.552 13 13 13 L 6 13 z M 9 19 C 9.552 19 10 19.448 10 20 C 10 20.552 9.552 21 9 21 C 8.448 21 8 20.552 8 20 C 8 19.448 8.448 19 9 19 z M 13 19 C 13.552 19 14 19.448 14 20 C 14 20.552 13.552 21 13 21 C 12.448 21 12 20.552 12 20 C 12 19.448 12.448 19 13 19 z M 17 19 C 17.552 19 18 19.448 18 20 C 18 20.552 17.552 21 17 21 C 16.448 21 16 20.552 16 20 C 16 19.448 16.448 19 17 19 z M 21 19 C 21.552 19 22 19.448 22 20 C 22 20.552 21.552 21 21 21 C 20.448 21 20 20.552 20 20 C 20 19.448 20.448 19 21 19 z M 11 22 C 11.552 22 12 22.448 12 23 C 12 23.552 11.552 24 11 24 C 10.448 24 10 23.552 10 23 C 10 22.448 10.448 22 11 22 z M 15 22 C 15.552 22 16 22.448 16 23 C 16 23.552 15.552 24 15 24 C 14.448 24 14 23.552 14 23 C 14 22.448 14.448 22 15 22 z M 19 22 C 19.552 22 20 22.448 20 23 C 20 23.552 19.552 24 19 24 C 18.448 24 18 23.552 18 23 C 18 22.448 18.448 22 19 22 z"/>
</g>
</svg>

View file

@ -0,0 +1,22 @@
---
layout: null
permalink: pagesmap.xml
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
{%- assign sorted = site.pages | sort: 'date' %}
{%- for page in sorted %}
{%- if page.title %}
<url>
<loc>{{ page.url | absolute_url }}</loc>
<xhtml:link rel="alternate" hreflang="{% if page.lang == site.lang %}{{ site.lang | default: 'ru' }}{% else %}{{ page.lang | default: 'en' }}{% endif %}" href="{{ page.url | absolute_url }}"/>
<xhtml:link rel="alternate" hreflang="{% if page.lang == site.lang %}{{ page.lang | default: 'en' }}{% else %}{{ site.lang | default: 'ru' }}{% endif %}" href="{{ page.url_translated | absolute_url }}"/>
{%- comment %}<!-- date format ISO-8601 -->{% endcomment %}
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
<changefreq>daily</changefreq>
<priority>{% if page.date %}0.8{% else %}0.5{% endif %}</priority>
</url>
{%- endif %}
{%- endfor %}
</urlset>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

4
jekyll_theme/install.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash
rm older-tomato-theme-0.1.0.gem
gem build older-tomato-theme.gemspec
sudo gem install --local older-tomato-theme-0.1.0.gem

View file

@ -0,0 +1,14 @@
Gem::Specification.new do |spec|
spec.name = "older-tomato-theme"
spec.version = "0.1.0"
spec.authors = ["Golovin G.G."]
spec.email = ["gennadiy.golovin@internet.ru"]
spec.summary = "older-tomato-theme"
spec.homepage = "https://hub.mos.ru/golovin.gg"
spec.license = "Nonstandard"
spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r!^(_includes|_layouts|assets)!i) }
spec.add_runtime_dependency "jekyll", "~> 4.3"
end