Skip to content

Commit

Permalink
feat: added noticia style
Browse files Browse the repository at this point in the history
  • Loading branch information
SoraAsc committed Nov 21, 2024
1 parent b492523 commit 336094d
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 3 deletions.
75 changes: 75 additions & 0 deletions assets/css/noticias.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
12 changes: 9 additions & 3 deletions lib/pescarte_web/live/blog/post_live/show.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ defmodule PescarteWeb.Blog.PostLive.Show do
@impl true
def render(assigns) do
~H"""
<div>
<h1><%= @post.titulo %></h1>
<div><%= raw(Markdown.to_html(@post.conteudo)) %></div>
<div class="noticia">
<h1 class="text-4xl leading-10 font-bold text-blue-100"><%= @post.titulo %></h1>
<div class="noticia-descricao"><%= raw(Markdown.to_html(@post.conteudo)) %></div>
<DesignSystem.link href="/noticias" class="text-sm font-semibold">
<.button style="primary">
<Lucideicons.arrow_left class="text-white-100" /> Voltar para Notícias
</.button>
</DesignSystem.link>
</div>
<PescarteWeb.DesignSystem.GetInTouch.render />
"""
end
end

0 comments on commit 336094d

Please sign in to comment.