add files
This commit is contained in:
83
template-parts/archive/header/author.php
Normal file
83
template-parts/archive/header/author.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<!--[archive/header/author]-->
|
||||
|
||||
<?php
|
||||
|
||||
$email = str_replace("-", ".", get_post_meta(get_queried_object_id(), 'cap-user_login', true))."@news-profile.ru";
|
||||
|
||||
?>
|
||||
|
||||
<?php if( get_post_meta( get_queried_object_id() , 'show_data', true) == 1 ) : ?>
|
||||
|
||||
<div class="author position-relative">
|
||||
|
||||
<div class="position-relative d-flex flex-column flex-md-row" itemscope="" itemtype="https://schema.org/Person">
|
||||
|
||||
<div class="text-center text-md-left">
|
||||
|
||||
<?= get_the_post_thumbnail( get_queried_object() ) ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex flex-column align-items-center align-items-md-start justify-content-between">
|
||||
|
||||
<div class="author__body d-flex flex flex-column align-items-center align-items-md-start justify-content-center">
|
||||
|
||||
<h1 class="author__title mt-3 mt-md-0 mb-2 mb-md-2" itemprop="name" lang="ru">
|
||||
|
||||
<?= get_queried_object()->display_name ?>
|
||||
|
||||
</h1>
|
||||
|
||||
<div class="author__post text-center text-md-left py-1 py-md-0 mb-4 mb-md-0">
|
||||
|
||||
<a href="mailto:<?= $email ?>" itemprop="email">
|
||||
|
||||
<?= $email ?>
|
||||
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="author__post text-center text-md-left py-1 py-md-0 mb-4 mb-md-0" itemprop="description">
|
||||
|
||||
<div style="margin-top: 8px;"><?= wpautop( get_queried_object()->description ); ?></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="author__post text-center text-md-left py-1 py-md-0 mb-4 mb-md-0" itemprop="url">
|
||||
<?php echo get_profile_website_link( get_queried_object()->website );?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
|
||||
<div class="position-relative d-flex flex-column flex-md-row mb-4" itemscope itemtype="https://schema.org/Person">
|
||||
|
||||
<div class="d-flex flex flex-column align-items-center align-items-md-start justify-content-between">
|
||||
|
||||
<div class="author__body d-flex flex flex-column align-items-center align-items-md-start justify-content-center">
|
||||
|
||||
<h1 class="author__title mt-3 mt-md-0 mb-2 mb-md-2" itemprop="name" lang="ru">
|
||||
|
||||
<?= get_queried_object()->display_name ?>
|
||||
|
||||
</h1>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!--[/archive/header/author]-->
|
||||
44
template-parts/archive/header/category.php
Normal file
44
template-parts/archive/header/category.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<!--[archive/header/category]-->
|
||||
|
||||
<?php if( !is_in_dk() ) : ?>
|
||||
|
||||
<div class="mb-4 position-relative">
|
||||
|
||||
<?php get_template_part("template-parts/ad/revive/ad", "", [ "zone" => 12 ]) ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if( wp_is_mobile() ) : ?>
|
||||
|
||||
<?php
|
||||
|
||||
$term_id = get_current_page_main_taxonomy_term_id( );
|
||||
|
||||
$color = get_term_meta( $term_id, "color", true );
|
||||
|
||||
$color = $color ? $color : "grey";
|
||||
|
||||
?>
|
||||
|
||||
<div class="col-12 col-md-6 col-xl-4 float-left">
|
||||
|
||||
<div class="section__title section__title--<?= $color ?> d-block d-md-none mb-3">
|
||||
|
||||
<?= get_term( get_queried_object_id() )->name ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php else : ?>
|
||||
|
||||
<div class="col-12 col-md-6 col-xl-4 float-left">
|
||||
|
||||
<?= str_replace("<p></p>", "", term_description( get_queried_object()->term_id )); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!--[/archive/header/category]-->
|
||||
13
template-parts/archive/header/event.php
Normal file
13
template-parts/archive/header/event.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<!--[archive/header/event]-->
|
||||
|
||||
<div class="d-flex justify-content-start align-items-center mb-3">
|
||||
|
||||
<h1 class="fs-32 font-weight-bold">
|
||||
|
||||
Календарь событий
|
||||
|
||||
</h1>
|
||||
|
||||
</div>
|
||||
|
||||
<!--[/archive/header/event]-->
|
||||
17
template-parts/archive/header/post-type.php
Normal file
17
template-parts/archive/header/post-type.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<!--[archive/header/post-type]-->
|
||||
|
||||
<?php if ( wp_is_mobile() || 1==1 ) : ?>
|
||||
|
||||
<div class="col-12 d-block d-md-none mb-3">
|
||||
|
||||
<div class="section__title section__title--orange">
|
||||
|
||||
<?= get_queried_object()->label ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!--[/archive/header/post-type]-->
|
||||
9
template-parts/archive/header/special/branding.php
Normal file
9
template-parts/archive/header/special/branding.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<!--[archive/header/special/branding]-->
|
||||
|
||||
<div class="col-12">
|
||||
|
||||
<?= str_replace("<p></p>", "", term_description( get_queried_object()->term_id )); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<!--[/archive/header/special/branding]-->
|
||||
@@ -0,0 +1,3 @@
|
||||
<!--[archive/header/special/special-mamleev]-->
|
||||
<!--TODO:Проверить, надо ли и сделать, если надо-->
|
||||
<!--[/archive/header/special/special-mamleev]-->
|
||||
92
template-parts/archive/header/tag.php
Normal file
92
template-parts/archive/header/tag.php
Normal file
@@ -0,0 +1,92 @@
|
||||
<!--[archive/header/tag]-->
|
||||
|
||||
<?php
|
||||
|
||||
$thumbnail_id = get_term_meta( get_queried_object_id(), "term_thumbnail", true );
|
||||
$term_description = term_description( get_queried_object_id() );
|
||||
|
||||
$rkn_meta = get_term_meta( get_queried_object_id(), "rkn_disclaimer", true );
|
||||
|
||||
?>
|
||||
<?php if( $thumbnail_id ): ?>
|
||||
|
||||
<div class="tag">
|
||||
|
||||
<div class="tag__body position-relative">
|
||||
|
||||
<?= wp_get_attachment_image_html($thumbnail_id, false, false, 1200); ?>
|
||||
|
||||
<div class="tag-main">
|
||||
|
||||
<h1 class="tag__body__title">
|
||||
|
||||
<img loading="lazy" src="/wp-content/themes/profile/assets/img/news/item/subtract.svg" alt="">
|
||||
|
||||
<?= get_term( get_queried_object_id() )->name ?>
|
||||
|
||||
</h1>
|
||||
|
||||
<?php if ( $term_description ) : ?>
|
||||
|
||||
<div class="tag__body__text d-none d-md-block">
|
||||
|
||||
<?= $term_description; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ( $term_description ) : ?>
|
||||
|
||||
<div class="container-fluid tag-mobile__text tag__body__text d-md-none">
|
||||
|
||||
<?= $term_description; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<div class="profile_onenews mb-4">
|
||||
|
||||
<div class="profile_onenews__title h2">
|
||||
|
||||
<svg class="align-baseline svg-icon" width="36" height="37"><use xlink:href="/wp-content/themes/profile/assets/img/sprites-svg/dist/sprite.svg#tag"></use></svg>
|
||||
|
||||
<?= get_term( get_queried_object_id() )->name ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ( $term_description ) : ?>
|
||||
|
||||
<div class="newstag__body__text d-none d-md-block">
|
||||
|
||||
<?= $term_description; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($rkn_meta): ?>
|
||||
|
||||
<div class="mt-2 mb-4 col-12">
|
||||
<em>
|
||||
<?= get_rkn_disclaimer_for_tags($rkn_meta, get_term( get_queried_object_id() )->name); ?>
|
||||
</em>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<!--[/archive/header/tag]-->
|
||||
Reference in New Issue
Block a user