From b5dcc96742cc2cbf98e4c0f734e842418e4f4307 Mon Sep 17 00:00:00 2001 From: maike Date: Thu, 3 Sep 2026 10:59:09 +0500 Subject: Restructued a project --- 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 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 117 insertions(+) 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 (limited to 'lib') 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[] -- cgit v1.3