From e176c0f0709bd17a46d943b96e631a3f2b1320fb Mon Sep 17 00:00:00 2001 From: maike Date: Wed, 2 Sep 2026 21:41:31 +0500 Subject: Clickable IRL photo --- css/main.css | 25 ++++++++++++++++++++++--- img/photo/me.jpg | Bin 0 -> 663485 bytes img/thumb/me.jpg | Bin 0 -> 39173 bytes img/thumb/me.webp | Bin 0 -> 33282 bytes index.html | 12 +++++++++++- partials/_article.p | 1 - partials/_figure.p | 29 +++++++++++++++++++++++++++++ partials/_header.p | 9 ++++++--- partials/_picture.p | 10 ++++++++-- partials/_section.p | 7 ++++--- 10 files changed, 80 insertions(+), 13 deletions(-) create mode 100644 img/photo/me.jpg create mode 100644 img/thumb/me.jpg create mode 100644 img/thumb/me.webp create mode 100644 partials/_figure.p diff --git a/css/main.css b/css/main.css index 83dc70b..6800c97 100644 --- a/css/main.css +++ b/css/main.css @@ -4,7 +4,7 @@ body { color: #424242; background-color: #f9f9f9; font-family: 'PT Sans', Arial, Helvetica, sans-serif; - font-size: 14px; + font-size: 16px; } h1, h2, h3, h4, h5, h6 { @@ -52,16 +52,35 @@ h1, h2, h3, h4, h5, h6 { } } +.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; } -.divider { - margin: 9px 0; +.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/img/photo/me.jpg b/img/photo/me.jpg new file mode 100644 index 0000000..de6f49a Binary files /dev/null and b/img/photo/me.jpg differ diff --git a/img/thumb/me.jpg b/img/thumb/me.jpg new file mode 100644 index 0000000..85eda7e Binary files /dev/null and b/img/thumb/me.jpg differ diff --git a/img/thumb/me.webp b/img/thumb/me.webp new file mode 100644 index 0000000..d09cc5b Binary files /dev/null and b/img/thumb/me.webp differ diff --git a/index.html b/index.html index 1670aee..0315ab8 100644 --- a/index.html +++ b/index.html @@ -2,11 +2,21 @@ /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][Обо мне]{ + ^section[about-me]{ + ^figure[$photo_thumbnails;image/jpeg; + $.caption[Моя фотография у останкинского телецентра в Москве] + $.height[160] + $.href[/img/photo/me.jpg] + ]

Меня зовут Михаил, я платно учусь в частном колледже на IT, интересуюсь технологиями и коллекционирую музыку на CD-пластинках. diff --git a/partials/_article.p b/partials/_article.p index b397998..3e2ddfb 100644 --- a/partials/_article.p +++ b/partials/_article.p @@ -1,7 +1,6 @@ @article[id;title;content]

$title

- $content
#end @article[] diff --git a/partials/_figure.p b/partials/_figure.p new file mode 100644 index 0000000..df7c653 --- /dev/null +++ b/partials/_figure.p @@ -0,0 +1,29 @@ +@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 index 2525cf3..5f57f7c 100644 --- a/partials/_header.p +++ b/partials/_header.p @@ -3,12 +3,15 @@ @header[brand] $pokepi[ - $.[image/png][/img/pokepi.png] $.[image/webp][/img/pokepi.webp] + $.[image/png][/img/pokepi.png] ] -
- ^picture[$pokepi;Мой покепи;pokepi;image/png] +