Se mejora la visualización de las citas y se cambia de menú

This commit is contained in:
Manuel Cillero 2018-11-25 20:02:49 +01:00
parent 541c042773
commit 904360e631
7 changed files with 1214 additions and 12 deletions

File diff suppressed because it is too large Load diff

View file

@ -27,7 +27,7 @@ if( $flexible_posts->have_posts() ):
if ($post->post_type == 'quote') {
$quote_text = get_the_content();
$author = wp_get_post_terms($post->ID, 'quote_author_tag', array("fields" => "all"));
$quote_author = '<p>— <a href="/quote-author/' . $author[0]->slug . '">' . $author[0]->name . '</a></p>';
$quote_author = '<p>— <a href="/quotes/author/' . $author[0]->slug . '">' . $author[0]->name . '</a></p>';
} else {
$quote_text = get_the_content();
$quote_author = get_the_title();

View file

@ -88,13 +88,21 @@ function avia_same_category_filter( $settings ) {
*/
add_filter( 'avf_title_args', 'fix_single_post_title', 10, 2 );
function fix_single_post_title( $args, $id ) {
if (is_single()) {
$post_type = get_post_type();
$category = get_the_category();
if ( ! empty( $category ) && is_single() && get_post_type() == 'post' ) {
if ( ! empty( $category ) && $post_type == 'post' ) {
// Social title for Twitter, Facebook & LinkedIn categories:
$args['title'] = in_array( $category[0]->name, array( 'Twitter', 'Facebook', 'LinkedIn' ) ) ? 'Social' : $category[0]->name;
$args['link'] = NULL;
$args['heading'] = 'h1';
}
elseif ( $post_type == 'quote' ) {
$args['title'] = 'Libro de citas';
$args['link'] = NULL;
$args['heading'] = 'h1';
}
}
return $args;
}
@ -574,6 +582,39 @@ class enfold_post_footer_widget extends WP_Widget {
}
}
/*
* Enable a new widget sidebar to display widgets after the loop.
* See https://stackoverflow.com/questions/39181634/how-to-add-a-widget-after-post-content
* See https://wordpress.stackexchange.com/questions/107113/output-before-and-after-the-loop
*/
register_sidebar( array(
'name' => 'Displayed After Loop',
'id' => 'after-loop',
'description' => '',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h2>',
'after_title' => '</h2>',
) );
add_action( 'loop_end', 'wp_content_after_loop' );
function wp_content_after_loop( $query ) {
if ( $query->is_main_query() && is_active_sidebar( 'after-loop' ) ) {
dynamic_sidebar( 'after-loop' );
}
}
/*
* Restore the font size in the tag cloud widget using a copy of the entire Avia
* stylesheet "enfold/css/avia-snippet-widget.css" from Enfold 4.5, and removing
* the font size line in the tag cloud styles.
* See https://kriesi.at/support/topic/tag-cloud-widget-display/#post-684196
*/
add_action( 'wp_enqueue_scripts', 'wp_change_layoutcss', 20 );
function wp_change_layoutcss() {
wp_dequeue_style( 'avia-widget-css' );
wp_enqueue_style( 'avia-widget-css-child', get_stylesheet_directory_uri() . '/avia-snippet-widget.css' );
}
/*
* Remove Avia Framework debug information in child theme.
* See http://www.kriesi.at/support/topic/removal-of-theme-debug-info/#post-386207

Binary file not shown.

After

Width:  |  Height:  |  Size: 896 B

View file

@ -23,8 +23,15 @@ $sidebar = apply_filters('avf_sidebar_position', $sidebar);
if(empty($sidebar)) return;
if(!empty($avia_config['overload_sidebar'])) $avia_config['currently_viewing'] = $avia_config['overload_sidebar'];
//get text alignment for left sidebar
$sidebar_text_alignment = '';
echo "<aside class='sidebar sidebar_".$sidebar." ".$sidebar_smartphone." ".avia_layout_class( 'sidebar', false )." units' ".avia_markup_helper(array('context' => 'sidebar', 'echo' => false)).">";
if ($sidebar == 'left'){
$sidebar_left_textalign = avia_get_option('sidebar_left_textalign');
$sidebar_text_alignment = $sidebar_left_textalign !== '' ? 'sidebar_'.$sidebar_left_textalign : '';
}
echo "<aside class='sidebar sidebar_".$sidebar." ".$sidebar_text_alignment." ".$sidebar_smartphone." ".avia_layout_class( 'sidebar', false )." units' ".avia_markup_helper(array('context' => 'sidebar', 'echo' => false)).">";
echo "<div class='inner_sidebar extralight-border'>";
//Display a subnavigation for pages that is automatically generated, so the users do not need to work with widgets
@ -64,6 +71,12 @@ echo "<aside class='sidebar sidebar_".$sidebar." ".$sidebar_smartphone." ".avia_
// general blog sidebars
if ($avia_config['currently_viewing'] == 'blog' && dynamic_sidebar('Sidebar Blog') ) : $default_sidebar = false; endif;
// general archive sidebars
if (avia_get_option('archive_sidebar') == 'archive_sidebar_separate') {
if ($avia_config['currently_viewing'] == 'archive' && dynamic_sidebar('Sidebar Archives') ) : $default_sidebar = false; endif;
}
// general pages sidebars
if ($avia_config['currently_viewing'] == 'page' && dynamic_sidebar('Sidebar Pages') ) : $default_sidebar = false; endif;

View file

@ -23,14 +23,20 @@ $sidebar = apply_filters('avf_sidebar_position', $sidebar);
if(empty($sidebar)) return;
if(!empty($avia_config['overload_sidebar'])) $avia_config['currently_viewing'] = $avia_config['overload_sidebar'];
//get text alignment for left sidebar
$sidebar_text_alignment = '';
echo "<aside class='sidebar sidebar_".$sidebar." ".$sidebar_smartphone." ".avia_layout_class( 'sidebar', false )." units' ".avia_markup_helper(array('context' => 'sidebar', 'echo' => false)).">";
if ($sidebar == 'left'){
$sidebar_left_textalign = avia_get_option('sidebar_left_textalign');
$sidebar_text_alignment = $sidebar_left_textalign !== '' ? 'sidebar_'.$sidebar_left_textalign : '';
}
echo "<aside class='sidebar sidebar_".$sidebar." ".$sidebar_text_alignment." ".$sidebar_smartphone." ".avia_layout_class( 'sidebar', false )." units' ".avia_markup_helper(array('context' => 'sidebar', 'echo' => false)).">";
echo "<div class='inner_sidebar extralight-border'>";
//global sidebar
if (dynamic_sidebar('Displayed Everywhere')) : $default_sidebar = false; endif;
//Display a subnavigation for pages that is automatically generated, so the users do not need to work with widgets
$av_sidebar_menu = avia_sidebar_menu(false);
if($av_sidebar_menu)
@ -68,6 +74,12 @@ echo "<aside class='sidebar sidebar_".$sidebar." ".$sidebar_smartphone." ".avia_
// general blog sidebars
if ($avia_config['currently_viewing'] == 'blog' && dynamic_sidebar('Sidebar Blog') ) : $default_sidebar = false; endif;
// general archive sidebars
if (avia_get_option('archive_sidebar') == 'archive_sidebar_separate') {
if ($avia_config['currently_viewing'] == 'archive' && dynamic_sidebar('Sidebar Archives') ) : $default_sidebar = false; endif;
}
// general pages sidebars
if ($avia_config['currently_viewing'] == 'page' && dynamic_sidebar('Sidebar Pages') ) : $default_sidebar = false; endif;

View file

@ -140,6 +140,9 @@ body.home .content {
background-color: #e9146c;
height: 4px;
}
#menu-item-5544 {
border-top: 1px solid #556372;
}
/*
* Navigation menu for pages.
@ -236,6 +239,36 @@ body.home .content {
.entry-content-wrapper .text-underline {
border-bottom: 1px solid currentcolor;
}
/* Text styles */
span[data-avia-tooltip] {
padding-left: 2px;
padding-right: 2px;
border-bottom: 3px solid #e9146c;
cursor: help;
}
.text-highlight,
.line-highlight-green,
.line-highlight-yellow,
.line-highlight-red,
.line-highlight-blue {
padding-left: 2px;
padding-right: 2px;
border-bottom: 3px solid #d8ff3f !important;
}
.text-highlight {
border-radius: 3px;
border: 3px solid #d8ff3f !important;
background-color: #d8ff3f;
}
.line-highlight-yellow {
border-color: #fff2a8 !important;
}
.line-highlight-red {
border-color: #ffb7b7 !important;
}
.line-highlight-blue {
border-color: #a8d1ff !important;
}
/* Center and set background color for featured images */
.big-preview a {
border-radius: 5px;
@ -255,6 +288,35 @@ article.post-entry-social .entry-content-wrapper p {
text-align: left;
color: #999999 !important;
}
/* Quotes posts */
article.type-quote .post-meta-infos > time,
article.type-quote .post-meta-infos > span {
display: none;
}
article.type-quote .post-meta-infos > span.blog-categories {
display: block;
text-indent: -1.325em;
margin-top: 1.4em;
}
article.type-quote .post-meta-infos span.blog-categories a:before {
content: "— ";
}
article.type-quote .post-meta-infos span.blog-categories a {
font-size: 1.4em;
color: #797979;
padding-left: 4px;
}
article.type-quote .entry-content-wrapper div.entry-content {
padding-left: 60px;
background: url(images/quotes.png) no-repeat 5px 0;
}
article.type-quote .entry-content-wrapper p {
font-size: 1.5em;
font-style: italic;
line-height: 1.5em;
text-align: left;
color: #999999 !important;
}
/* EXIF info */
p.exif > span > span {
font-weight: 700;
@ -575,12 +637,15 @@ a.dpe-flexible-photos-link:hover {
text-align: left;
margin: .1em 0 .4em;
}
.quote-text p {
margin: 0 !important;
}
.quote-author p {
color: #999;
text-align: left;
font-size: .88em;
font-weight: 300;
margin-bottom: .4em;
margin-bottom: .8em;
margin-left: 8px;
}
.quote-author a {
@ -590,6 +655,23 @@ a.dpe-flexible-photos-link:hover {
color: #f70a0a;
}
body.tax-quote_author_tag .quote-text,
body.tax-quote_author_tag .quote-text p {
color: #999;
margin-top: 1.4em;
margin-left: 1.2em;
}
body.tax-quote_author_tag .quote-author p {
margin-left: 2.8em;
}
body.tax-quote_author_tag .quote-author a {
color: #ccc;
font-weight: 400;
}
body.tax-quote_author_tag .quote-author a:hover {
color: #f70a0a;
}
/*
* Métrica 3 widget.
*/