From e7c15e2602e49355444f5d90819dfd0ea66e47bf Mon Sep 17 00:00:00 2001 From: maike Date: Wed, 2 Sep 2026 00:23:42 +0500 Subject: Basic article layout --- css/main.css | 14 ++++++++++++++ index.html | 14 +++++++++++++- partials/_article.p | 7 +++++++ partials/_header.p | 18 ++++++++++-------- partials/_picture.p | 8 ++++++++ partials/_section.p | 7 +++++++ templates/_base.p | 3 ++- 7 files changed, 61 insertions(+), 10 deletions(-) create mode 100644 partials/_article.p create mode 100644 partials/_picture.p create mode 100644 partials/_section.p diff --git a/css/main.css b/css/main.css index 9531435..83dc70b 100644 --- a/css/main.css +++ b/css/main.css @@ -51,3 +51,17 @@ h1, h2, h3, h4, h5, h6 { display: none; /* hide on tiny screens */ } } + +.article .title { + margin: 0; +} + +.article .section .title, +.article .section .text { + margin: 9px 0; + text-align: justify; +} + +.divider { + margin: 9px 0; +} diff --git a/index.html b/index.html index fbc467e..1670aee 100644 --- a/index.html +++ b/index.html @@ -1,11 +1,23 @@ @USE /templates/_base.p +/partials/_article.p +/partials/_section.p @main[] ^base[михаил «synzr»]{ -

Hello World

+ ^article[index][Приветствую вас!]{ + ^section[about-me][Обо мне]{ +

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

+ } +
+ } }{ # empty CSS block }{ # empty JS block } +#end @main[] diff --git a/partials/_article.p b/partials/_article.p new file mode 100644 index 0000000..b397998 --- /dev/null +++ b/partials/_article.p @@ -0,0 +1,7 @@ +@article[id;title;content] +
+

$title

+ + $content +
+#end @article[] diff --git a/partials/_header.p b/partials/_header.p index ca070ea..2525cf3 100644 --- a/partials/_header.p +++ b/partials/_header.p @@ -1,16 +1,18 @@ -@header[] -$brand[synzr] +@USE +/partials/_picture.p -
- - - - Моя покеписона - +@header[brand] +$pokepi[ + $.[image/png][/img/pokepi.png] + $.[image/webp][/img/pokepi.webp] +] +
+ ^picture[$pokepi;Мой покепи;pokepi;image/png]

^for[i](0;^brand.length[] - 1){ ^brand.mid($i;1) }

+#end @header[] diff --git a/partials/_picture.p b/partials/_picture.p new file mode 100644 index 0000000..9128f1f --- /dev/null +++ b/partials/_picture.p @@ -0,0 +1,8 @@ +@picture[images;alt;class;default] + + ^images.foreach[type;srcset]{ + + } + $alt + +#end @picture[] diff --git a/partials/_section.p b/partials/_section.p new file mode 100644 index 0000000..d6e0b66 --- /dev/null +++ b/partials/_section.p @@ -0,0 +1,7 @@ +@section[id;title;content] +
+

$title

+ + $content +
+#end @section[] diff --git a/templates/_base.p b/templates/_base.p index fb80ef7..4b5536f 100644 --- a/templates/_base.p +++ b/templates/_base.p @@ -25,7 +25,7 @@
- ^header[] + ^header[synzr] $body
@@ -36,3 +36,4 @@ +#end @base[] -- cgit v1.3