Merge branch 'develop' of https://github.com/tainacan/tainacan-theme into develop
This commit is contained in:
commit
e73d6a4074
|
@ -25,6 +25,9 @@ jQuery(document).ready(function( $ ) {
|
|||
*/
|
||||
$('#comments ul.children').addClass('align-children');
|
||||
|
||||
|
||||
$('.tainacan-single-post .tainacan-content table').addClass('table table-borderless');
|
||||
|
||||
/**
|
||||
* Add the icon on previous and next pagination in comment list
|
||||
*/
|
||||
|
@ -80,21 +83,12 @@ jQuery(document).ready(function( $ ) {
|
|||
// instead of a settings object
|
||||
]
|
||||
});
|
||||
//$('.t-collection--info-description-text').attr('style', 'display: block; max-height: 4.5em;');
|
||||
/* var t = $(".elimore");
|
||||
t.dotdotdot({
|
||||
keep: ".toggle"
|
||||
});
|
||||
|
||||
var n = t.data("dotdotdot");
|
||||
t.on("click", ".toggle", function(e) {
|
||||
t.preventDefault(), t.hasClass("ddd-truncated") ? (n.restore(), t.addClass("full-story")) : (t.removeClass("full-story"), n.truncate(), n.watch())
|
||||
}); */
|
||||
});
|
||||
jQuery(document).ready(function(e) {
|
||||
var t = e(".dotmore");
|
||||
t.dotdotdot({
|
||||
keep: ".toggle"
|
||||
keep: ".toggle",
|
||||
height: "watch"
|
||||
});
|
||||
var n = t.data("dotdotdot");
|
||||
t.on("click", ".toggle", function(e) {
|
||||
|
|
|
@ -96,13 +96,20 @@
|
|||
}
|
||||
&.dotmore {
|
||||
height: 65px;
|
||||
margin-bottom: 2rem;
|
||||
.toggle {
|
||||
color: #9d9fa0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
&.full-story {
|
||||
height: auto;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
&:not(.ddd-truncated):not(.full-story) {
|
||||
.toggle {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,23 @@
|
|||
&h1, &h2{
|
||||
font-size: 1rem;
|
||||
}
|
||||
blockquote:not(.wp-block-pullquote), .wp-block-quote {
|
||||
color: #898d8f;
|
||||
font-weight: 400;
|
||||
padding: 1rem;
|
||||
border-left:2px solid #298596;
|
||||
margin-left: 4.16666666667%;
|
||||
margin-right: 4.16666666667%;
|
||||
cite {
|
||||
float: right;
|
||||
color: #298596;
|
||||
}
|
||||
}
|
||||
.table {
|
||||
thead {
|
||||
border-bottom: 1px solid #cbcbcb;
|
||||
}
|
||||
}
|
||||
img[class*="align"],
|
||||
img[class*="wp-image-"],
|
||||
.gallery {
|
||||
|
@ -118,26 +135,6 @@
|
|||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
/* .wp-caption {
|
||||
background: #cbcbcb;
|
||||
margin-bottom: 1.625em;
|
||||
max-width: 96%;
|
||||
max-width: calc( 100% - 18px );
|
||||
padding: 9px;
|
||||
.wp-caption-text {
|
||||
margin-bottom: 0.6em;
|
||||
padding: 10px 0 5px 40px;
|
||||
position: relative;
|
||||
}
|
||||
.wp-caption-text, .gallery-caption {
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
}
|
||||
} */
|
||||
table, tr, td {
|
||||
border: 1px solid black;
|
||||
padding: 5px;
|
||||
}
|
||||
figure {
|
||||
margin: 16px 40px;
|
||||
}
|
||||
|
@ -185,6 +182,17 @@
|
|||
.wp-block-pullquote{
|
||||
border-top: 1px solid #cbcbcb;
|
||||
border-bottom: 1px solid #cbcbcb;
|
||||
p {
|
||||
color: #298596;
|
||||
font: {
|
||||
size: 22px;
|
||||
weight: 500;
|
||||
}
|
||||
}
|
||||
cite {
|
||||
font-size: 16px;
|
||||
color: #898d8f;
|
||||
}
|
||||
}
|
||||
.wp-caption, .gallery-caption {
|
||||
font-size: 13px;
|
||||
|
|
|
@ -315,9 +315,10 @@ nav{
|
|||
}
|
||||
}
|
||||
&.page-collection{
|
||||
height: 400px !important;
|
||||
height: auto;
|
||||
padding-top: 250px;
|
||||
@media only screen and (max-width: 576px){
|
||||
height: 200px !important;
|
||||
padding-top: 89.62px;
|
||||
}
|
||||
}
|
||||
&.page-height{
|
||||
|
|
|
@ -20,7 +20,7 @@ if (post_password_required()) {
|
|||
<div id="respond" class="clearfix mt-5 <?php if(!wp_is_mobile()) { ?>margin-two-column<?php } ?>">
|
||||
<?php if(get_option('comment_registration') && !is_user_logged_in()) : ?>
|
||||
<p>
|
||||
<?php printf( __( 'You must be %slogged%s in to post a comment.', 'tainacan-theme'), "<a href='" . esc_url( home_url() ) . "/wp-login.php'>", "</a>" ); ?>
|
||||
<?php printf( __( 'You must be %1$slogged%2$s in to post a comment.', 'tainacan-theme'), "<a href='" . esc_url( home_url() ) . "/wp-login.php'>", "</a>" ); ?>
|
||||
</p>
|
||||
<?php else : ?>
|
||||
<div for="comment" class="d-flex mb-2">
|
||||
|
@ -36,7 +36,7 @@ if (post_password_required()) {
|
|||
</div>
|
||||
|
||||
<?php
|
||||
$comment_args = [
|
||||
$comment_args = array(
|
||||
'logged_in_as' => '<span class="text-oslo-gray authenticated d-inline d-sm-none mb-4">'.
|
||||
sprintf( __('Authenticated as <a href="%1$s" class="font-weight-light">%2$s</a>', 'tainacan-theme'), get_author_posts_url($current_user->ID), $current_user->display_name)
|
||||
.'</span>',
|
||||
|
@ -48,7 +48,7 @@ if (post_password_required()) {
|
|||
'cancel_reply_after' => '',
|
||||
'class_submit' => 'btn btn-info bg-jungle-green align-self-center mt-3 float-right ml-auto comment-submit-link',
|
||||
'label_submit' => __('Send', 'tainacan-theme'),
|
||||
];
|
||||
);
|
||||
comment_form($comment_args);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<span>
|
||||
<?php
|
||||
if ( true == get_theme_mod( 'display_powered', false ) ) {
|
||||
printf(__('Proudly powered by %s and %s', 'tainacan-theme'), '<a href="https://wordpress.org/">Wordpress</a>', '<a href="http://tainacan.org/">Tainacan</a>');
|
||||
printf(__('Proudly powered by %1$s and %2$s', 'tainacan-theme'), '<a href="https://wordpress.org/">Wordpress</a>', '<a href="http://tainacan.org/">Tainacan</a>');
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
|
@ -60,4 +60,5 @@
|
|||
<?php endif; ?>
|
||||
<?php wp_footer(); ?>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -64,12 +64,12 @@ if(!function_exists('tainacan_setup')) {
|
|||
add_theme_support( 'custom-logo', $logo_args );
|
||||
|
||||
if (function_exists('tainacan_register_view_mode')) {
|
||||
tainacan_register_view_mode('grid', [
|
||||
tainacan_register_view_mode('grid', array(
|
||||
'label' => 'Thumbnail',
|
||||
'description' => 'A thumbnail grid view, showing only title and thumbnail',
|
||||
'icon' => '<span class="icon"><i class="mdi mdi-apps mdi-24px"></i></span>',
|
||||
'dynamic_metadata' => false,
|
||||
]);
|
||||
));
|
||||
}
|
||||
|
||||
add_image_size( 'tainacan-theme-list-post', 300, 200, true );
|
||||
|
@ -179,12 +179,11 @@ function tainacan_hex2rgb( $color ) {
|
|||
return array( 'red' => $r, 'green' => $g, 'blue' => $b );
|
||||
}
|
||||
|
||||
add_filter( 'query_vars', function ( $public_query_vars ) {
|
||||
|
||||
function tainacan_collections_viewmode($public_query_vars){
|
||||
$public_query_vars[] = "tainacan_collections_viewmode";
|
||||
return $public_query_vars;
|
||||
|
||||
} );
|
||||
}
|
||||
add_filter( 'query_vars', 'tainacan_collections_viewmode');
|
||||
|
||||
function tainacan_active($selected, $current = true, $echo = true) {
|
||||
|
||||
|
@ -197,20 +196,20 @@ function tainacan_active($selected, $current = true, $echo = true) {
|
|||
|
||||
}
|
||||
|
||||
add_filter('get_the_archive_title', function($title) {
|
||||
function tainacan_theme_collection_title($title){
|
||||
if (is_post_type_archive('tainacan-collection')) {
|
||||
return __('Collections', 'tainacan-theme');
|
||||
}
|
||||
return $title;
|
||||
});
|
||||
|
||||
add_action('pre_get_posts', function($query) {
|
||||
}
|
||||
add_filter('get_the_archive_title', 'tainacan_theme_collection_title');
|
||||
|
||||
function tainacan_theme_collection_query($query){
|
||||
if ($query->is_main_query() && $query->is_post_type_archive('tainacan-collection')) {
|
||||
$query->set('posts_per_page', 12);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
add_action('pre_get_posts', 'tainacan_theme_collection_query');
|
||||
|
||||
require get_template_directory() . '/functions/customizer.php';
|
||||
require get_template_directory() . '/functions/pagination.php';
|
||||
|
|
|
@ -25,6 +25,7 @@ if ( ! function_exists('tainacan_Enqueues') ) {
|
|||
* Slick Slider Carousel
|
||||
*/
|
||||
//Styles
|
||||
wp_enqueue_style('RobotoFonts', 'https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i');
|
||||
wp_register_style('SlickCss', get_template_directory_uri() . '/assets/vendor/slick/css/slick.min.css', '', '1.6.1', '');
|
||||
wp_register_style('SlickThemeCss', get_template_directory_uri() . '/assets/vendor/slick/css/slick-theme.min.css', '', '1.6.1', '');
|
||||
wp_enqueue_style('SlickCss');
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
function tainacan_Comments_Callback($comment, $args, $depth) {
|
||||
//get comment to determine type
|
||||
$GLOBALS['comment'] = $comment;
|
||||
global $post;
|
||||
//var_dump($args);die;
|
||||
$class_has = "has-children media comment-". $comment->comment_ID; ?>
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i" rel="stylesheet">
|
||||
<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
|
||||
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -102,7 +102,8 @@
|
|||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if ( true == get_theme_mod( 'twitter_share', true ) ) : ?>
|
||||
<?php $via = !empty(get_option( 'twitter_user')) ? '&via=' . get_option( 'twitter_user') : ''; ?>
|
||||
<?php $twitter_option = get_option( 'twitter_user'); ?>
|
||||
<?php $via = !empty($twitter_option) ? '&via=' . get_option( 'twitter_user') : ''; ?>
|
||||
<a href="http://twitter.com/share?url=<?php the_permalink(); ?>&text=<?php the_title_attribute(); ?><?php echo $via; ?>" target="_blank" class="item-card-link--sharing">
|
||||
<img src="<?php echo get_template_directory_uri().'/assets/images/twitter-circle.png'; ?>" alt="">
|
||||
</a>
|
||||
|
@ -118,7 +119,7 @@
|
|||
</div>
|
||||
<div class="col col-md-8 s-item-collection--metadata">
|
||||
<?php
|
||||
$args = ['before_title' => '<div><h3>', 'after_title' => '</h3>', 'before_value' => '<p>', 'after_value' => '</p></div>'];
|
||||
$args = array('before_title' => '<div><h3>', 'after_title' => '</h3>', 'before_value' => '<p>', 'after_value' => '</p></div>');
|
||||
//$field = null;
|
||||
tainacan_the_metadata($args);
|
||||
?>
|
||||
|
|
|
@ -70,7 +70,8 @@
|
|||
<h2 class="t-collection--info-title text-white">
|
||||
<?php tainacan_the_collection_name(); ?>
|
||||
</h2>
|
||||
<?php if ( !empty(tainacan_get_the_collection_description()) ): ?>
|
||||
<?php $tainacan_collection_description = tainacan_get_the_collection_description(); ?>
|
||||
<?php if ( !empty($tainacan_collection_description) ): ?>
|
||||
<div class="text-white t-collection--info-description-text dotmore">
|
||||
<?php
|
||||
tainacan_the_collection_description();
|
||||
|
|
|
@ -27,7 +27,8 @@
|
|||
<h2 class="t-collection--info-title text-white">
|
||||
<?php tainacan_the_term_name(); ?>
|
||||
</h2>
|
||||
<?php if ( !empty(tainacan_get_the_term_description()) ): ?>
|
||||
<?php $tainacan_collection_description = tainacan_get_the_collection_description(); ?>
|
||||
<?php if ( !empty($tainacan_collection_description) ): ?>
|
||||
<div class="text-white t-collection--info-description-text dotmore">
|
||||
<?php
|
||||
tainacan_the_term_description();
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if ( true == get_theme_mod( 'twitter_share', true ) ) : ?>
|
||||
<?php $via = !empty(get_option( 'twitter_user')) ? '&via=' . get_option( 'twitter_user') : ''; ?>
|
||||
<?php $twitter_option = get_option( 'twitter_user'); ?>
|
||||
<?php $via = !empty($twitter_option) ? '&via=' . get_option( 'twitter_user') : ''; ?>
|
||||
<a href="http://twitter.com/share?url=<?php the_permalink(); ?>&text=<?php the_title_attribute(); ?><?php echo $via; ?>" target="_blank" class="">
|
||||
<img src="<?php echo get_template_directory_uri().'/assets/images/twitter-circle.png'; ?>" alt="">
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue