first version

This commit is contained in:
Josevi Canet
2024-06-14 15:48:06 +02:00
parent 7a1361419a
commit 19403eb4c8
16 changed files with 453 additions and 165 deletions

View File

@@ -2,5 +2,61 @@
<profile version="1.0"> <profile version="1.0">
<option name="myName" value="Project Default" /> <option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="PhpCSValidationInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
<inspection_tool class="SecurityAdvisoriesInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="optionConfiguration">
<list>
<option value="barryvdh/laravel-debugbar" />
<option value="behat/behat" />
<option value="brianium/paratest" />
<option value="codeception/codeception" />
<option value="codedungeon/phpunit-result-printer" />
<option value="composer/composer" />
<option value="doctrine/coding-standard" />
<option value="filp/whoops" />
<option value="friendsofphp/php-cs-fixer" />
<option value="humbug/humbug" />
<option value="infection/infection" />
<option value="jakub-onderka/php-parallel-lint" />
<option value="johnkary/phpunit-speedtrap" />
<option value="kalessil/production-dependencies-guard" />
<option value="mikey179/vfsStream" />
<option value="mockery/mockery" />
<option value="mybuilder/phpunit-accelerator" />
<option value="orchestra/testbench" />
<option value="pdepend/pdepend" />
<option value="phan/phan" />
<option value="phing/phing" />
<option value="phpcompatibility/php-compatibility" />
<option value="phpmd/phpmd" />
<option value="phpro/grumphp" />
<option value="phpspec/phpspec" />
<option value="phpspec/prophecy" />
<option value="phpstan/phpstan" />
<option value="phpunit/phpunit" />
<option value="povils/phpmnd" />
<option value="roave/security-advisories" />
<option value="satooshi/php-coveralls" />
<option value="sebastian/phpcpd" />
<option value="slevomat/coding-standard" />
<option value="spatie/phpunit-watcher" />
<option value="squizlabs/php_codesniffer" />
<option value="sstalle/php7cc" />
<option value="symfony/debug" />
<option value="symfony/maker-bundle" />
<option value="symfony/phpunit-bridge" />
<option value="symfony/var-dumper" />
<option value="vimeo/psalm" />
<option value="wimg/php-compatibility" />
<option value="wp-coding-standards/wpcs" />
<option value="yiisoft/yii2-coding-standards" />
<option value="yiisoft/yii2-debug" />
<option value="yiisoft/yii2-gii" />
<option value="zendframework/zend-coding-standard" />
<option value="zendframework/zend-debug" />
<option value="zendframework/zend-test" />
</list>
</option>
</inspection_tool>
</profile> </profile>
</component> </component>

37
.idea/php.xml generated
View File

