Skip to content

Commit 9be7b13

Browse files
committed
Релиз [deploy]
0 parents  commit 9be7b13

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+8916
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[*]
2+
charset = utf-8
3+
end_of_line = lf
4+
indent_style = tab
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
8+
[*.{md,yml}]
9+
indent_size = 2
10+
indent_style = space
11+
12+
[*.min.*]
13+
insert_final_newline = false

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
jobs:
6+
ci:
7+
if: ${{ ! contains(github.event.head_commit.message, '[skip') }}
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Set up Node.js
11+
uses: actions/setup-node@v1
12+
with:
13+
node-version: '24'
14+
- name: Checkout
15+
uses: actions/checkout@master
16+
- name: Install dependencies
17+
run: npm ci
18+
- name: Lint
19+
run: npm run lint
20+
- name: Build & Test
21+
run: npm test
22+
- name: Deploy to GitHub Pages
23+
if: ${{ contains(github.event.head_commit.message, '[deploy]') }}
24+
uses: peaceiris/actions-gh-pages@v3
25+
with:
26+
github_token: ${{ secrets.GITHUB_TOKEN }}
27+
publish_dir: ./public

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*cache*
2+
*tmp*
3+
.DS_Store
4+
.vscode/*
5+
!.vscode/extensions.json
6+
!.vscode/settings.json
7+
Thumbs.db
8+
bundles
9+
coverage
10+
node_modules
11+
public/**/*.html
12+
sitemap-main.xml
13+
temp

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*

.vscode/extensions.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"recommendations": [
3+
"enhancedjs.html-in-template-string",
4+
"forbeslindesay.vscode-sql-template-literal",
5+
"hugo-vrijswijk.vscode-lit-xml",
6+
"natizyskunk.sftp",
7+
"oouo-diogo-perdigao.docthis",
8+
"editorconfig.editorconfig"
9+
]
10+
}

.vscode/settings.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll.biome": "explicit",
4+
"source.organizeImports.biome": "explicit",
5+
"source.suppressRule.inline.biome": "never",
6+
"source.suppressRule.topLevel.biome": "never"
7+
},
8+
"editor.defaultFormatter": "biomejs.biome",
9+
"editor.formatOnPaste": true,
10+
"editor.formatOnSave": true,
11+
"emmet.includeLanguages": {
12+
"javascript": "html"
13+
},
14+
"emmet.preferences": {
15+
"output.reverseAttributes": true
16+
}
17+
}

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# a-raskatov.github.io
2+
3+
Заказ для @efiand на интернет-сборник стихотворений (MPA).
4+
5+
## Набор возможностей
6+
7+
- PWA.
8+
- «Книгоподобное» оглавление с заполнителем промежутков.
9+
- [sitemap](https://a-raskatov.github.io/sitemap-main.xml).
10+
- [AMP-версия](https://a-raskatov.github.io/amp/).
11+
12+
## Для разработчика
13+
14+
- Инструмент [aвтообновления зависимостей](tools/upgrade.js).
15+
- Перезагрузка страницы в браузере при перезагрузке сервера в режиме разработки с помощью Server Sent Events.
16+
- [Biome](https://biomejs.dev/) для проверки кода.
17+
- Jest для тестирования.
18+
- Автодеплой при пуше через github action по наличию фразы `[deploy]` в заголовке коммита.
19+
20+
## Технические особенности
21+
22+
- Написано на чистом Javascript (JSDoc для тайпчекинга), CSS, SQL без сборщиков.
23+
- [Валидация](test/validate.spec.js) HTML-разметки, БЭМ-нейминга, AMP-разметки, XML-структуры карты сайта.
24+
- Хренение контента в SQLite.
25+
- БЭМ-нейминг классов, без вложенности. Дополнение к методологии:
26+
- хелперы с префиксом `_` в названии, подключены в конце;
27+
- допускается вложенность тегов не более 2-х;
28+
- компоненты, основанные на уникальных тегах, могут не иметь классов.

app/client/critical.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@import url("css/fonts.css");
2+
@import url("css/global.css");
3+
@import url("css/helpers.css");
4+
5+
@import url("../components/author/author.css");
6+
@import url("../components/copyright/copyright.css");
7+
@import url("../components/footer/footer.css");
8+
@import url("../components/header/header.css");
9+
@import url("../components/layout/layout.css");
10+
@import url("../components/nav-ring/nav-ring.css");
11+
@import url("../components/poem/poem.css");
12+
@import url("../components/toc/toc.css");

app/client/css/fonts.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
@font-face {
2+
font-weight: 400;
3+
font-style: normal;
4+
font-family: "Georgia";
5+
font-display: swap;
6+
src: url("/fonts/georgia-normal-400.woff2") format("woff2");
7+
}
8+
9+
@font-face {
10+
font-weight: 400;
11+
font-style: italic;
12+
font-family: "Georgia";
13+
font-display: swap;
14+
src: url("/fonts/georgia-italic-400.woff2") format("woff2");
15+
}
16+
17+
@font-face {
18+
font-weight: 400;
19+
font-style: normal;
20+
font-family: "Verdana";
21+
font-display: swap;
22+
src: url("/fonts/verdana-normal-400.woff2") format("woff2");
23+
}
24+
25+
@font-face {
26+
font-weight: 400;
27+
font-style: italic;
28+
font-family: "Verdana";
29+
font-display: swap;
30+
src: url("/fonts/verdana-italic-400.woff2") format("woff2");
31+
}

app/client/css/global.css

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
html {
2+
--color-back: #ececec;
3+
--color-main-lite: #b2dfdb;
4+
--color-main-semitransparent: rgba(0, 121, 107, 0.7);
5+
--color-main: #00796b;
6+
--color-text: #323232;
7+
--color-white: #ffffff;
8+
--font-sans-serif: "Verdana", sans-serif;
9+
--font-serif: "Georgia", serif;
10+
--transition: none;
11+
--icon-toc: url("../../client/icons/toc.svg");
12+
13+
height: 100%;
14+
background-color: var(--color-back);
15+
overflow-anchor: none;
16+
scrollbar-color: var(--color-main) var(--color-main-lite);
17+
scrollbar-width: thin;
18+
-webkit-overflow-scrolling: touch;
19+
}
20+
21+
h1 {
22+
margin: 0 0 3rem;
23+
font: italic 2.5rem / 3rem var(--font-serif);
24+
text-align: center;
25+
color: var(--color-main);
26+
}
27+
28+
h2 {
29+
margin: 3rem 0 1.5rem;
30+
font-weight: 400;
31+
font-style: italic;
32+
font-size: 1.75rem;
33+
line-height: 2rem;
34+
font-family: var(--font-serif);
35+
text-align: center;
36+
}
37+
38+
a {
39+
text-decoration-skip-ink: none;
40+
color: inherit;
41+
border-radius: 0.25rem;
42+
outline: none;
43+
box-shadow: inset 0 0 0 2px transparent;
44+
transition: var(--transition);
45+
transition-property: color, background-color, border-color, opacity, box-shadow;
46+
}
47+
48+
ul,
49+
ol {
50+
margin: 0;
51+
padding: 0;
52+
list-style: none;
53+
}
54+
55+
p {
56+
margin: 0;
57+
}
58+
59+
time {
60+
display: block;
61+
text-align: right;
62+
}
63+
64+
::selection {
65+
background-color: var(--color-main-lite);
66+
}
67+
68+
::-webkit-scrollbar {
69+
width: 0.125rem;
70+
background-color: var(--color-main-lite);
71+
}
72+
73+
::-webkit-scrollbar-thumb {
74+
background-color: var(--color-main);
75+
}
76+
77+
::-webkit-scrollbar-track {
78+
background-color: var(--color-main-lite);
79+
}
80+
81+
@media (hover: hover) {
82+
a[href]:hover,
83+
a[href]:active {
84+
text-decoration: none;
85+
transition-duration: 0.2s;
86+
}
87+
88+
a[href]:hover {
89+
color: var(--color-main);
90+
background-color: var(--color-main-lite);
91+
box-shadow: inset 0 0 0 2px var(--color-main);
92+
}
93+
94+
a[href]:active {
95+
color: var(--color-white);
96+
background-color: var(--color-main);
97+
box-shadow: inset 0 2px #0000004d;
98+
}
99+
100+
a[href]:focus-visible {
101+
text-decoration: none;
102+
color: var(--color-main);
103+
background-color: var(--color-main-lite);
104+
box-shadow: inset 0 0 0 2px var(--color-main);
105+
transition-duration: 0.2s;
106+
}
107+
}
108+
109+
@media (prefers-reduced-motion: no-preference) {
110+
html {
111+
--transition: 0.3s ease-in-out;
112+
}
113+
}
114+
115+
@media (min-width: 768px) {
116+
html {
117+
font-size: 16px;
118+
}
119+
}
120+
121+
@media print {
122+
html {
123+
--color-back: #ffffff;
124+
--color-main: #000000;
125+
--color-text: #000000;
126+
font-size: 12pt;
127+
}
128+
}

0 commit comments

Comments
 (0)