From 336094d1dd4fcaa6213c37e712fc2c0fdde13b7a Mon Sep 17 00:00:00 2001 From: Marcos Dias <57465032+SoraAsc@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:16:23 -0300 Subject: [PATCH] feat: added noticia style --- assets/css/noticias.scss | 75 ++++++++++++++++++++ lib/pescarte_web/live/blog/post_live/show.ex | 12 +++- 2 files changed, 84 insertions(+), 3 deletions(-) diff --git a/assets/css/noticias.scss b/assets/css/noticias.scss index e96b0367..b8779238 100644 --- a/assets/css/noticias.scss +++ b/assets/css/noticias.scss @@ -143,3 +143,78 @@ margin-top: 20px; } } + +.noticia { + display: flex; + flex-direction: column; + align-items: center; + padding: 40px 220px; +} + +.noticia h1 { + margin-bottom: 30px; + line-height: 46px; + font-weight: 700; +} + +.noticia .noticia-descricao h2 { + color: #0064C8; + font-size: 32px; + line-height: 38px; + font-weight: 700; + margin-top: 60px; + margin-bottom: 30px; +} + +.noticia .noticia-descricao h3 { + font-size: 24px; + line-height: 28px; + font-weight: 700; + color: #404040; + margin-bottom: 30px; +} + +.noticia .noticia-descricao strong em { + text-decoration: underline; + color: #0064C8; + font-weight: 400; + font-style: normal; +} + +.noticia .noticia-descricao p { + font-size: 16px; + color: #404040; + margin-bottom: 40px; +} + + +.noticia .noticia-descricao p a { + font-weight: 700; + line-height: 24px; + color: #0064C8; +} + +.noticia .noticia-descricao p a::after { + content: "➔"; + display: inline-block; + color: inherit; + font-size: 0.8em; + position: relative; + transform: rotate(-45deg); + bottom: 2px; +} + +.noticia .noticia-descricao p a:hover { + text-decoration-line: underline; +} + +.noticia .noticia-descricao img { + width: 100%; + border-radius: 16px; +} + +@media (max-width: 768px) { + .noticia { + padding: 40px; + } +} diff --git a/lib/pescarte_web/live/blog/post_live/show.ex b/lib/pescarte_web/live/blog/post_live/show.ex index 42009c15..c0aaa772 100644 --- a/lib/pescarte_web/live/blog/post_live/show.ex +++ b/lib/pescarte_web/live/blog/post_live/show.ex @@ -15,10 +15,16 @@ defmodule PescarteWeb.Blog.PostLive.Show do @impl true def render(assigns) do ~H""" -
-

<%= @post.titulo %>

-
<%= raw(Markdown.to_html(@post.conteudo)) %>
+
+

<%= @post.titulo %>

+
<%= raw(Markdown.to_html(@post.conteudo)) %>
+ + <.button style="primary"> + Voltar para Notícias + +
+ """ end end