mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-28 05:36:22 +00:00
Merge branch 'issue-16968' into production.panel.sutty.nl
This commit is contained in:
commit
de501038fa
2 changed files with 19 additions and 2 deletions
|
@ -15,10 +15,17 @@ $colors: (
|
||||||
$custom-file-text: (
|
$custom-file-text: (
|
||||||
en: "Browse",
|
en: "Browse",
|
||||||
es: "Buscar archivo",
|
es: "Buscar archivo",
|
||||||
pt: "Buscar arquivo",
|
pt: "Buscar ficheiro",
|
||||||
pt-BR: "Buscar arquivo"
|
pt-BR: "Buscar arquivo"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$custom-file-text-replace: (
|
||||||
|
en: "Replace file",
|
||||||
|
es: "Reemplazar archivo",
|
||||||
|
pt: "substituir ficheiro",
|
||||||
|
pt-BR: "substituir arquivo"
|
||||||
|
);
|
||||||
|
|
||||||
// Redefinir variables de Bootstrap
|
// Redefinir variables de Bootstrap
|
||||||
$primary: $magenta;
|
$primary: $magenta;
|
||||||
$secondary: $black;
|
$secondary: $black;
|
||||||
|
@ -53,6 +60,16 @@ $sizes: (
|
||||||
@import "bootstrap";
|
@import "bootstrap";
|
||||||
@import "editor";
|
@import "editor";
|
||||||
|
|
||||||
|
.custom-file-input {
|
||||||
|
&.replace-image {
|
||||||
|
@each $lang, $value in $custom-file-text-replace {
|
||||||
|
&:lang(#{$lang}) ~ .custom-file-label::after {
|
||||||
|
content: $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@each $color, $rgb in $theme-colors {
|
@each $color, $rgb in $theme-colors {
|
||||||
.#{$color} {
|
.#{$color} {
|
||||||
color: var(--#{$color});
|
color: var(--#{$color});
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
.custom-file
|
.custom-file
|
||||||
= file_field(*field_name_for(base, attribute, :path),
|
= file_field(*field_name_for(base, attribute, :path),
|
||||||
**field_options(attribute, metadata, required: (metadata.required && !metadata.path?)),
|
**field_options(attribute, metadata, required: (metadata.required && !metadata.path?)),
|
||||||
class: "custom-file-input #{invalid(post, attribute)}",
|
class: ['custom-file-input', invalid(post, attribute), ('replace-image' if metadata.static_file)].compact.join(' '),
|
||||||
accept: ActiveStorage.web_image_content_types.join(','),
|
accept: ActiveStorage.web_image_content_types.join(','),
|
||||||
lang: locale,
|
lang: locale,
|
||||||
data: { 'file-preview-target': 'input', action: 'file-preview#update' })
|
data: { 'file-preview-target': 'input', action: 'file-preview#update' })
|
||||||
|
|
Loading…
Reference in a new issue