From b5dcc96742cc2cbf98e4c0f734e842418e4f4307 Mon Sep 17 00:00:00 2001 From: maike Date: Thu, 3 Sep 2026 10:59:09 +0500 Subject: Restructued a project --- css/main.css | 86 ----------------------------------------------- htdocs/css/main.css | 86 +++++++++++++++++++++++++++++++++++++++++++++++ htdocs/img/photo/me.jpg | Bin 0 -> 663485 bytes htdocs/img/pokepi.png | Bin 0 -> 70708 bytes htdocs/img/pokepi.webp | Bin 0 -> 29530 bytes htdocs/img/thumb/me.jpg | Bin 0 -> 39173 bytes htdocs/img/thumb/me.webp | Bin 0 -> 33282 bytes htdocs/index.html | 33 ++++++++++++++++++ htdocs/js/main.js | 10 ++++++ img/photo/me.jpg | Bin 663485 -> 0 bytes img/pokepi.png | Bin 70708 -> 0 bytes img/pokepi.webp | Bin 29530 -> 0 bytes img/thumb/me.jpg | Bin 39173 -> 0 bytes img/thumb/me.webp | Bin 33282 -> 0 bytes index.html | 33 ------------------ js/main.js | 10 ------ lib/partials/article.p | 6 ++++ lib/partials/figure.p | 29 ++++++++++++++++ lib/partials/header.p | 21 ++++++++++++ lib/partials/picture.p | 14 ++++++++ lib/partials/section.p | 8 +++++ lib/templates/base.p | 39 +++++++++++++++++++++ partials/_article.p | 6 ---- partials/_figure.p | 29 ---------------- partials/_header.p | 21 ------------ partials/_picture.p | 14 -------- partials/_section.p | 8 ----- templates/_base.p | 39 --------------------- 28 files changed, 246 insertions(+), 246 deletions(-) delete mode 100644 css/main.css create mode 100644 htdocs/css/main.css create mode 100644 htdocs/img/photo/me.jpg create mode 100644 htdocs/img/pokepi.png create mode 100644 htdocs/img/pokepi.webp create mode 100644 htdocs/img/thumb/me.jpg create mode 100644 htdocs/img/thumb/me.webp create mode 100644 htdocs/index.html create mode 100644 htdocs/js/main.js delete mode 100644 img/photo/me.jpg delete mode 100644 img/pokepi.png delete mode 100644 img/pokepi.webp delete mode 100644 img/thumb/me.jpg delete mode 100644 img/thumb/me.webp delete mode 100644 index.html delete mode 100644 js/main.js create mode 100644 lib/partials/article.p create mode 100644 lib/partials/figure.p create mode 100644 lib/partials/header.p create mode 100644 lib/partials/picture.p create mode 100644 lib/partials/section.p create mode 100644 lib/templates/base.p delete mode 100644 partials/_article.p delete mode 100644 partials/_figure.p delete mode 100644 partials/_header.p delete mode 100644 partials/_picture.p delete mode 100644 partials/_section.p delete mode 100644 templates/_base.p diff --git a/css/main.css b/css/main.css deleted file mode 100644 index 6800c97..0000000 --- a/css/main.css +++ /dev/null @@ -1,86 +0,0 @@ -body { - margin: 0; - padding: 0; - color: #424242; - background-color: #f9f9f9; - font-family: 'PT Sans', Arial, Helvetica, sans-serif; - font-size: 16px; -} - -h1, h2, h3, h4, h5, h6 { - color: #ff685b; - font-family: 'PT Sans Narrow', 'Arial Narrow', Arial, Helvetica, sans-serif; -} - -.clearfix::after { - content: ""; - display: table; - clear: both; -} - -.layout { - margin: 0 auto; - width: 100%; - max-width: 640px; - min-width: 240px; - min-height: 100vh; - background-color: #fff; -} - -.header .pokepi { - width: 240px; - height: 240px; - user-select: none; -} - -.header .brand { - float: right; - user-select: none; - margin: 18px; - font-size: 16px; - font-family: 'PT Mono', 'Courier New', Courier, monospace; -} - -.header .brand .letter { - display: block; - margin: 4px 0; -} - -@media (max-width: 480px) { - .header .brand { - display: none; /* hide on tiny screens */ - } -} - -.article { - padding: 0 9px; -} - -.article .title { - margin: 0; -} - -.article .divider { - margin: 9px 0; -} - -.article .section .title, -.article .section .text { - margin: 9px 0; -} - -.article .section .text { - text-align: justify; - text-indent: 12.5mm; -} - -.article .section .figure { - margin: 0 0 0 9px; - width: min-content; - float: right; -} - -.article .section .figure .caption { - font-style: italic; - font-size: 11px; -} diff --git a/htdocs/css/main.css b/htdocs/css/main.css new file mode 100644 index 0000000..6800c97 --- /dev/null +++ b/htdocs/css/main.css @@ -0,0 +1,86 @@ +body { + margin: 0; + padding: 0; + color: #424242; + background-color: #f9f9f9; + font-family: 'PT Sans', Arial, Helvetica, sans-serif; + font-size: 16px; +} + +h1, h2, h3, h4, h5, h6 { + color: #ff685b; + font-family: 'PT Sans Narrow', 'Arial Narrow', Arial, Helvetica, sans-serif; +} + +.clearfix::after { + content: ""; + display: table; + clear: both; +} + +.layout { + margin: 0 auto; + width: 100%; + max-width: 640px; + min-width: 240px; + min-height: 100vh; + background-color: #fff; +} + +.header .pokepi { + width: 240px; + height: 240px; + user-select: none; +} + +.header .brand { + float: right; + user-select: none; + margin: 18px; + font-size: 16px; + font-family: 'PT Mono', 'Courier New', Courier, monospace; +} + +.header .brand .letter { + display: block; + margin: 4px 0; +} + +@media (max-width: 480px) { + .header .brand { + display: none; /* hide on tiny screens */ + } +} + +.article { + padding: 0 9px; +} + +.article .title { + margin: 0; +} + +.article .divider { + margin: 9px 0; +} + +.article .section .title, +.article .section .text { + margin: 9px 0; +} + +.article .section .text { + text-align: justify; + text-indent: 12.5mm; +} + +.article .section .figure { + margin: 0 0 0 9px; + width: min-content; + float: right; +} + +.article .section .figure .caption { + font-style: italic; + font-size: 11px; +} diff --git a/htdocs/img/photo/me.jpg b/htdocs/img/photo/me.jpg new file mode 100644 index 0000000..de6f49a Binary files /dev/null and b/htdocs/img/photo/me.jpg differ diff --git a/htdocs/img/pokepi.png b/htdocs/img/pokepi.png new file mode 100644 index 0000000..d62f7ab Binary files /dev/null and b/htdocs/img/pokepi.png differ diff --git a/htdocs/img/pokepi.webp b/htdocs/img/pokepi.webp new file mode 100644 index 0000000..0709ecb Binary files /dev/null and b/htdocs/img/pokepi.webp differ diff --git a/htdocs/img/thumb/me.jpg b/htdocs/img/thumb/me.jpg new file mode 100644 index 0000000..85eda7e Binary files /dev/null and b/htdocs/img/thumb/me.jpg differ diff --git a/htdocs/img/thumb/me.webp b/htdocs/img/thumb/me.webp new file mode 100644 index 0000000..d09cc5b Binary files /dev/null and b/htdocs/img/thumb/me.webp differ diff --git a/htdocs/index.html b/htdocs/index.html new file mode 100644 index 0000000..ba13d03 --- /dev/null +++ b/htdocs/index.html @@ -0,0 +1,33 @@ +@USE +../lib/templates/base.p +../lib/partials/article.p +../lib/partials/section.p +../lib/partials/figure.p + +@main[] +$photo_thumbnails[ + $.[image/webp][/img/thumb/me.webp] + $.[image/jpeg][/img/thumb/me.jpg] +] +^base[михаил «synzr»]{ + ^article[index][Приветствую вас!]{ + ^section[about-me]{ + ^figure[$photo_thumbnails;image/jpeg; + $.caption[Моя фотография у останкинского телецентра в Москве] + $.height[160] + $.href[/img/photo/me.jpg] + ] +

+ Меня зовут Михаил, я платно учусь в частном колледже на IT, + интересуюсь технологиями и коллекционирую музыку на CD-пластинках. + Ну, вроде бы я человек - насколько это возможно. Обожаю лезть, куда не надо. +

+ } +
+ } +}{ +# empty CSS block +}{ +# empty JS block +} +#end @main[] diff --git a/htdocs/js/main.js b/htdocs/js/main.js new file mode 100644 index 0000000..b96513b --- /dev/null +++ b/htdocs/js/main.js @@ -0,0 +1,10 @@ +// brand letters' rotation +function rotate(letter) { + return String.fromCharCode( + letter.charCodeAt(0) + (letter.toLowerCase() <= 'm' ? 13 : -13) + ); +} + +$(".header .brand .letter").hover(function () { + $(this).text(rotate($(this).text())); +}); diff --git a/img/photo/me.jpg b/img/photo/me.jpg deleted file mode 100644 index de6f49a..0000000 Binary files a/img/photo/me.jpg and /dev/null differ diff --git a/img/pokepi.png b/img/pokepi.png deleted file mode 100644 index d62f7ab..0000000 Binary files a/img/pokepi.png and /dev/null differ diff --git a/img/pokepi.webp b/img/pokepi.webp deleted file mode 100644 index 0709ecb..0000000 Binary files a/img/pokepi.webp and /dev/null differ diff --git a/img/thumb/me.jpg b/img/thumb/me.jpg deleted file mode 100644 index 85eda7e..0000000 Binary files a/img/thumb/me.jpg and /dev/null differ diff --git a/img/thumb/me.webp b/img/thumb/me.webp deleted file mode 100644 index d09cc5b..0000000 Binary files a/img/thumb/me.webp and /dev/null differ diff --git a/index.html b/index.html deleted file mode 100644 index 0315ab8..0000000 --- a/index.html +++ /dev/null @@ -1,33 +0,0 @@ -@USE -/templates/_base.p -/partials/_article.p -/partials/_section.p -/partials/_figure.p - -@main[] -$photo_thumbnails[ - $.[image/webp][/img/thumb/me.webp] - $.[image/jpeg][/img/thumb/me.jpg] -] -^base[михаил «synzr»]{ - ^article[index][Приветствую вас!]{ - ^section[about-me]{ - ^figure[$photo_thumbnails;image/jpeg; - $.caption[Моя фотография у останкинского телецентра в Москве] - $.height[160] - $.href[/img/photo/me.jpg] - ] -

- Меня зовут Михаил, я платно учусь в частном колледже на IT, - интересуюсь технологиями и коллекционирую музыку на CD-пластинках. - Ну, вроде бы я человек - насколько это возможно. Обожаю лезть, куда не надо. -

- } -
- } -}{ -# empty CSS block -}{ -# empty JS block -} -#end @main[] diff --git a/js/main.js b/js/main.js deleted file mode 100644 index b96513b..0000000 --- a/js/main.js +++ /dev/null @@ -1,10 +0,0 @@ -// brand letters' rotation -function rotate(letter) { - return String.fromCharCode( - letter.charCodeAt(0) + (letter.toLowerCase() <= 'm' ? 13 : -13) - ); -} - -$(".header .brand .letter").hover(function () { - $(this).text(rotate($(this).text())); -}); diff --git a/lib/partials/article.p b/lib/partials/article.p new file mode 100644 index 0000000..3e2ddfb --- /dev/null +++ b/lib/partials/article.p @@ -0,0 +1,6 @@ +@article[id;title;content] +
+

$title

+ $content +
+#end @article[] diff --git a/lib/partials/figure.p b/lib/partials/figure.p new file mode 100644 index 0000000..f853c96 --- /dev/null +++ b/lib/partials/figure.p @@ -0,0 +1,29 @@ +@USE +picture.p + +@figure[images;default_type;.caption;.alt;.height;.href] +^if(def $alt){ + $resolved_alt[$alt] +}(def $caption){ + $resolved_alt[$caption] +} + +
+# HACK боже какое оно вонючее + ^if(def $href){ + + } + ^picture[$images;$default_type; + $.alt[$resolved_alt] + $.height[$height] + $.class[image] + ] + ^if(def $href){ + + } + + ^if(def $caption){ +
$caption
+ } +
+#end @figure[] diff --git a/lib/partials/header.p b/lib/partials/header.p new file mode 100644 index 0000000..84e59d1 --- /dev/null +++ b/lib/partials/header.p @@ -0,0 +1,21 @@ +@USE +picture.p + +@header[brand] +$pokepi[ + $.[image/webp][/img/pokepi.webp] + $.[image/png][/img/pokepi.png] +] + + +#end @header[] diff --git a/lib/partials/picture.p b/lib/partials/picture.p new file mode 100644 index 0000000..cdd1baf --- /dev/null +++ b/lib/partials/picture.p @@ -0,0 +1,14 @@ +@picture[images;default_type;.alt;.class;.role;.height] + + ^images.foreach[type;srcset]{ + + } + + +#end @picture[] diff --git a/lib/partials/section.p b/lib/partials/section.p new file mode 100644 index 0000000..44135e1 --- /dev/null +++ b/lib/partials/section.p @@ -0,0 +1,8 @@ +@section[id;content;.title] +
+ ^if(def $title){ +

$title

+ } + $content +
+#end @section[] diff --git a/lib/templates/base.p b/lib/templates/base.p new file mode 100644 index 0000000..24d2db7 --- /dev/null +++ b/lib/templates/base.p @@ -0,0 +1,39 @@ +@USE +../partials/header.p + +@base[title;body;css;js] + + + + + + + + + + + $title + + + + + + + + $css + + + +
+ ^header[synzr] + + $body +
+ + + + $js + + + +#end @base[] diff --git a/partials/_article.p b/partials/_article.p deleted file mode 100644 index 3e2ddfb..0000000 --- a/partials/_article.p +++ /dev/null @@ -1,6 +0,0 @@ -@article[id;title;content] -
-

