From f904c81824c9ce38a28e1f9e5425cdda35f6d88a Mon Sep 17 00:00:00 2001 From: Zoey de Souza Pessanha Date: Fri, 6 Sep 2024 16:29:57 -0300 Subject: [PATCH 1/4] extract common tasks aliases --- config/config.exs | 9 +-------- mix.exs | 4 +++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/config/config.exs b/config/config.exs index 18a34de9..4a616e02 100644 --- a/config/config.exs +++ b/config/config.exs @@ -48,14 +48,7 @@ config :git_hooks, ], hooks: [ pre_push: [ - tasks: [ - "mix clean", - "mix compile --warning-as-errors", - "mix format --check-formatted", - "mix credo --strict", - "mix test --only unit", - "mix test --only integration" - ] + tasks: ["ci.check"] ] ] diff --git a/mix.exs b/mix.exs index 63052e88..c8a77e13 100644 --- a/mix.exs +++ b/mix.exs @@ -89,7 +89,9 @@ defmodule Pescarte.MixProject do "ecto.reset": ["ecto.drop", "ecto.setup", "seed"], test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"], "assets.build": ["cmd --cd assets node build.js"], - "assets.deploy": ["cmd --cd assets node build.js --deploy", "phx.digest"] + "assets.deploy": ["cmd --cd assets node build.js --deploy", "phx.digest"], + lint: ["compile --warning-as-errors", "clean", "format --check-formatted", "credo --strict"], + "ci.check": ["lint", "test --only unit", "test --only integration"] ] end end From 78874f83c658d2ebfabdaf18786c79113172e81e Mon Sep 17 00:00:00 2001 From: juanzeen Date: Wed, 11 Sep 2024 19:20:22 -0300 Subject: [PATCH 2/4] feat: responsivity for item-cards --- assets/css/boletins.scss | 27 +++++ assets/css/landing.scss | 114 ++++++++++++++++++ lib/pescarte_web/layouts/app.html.heex | 4 +- .../templates/boletins_html/show.html.heex | 2 +- .../templates/journal_html/show.html.heex | 2 +- .../templates/livros_html/show.html.heex | 8 +- 6 files changed, 149 insertions(+), 8 deletions(-) diff --git a/assets/css/boletins.scss b/assets/css/boletins.scss index a8ce45d8..edb8eb9e 100644 --- a/assets/css/boletins.scss +++ b/assets/css/boletins.scss @@ -3,3 +3,30 @@ width: 15.5rem; } } + +@media (min-width: 530px) and (max-width: 770px){ + + .boletim-wrapper { + .links-item { + @apply flex flex-col justify-start items-start m-8; + width: 60%; + height: 16rem; + border-radius: 8px; + box-sizing: border-box; + background: linear-gradient(180deg, rgba(16, 16, 16, 0) 0%, #101010 100%); + } + } +} +@media (min-width: 350px) and (max-width: 529px){ + + .boletim-wrapper { + .links-item { + @apply flex flex-col justify-start items-start m-8; + width: 70%; + height: 13rem; + border-radius: 8px; + box-sizing: border-box; + background: linear-gradient(180deg, rgba(16, 16, 16, 0) 0%, #101010 100%); + } + } +} diff --git a/assets/css/landing.scss b/assets/css/landing.scss index 35d5f1f0..bfb72bb3 100644 --- a/assets/css/landing.scss +++ b/assets/css/landing.scss @@ -34,7 +34,10 @@ img { width: 100%; height: 100%; + max-width: 1100px; + max-height: 600px; background-size: cover; + margin: 0 auto; } } @@ -141,6 +144,7 @@ display: flex; flex-direction: column; align-items: center; + width: 100%; .publications-main-text { margin: 5rem 30rem; @@ -493,3 +497,113 @@ width: 1360px; } } + +@media (min-width: 530px) and (max-width: 770px){ + .links-landing { + @apply flex flex-col justify-center items-center; + width: 100%; + + .links-item { + @apply flex flex-col justify-start items-start m-8; + width: 60%; + height: 16rem; + border-radius: 8px; + box-sizing: border-box; + background: linear-gradient(180deg, rgba(16, 16, 16, 0) 0%, #101010 100%); + + a { + @apply flex flex-col mt-auto; + } + + img { + border-radius: 8px; + width: inherit; + height: inherit; + @apply absolute; + z-index: -10; + } + + h3 { + padding-left: 1rem; + } + + p { + text-wrap: wrap; + margin-top: 0.5rem; + padding: 0 1rem 1.5rem 1rem; + } + + button { + width: 100%; + padding: 0 1rem 1.5rem 0; + background-color: transparent; + + p { + display: inline-flex; + width: inherit; + + &:hover { + text-decoration: underline; + } + } + } + } + } + +} + +@media (min-width: 350px) and (max-width: 529px){ + + + + .links-landing { + @apply flex flex-col justify-center items-center; + width: 100%; + + .links-item { + @apply flex flex-col justify-start items-start m-8; + width: 70%; + height: 13rem; + border-radius: 8px; + box-sizing: border-box; + background: linear-gradient(180deg, rgba(16, 16, 16, 0) 0%, #101010 100%); + + a { + @apply flex flex-col mt-auto; + } + + img { + border-radius: 8px; + width: inherit; + height: inherit; + @apply absolute; + z-index: -10; + } + + h3 { + padding-left: 1rem; + } + + p { + text-wrap: wrap; + margin-top: 0.5rem; + padding: 0 1rem 1.5rem 1rem; + } + + button { + width: 100%; + padding: 0 1rem 1.5rem 0; + background-color: transparent; + + p { + display: inline-flex; + width: inherit; + + &:hover { + text-decoration: underline; + } + } + } + } + } +} diff --git a/lib/pescarte_web/layouts/app.html.heex b/lib/pescarte_web/layouts/app.html.heex index 8876c298..b9268141 100644 --- a/lib/pescarte_web/layouts/app.html.heex +++ b/lib/pescarte_web/layouts/app.html.heex @@ -1,5 +1,5 @@ - +
<.flash_group flash={@flash} /> <%= @inner_content %>
-<.footer /> + <.footer /> diff --git a/lib/pescarte_web/templates/boletins_html/show.html.heex b/lib/pescarte_web/templates/boletins_html/show.html.heex index a54e4848..5f83625c 100644 --- a/lib/pescarte_web/templates/boletins_html/show.html.heex +++ b/lib/pescarte_web/templates/boletins_html/show.html.heex @@ -114,5 +114,5 @@ - + diff --git a/lib/pescarte_web/templates/journal_html/show.html.heex b/lib/pescarte_web/templates/journal_html/show.html.heex index dde964e8..230db79f 100644 --- a/lib/pescarte_web/templates/journal_html/show.html.heex +++ b/lib/pescarte_web/templates/journal_html/show.html.heex @@ -57,5 +57,5 @@ - + diff --git a/lib/pescarte_web/templates/livros_html/show.html.heex b/lib/pescarte_web/templates/livros_html/show.html.heex index 5db0f2b2..b8257554 100644 --- a/lib/pescarte_web/templates/livros_html/show.html.heex +++ b/lib/pescarte_web/templates/livros_html/show.html.heex @@ -7,7 +7,7 @@
- + diff --git a/lib/pescarte_web/templates/journal_html/show.html.heex b/lib/pescarte_web/templates/journal_html/show.html.heex index 230db79f..dde964e8 100644 --- a/lib/pescarte_web/templates/journal_html/show.html.heex +++ b/lib/pescarte_web/templates/journal_html/show.html.heex @@ -57,5 +57,5 @@ - + From 4502606f7006be05e2acbc801c4da16c2fb934f7 Mon Sep 17 00:00:00 2001 From: juanzeen Date: Wed, 11 Sep 2024 19:31:18 -0300 Subject: [PATCH 4/4] bug: testing git hooks --- assets/css/landing.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/landing.scss b/assets/css/landing.scss index bfb72bb3..b4bdb2ab 100644 --- a/assets/css/landing.scss +++ b/assets/css/landing.scss @@ -500,7 +500,7 @@ @media (min-width: 530px) and (max-width: 770px){ .links-landing { - @apply flex flex-col justify-center items-center; + @apply flex flex-col justify-center items-center ; width: 100%; .links-item {