@@ -7,12 +7,49 @@
<option name="transferred" value="true" /> <option name="transferred" value="true" />
</component> </component>
<component name="PHPCodeSnifferOptionsConfiguration"> <component name="PHPCodeSnifferOptionsConfiguration">
<option name="codingStandard" value="Custom" />
<option name="customRuleset" value="$PROJECT_DIR$/phpcs.xml.dist" />
<option name="highlightLevel" value="WARNING" /> <option name="highlightLevel" value="WARNING" />
<option name="transferred" value="true" /> <option name="transferred" value="true" />
</component> </component>
<component name="PhpCodeSniffer">
<phpcs_settings>
<PhpCSConfiguration beautifier_path="$PROJECT_DIR$/vendor/bin/phpcbf" tool_path="$PROJECT_DIR$/vendor/bin/phpcs" />
</phpcs_settings>
</component>
<component name="PhpIncludePathManager">
<include_path>
<path value="$PROJECT_DIR$/vendor/composer" />
<path value="$PROJECT_DIR$/vendor/symfony/finder" />
<path value="$PROJECT_DIR$/vendor/mustache/mustache" />
<path value="$PROJECT_DIR$/vendor/eftec/bladeone" />
<path value="$PROJECT_DIR$/vendor/wp-coding-standards/wpcs" />
<path value="$PROJECT_DIR$/vendor/phpcompatibility/php-compatibility" />
<path value="$PROJECT_DIR$/vendor/phpcompatibility/phpcompatibility-paragonie" />
<path value="$PROJECT_DIR$/vendor/phpcompatibility/phpcompatibility-wp" />
<path value="$PROJECT_DIR$/vendor/dealerdirect/phpcodesniffer-composer-installer" />
<path value="$PROJECT_DIR$/vendor/gettext/gettext" />
<path value="$PROJECT_DIR$/vendor/gettext/languages" />
<path value="$PROJECT_DIR$/vendor/mck89/peast" />
<path value="$PROJECT_DIR$/vendor/sirbrillig/phpcs-changed" />
<path value="$PROJECT_DIR$/vendor/wp-cli/i18n-command" />
<path value="$PROJECT_DIR$/vendor/sirbrillig/phpcs-variable-analysis" />
<path value="$PROJECT_DIR$/vendor/wp-cli/mustangostang-spyc" />
<path value="$PROJECT_DIR$/vendor/wp-cli/php-cli-tools" />
<path value="$PROJECT_DIR$/vendor/wp-cli/wp-cli" />
<path value="$PROJECT_DIR$/vendor/phpcsstandards/phpcsextra" />
<path value="$PROJECT_DIR$/vendor/phpcsstandards/phpcsutils" />
<path value="$PROJECT_DIR$/vendor/squizlabs/php_codesniffer" />
</include_path>
</component>
<component name="PhpStanOptionsConfiguration"> <component name="PhpStanOptionsConfiguration">
<option name="transferred" value="true" /> <option name="transferred" value="true" />
</component> </component>
<component name="PhpUnit">
<phpunit_settings>
<PhpUnitSettings custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" />
</phpunit_settings>
</component>
<component name="PsalmOptionsConfiguration"> <component name="PsalmOptionsConfiguration">
<option name="transferred" value="true" /> <option name="transferred" value="true" />
</component> </component>

24
.idea/valier.iml generated
View File

@@ -1,7 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4"> <module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager"> <component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" /> <content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/dealerdirect/phpcodesniffer-composer-installer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/eftec/bladeone" />
<excludeFolder url="file://$MODULE_DIR$/vendor/gettext/gettext" />
<excludeFolder url="file://$MODULE_DIR$/vendor/gettext/languages" />
<excludeFolder url="file://$MODULE_DIR$/vendor/mck89/peast" />
<excludeFolder url="file://$MODULE_DIR$/vendor/mustache/mustache" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpcompatibility/php-compatibility" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpcompatibility/phpcompatibility-paragonie" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpcompatibility/phpcompatibility-wp" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpcsstandards/phpcsextra" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpcsstandards/phpcsutils" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sirbrillig/phpcs-changed" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sirbrillig/phpcs-variable-analysis" />
<excludeFolder url="file://$MODULE_DIR$/vendor/squizlabs/php_codesniffer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/finder" />
<excludeFolder url="file://$MODULE_DIR$/vendor/wp-cli/i18n-command" />
<excludeFolder url="file://$MODULE_DIR$/vendor/wp-cli/mustangostang-spyc" />
<excludeFolder url="file://$MODULE_DIR$/vendor/wp-cli/php-cli-tools" />
<excludeFolder url="file://$MODULE_DIR$/vendor/wp-cli/wp-cli" />
<excludeFolder url="file://$MODULE_DIR$/vendor/wp-coding-standards/wpcs" />
</content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>

View File

@@ -16,7 +16,8 @@
}, },
"config": { "config": {
"allow-plugins": { "allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true "dealerdirect/phpcodesniffer-composer-installer": true,
"composer/installers": true
} }
} }
} }

View File

@@ -12,5 +12,6 @@
* editor. * editor.
*/ */
body { body {
@apply bg-background text-foreground font-sans; @apply bg-background text-tertiary font-sans;
font-size: 18px;
} }

View File