$title

- $content -
-#end @article[] diff --git a/partials/_figure.p b/partials/_figure.p deleted file mode 100644 index df7c653..0000000 --- a/partials/_figure.p +++ /dev/null @@ -1,29 +0,0 @@ -@USE -/partials/_picture.p - -@figure[images;default_type;.caption;.alt;.height;.href] -^if(def $alt){ - $resolved_alt[$alt] -}(def $caption){ - $resolved_alt[$caption] -} - -
-# HACK боже какое оно вонючее - ^if(def $href){ - - } - ^picture[$images;$default_type; - $.alt[$resolved_alt] - $.height[$height] - $.class[image] - ] - ^if(def $href){ - - } - - ^if(def $caption){ -
$caption
- } -
-#end @figure[] diff --git a/partials/_header.p b/partials/_header.p deleted file mode 100644 index 5f57f7c..0000000 --- a/partials/_header.p +++ /dev/null @@ -1,21 +0,0 @@ -@USE -/partials/_picture.p - -@header[brand] -$pokepi[ - $.[image/webp][/img/pokepi.webp] - $.[image/png][/img/pokepi.png] -] - - -#end @header[] diff --git a/partials/_picture.p b/partials/_picture.p deleted file mode 100644 index cdd1baf..0000000 --- a/partials/_picture.p +++ /dev/null @@ -1,14 +0,0 @@ -@picture[images;default_type;.alt;.class;.role;.height] - - ^images.foreach[type;srcset]{ - - } - - -#end @picture[] diff --git a/partials/_section.p b/partials/_section.p deleted file mode 100644 index 44135e1..0000000 --- a/partials/_section.p +++ /dev/null @@ -1,8 +0,0 @@ -@section[id;content;.title] -
- ^if(def $title){ -

$title

- } - $content -
-#end @section[] diff --git a/templates/_base.p b/templates/_base.p deleted file mode 100644 index 4b5536f..0000000 --- a/templates/_base.p +++ /dev/null @@ -1,39 +0,0 @@ -@USE -/partials/_header.p - -@base[title;body;css;js] - - - - - - - - - - - $title - - - - - - - - $css - - - -
- ^header[synzr] - - $body -
- - - - $js - - - -#end @base[] -- cgit v1.3