From 3bda9ed0089c80322a376b92ef0c37d81ab5920a Mon Sep 17 00:00:00 2001 From: Sergiotarxz Date: Thu, 9 Nov 2023 17:38:17 +0100 Subject: [PATCH] Rebranding Burguillos.info. --- lib/BurguillosInfo.pm | 1 - lib/BurguillosInfo/Controller/Page.pm | 8 -------- public/css/styles.css | 15 +++++++++------ public/css/styles.scss | 12 +++++++++--- templates/page/_list_posts.html.ep | 12 ++++++++---- 5 files changed, 26 insertions(+), 22 deletions(-) diff --git a/lib/BurguillosInfo.pm b/lib/BurguillosInfo.pm index e83e36a..47c4963 100644 --- a/lib/BurguillosInfo.pm +++ b/lib/BurguillosInfo.pm @@ -47,7 +47,6 @@ sub startup ($self) { $r->get('/privacy.txt')->to('Privacy#index'); $r->get('/sitemap.xml')->to('Sitemap#sitemap'); $r->get('/robots.txt')->to('Robots#robots'); - $r->get('/aprende-a-dibujar-con-krita')->to('Page#rickroll'); # $r->get('/:post')->to('Page#post'); $r->get('/stats')->to('Metrics#stats'); diff --git a/lib/BurguillosInfo/Controller/Page.pm b/lib/BurguillosInfo/Controller/Page.pm index f9b63b8..959705c 100644 --- a/lib/BurguillosInfo/Controller/Page.pm +++ b/lib/BurguillosInfo/Controller/Page.pm @@ -30,14 +30,6 @@ sub index { ); } -sub rickroll ($self) { - if ( $self->req->headers->user_agent =~ /bot/i ) { - return $self->render( text => '' ); - } - $self->res->headers->location('http://ibaillanos.tv'); - $self->render( text => '', status => 302 ); -} - sub category_rss { require BurguillosInfo; my $self = shift; diff --git a/public/css/styles.css b/public/css/styles.css index 3dbd19f..b3f1389 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -10,7 +10,7 @@ body { height: 100%; } body span.round-center { background: blueviolet; - color: white; + color: #FEFEFA; line-height: 100%; aspect-ratio: 1 / 1; display: inline-flex; @@ -208,7 +208,7 @@ body { height: calc(100% - 60px); z-index: 500; transition: left 0.5s ease-in, visibility 0.5s ease-in; - background: white; } + background: #FEFEFA; } body nav.mobile-foldable > a:first-child { margin-top: 30px; } body nav.mobile-foldable a { @@ -218,7 +218,7 @@ body { padding-left: auto; padding-right: auto; color: blueviolet; - background: white; + background: #FEFEFA; margin-top: 10px; padding: 10px; margin-left: 10px; @@ -238,7 +238,7 @@ body { align-items: center; justify-content: center; } body nav.mobile-shortcuts > a.active { - background: white; + background: #FEFEFA; color: #dcdcf5; } body nav.mobile-shortcuts > a.active:focus { background: #f2eb8c; } @@ -360,6 +360,11 @@ body { display: flex; flex-direction: row; flex-wrap: wrap; } + body div.page-contents div.description div.articles a { + width: 45%; + margin-left: 5%; } + body div.page-contents div.description div.articles a:nth-child(2n+1) { + margin-left: 0%; } body div.page-contents div.description div.articles div.image-container { margin-left: 2.5%; margin-top: 10px; @@ -376,7 +381,6 @@ body { border: solid 1px black; } body div.page-contents div.description div.articles a { min-height: 90%; - width: 100%; display: block; text-decoration: none; text-overflow: ellipsis; @@ -390,7 +394,6 @@ body { height: 90%; padding: 5%; padding-top: 1%; - background: #f2eb8c; color: blueviolet; box-shadow: 8px 8px 1px 0px #8ddfd6; border: 3px solid black; } diff --git a/public/css/styles.scss b/public/css/styles.scss index 07ceeb3..9e1401b 100644 --- a/public/css/styles.scss +++ b/public/css/styles.scss @@ -8,7 +8,7 @@ $background-secondary: #635283; $color-secondary: #8eea6d; $accent-secondary: #fde68f; $primary-secondary: #590e11; -$background_sidebar: white; //#F5F5DC; +$background_sidebar: $background-page; //#F5F5DC; $color_sidebar: #dcdcf5; html { @@ -532,6 +532,14 @@ body { display: flex; flex-direction: row; flex-wrap: wrap; + a { + &:nth-child(2n+1) { + margin-left: 0%; + } + + width: 45%; + margin-left: 5%; + } div.image-container { margin-left: 2.5%; @@ -553,7 +561,6 @@ body { a { min-height: 90%; - width: 100%; display: block; text-decoration: none; text-overflow: ellipsis; @@ -594,7 +601,6 @@ body { padding: 5%; padding-top: 1%; - background: $color_div; color: $background_div; box-shadow: 8px 8px 1px 0px #8ddfd6; border: 3px solid black; diff --git a/templates/page/_list_posts.html.ep b/templates/page/_list_posts.html.ep index 5243efd..ba616b4 100644 --- a/templates/page/_list_posts.html.ep +++ b/templates/page/_list_posts.html.ep @@ -11,17 +11,21 @@ $date_article->set_time_zone('Europe/Madrid'); %>

<%= ''.$date_article %>

<% + my $title = $post->{title}; + if (length($title) > 50) { + $title = substr($title, 0, 47).'...'; + } if (defined $post->{image}) { %>
- Portada de <%=$post->{title}%> + Portada de <%=$title%>
<% } %>
-

<%=$post->{title}%>

<% +

<%=$title%>

<% my $xml = Mojo::DOM->new($post->{content}); my $text = $xml->all_text; - if (length($text) > 120) { - $text = substr($text, 0, 100).'...'; + if (length($text) > 50) { + $text = substr($text, 0, 47).'...'; } %>

<%=$text%>

Escrito por <%=$post->{author}%>