@@ -32,11 +32,6 @@
* *
* https://make.wordpress.org/core/2021/06/29/on-layout-and-content-width-in-wordpress-5-8/ * https://make.wordpress.org/core/2021/06/29/on-layout-and-content-width-in-wordpress-5-8/
*/ */
.page-content > *,
.entry-content > * {
/* Content width from the `theme.json` file */
@apply max-w-content mx-auto;
}
.entry-content > .alignwide { .entry-content > .alignwide {
/* Wide width from the `theme.json` file */ /* Wide width from the `theme.json` file */
@@ -54,3 +49,97 @@
.entry-content > .alignright { .entry-content > .alignright {
@apply float-right ml-8; @apply float-right ml-8;
} }
:where(.wp-block-columns) {
margin-bottom: 0 !important;
}
a {
text-decoration: none !important;
}
header {
background-size: cover;
background-position: center;
#site-navigation {
img.linkedin {
height: 1rem;
}
}
.header-cointainer {
@apply pt-6 grid items-center;
height: 75vh;
position: relative
}
.video-container {
overflow: hidden;
width: 100%;
position: absolute;
z-index: 0;
top: 0;
height: 75vh;
video {
width: 100%;
}
}
&:not(.home) {
img.linkedin {
filter: invert(1);
}
h1 {
background-size: cover;
background-position: center;
}
}
}
footer {
ul.menu li::before {
@apply mr-3 italic;
content: "|";
}
}
.contact-block {
@apply relative;
.overlay {
@apply absolute drop-shadow-xl;
top: 15%;
z-index: 1000;
width: 40vw;
margin-left: 15vw;
}
}
.text-over-image {
@apply relative;
overflow: visible;
.text {
@apply absolute;
left: -10vw;
top: 10vw;
}
}
.overlay-icons {
@apply absolute drop-shadow-xl p-5;
width: 40vw;
img {
width: 100px;
}
p {
width: 250px;
}
}

View File

@@ -26,8 +26,8 @@ module.exports = {
require('@_tw/themejson'), require('@_tw/themejson'),
// Uncomment below to add additional first-party Tailwind plugins. // Uncomment below to add additional first-party Tailwind plugins.
// require('@tailwindcss/forms'), require('@tailwindcss/forms'),
// require('@tailwindcss/aspect-ratio'), require('@tailwindcss/aspect-ratio'),
// require('@tailwindcss/container-queries'), require('@tailwindcss/container-queries'),
], ],
}; };

Binary file not shown.

View File

