diff --git a/assets/assetpack.db b/assets/assetpack.db index 0132ec5..7c32dbc 100644 --- a/assets/assetpack.db +++ b/assets/assetpack.db @@ -6,3 +6,7 @@ minified=1 checksum=4f089bc53f format=css minified=1 +[sass:sass/post_text.scss] +checksum=ecda188939 +format=css +minified=0 diff --git a/assets/assetpack.def b/assets/assetpack.def new file mode 100644 index 0000000..1964eea --- /dev/null +++ b/assets/assetpack.def @@ -0,0 +1,3 @@ +! app.css +< https://unpkg.com/normalize.css@8.0.1/normalize.css +< sass/post_text.scss diff --git a/assets/css/PostText.css b/assets/sass/post_text.scss similarity index 72% rename from assets/css/PostText.css rename to assets/sass/post_text.scss index faf047f..9dd5b5f 100644 --- a/assets/css/PostText.css +++ b/assets/sass/post_text.scss @@ -1,5 +1,8 @@ +/* + * Tags + */ + :root { - font-size: calc(8px + 1vmin); box-sizing: border-box; } @@ -9,26 +12,42 @@ body { background-image: url('/images/halloween_background_1.gif'); - background-attachment: fixed; - width: 99vmin; + width: 95vmin; margin: 0 auto; + font-size: calc(8px + 1vmin); } -header > h1, footer > p { +pre { + white-space: pre-wrap; +} + +/* + * Simple classes + */ + +.site-title { text-align: center; border: outset; background-color: #C2B3A9; padding: 0.5em 0; } -hr + h2 { +.site-footer { + text-align: center; + border: outset; + background-color: #C2B3A9; + padding: 0; + margin: 1em 0; +} + +.page-title { text-align: center; border: inset; padding: 0.5em 0; background-color: #A59990; } -header > nav { +.site-nav { display: flex; flex-flow: row wrap; justify-content: flex-start; @@ -38,103 +57,13 @@ header > nav { background-color: #C2B3A9; } -header > nav a { +.site-nav > a { border: outset; flex: 1; - padding-left: 0.5em; + padding: 0 0.5em 0 0.5em; background-color: #8C97A8; } -.threads, .remarks { - display: flex; - flex-direction: column; - /* border: dashed; */ - gap: 1em; - padding: 0.5em 0; -} - -.thread, .remark { - background-color: #C2B3A9; - border: outset; -} - -.thread .title, .remark .date { - display: flex; - justify-content: space-between; - flex-wrap: wrap; - background-color: #5B90A4; - margin: 0; - padding: 0.25em 0.5em 0.25em 0.75em; - align-items: center; - border: inset; -} - -.thread .title .id, .remark .id { - border: outset; - padding: 0.25em; - background-color: #999999; -} - -.thread .date, .thread .author, .thread .body { - margin: 1em 0.5em; - padding: 0.25em 0.5em; -} - -.remark .author, .remark .body { - margin: 1em 0.5em; - padding: 0.25em 0.5em; -} - -.thread .body, .remark .body { - background-color: #A59990; - border: inset; -} - -.thread nav, .remark nav { - display: flex; - justify-content: flex-end; - flex-flow: row wrap; - padding: 0 1em 0.5em 1em; - gap: 0.5em; - align-items: center; -} - -.thread nav a, .remark nav a { - flex: 1 0; - text-align: center; - border: outset; - padding: 0.25em 0; - white-space: nowrap; - background-color: #8C97A8; -} - -article + nav { - display: flex; - justify-content: flex-start; - flex-flow: row wrap; - border: inset; - background-color: #A59990; - padding: 0.5em 0.25em; - gap: 0.25em; -} - -article + nav > a { - border: outset; - flex: 1; - /* border-bottom-style: none; */ - text-align: center; - background-color: #8C97A8; -} - -article + nav > a[rel="self"] { - border-style: inset; - background-color: #696F80; -} - -article + nav > span { - -} - .field-with-info { border-style: solid; border-color: green; @@ -145,6 +74,98 @@ article + nav > span { border-color: red; } -pre { - white-space: pre-wrap; +/* + * Nested/layered classes + */ + +.pager { + display: flex; + flex-direction: column; + /* border: dashed; */ + gap: 1em; + padding: 0.5em 0; +} + +.pager__nav { + display: flex; + justify-content: flex-start; + flex-flow: row wrap; + border: inset; + background-color: #A59990; + padding: 0.5em 0.25em; + gap: 0.25em; +} + +.pager__nav > a { + border: outset; + flex: 1; + /* border-bottom-style: none; */ + text-align: center; + background-color: #8C97A8; +} + +.pager__nav > a[rel="self"] { + border-style: inset; + background-color: #696F80; +} + +.post { + background-color: #C2B3A9; + border: outset; +} + +.post__title { + display: flex; + justify-content: space-between; + flex-wrap: wrap; + background-color: #5B90A4; + margin: 0; + padding: 0.25em 0.5em 0.25em 0.75em; + align-items: center; + border: inset; +} + +.post__id { + border: outset; + padding: 0.25em; + background-color: #999999; +} + +.post__date, .post__author, .post__body { + margin: 1em 0.5em; + padding: 0.25em 0.5em; +} + +.post--remark__date { + display: flex; + justify-content: space-between; + flex-wrap: wrap; + background-color: #5B90A4; + margin: 0; + padding: 0.25em 0.5em 0.25em 0.75em; + align-items: center; + border: inset; +} + +.post__body { + background-color: #A59990; + border: inset; +} + +.post__nav { + display: flex; + justify-content: flex-end; + flex-flow: row wrap; + padding: 0 1em 0.5em 1em; + gap: 0.5em; + align-items: center; +} + +.post__nav > a { + flex: 1 0; + text-align: center; + border: outset; + padding: 0.25em 0; + white-space: nowrap; + background-color: #8C97A8; } diff --git a/cpanfile b/cpanfile index efe15bf..4720e2d 100644 --- a/cpanfile +++ b/cpanfile @@ -10,3 +10,5 @@ requires 'XML::RSS'; requires 'CSS::Minifier::XS'; requires 'Text::Markdown'; requires 'HTML::Restrict'; +requires 'IO::Socket::SSL'; +requires 'CSS::Sass'; diff --git a/lib/PostText.pm b/lib/PostText.pm index 6b38cfc..91ee170 100644 --- a/lib/PostText.pm +++ b/lib/PostText.pm @@ -16,7 +16,7 @@ use PostText::Model::Moderator; sub startup($self) { $self->plugin('Config'); $self->plugin('TagHelpers::Pagination'); - $self->plugin(AssetPack => {pipes => [qw{Css Combine}]}); + $self->plugin(AssetPack => {pipes => [qw{Sass Css Combine}]}); # Helpers $self->helper(pg => sub ($c) { @@ -94,7 +94,7 @@ sub startup($self) { $self->remark->per_page($remarks_per_page) } - $self->asset->process('main.css', 'css/PostText.css'); + $self->asset->process; push @{$self->commands->namespaces}, 'PostText::Command'; diff --git a/public/images/background2.gif b/public/images/background2.gif new file mode 100644 index 0000000..bfa6369 Binary files /dev/null and b/public/images/background2.gif differ diff --git a/public/images/background_stars_anm.gif b/public/images/background_stars_anm.gif new file mode 100644 index 0000000..024591e Binary files /dev/null and b/public/images/background_stars_anm.gif differ diff --git a/public/images/topwwbackground.gif b/public/images/topwwbackground.gif new file mode 100644 index 0000000..edc8e08 Binary files /dev/null and b/public/images/topwwbackground.gif differ diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index 5895483..c2b2842 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -3,26 +3,26 @@ Post::Text - <%= title %> - <%= asset 'main.css' %> + <%= asset 'app.css' %>
-

Post::Text

-
-
<% if (flash 'error') { =%>

<%= flash 'error' %>

<% } elsif (stash 'error') { =%> @@ -53,7 +52,7 @@

<%= stash 'info' %>

<% } =%> <%= content =%> -