From aa0cd9d6a301cc955632a42afe442093d3e97521 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 15 Apr 2023 12:23:43 -0300 Subject: [PATCH 01/13] =?UTF-8?q?ci:=20compilar=20assets=20tambi=C3=A9n=20?= =?UTF-8?q?en=20gitlab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..41b504ac --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,33 @@ +image: "gitea.nulo.in/sutty/panel:3.14.10-2.7.8-panel.sutty.nl" +variables: + RAILS_ENV: "production" + LC_ALL: "C.UTF-8" +cache: + paths: + - "vendor/ruby" +assets: + stage: "assets" + rules: + - if: "$CI_COMMIT_BRANCH == panel.sutty.nl" + - if: "$CI_COMMIT_BRANCH" + changes: + compares_to: "refs/heads/rails" + paths: + - "package.json" + - "app/javascript/**/*" + - "app/assets/**/*" + before_script: + - "git config --global user.email \"${GIT_USER_EMAIL:-$GITLAB_USER_EMAIL}\"" + - "git config --global user.name \"${GIT_USER_NAME:-$GITLAB_USER_NAME}\"" + - "git remote set-url --push origin \"https://${GITLAB_USERNAME}:${GITLAB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git\"" + - "apk add python2 dotenv brotli" + - "mv config/credentials.yml.enc.ci config/credentials.yml.enc" + - "cp .env.example .env" + - "dotenv bundle install --path=vendor" + script: + - "dotenv RAILS_ENV=production bundle exec rails webpacker:clobber" + - "dotenv RAILS_ENV=production bundle exec rails assets:precompile" + - "dotenv RAILS_ENV=production bundle exec rails assets:clean" + after_script: + - "git add public && git commit -m \"ci: assets [skip ci]\"" + - "git push -o ci.skip" From e85ce7c883746dcb79c514814e45f50e8e5e481a Mon Sep 17 00:00:00 2001 From: f Date: Sat, 15 Apr 2023 12:28:37 -0300 Subject: [PATCH 02/13] ci: typo --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 41b504ac..7c09d65f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,7 @@ assets: - if: "$CI_COMMIT_BRANCH == panel.sutty.nl" - if: "$CI_COMMIT_BRANCH" changes: - compares_to: "refs/heads/rails" + compare_to: "refs/heads/rails" paths: - "package.json" - "app/javascript/**/*" From 1231f3bdab0d608e258b2cd25f59e509a2106f4d Mon Sep 17 00:00:00 2001 From: f Date: Sat, 15 Apr 2023 12:31:12 -0300 Subject: [PATCH 03/13] ci: comillas --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7c09d65f..bd9a3903 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,7 @@ cache: assets: stage: "assets" rules: - - if: "$CI_COMMIT_BRANCH == panel.sutty.nl" + - if: "$CI_COMMIT_BRANCH == \"panel.sutty.nl\"" - if: "$CI_COMMIT_BRANCH" changes: compare_to: "refs/heads/rails" From 29f4c7a847d191b66c249501d31546b6e7890d91 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 15 Apr 2023 12:31:52 -0300 Subject: [PATCH 04/13] =?UTF-8?q?ci:=20estad=C3=ADo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bd9a3903..f8994356 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ cache: paths: - "vendor/ruby" assets: - stage: "assets" + stage: "build" rules: - if: "$CI_COMMIT_BRANCH == \"panel.sutty.nl\"" - if: "$CI_COMMIT_BRANCH" From ffe30cfc337b9da021dc1649e45e440aa40a1d32 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 15 Apr 2023 16:39:05 -0300 Subject: [PATCH 05/13] =?UTF-8?q?fix:=20los=20botones=20siempre=20son=20de?= =?UTF-8?q?=20una=20sola=20l=C3=ADnea=20#13113?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/application.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index bba48558..4cdb0da4 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -20,6 +20,7 @@ $form-feedback-valid-color: $cyan; $form-feedback-invalid-color: $magenta; $form-feedback-icon-valid-color: $black; $component-active-bg: $magenta; +$btn-white-space: nowrap; $spacers: ( 2-plus: 0.75rem From 6ea79f2fec767192652a45d1f260571f30253ef2 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 15 Apr 2023 16:39:31 -0300 Subject: [PATCH 06/13] fix: las etiquetas se cortan por los espacios si son muy largas --- app/assets/stylesheets/application.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 4cdb0da4..857a6f91 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -226,6 +226,10 @@ svg { } } +.badge { + white-space: break-spaces; +} + .btn-sm { @extend .badge } From 92dce3cd283c081750f0364a65f6efa99cd1b9ae Mon Sep 17 00:00:00 2001 From: f Date: Sat, 15 Apr 2023 16:40:01 -0300 Subject: [PATCH 07/13] fix: permitir que las migas sigan el ancho de pantalla --- app/views/layouts/_breadcrumb.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_breadcrumb.haml b/app/views/layouts/_breadcrumb.haml index b1c42cb2..541be95b 100644 --- a/app/views/layouts/_breadcrumb.haml +++ b/app/views/layouts/_breadcrumb.haml @@ -1,9 +1,9 @@ -%nav.navbar +%nav.navbar.flex-nowrap %a.navbar-brand.d-none.d-sm-block{ href: '/' } = inline_svg_tag 'sutty.svg', class: 'black', aria: true, title: t('svg.sutty.title'), desc: t('svg.sutty.desc') - %nav{ aria: { label: t('.title') } } + %nav.flex-grow-1{ aria: { label: t('.title') } } %ol.breadcrumb.m-0.flex-wrap - breadcrumb_trail do |crumb| %li.breadcrumb-item{ class: crumb.current? ? 'active' : '' } From 89f66b9cc3c753aaab7d2ac4bb93f093cfe73dbc Mon Sep 17 00:00:00 2001 From: f Date: Sat, 15 Apr 2023 16:54:07 -0300 Subject: [PATCH 08/13] fix: mostrar el foco fix: mostrar un borde al enfocar links en las migas --- app/views/layouts/_breadcrumb.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_breadcrumb.haml b/app/views/layouts/_breadcrumb.haml index 541be95b..7612af11 100644 --- a/app/views/layouts/_breadcrumb.haml +++ b/app/views/layouts/_breadcrumb.haml @@ -10,7 +10,7 @@ - if crumb.current? %span.line-clamp-1{ aria: { current: 'page' } }= crumb.name - else - %span.line-clamp-1= link_to crumb.name, crumb.url + = link_to crumb.name, crumb.url, class: 'line-clamp-1' - if @current_usuarie || current_usuarie %ul.navbar-nav From 8807f54719b6ec7b488f4013be4f5d6552505323 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 15 Apr 2023 16:57:42 -0300 Subject: [PATCH 09/13] fix: usar el color primary al dar foco a links --- app/assets/stylesheets/application.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 857a6f91..ded83172 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -101,6 +101,10 @@ a { color: var(--color); } + &:focus { + outline: 1px solid var(--color); + } + &[target=_blank] { /* TODO: Convertir a base64 para no hacer peticiones extra */ &:after { From 1be894403ac1d0cbdf87917328d00c7570dfc417 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 15 Apr 2023 17:02:49 -0300 Subject: [PATCH 10/13] fix: cambiar el orden en responsive --- app/views/layouts/_breadcrumb.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/_breadcrumb.haml b/app/views/layouts/_breadcrumb.haml index 7612af11..fd44326b 100644 --- a/app/views/layouts/_breadcrumb.haml +++ b/app/views/layouts/_breadcrumb.haml @@ -1,9 +1,9 @@ %nav.navbar.flex-nowrap - %a.navbar-brand.d-none.d-sm-block{ href: '/' } + %a.navbar-brand.order-0.d-none.d-sm-block{ href: '/' } = inline_svg_tag 'sutty.svg', class: 'black', aria: true, title: t('svg.sutty.title'), desc: t('svg.sutty.desc') - %nav.flex-grow-1{ aria: { label: t('.title') } } + %nav.flex-grow-1.order-2.order-md-1{ aria: { label: t('.title') } } %ol.breadcrumb.m-0.flex-wrap - breadcrumb_trail do |crumb| %li.breadcrumb-item{ class: crumb.current? ? 'active' : '' } @@ -13,7 +13,7 @@ = link_to crumb.name, crumb.url, class: 'line-clamp-1' - if @current_usuarie || current_usuarie - %ul.navbar-nav + %ul.navbar-nav.order-1.order-md-2 - if @site&.tienda? %li.nav-item = link_to t('.tienda'), @site.tienda_url, From 21af0bfc4f570f08086f7473f6990c087cca25e0 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 15 Apr 2023 17:03:07 -0300 Subject: [PATCH 11/13] fix: mostrar el logo en responsive --- app/views/layouts/_breadcrumb.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_breadcrumb.haml b/app/views/layouts/_breadcrumb.haml index fd44326b..2d202d48 100644 --- a/app/views/layouts/_breadcrumb.haml +++ b/app/views/layouts/_breadcrumb.haml @@ -1,5 +1,5 @@ %nav.navbar.flex-nowrap - %a.navbar-brand.order-0.d-none.d-sm-block{ href: '/' } + %a.navbar-brand.order-0{ href: '/' } = inline_svg_tag 'sutty.svg', class: 'black', aria: true, title: t('svg.sutty.title'), desc: t('svg.sutty.desc') From 3879244a1a9566cf138c5b5fca80001fe4c77505 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 15 Apr 2023 17:03:27 -0300 Subject: [PATCH 12/13] fix: los links de idiomas son parte de la nav --- app/views/layouts/_breadcrumb.haml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/layouts/_breadcrumb.haml b/app/views/layouts/_breadcrumb.haml index 2d202d48..a9d231d1 100644 --- a/app/views/layouts/_breadcrumb.haml +++ b/app/views/layouts/_breadcrumb.haml @@ -12,8 +12,8 @@ - else = link_to crumb.name, crumb.url, class: 'line-clamp-1' - - if @current_usuarie || current_usuarie - %ul.navbar-nav.order-1.order-md-2 + %ul.navbar-nav.order-1.order-md-2 + - if @current_usuarie || current_usuarie - if @site&.tienda? %li.nav-item = link_to t('.tienda'), @site.tienda_url, @@ -22,8 +22,8 @@ %li.nav-item = link_to t('.logout'), main_app.destroy_usuarie_session_path, method: :delete, role: 'button', class: 'btn' - - else - - params.permit! - - I18n.available_locales.each do |locale| - - next if locale == I18n.locale - = link_to t(locale), params.to_h.merge(change_locale_to: locale) + - else + - params.permit! + - I18n.available_locales.each do |locale| + - next if locale == I18n.locale + %li.nav-item= link_to t(locale), params.to_h.merge(change_locale_to: locale) From b82fd37526906f0bba2e9c1bcbdc7e00c2fd3180 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 15 Apr 2023 17:06:42 -0300 Subject: [PATCH 13/13] fix: no agregar contenedor de migas si no hay ninguna --- app/views/layouts/_breadcrumb.haml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/app/views/layouts/_breadcrumb.haml b/app/views/layouts/_breadcrumb.haml index a9d231d1..9251ee36 100644 --- a/app/views/layouts/_breadcrumb.haml +++ b/app/views/layouts/_breadcrumb.haml @@ -3,14 +3,15 @@ = inline_svg_tag 'sutty.svg', class: 'black', aria: true, title: t('svg.sutty.title'), desc: t('svg.sutty.desc') - %nav.flex-grow-1.order-2.order-md-1{ aria: { label: t('.title') } } - %ol.breadcrumb.m-0.flex-wrap - - breadcrumb_trail do |crumb| - %li.breadcrumb-item{ class: crumb.current? ? 'active' : '' } - - if crumb.current? - %span.line-clamp-1{ aria: { current: 'page' } }= crumb.name - - else - = link_to crumb.name, crumb.url, class: 'line-clamp-1' + - if breadcrumbs? + %nav.flex-grow-1.order-2.order-md-1{ aria: { label: t('.title') } } + %ol.breadcrumb.m-0.flex-wrap + - breadcrumb_trail do |crumb| + %li.breadcrumb-item{ class: crumb.current? ? 'active' : '' } + - if crumb.current? + %span.line-clamp-1{ aria: { current: 'page' } }= crumb.name + - else + = link_to crumb.name, crumb.url, class: 'line-clamp-1' %ul.navbar-nav.order-1.order-md-2 - if @current_usuarie || current_usuarie