@@ -7,7 +7,7 @@
* @package Valier * @package Valier
*/ */
if ( ! defined( 'VLR_VERSION' ) ) { if (!defined('VLR_VERSION')) {
/* /*
* Set the themes version number. * Set the themes version number.
* *
@@ -15,10 +15,10 @@ if ( ! defined( 'VLR_VERSION' ) ) {
* to create your production build, the value below will be replaced in the * to create your production build, the value below will be replaced in the
* generated zip file with a timestamp, converted to base 36. * generated zip file with a timestamp, converted to base 36.
*/ */
define( 'VLR_VERSION', '0.1.0' ); define('VLR_VERSION', '0.1.0');
} }
if ( ! defined( 'VLR_TYPOGRAPHY_CLASSES' ) ) { if (!defined('VLR_TYPOGRAPHY_CLASSES')) {
/* /*
* Set Tailwind Typography classes for the front end, block editor and * Set Tailwind Typography classes for the front end, block editor and
* classic editor using the constant below. * classic editor using the constant below.
@@ -42,7 +42,7 @@ if ( ! defined( 'VLR_TYPOGRAPHY_CLASSES' ) ) {
); );
} }
if ( ! function_exists( 'vlr_setup' ) ) : if (!function_exists('vlr_setup')) :
/** /**
* Sets up theme defaults and registers support for various WordPress features. * Sets up theme defaults and registers support for various WordPress features.
* *
@@ -50,17 +50,18 @@ if ( ! function_exists( 'vlr_setup' ) ) :
* runs before the init hook. The init hook is too late for some features, such * runs before the init hook. The init hook is too late for some features, such
* as indicating support for post thumbnails. * as indicating support for post thumbnails.
*/ */
function vlr_setup() { function vlr_setup()
{
/* /*
* Make theme available for translation. * Make theme available for translation.
* Translations can be filed in the /languages/ directory. * Translations can be filed in the /languages/ directory.
* If you're building a theme based on Valier, use a find and replace * If you're building a theme based on Valier, use a find and replace
* to change 'valier' to the name of your theme in all the template files. * to change 'valier' to the name of your theme in all the template files.
*/ */
load_theme_textdomain( 'valier', get_template_directory() . '/languages' ); load_theme_textdomain('valier', get_template_directory() . '/languages');
// Add default posts and comments RSS feed links to head. // Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' ); add_theme_support('automatic-feed-links');
/* /*
* Let WordPress manage the document title. * Let WordPress manage the document title.
@@ -68,20 +69,20 @@ if ( ! function_exists( 'vlr_setup' ) ) :
* hard-coded <title> tag in the document head, and expect WordPress to * hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us. * provide it for us.
*/ */
add_theme_support( 'title-tag' ); add_theme_support('title-tag');
/* /*
* Enable support for Post Thumbnails on posts and pages. * Enable support for Post Thumbnails on posts and pages.
* *
* @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
*/ */
add_theme_support( 'post-thumbnails' ); add_theme_support('post-thumbnails');
// This theme uses wp_nav_menu() in two locations. // This theme uses wp_nav_menu() in two locations.
register_nav_menus( register_nav_menus(
array( array(
'menu-1' => __( 'Primary', 'valier' ), 'menu-primary' => __('Principal', 'valier'),
'menu-2' => __( 'Footer Menu', 'valier' ), 'menu-legal' => __('Legal', 'valier')
) )
); );
@@ -103,35 +104,42 @@ if ( ! function_exists( 'vlr_setup' ) ) :
); );
// Add theme support for selective refresh for widgets. // Add theme support for selective refresh for widgets.
add_theme_support( 'customize-selective-refresh-widgets' ); add_theme_support('customize-selective-refresh-widgets');
// Add support for editor styles. // Add support for editor styles.
add_theme_support( 'editor-styles' ); add_theme_support('editor-styles');
// Enqueue editor styles. // Enqueue editor styles.
add_editor_style( 'style-editor.css' ); add_editor_style('style-editor.css');
add_editor_style( 'style-editor-extra.css' ); add_editor_style('style-editor-extra.css');
// Add support for responsive embedded content. // Add support for responsive embedded content.
add_theme_support( 'responsive-embeds' ); add_theme_support('responsive-embeds');
// Add support for custom logo
add_theme_support('custom-logo');
add_theme_support('custom-header');
// Remove support for block templates. // Remove support for block templates.
remove_theme_support( 'block-templates' ); remove_theme_support('block-templates');
//hidden ACF
add_filter('acf/settings/show_admin', '__return_false');
} }
endif; endif;
add_action( 'after_setup_theme', 'vlr_setup' ); add_action('after_setup_theme', 'vlr_setup');
/** /**
* Register widget area. * Register widget area.
* *
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/ */
function vlr_widgets_init() { function vlr_widgets_init()
{
register_sidebar( register_sidebar(
array( array(
'name' => __( 'Footer', 'valier' ), 'name' => __('Pie', 'valier'),
'id' => 'sidebar-1', 'id' => 'footer-sidebar',
'description' => __( 'Add widgets here to appear in your footer.', 'valier' ), 'description' => __('Añade los widgets para mostrarse en el pie', 'valier'),
'before_widget' => '<section id="%1$s" class="widget %2$s">', 'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>', 'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">', 'before_title' => '<h2 class="widget-title">',
@@ -139,26 +147,30 @@ function vlr_widgets_init() {
) )
); );
} }
add_action( 'widgets_init', 'vlr_widgets_init' );
add_action('widgets_init', 'vlr_widgets_init');
/** /**
* Enqueue scripts and styles. * Enqueue scripts and styles.
*/ */
function vlr_scripts() { function vlr_scripts()
wp_enqueue_style( 'valier-style', get_stylesheet_uri(), array(), VLR_VERSION ); {
wp_enqueue_script( 'valier-script', get_template_directory_uri() . '/js/script.min.js', array(), VLR_VERSION, true ); wp_enqueue_style('valier-style', get_stylesheet_uri(), array(), VLR_VERSION);
wp_enqueue_script('valier-script', get_template_directory_uri() . '/js/script.min.js', array(), VLR_VERSION, true);
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { if (is_singular() && comments_open() && get_option('thread_comments')) {
wp_enqueue_script( 'comment-reply' ); wp_enqueue_script('comment-reply');
} }
} }
add_action( 'wp_enqueue_scripts', 'vlr_scripts' );
add_action('wp_enqueue_scripts', 'vlr_scripts');
/** /**
* Enqueue the block editor script. * Enqueue the block editor script.
*/ */
function vlr_enqueue_block_editor_script() { function vlr_enqueue_block_editor_script()
if ( is_admin() ) { {
if (is_admin()) {
wp_enqueue_script( wp_enqueue_script(
'valier-editor', 'valier-editor',
get_template_directory_uri() . '/js/block-editor.min.js', get_template_directory_uri() . '/js/block-editor.min.js',
@@ -169,10 +181,11 @@ function vlr_enqueue_block_editor_script() {
VLR_VERSION, VLR_VERSION,
true true
); );
wp_add_inline_script( 'valier-editor', "tailwindTypographyClasses = '" . esc_attr( VLR_TYPOGRAPHY_CLASSES ) . "'.split(' ');", 'before' ); wp_add_inline_script('valier-editor', "tailwindTypographyClasses = '" . esc_attr(VLR_TYPOGRAPHY_CLASSES) . "'.split(' ');", 'before');
} }
} }
add_action( 'enqueue_block_assets', 'vlr_enqueue_block_editor_script' );
add_action('enqueue_block_assets', 'vlr_enqueue_block_editor_script');
/** /**
* Add the Tailwind Typography classes to TinyMCE. * Add the Tailwind Typography classes to TinyMCE.
@@ -180,11 +193,13 @@ add_action( 'enqueue_block_assets', 'vlr_enqueue_block_editor_script' );
* @param array $settings TinyMCE settings. * @param array $settings TinyMCE settings.
* @return array * @return array
*/ */
function vlr_tinymce_add_class( $settings ) { function vlr_tinymce_add_class($settings)
{
$settings['body_class'] = VLR_TYPOGRAPHY_CLASSES; $settings['body_class'] = VLR_TYPOGRAPHY_CLASSES;
return $settings; return $settings;
} }
add_filter( 'tiny_mce_before_init', 'vlr_tinymce_add_class' );
add_filter('tiny_mce_before_init', 'vlr_tinymce_add_class');
/** /**
* Custom template tags for this theme. * Custom template tags for this theme.

View File

@@ -11,50 +11,17 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header"> <div <?php vlr_content_class('entry-content'); ?>>
<?php
if ( ! is_front_page() ) {
the_title( '<h1 class="entry-title">', '</h1>' );
} else {
the_title( '<h2 class="entry-title">', '</h2>' );
}
?>
</header><!-- .entry-header -->
<?php vlr_post_thumbnail(); ?>
<div <?php vlr_content_class( 'entry-content' ); ?>>
<?php <?php
the_content(); the_content();
wp_link_pages( wp_link_pages(
array( array(
'before' => '<div>' . __( 'Pages:', 'valier' ), 'before' => '<div>' . __('Pages:', 'valier'),
'after' => '</div>', 'after' => '</div>',
) )
); );
?> ?>
</div><!-- .entry-content --> </div><!-- .entry-content -->
<?php if ( get_edit_post_link() ) : ?>
<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers. */
__( 'Edit <span class="sr-only">%s</span>', 'valier' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
)
);
?>
</footer><!-- .entry-footer -->
<?php endif; ?>
</article><!-- #post-<?php the_ID(); ?> --> </article><!-- #post-<?php the_ID(); ?> -->

View File

@@ -9,44 +9,33 @@
?> ?>
<footer id="colophon"> <footer style="background: url(<?= get_field('footer_image', 'option') ?>)">
<?php if (is_active_sidebar('footer-sidebar')) : ?>
<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?> <aside role="complementary" aria-label="<?php esc_attr_e('Footer', 'valier'); ?>" class="container mx-auto ">
<aside role="complementary" aria-label="<?php esc_attr_e( 'Footer', 'valier' ); ?>"> <?php dynamic_sidebar('footer-sidebar'); ?>
<?php dynamic_sidebar( 'sidebar-1' ); ?>
</aside> </aside>
<?php endif; ?> <?php endif; ?>
<div class="container mx-auto">
<a href="<?= get_field('linkedin_link', 'option') ?>" target="_blank"
class="flex justify-center gap-3 items-end mb-2">
<img src="<?= get_field('abrevitura_de_linkedin', 'option') ?>" alt="Linkedin">
<img src="<?= get_field('logo_linkedin', 'option') ?>" alt="Linkedin">
<?php if ( has_nav_menu( 'menu-2' ) ) : ?> </a>
<nav aria-label="<?php esc_attr_e( 'Footer Menu', 'valier' ); ?>"> </div>
<div class="bg-primary text-black py-2 has-playfair-font-family">
<div class="container mx-auto has-mini-font-size flex justify-center gap-3 italic">
<?= get_field('texto_legal', 'option') ?>
<?php <?php
wp_nav_menu( wp_nav_menu(
array( array(
'theme_location' => 'menu-2', 'theme_location' => 'menu-legal',
'menu_class' => 'footer-menu', 'container' => false,
'depth' => 1, 'menu_id' => 'menu-legal',
'items_wrap' => '<ul id="%1$s" class="%2$s flex justify-center gap-3" aria-label="submenu">%3$s</ul>',
) )
); );
?> ?>
</nav>
<?php endif; ?>
<div>
<?php
$vlr_blog_info = get_bloginfo( 'name' );
if ( ! empty( $vlr_blog_info ) ) :
?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>,
<?php
endif;
/* translators: 1: WordPress link, 2: WordPress. */
printf(
'<a href="%1$s">proudly powered by %2$s</a>.',
esc_url( __( 'https://wordpress.org/', 'valier' ) ),
'WordPress'
);
?>
</div> </div>
</div>
</footer><!-- #colophon --> </footer>

View File

@@ -7,41 +7,9 @@
* @package Valier * @package Valier
*/ */
?> if (is_front_page()) {
get_template_part('template-parts/layout/header', 'home');
} else {
get_template_part('template-parts/layout/header', 'page');
}
<header id="masthead">
<div>
<?php
if ( is_front_page() ) :
?>
<h1><?php bloginfo( 'name' ); ?></h1>
<?php
else :
?>
<p><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php
endif;
$vlr_description = get_bloginfo( 'description', 'display' );
if ( $vlr_description || is_customize_preview() ) :
?>
<p><?php echo $vlr_description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
<?php endif; ?>
</div>
<nav id="site-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'valier' ); ?>">
<button aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', 'valier' ); ?></button>
<?php
wp_nav_menu(
array(
'theme_location' => 'menu-1',
'menu_id' => 'primary-menu',
'items_wrap' => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
)
);
?>
</nav><!-- #site-navigation -->
</header><!-- #masthead -->

View File

@@ -0,0 +1,29 @@
<header id="masthead" style="background-image: url(<?= get_header_image() ?>)" class="home">
<div class="video-container">
<video autoplay muted loop src="<?= get_field('video_header', 'option') ?>"></video>
</div>
<div class="header-cointainer">
<div class="container mx-auto flex justify-between self-start justify-self-start ">
<img src="<?= get_field('logo_home', 'option') ?>" alt="<?= get_bloginfo('name') ?>">
<nav id="site-navigation" aria-label="<?php esc_attr_e('Main Navigation', 'valier'); ?>"
class="has-small-font-size uppercase has-cinzel-font-family flex items-center gap-6">
<?php
wp_nav_menu(
array(
'theme_location' => 'menu-primary',
'container' => false,
'menu_id' => 'menu-primary',
'items_wrap' => '<ul id="%1$s" class="%2$s flex justify-center gap-6 text-white " aria-label="submenu">%3$s</ul>',
)
);
?>
<a href="<?= get_field('linkedin_link', 'option') ?>" target="_blank">
<img src="<?= get_field('abrevitura_de_linkedin', 'option') ?>" alt="Linkedin" class="linkedin">
</a>
</nav>
</div>
<h1 class="self-start justify-self-center has-extreme-font-size has-white-color has-cinzel-font-family uppercase "><?= get_the_title() ?></h1>
</div>
</header>

View File

@@ -0,0 +1,25 @@
<header id="masthead">
<div class="bg-white py-6">
<div class="container mx-auto flex justify-between self-start justify-self-start ">
<?= get_custom_logo() ?>
<nav id="site-navigation" aria-label="<?php esc_attr_e('Main Navigation', 'valier'); ?>"
class="has-small-font-size uppercase has-cinzel-font-family flex items-center gap-6 ">
<?php
wp_nav_menu(
array(
'theme_location' => 'menu-primary',
'container' => false,
'menu_id' => 'menu-primary',
'items_wrap' => '<ul id="%1$s" class="%2$s flex justify-center gap-6 " aria-label="submenu">%3$s</ul>',
)
);
?>
<a href="<?= get_field('linkedin_link', 'option') ?>" target="_blank">
<img src="<?= get_field('abrevitura_de_linkedin', 'option') ?>" alt="Linkedin" class="linkedin">
</a>
</nav>
</div>
</div>
<h1 class="self-start justify-self-center has-extreme-font-size has-white-color has-cinzel-font-family uppercase text-center py-10"
style="background-image: url(<?= get_the_post_thumbnail_url() ?>)"><?= get_the_title() ?></h1>
</header>

View File

@@ -1,39 +1,128 @@
{ {
"$schema": "https://schemas.wp.org/trunk/theme.json", "$schema": "https:\/\/schemas.wp.org\/trunk\/theme.json",
"version": 2, "version": 2,
"settings": { "settings": {
"appearanceTools": true,
"color": { "color": {
"palette": [ "palette": [
{ {
"slug": "background", "slug": "background",
"color": "#ffffff", "color": "#ecedf0",
"name": "Background" "name": "Background"
}, },
{
"slug": "foreground",
"color": "#404040",
"name": "Foreground"
},
{ {
"slug": "primary", "slug": "primary",
"color": "#b91c1c", "color": "#b37b20",
"name": "Primary" "name": "Primary"
}, },
{ {
"slug": "secondary", "slug": "secondary",
"color": "#15803d", "color": "#002e4f",
"name": "Secondary" "name": "Secondary"
}, },
{ {
"slug": "tertiary", "slug": "tertiary",
"color": "#0369a1", "color": "#706f6f",
"name": "Tertiary" "name": "Tertiary"
} }
] ]
}, },
"typography": {
"fontFamilies": [
{
"name": "Cinzel",
"slug": "cinzel",
"fontFamily": "\"Cinzel\", serif",
"fontFace": [
{
"fontFamily": "cinzel",
"fontWeight": "400 900",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/Cinzel-VariableFont_wght.ttf"
]
}
]
},
{
"name": "Playfair",
"slug": "playfair",
"fontFamily": "\"Playfair Display\", serif",
"fontFace": [
{
"fontFamily": "playfair",
"fontWeight": "400 900",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/PlayfairDisplay-VariableFont_wght.ttf"
]
}
]
}
],
"fontSizes": [
{
"slug": "mini",
"size": "0.77rem",
"name": "Pequeño"
},
{
"slug": "small",
"size": "0.88rem",
"name": "Pequeño"
},
{
"slug": "regular",
"size": "1rem",
"name": "Normal"
},
{
"slug": "big",
"size": "1.66rem",
"name": "Grande"
},
{
"slug": "extreme",
"size": "2.55rem",
"name": "Enorme"
}
]
},
"spacing": [
{
"units": [
"px",
"em",
"rem",
"vh",
"vw"
]
}
],
"layout": { "layout": {
"contentSize": "40rem", "contentSize": "840px",
"wideSize": "60rem" "wideSize": "1100px"
},
"shadow": {
"presets": [
{
"name": "Small",
"slug": "sm",
"shadow": "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)"
},
{
"name": "Medium",
"slug": "md",
"shadow": "0 4px 10px 0 rgba( 0, 0, 0, 0.3 )"
},
{
"name": "Large",
"slug": "lg",
"shadow": "0 8px 15px 0 rgba( 0, 0, 0, 0.3 )"
}
]
} }
} }
} }