change logo and colors
This commit is contained in:
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 5.9 KiB |
4
wp-content/themes/gure-ametsa/assets/img/logo-mark.svg
Normal file
4
wp-content/themes/gure-ametsa/assets/img/logo-mark.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 6.0 KiB |
5
wp-content/themes/gure-ametsa/assets/img/logo.svg
Normal file
5
wp-content/themes/gure-ametsa/assets/img/logo.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 28 KiB |
@@ -21,7 +21,7 @@ $columns = array(
|
||||
<div class="ga-wrap">
|
||||
<div class="ga-footer__grid">
|
||||
<div class="ga-footer__about">
|
||||
<?php ga_brand(); ?>
|
||||
<?php ga_brand( 'footer' ); ?>
|
||||
<p><?php ga_opt_e( 'footer', 'about' ); ?></p>
|
||||
<div class="ga-footer__social"><?php echo ga_social_links(); // Escapado en la función. ?></div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
define( 'GA_THEME_VERSION', '2.0.0' );
|
||||
define( 'GA_THEME_VERSION', '2.1.0' );
|
||||
|
||||
require_once __DIR__ . '/inc/customizer.php';
|
||||
require_once __DIR__ . '/inc/dynamic-css.php';
|
||||
@@ -129,19 +129,45 @@ function ga_tel_link() {
|
||||
return 'tel:+34' . preg_replace( '/\D/', '', ga_info( 'telefono' ) );
|
||||
}
|
||||
|
||||
function ga_brand() {
|
||||
/** SVG del logo (assets/img/logo.svg o logo-mark.svg), en línea para poder recolorearlo con CSS. */
|
||||
function ga_logo_svg( $variant = 'full' ) {
|
||||
static $cache = array();
|
||||
if ( ! isset( $cache[ $variant ] ) ) {
|
||||
$file = get_theme_file_path( 'assets/img/' . ( 'mark' === $variant ? 'logo-mark.svg' : 'logo.svg' ) );
|
||||
$cache[ $variant ] = is_readable( $file ) ? trim( file_get_contents( $file ) ) : '';
|
||||
}
|
||||
return $cache[ $variant ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Marca del sitio.
|
||||
*
|
||||
* @param string $context 'header' o 'footer'.
|
||||
*/
|
||||
function ga_brand( $context = 'header' ) {
|
||||
if ( has_custom_logo() ) {
|
||||
the_custom_logo();
|
||||
return;
|
||||
}
|
||||
printf(
|
||||
'<a class="ga-brand" href="%s" rel="home"><span class="ga-brand__mark">%s</span><span class="ga-brand__name"><b>%s</b><b>%s</b><small>%s</small></span></a>',
|
||||
esc_url( ga_home_url() ),
|
||||
ga_icon( 'mark' ), // SVG estático.
|
||||
$style = 'footer' === $context ? 'full' : ga_opt( 'header', 'logo_style' );
|
||||
$name = sprintf(
|
||||
'<span class="ga-brand__name"><b>%s</b><b>%s</b><small>%s</small></span>',
|
||||
esc_html( ga_opt( 'header', 'brand_line1' ) ),
|
||||
esc_html( ga_opt( 'header', 'brand_line2' ) ),
|
||||
esc_html( ga_opt( 'header', 'brand_line3' ) )
|
||||
);
|
||||
$inner = match ( $style ) {
|
||||
'full' => '<span class="ga-brand__logo">' . ga_logo_svg( 'full' ) . '</span>',
|
||||
'text' => $name,
|
||||
default => '<span class="ga-brand__mark">' . ga_logo_svg( 'mark' ) . '</span>' . $name,
|
||||
};
|
||||
printf(
|
||||
'<a class="ga-brand ga-brand--%s" href="%s" rel="home" aria-label="%s">%s</a>',
|
||||
esc_attr( $style ),
|
||||
esc_url( ga_home_url() ),
|
||||
esc_attr( get_bloginfo( 'name' ) ),
|
||||
$inner // SVG estático del tema y textos escapados.
|
||||
);
|
||||
}
|
||||
|
||||
/* ---------- Ayudantes de animales ---------- */
|
||||
|
||||
@@ -27,6 +27,14 @@ function ga_fonts() {
|
||||
/** Paletas rápidas. 'custom' usa los colores elegidos a mano. */
|
||||
function ga_palettes() {
|
||||
return array(
|
||||
'logo' => array(
|
||||
'label' => 'Colores del logo (marrón y beige)',
|
||||
'primary' => '#401f0c', // marrón del logo
|
||||
'accent' => '#bd8537', // caramelo: el tono del beige, más intenso
|
||||
'background' => '#fcfaf5',
|
||||
'surface' => '#f3ecdc', // beige del logo aclarado
|
||||
'text' => '#2b1508',
|
||||
),
|
||||
'ciruela' => array(
|
||||
'label' => 'Ciruela y mostaza',
|
||||
'primary' => '#5b2c4e',
|
||||
@@ -98,7 +106,7 @@ function ga_customizer_registry() {
|
||||
};
|
||||
|
||||
$palette_choices = array_map( fn( $p ) => $p['label'], ga_palettes() ) + array( 'custom' => 'Personalizada (colores de abajo)' );
|
||||
$default = ga_palettes()['ciruela'];
|
||||
$default = ga_palettes()['logo'];
|
||||
|
||||
$registry = array(
|
||||
/* ================= Diseño ================= */
|
||||
@@ -106,7 +114,7 @@ function ga_customizer_registry() {
|
||||
'panel' => 'ga_design',
|
||||
'title' => 'Colores',
|
||||
'fields' => array(
|
||||
'palette' => array( 'type' => 'select', 'label' => 'Paleta', 'default' => 'ciruela', 'choices' => $palette_choices, 'description' => 'Elige una paleta lista, o «Personalizada» para usar los colores de abajo.' ),
|
||||
'palette' => array( 'type' => 'select', 'label' => 'Paleta', 'default' => 'logo', 'choices' => $palette_choices, 'description' => 'Elige una paleta lista, o «Personalizada» para usar los colores de abajo.' ),
|
||||
'primary' => array( 'type' => 'color', 'label' => 'Color principal', 'default' => $default['primary'], 'description' => 'Títulos, botones de la cabecera, secciones oscuras y pie.' ),
|
||||
'accent' => array( 'type' => 'color', 'label' => 'Color de acento', 'default' => $default['accent'], 'description' => 'Botones principales, detalles y palabras resaltadas.' ),
|
||||
'background' => array( 'type' => 'color', 'label' => 'Fondo de la página', 'default' => $default['background'] ),
|
||||
@@ -135,6 +143,11 @@ function ga_customizer_registry() {
|
||||
'panel' => 'ga_design',
|
||||
'title' => 'Cabecera',
|
||||
'fields' => array(
|
||||
'logo_style' => array( 'type' => 'select', 'label' => 'Logo en la cabecera', 'default' => 'mark', 'choices' => array(
|
||||
'mark' => 'Símbolo + nombre escrito',
|
||||
'full' => 'Logo completo',
|
||||
'text' => 'Solo el nombre escrito',
|
||||
), 'description' => 'Si subes otro logo en «Identidad del sitio», se usa ese.' ),
|
||||
'phone' => array( 'type' => 'checkbox', 'label' => 'Mostrar el teléfono en la cabecera', 'default' => true ),
|
||||
'switcher' => array( 'type' => 'checkbox', 'label' => 'Mostrar selector de idioma ES | EU', 'default' => true ),
|
||||
'sticky' => array( 'type' => 'checkbox', 'label' => 'Cabecera fija al hacer scroll', 'default' => true ),
|
||||
|
||||
@@ -173,7 +173,11 @@ p { margin: 0 0 1.1em; }
|
||||
.ga-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ga-green-dark); flex: none; }
|
||||
.ga-brand:hover { color: var(--ga-green-dark); }
|
||||
.ga-brand img, .ga-brand .custom-logo, .custom-logo-link img { max-height: 58px; width: auto; }
|
||||
.ga-brand__mark { width: 46px; height: 46px; flex: none; }
|
||||
.ga-brand__mark { width: 54px; height: auto; flex: none; }
|
||||
.ga-brand__mark svg, .ga-brand__logo svg { display: block; width: 100%; height: auto; }
|
||||
.ga-brand__logo { width: 76px; display: block; }
|
||||
.ga-footer .ga-brand__logo { width: 150px; }
|
||||
.ga-footer .ga-logo__text { fill: var(--ga-sand); }
|
||||
.ga-brand__name { display: flex; flex-direction: column; }
|
||||
.ga-brand__name b { font: 800 1.08rem/1.02 var(--ga-serif); letter-spacing: -.01em; }
|
||||
.ga-brand__name small { margin-top: 4px; font: 700 .66rem/1 var(--ga-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ga-muted); }
|
||||
@@ -224,7 +228,8 @@ p { margin: 0 0 1.1em; }
|
||||
.ga-brand__name small { display: none; }
|
||||
.ga-header .ga-wrap { gap: 10px; min-height: 68px; }
|
||||
.ga-brand { gap: 9px; }
|
||||
.ga-brand__mark { width: 40px; height: 40px; }
|
||||
.ga-brand__mark { width: 44px; }
|
||||
.ga-brand__logo { width: 60px; }
|
||||
.ga-brand__name b { font-size: .96rem; }
|
||||
.ga-header__actions { gap: 8px; }
|
||||
.ga-menu-toggle { padding: 8px 10px; }
|
||||
@@ -262,7 +267,11 @@ body { overflow-x: clip; }
|
||||
color-mix(in srgb, var(--ga-green) calc(var(--ga-overlay, .7) * 80%), transparent) 55%,
|
||||
color-mix(in srgb, var(--ga-green) calc(var(--ga-overlay, .7) * 35%), transparent) 100%);
|
||||
}
|
||||
.ga-hero__paw { position: absolute; right: -40px; bottom: -60px; width: min(46vw, 540px); color: #fff; opacity: .07; transform: rotate(-16deg); z-index: 1; }
|
||||
.ga-hero__paw { position: absolute; right: 2%; bottom: 0; width: min(44vw, 560px); color: #fff; opacity: .09; z-index: 1; }
|
||||
.ga-hero__paw svg { display: block; width: 100%; height: auto; }
|
||||
.ga-hero__paw .ga-logo__arch { fill: none; }
|
||||
.ga-hero__paw .ga-logo__animals { fill: #fff; }
|
||||
.has-doors .ga-hero__paw { bottom: 0; }
|
||||
|
||||
/* Dos columnas */
|
||||
.ga-hero--split { background: var(--ga-sand); padding: clamp(56px, 8vw, 110px) 0; }
|
||||
@@ -605,7 +614,7 @@ ol.is-style-ga-pasos li::before {
|
||||
/* =========================================================================
|
||||
Pie
|
||||
========================================================================= */
|
||||
.ga-footer { background: var(--ga-footer-bg); color: color-mix(in srgb, #fff 72%, var(--ga-footer-bg)); padding: 72px 0 28px; font-size: .95rem; }
|
||||
.ga-footer { border-top: 1px solid rgba(255, 255, 255, .08); background: var(--ga-footer-bg); color: color-mix(in srgb, #fff 72%, var(--ga-footer-bg)); padding: 72px 0 28px; font-size: .95rem; }
|
||||
.ga-footer a { color: #fff; text-decoration: none; }
|
||||
.ga-footer a:hover { text-decoration: underline; color: #fff; }
|
||||
.ga-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: 40px; }
|
||||
|
||||
@@ -36,7 +36,7 @@ if ( $doors ) {
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php elseif ( $full ) : ?>
|
||||
<div class="ga-hero__paw" aria-hidden="true"><?php echo ga_icon( 'paw' ); ?></div>
|
||||
<div class="ga-hero__paw" aria-hidden="true"><?php echo ga_logo_svg( 'mark' ) ?: ga_icon( 'paw' ); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="ga-wrap ga-hero__inner">
|
||||
|
||||
Reference in New Issue
Block a user