Initial commit: gustavoo portfolio project
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* Empty result state.
|
||||
*
|
||||
* @package Gustavo_Portfolio
|
||||
*/
|
||||
?>
|
||||
|
||||
<section class="no-results not-found" aria-labelledby="no-results-title">
|
||||
<h2 id="no-results-title" class="no-results__title"><?php esc_html_e( 'Nada encontrado', 'gustavoo-portfolio' ); ?></h2>
|
||||
<?php if ( is_search() ) : ?>
|
||||
<p><?php esc_html_e( 'Não encontramos conteúdo com esses termos. Tente palavras diferentes.', 'gustavoo-portfolio' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
<?php else : ?>
|
||||
<p><?php esc_html_e( 'Ainda não há publicações aqui.', 'gustavoo-portfolio' ); ?></p>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Page content.
|
||||
*
|
||||
* @package Gustavo_Portfolio
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class( 'page-article' ); ?>>
|
||||
<header class="page-article__header">
|
||||
<p class="eyebrow"><?php esc_html_e( 'Página', 'gustavoo-portfolio' ); ?></p>
|
||||
<?php the_title( '<h1 class="page-article__title">', '</h1>' ); ?>
|
||||
</header>
|
||||
|
||||
<?php if ( has_post_thumbnail() ) : ?>
|
||||
<figure class="page-article__media">
|
||||
<?php the_post_thumbnail( 'full', array( 'class' => 'page-article__image' ) ); ?>
|
||||
</figure>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="entry-content prose">
|
||||
<?php the_content(); ?>
|
||||
<?php
|
||||
wp_link_pages(
|
||||
array(
|
||||
'before' => '<nav class="page-links" aria-label="' . esc_attr__( 'Páginas deste conteúdo', 'gustavoo-portfolio' ) . '"><span>' . esc_html__( 'Páginas:', 'gustavoo-portfolio' ) . '</span>',
|
||||
'after' => '</nav>',
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* Front-page about section.
|
||||
*
|
||||
* @package Gustavo_Portfolio
|
||||
*/
|
||||
|
||||
$gustavoo_about_text = (string) gustavoo_portfolio_get_setting( 'about_text' );
|
||||
$gustavoo_about_secondary_text = (string) gustavoo_portfolio_get_setting( 'about_secondary_text' );
|
||||
?>
|
||||
|
||||
<section id="sobre" class="section section--about" aria-labelledby="about-title">
|
||||
<div class="site-shell about-layout">
|
||||
<header class="section__header about-layout__header">
|
||||
<p class="eyebrow"><?php echo esc_html( gustavoo_portfolio_get_setting( 'about_eyebrow' ) ); ?></p>
|
||||
<h2 id="about-title" class="section__title"><?php echo esc_html( gustavoo_portfolio_get_setting( 'about_title' ) ); ?></h2>
|
||||
</header>
|
||||
|
||||
<div class="about-layout__content">
|
||||
<div class="prose prose--lead">
|
||||
<?php echo wp_kses_post( wpautop( esc_html( $gustavoo_about_text ) ) ); ?>
|
||||
<?php echo wp_kses_post( wpautop( esc_html( $gustavoo_about_secondary_text ) ) ); ?>
|
||||
</div>
|
||||
|
||||
<dl class="about-facts" aria-label="<?php esc_attr_e( 'Diferenciais profissionais', 'gustavoo-portfolio' ); ?>">
|
||||
<div class="about-fact">
|
||||
<dt><?php esc_html_e( 'Escopo', 'gustavoo-portfolio' ); ?></dt>
|
||||
<dd><?php esc_html_e( 'Da regra de negócio à infraestrutura', 'gustavoo-portfolio' ); ?></dd>
|
||||
</div>
|
||||
<div class="about-fact">
|
||||
<dt><?php esc_html_e( 'Entrega', 'gustavoo-portfolio' ); ?></dt>
|
||||
<dd><?php esc_html_e( 'Código limpo, documentado e sustentável', 'gustavoo-portfolio' ); ?></dd>
|
||||
</div>
|
||||
<div class="about-fact">
|
||||
<dt><?php esc_html_e( 'Visão', 'gustavoo-portfolio' ); ?></dt>
|
||||
<dd><?php esc_html_e( 'Tecnologia alinhada ao crescimento', 'gustavoo-portfolio' ); ?></dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Front-page contact section.
|
||||
*
|
||||
* @package Gustavo_Portfolio
|
||||
*/
|
||||
|
||||
$gustavoo_contact_form_id = absint( gustavoo_portfolio_get_setting( 'contact_form_id' ) );
|
||||
$gustavoo_email = sanitize_email( (string) gustavoo_portfolio_get_setting( 'email' ) );
|
||||
$gustavoo_privacy_url = get_privacy_policy_url();
|
||||
?>
|
||||
|
||||
<section id="contato" class="section section--contact" aria-labelledby="contact-title">
|
||||
<div class="site-shell contact-panel">
|
||||
<div class="contact-panel__content">
|
||||
<p class="eyebrow"><?php echo esc_html( gustavoo_portfolio_get_setting( 'contact_eyebrow' ) ); ?></p>
|
||||
<h2 id="contact-title" class="section__title"><?php echo esc_html( gustavoo_portfolio_get_setting( 'contact_heading' ) ); ?></h2>
|
||||
<p class="contact-panel__description"><?php echo esc_html( gustavoo_portfolio_get_setting( 'contact_text' ) ); ?></p>
|
||||
|
||||
<?php if ( $gustavoo_email ) : ?>
|
||||
<ul class="contact-list">
|
||||
<?php if ( $gustavoo_email ) : ?>
|
||||
<li><span><?php esc_html_e( 'E-mail', 'gustavoo-portfolio' ); ?></span><a href="<?php echo esc_url( 'mailto:' . $gustavoo_email ); ?>"><?php echo esc_html( antispambot( $gustavoo_email ) ); ?></a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php gustavoo_portfolio_social_links( 'social-links social-links--contact' ); ?>
|
||||
</div>
|
||||
|
||||
<div class="contact-panel__form">
|
||||
<?php gustavoo_portfolio_the_fluent_form( $gustavoo_contact_form_id, 'contact' ); ?>
|
||||
<?php if ( $gustavoo_privacy_url ) : ?>
|
||||
<p class="form-privacy">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: privacy policy URL. */
|
||||
wp_kses_post( __( 'Ao enviar, você concorda com o tratamento dos dados conforme a <a href="%s">Política de Privacidade</a>.', 'gustavoo-portfolio' ) ),
|
||||
esc_url( $gustavoo_privacy_url )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* Front-page hero.
|
||||
*
|
||||
* @package Gustavo_Portfolio
|
||||
*/
|
||||
|
||||
$gustavoo_hero_eyebrow = (string) gustavoo_portfolio_get_setting( 'hero_eyebrow' );
|
||||
$gustavoo_hero_title = (string) gustavoo_portfolio_get_setting( 'hero_title' );
|
||||
$gustavoo_hero_description = (string) gustavoo_portfolio_get_setting( 'hero_description' );
|
||||
$gustavoo_hero_primary_label = (string) gustavoo_portfolio_get_setting( 'hero_primary_label' );
|
||||
$gustavoo_hero_primary_url = (string) gustavoo_portfolio_get_setting( 'hero_primary_url' );
|
||||
$gustavoo_hero_secondary_label = (string) gustavoo_portfolio_get_setting( 'hero_secondary_label' );
|
||||
$gustavoo_hero_secondary_url = (string) gustavoo_portfolio_get_setting( 'hero_secondary_url' );
|
||||
$gustavoo_hero_sources = gustavoo_portfolio_get_picture_sources( 'hero-art' );
|
||||
?>
|
||||
|
||||
<section class="hero-stage" aria-labelledby="hero-title">
|
||||
<div class="site-shell hero">
|
||||
<div class="hero__content">
|
||||
<?php if ( $gustavoo_hero_eyebrow ) : ?>
|
||||
<p class="eyebrow hero__eyebrow"><?php echo esc_html( $gustavoo_hero_eyebrow ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<h1 id="hero-title" class="hero__title"><?php echo esc_html( $gustavoo_hero_title ); ?></h1>
|
||||
<p class="hero__description"><?php echo esc_html( $gustavoo_hero_description ); ?></p>
|
||||
|
||||
<div class="hero__actions">
|
||||
<?php if ( $gustavoo_hero_primary_label && $gustavoo_hero_primary_url ) : ?>
|
||||
<a class="button button--primary" href="<?php echo esc_url( $gustavoo_hero_primary_url ); ?>">
|
||||
<?php echo esc_html( $gustavoo_hero_primary_label ); ?> <span aria-hidden="true">→</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $gustavoo_hero_secondary_label && $gustavoo_hero_secondary_url ) : ?>
|
||||
<a class="button button--secondary" href="<?php echo esc_url( $gustavoo_hero_secondary_url ); ?>">
|
||||
<?php echo esc_html( $gustavoo_hero_secondary_label ); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="hero__visual" aria-hidden="true">
|
||||
<div class="hero__visual-glow"></div>
|
||||
<picture>
|
||||
<?php if ( $gustavoo_hero_sources['webp'] ) : ?>
|
||||
<source srcset="<?php echo esc_url( $gustavoo_hero_sources['webp'] ); ?>" type="image/webp">
|
||||
<?php endif; ?>
|
||||
<img class="hero__image" src="<?php echo esc_url( $gustavoo_hero_sources['fallback'] ); ?>" width="1234" height="1280" alt="" loading="eager" decoding="async" fetchpriority="high">
|
||||
</picture>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Front-page latest posts.
|
||||
*
|
||||
* @package Gustavo_Portfolio
|
||||
*/
|
||||
|
||||
$gustavoo_blog_limit = max( 1, min( 12, absint( gustavoo_portfolio_get_setting( 'blog_limit', 4 ) ) ) );
|
||||
$gustavoo_posts = new WP_Query(
|
||||
array(
|
||||
'post_type' => 'post',
|
||||
'post_status' => 'publish',
|
||||
'posts_per_page' => $gustavoo_blog_limit,
|
||||
'ignore_sticky_posts' => true,
|
||||
'no_found_rows' => true,
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<section id="blog" class="section section--posts" aria-labelledby="latest-posts-title">
|
||||
<div class="site-shell">
|
||||
<header class="section__header section__header--split">
|
||||
<div>
|
||||
<p class="eyebrow"><?php echo esc_html( gustavoo_portfolio_get_setting( 'blog_eyebrow' ) ); ?></p>
|
||||
<h2 id="latest-posts-title" class="section__title"><?php echo esc_html( gustavoo_portfolio_get_setting( 'blog_title' ) ); ?></h2>
|
||||
</div>
|
||||
<p class="section__description"><?php echo esc_html( gustavoo_portfolio_get_setting( 'blog_text' ) ); ?></p>
|
||||
</header>
|
||||
|
||||
<?php if ( $gustavoo_posts->have_posts() ) : ?>
|
||||
<div class="posts-grid posts-grid--featured">
|
||||
<?php
|
||||
while ( $gustavoo_posts->have_posts() ) {
|
||||
$gustavoo_posts->the_post();
|
||||
get_template_part( 'template-parts/global/post-card' );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<p class="section__action"><a class="button button--secondary" href="<?php echo esc_url( gustavoo_portfolio_get_blog_url() ); ?>"><?php esc_html_e( 'Explorar todos os artigos', 'gustavoo-portfolio' ); ?> <span aria-hidden="true">→</span></a></p>
|
||||
<?php else : ?>
|
||||
<div class="section__empty"><p><?php esc_html_e( 'O primeiro artigo está a caminho.', 'gustavoo-portfolio' ); ?></p></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php wp_reset_postdata(); ?>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* Front-page project grid.
|
||||
*
|
||||
* @package Gustavo_Portfolio
|
||||
*/
|
||||
|
||||
$gustavoo_project_limit = max( 1, min( 24, absint( gustavoo_portfolio_get_setting( 'projects_limit', 6 ) ) ) );
|
||||
$gustavoo_projects = gustavoo_portfolio_get_home_projects( $gustavoo_project_limit );
|
||||
$gustavoo_archive_url = esc_url_raw( (string) gustavoo_portfolio_get_setting( 'projects_archive_url' ) );
|
||||
?>
|
||||
|
||||
<section id="projetos" class="section section--projects" aria-labelledby="projects-title">
|
||||
<div class="site-shell">
|
||||
<header class="section__header section__header--split">
|
||||
<div>
|
||||
<p class="eyebrow"><?php echo esc_html( gustavoo_portfolio_get_setting( 'projects_eyebrow' ) ); ?></p>
|
||||
<h2 id="projects-title" class="section__title"><?php echo esc_html( gustavoo_portfolio_get_setting( 'projects_title' ) ); ?></h2>
|
||||
</div>
|
||||
<p class="section__description"><?php echo esc_html( gustavoo_portfolio_get_setting( 'projects_text' ) ); ?></p>
|
||||
</header>
|
||||
|
||||
<?php if ( $gustavoo_projects ) : ?>
|
||||
<div class="projects-grid">
|
||||
<?php
|
||||
global $post;
|
||||
|
||||
foreach ( $gustavoo_projects as $post ) {
|
||||
setup_postdata( $post );
|
||||
get_template_part( 'template-parts/global/project-card' );
|
||||
}
|
||||
|
||||
wp_reset_postdata();
|
||||
?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="section__empty">
|
||||
<p><?php esc_html_e( 'Novos projetos serão publicados aqui em breve.', 'gustavoo-portfolio' ); ?></p>
|
||||
<?php if ( current_user_can( 'edit_posts' ) && post_type_exists( 'gso_project' ) ) : ?>
|
||||
<a class="text-link" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=gso_project' ) ); ?>"><?php esc_html_e( 'Adicionar o primeiro projeto', 'gustavoo-portfolio' ); ?> <span aria-hidden="true">→</span></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $gustavoo_archive_url ) : ?>
|
||||
<p class="section__action"><a class="button button--secondary" href="<?php echo esc_url( $gustavoo_archive_url ); ?>"><?php esc_html_e( 'Ver todos os projetos', 'gustavoo-portfolio' ); ?> <span aria-hidden="true">→</span></a></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Front-page services section.
|
||||
*
|
||||
* @package Gustavo_Portfolio
|
||||
*/
|
||||
|
||||
$gustavoo_services = gustavoo_portfolio_get_services();
|
||||
?>
|
||||
|
||||
<section id="servicos" class="section section--services" aria-labelledby="services-title">
|
||||
<div class="site-shell">
|
||||
<header class="section__header section__header--split">
|
||||
<div>
|
||||
<p class="eyebrow"><?php echo esc_html( gustavoo_portfolio_get_setting( 'services_eyebrow' ) ); ?></p>
|
||||
<h2 id="services-title" class="section__title"><?php echo esc_html( gustavoo_portfolio_get_setting( 'services_title' ) ); ?></h2>
|
||||
</div>
|
||||
<p class="section__description"><?php echo esc_html( gustavoo_portfolio_get_setting( 'services_description' ) ); ?></p>
|
||||
</header>
|
||||
|
||||
<div class="services-grid">
|
||||
<?php foreach ( $gustavoo_services as $gustavoo_service ) : ?>
|
||||
<article class="service-card">
|
||||
<p class="service-card__number" aria-hidden="true"><?php echo esc_html( $gustavoo_service['number'] ?? '' ); ?></p>
|
||||
<h3 class="service-card__title"><?php echo esc_html( $gustavoo_service['title'] ?? '' ); ?></h3>
|
||||
<p class="service-card__description"><?php echo esc_html( $gustavoo_service['description'] ?? '' ); ?></p>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/** Compact editorial news card. @package Gustavo_Portfolio */
|
||||
|
||||
$gustavoo_args = isset( $args ) && is_array( $args ) ? $args : array();
|
||||
$gustavoo_is_featured = ! empty( $gustavoo_args['featured'] );
|
||||
$gustavoo_categories = get_the_category();
|
||||
$gustavoo_category = $gustavoo_categories ? $gustavoo_categories[0] : null;
|
||||
$gustavoo_image_url = gustavoo_portfolio_get_news_image_url( get_the_ID(), $gustavoo_is_featured ? 'large' : 'gustavoo-post-card' );
|
||||
?>
|
||||
<article <?php post_class( 'latest-news-card' . ( $gustavoo_is_featured ? ' latest-news-card--featured' : '' ) ); ?>>
|
||||
<a class="latest-news-card__media" href="<?php the_permalink(); ?>" aria-hidden="true" tabindex="-1">
|
||||
<?php if ( $gustavoo_image_url ) : ?>
|
||||
<img class="latest-news-card__image" src="<?php echo esc_url( $gustavoo_image_url ); ?>" loading="<?php echo $gustavoo_is_featured ? 'eager' : 'lazy'; ?>" decoding="async" alt="">
|
||||
<?php else : ?><span class="latest-news-card__placeholder" aria-hidden="true"></span><?php endif; ?>
|
||||
</a>
|
||||
<div class="latest-news-card__body">
|
||||
<?php if ( $gustavoo_category ) : ?><a class="latest-news-card__category" href="<?php echo esc_url( get_category_link( $gustavoo_category ) ); ?>"><?php echo esc_html( $gustavoo_category->name ); ?></a><?php endif; ?>
|
||||
<h2 class="latest-news-card__title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
||||
<time class="latest-news-card__date" datetime="<?php echo esc_attr( get_the_date( DATE_W3C ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time>
|
||||
<?php if ( $gustavoo_is_featured && has_excerpt() ) : ?><p class="latest-news-card__excerpt"><?php echo esc_html( wp_trim_words( get_the_excerpt(), 28 ) ); ?></p><?php endif; ?>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Secondary compact news list for news and category pages.
|
||||
*
|
||||
* @package Gustavo_Portfolio
|
||||
*/
|
||||
|
||||
$gustavoo_args = isset( $args ) && is_array( $args ) ? $args : array();
|
||||
$gustavoo_query_args = array(
|
||||
'post_type' => 'post',
|
||||
'post_status' => 'publish',
|
||||
'posts_per_page' => 4,
|
||||
'post__not_in' => array_map( 'absint', $gustavoo_args['exclude'] ?? array() ),
|
||||
'ignore_sticky_posts' => true,
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC',
|
||||
);
|
||||
|
||||
if ( ! empty( $gustavoo_args['category_id'] ) ) {
|
||||
$gustavoo_query_args['cat'] = absint( $gustavoo_args['category_id'] );
|
||||
}
|
||||
|
||||
$gustavoo_latest_posts = new WP_Query( $gustavoo_query_args );
|
||||
|
||||
if ( ! $gustavoo_latest_posts->have_posts() ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<section class="latest-news-list" aria-labelledby="latest-news-list-title">
|
||||
<h2 id="latest-news-list-title" class="latest-news-list__heading"><?php esc_html_e( 'Últimas notícias', 'gustavoo-portfolio' ); ?></h2>
|
||||
<div class="latest-news-list__items">
|
||||
<?php while ( $gustavoo_latest_posts->have_posts() ) : $gustavoo_latest_posts->the_post(); ?>
|
||||
<?php $gustavoo_categories = get_the_category(); $gustavoo_category = $gustavoo_categories ? $gustavoo_categories[0] : null; $gustavoo_image_url = gustavoo_portfolio_get_news_image_url(); ?>
|
||||
<article <?php post_class( 'latest-news-list__item' ); ?>>
|
||||
<a class="latest-news-list__image" href="<?php the_permalink(); ?>" aria-hidden="true" tabindex="-1">
|
||||
<?php if ( $gustavoo_image_url ) : ?><img src="<?php echo esc_url( $gustavoo_image_url ); ?>" loading="lazy" decoding="async" alt=""><?php endif; ?>
|
||||
</a>
|
||||
<div class="latest-news-list__body">
|
||||
<?php if ( $gustavoo_category ) : ?><a class="latest-news-card__category" href="<?php echo esc_url( get_category_link( $gustavoo_category ) ); ?>"><?php echo esc_html( $gustavoo_category->name ); ?></a><?php endif; ?>
|
||||
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
|
||||
<time datetime="<?php echo esc_attr( get_the_date( DATE_W3C ) ); ?>"><?php echo esc_html( get_the_date( 'D, d/m/Y · H:i' ) ); ?></time>
|
||||
</div>
|
||||
</article>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</section>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Global newsletter call to action, rendered before every site footer.
|
||||
*
|
||||
* @package Gustavo_Portfolio
|
||||
*/
|
||||
|
||||
$gustavoo_newsletter_form_id = absint( gustavoo_portfolio_get_setting( 'newsletter_form_id' ) );
|
||||
$gustavoo_privacy_url = get_privacy_policy_url();
|
||||
?>
|
||||
|
||||
<section class="section section--newsletter" aria-labelledby="newsletter-title">
|
||||
<div class="site-shell newsletter-panel">
|
||||
<div class="newsletter-panel__content">
|
||||
<p class="eyebrow"><?php echo esc_html( gustavoo_portfolio_get_setting( 'newsletter_eyebrow' ) ); ?></p>
|
||||
<h2 id="newsletter-title" class="newsletter-panel__title"><?php echo esc_html( gustavoo_portfolio_get_setting( 'newsletter_heading' ) ); ?></h2>
|
||||
<p class="newsletter-panel__description"><?php echo esc_html( gustavoo_portfolio_get_setting( 'newsletter_text' ) ); ?></p>
|
||||
</div>
|
||||
|
||||
<div class="newsletter-panel__form">
|
||||
<?php gustavoo_portfolio_the_fluent_form( $gustavoo_newsletter_form_id, 'newsletter' ); ?>
|
||||
<?php if ( $gustavoo_privacy_url ) : ?>
|
||||
<p class="form-privacy">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: privacy policy URL. */
|
||||
wp_kses_post( __( 'Você pode cancelar a inscrição a qualquer momento. Consulte a <a href="%s">Política de Privacidade</a>.', 'gustavoo-portfolio' ) ),
|
||||
esc_url( $gustavoo_privacy_url )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Blog post card.
|
||||
*
|
||||
* @package Gustavo_Portfolio
|
||||
*/
|
||||
|
||||
$gustavoo_categories = get_the_category();
|
||||
$gustavoo_category = $gustavoo_categories ? $gustavoo_categories[0] : null;
|
||||
?>
|
||||
|
||||
<article <?php post_class( 'post-card' ); ?>>
|
||||
<?php if ( has_post_thumbnail() ) : ?>
|
||||
<a class="post-card__media" href="<?php the_permalink(); ?>" tabindex="-1" aria-hidden="true">
|
||||
<?php
|
||||
the_post_thumbnail(
|
||||
'gustavoo-post-card',
|
||||
array(
|
||||
'class' => 'post-card__image',
|
||||
'loading' => 'lazy',
|
||||
'decoding' => 'async',
|
||||
'alt' => '',
|
||||
)
|
||||
);
|
||||
?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="post-card__body">
|
||||
<div class="post-card__meta">
|
||||
<?php if ( $gustavoo_category ) : ?>
|
||||
<a class="post-card__category" href="<?php echo esc_url( get_category_link( $gustavoo_category ) ); ?>"><?php echo esc_html( $gustavoo_category->name ); ?></a>
|
||||
<?php endif; ?>
|
||||
<?php gustavoo_portfolio_posted_on(); ?>
|
||||
<span class="reading-time"><?php echo esc_html( gustavoo_portfolio_reading_time() ); ?></span>
|
||||
</div>
|
||||
|
||||
<h2 class="post-card__title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
||||
<p class="post-card__excerpt"><?php echo esc_html( wp_trim_words( get_the_excerpt(), 26 ) ); ?></p>
|
||||
<a class="post-card__more" href="<?php the_permalink(); ?>">
|
||||
<?php esc_html_e( 'Ler artigo', 'gustavoo-portfolio' ); ?> <span aria-hidden="true">→</span>
|
||||
<span class="screen-reader-text">: <?php the_title(); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/**
|
||||
* Project card.
|
||||
*
|
||||
* @package Gustavo_Portfolio
|
||||
*/
|
||||
|
||||
$gustavoo_project_id = get_the_ID();
|
||||
$gustavoo_project_url = gustavoo_portfolio_validate_project_url( get_post_meta( $gustavoo_project_id, '_gso_project_url', true ) );
|
||||
$gustavoo_project_client = sanitize_text_field( (string) get_post_meta( $gustavoo_project_id, '_gso_project_client', true ) );
|
||||
$gustavoo_project_year = absint( get_post_meta( $gustavoo_project_id, '_gso_project_year', true ) );
|
||||
$gustavoo_project_link_label = sanitize_text_field( (string) get_post_meta( $gustavoo_project_id, '_gso_project_link_label', true ) );
|
||||
$gustavoo_project_link_label = $gustavoo_project_link_label ?: __( 'Ver projeto', 'gustavoo-portfolio' );
|
||||
$gustavoo_project_types = taxonomy_exists( 'gso_project_type' ) ? get_the_terms( $gustavoo_project_id, 'gso_project_type' ) : array();
|
||||
$gustavoo_project_tech = taxonomy_exists( 'gso_project_tech' ) ? get_the_terms( $gustavoo_project_id, 'gso_project_tech' ) : array();
|
||||
|
||||
if ( ! $gustavoo_project_url ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<article <?php post_class( 'project-card' ); ?>>
|
||||
<a class="project-card__link" href="<?php echo esc_url( $gustavoo_project_url ); ?>" target="_blank" rel="noopener noreferrer external">
|
||||
<figure class="project-card__media">
|
||||
<?php if ( has_post_thumbnail() ) : ?>
|
||||
<?php
|
||||
$gustavoo_thumbnail_id = get_post_thumbnail_id();
|
||||
$gustavoo_thumbnail_alt = get_post_meta( $gustavoo_thumbnail_id, '_wp_attachment_image_alt', true );
|
||||
$gustavoo_thumbnail_alt = $gustavoo_thumbnail_alt ?: sprintf(
|
||||
/* translators: %s: project title. */
|
||||
__( 'Imagem do projeto %s', 'gustavoo-portfolio' ),
|
||||
get_the_title()
|
||||
);
|
||||
|
||||
echo get_the_post_thumbnail(
|
||||
$gustavoo_project_id,
|
||||
'gustavoo-project-card',
|
||||
array(
|
||||
'alt' => $gustavoo_thumbnail_alt,
|
||||
'class' => 'project-card__image',
|
||||
'loading' => 'lazy',
|
||||
'decoding' => 'async',
|
||||
)
|
||||
); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Core image markup.
|
||||
?>
|
||||
<?php else : ?>
|
||||
<span class="project-card__placeholder" aria-hidden="true">
|
||||
<img src="<?php echo esc_url( gustavoo_portfolio_get_image_source( 'logo-mark' ) ); ?>" width="96" height="96" alt="">
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</figure>
|
||||
|
||||
<div class="project-card__body">
|
||||
<?php if ( ! is_wp_error( $gustavoo_project_types ) && $gustavoo_project_types ) : ?>
|
||||
<p class="project-card__type"><?php echo esc_html( implode( ' · ', wp_list_pluck( $gustavoo_project_types, 'name' ) ) ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<h3 class="project-card__title"><?php the_title(); ?></h3>
|
||||
|
||||
<?php if ( has_excerpt() ) : ?>
|
||||
<p class="project-card__description"><?php echo esc_html( wp_trim_words( get_the_excerpt(), 24 ) ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $gustavoo_project_client || $gustavoo_project_year ) : ?>
|
||||
<p class="project-card__meta">
|
||||
<?php echo esc_html( implode( ' · ', array_filter( array( $gustavoo_project_client, $gustavoo_project_year ? (string) $gustavoo_project_year : '' ) ) ) ); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( ! is_wp_error( $gustavoo_project_tech ) && $gustavoo_project_tech ) : ?>
|
||||
<ul class="project-card__tags" aria-label="<?php esc_attr_e( 'Tecnologias', 'gustavoo-portfolio' ); ?>">
|
||||
<?php foreach ( array_slice( $gustavoo_project_tech, 0, 4 ) as $gustavoo_technology ) : ?>
|
||||
<li><?php echo esc_html( $gustavoo_technology->name ); ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<span class="project-card__cta">
|
||||
<?php echo esc_html( $gustavoo_project_link_label ); ?> <span aria-hidden="true">↗</span>
|
||||
<span class="screen-reader-text"> <?php esc_html_e( '(abre em uma nova guia)', 'gustavoo-portfolio' ); ?></span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Floating WhatsApp action used by the Customizer partial refresh.
|
||||
*
|
||||
* @package Gustavo_Portfolio
|
||||
*/
|
||||
|
||||
gustavoo_portfolio_the_whatsapp_float();
|
||||
Reference in New Issue
Block a user