5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-18 16:46:21 +00:00

Merge branch 'issue-13113' into panel.sutty.nl

This commit is contained in:
f 2023-04-15 17:12:43 -03:00
commit 0558cc3e99
3 changed files with 61 additions and 17 deletions

33
.gitlab-ci.yml Normal file
View file

@ -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: "build"
rules:
- if: "$CI_COMMIT_BRANCH == \"panel.sutty.nl\""
- if: "$CI_COMMIT_BRANCH"
changes:
compare_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"

View file

@ -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
@ -92,6 +93,10 @@ a {
color: var(--color);
}
&:focus {
outline: 1px solid var(--color);
}
&[target=_blank] {
/* TODO: Convertir a base64 para no hacer peticiones extra */
&:after {
@ -217,6 +222,10 @@ svg {
}
}
.badge {
white-space: break-spaces;
}
.btn-sm {
@extend .badge
}

View file

@ -1,19 +1,20 @@
%nav.navbar
%a.navbar-brand.d-none.d-sm-block{ href: '/' }
%nav.navbar.flex-nowrap
%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')
%nav{ 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
%span.line-clamp-1= link_to crumb.name, crumb.url
- 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'
- if @current_usuarie || current_usuarie
%ul.navbar-nav
%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 +23,9 @@
%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("switch_locale.#{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("switch_locale.#{locale}"), params.to_h.merge(change_locale_to: locale)