Resolvendo conflito

This commit is contained in:
Alvino Rodrigues 2018-11-27 14:57:23 -02:00
commit e7e3667ee6
19 changed files with 121 additions and 58 deletions

View File

@ -5,3 +5,15 @@ Default Tainacan Theme, to be used with tainacan plugin
# Instalação no WordPress
- Copiar o arquivo `build-config-sample.cfg` para `build-config.cfg`
- Ajustar o `PATH` da variável `destination` para o caminho desejado correspondente
- Instalar o SASS
- sudo apt install ruby-full rubygems autogen autoconf libtool make
- sudo gem install sass
- Instalar o Composer
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
- HASH="$(wget -q -O - https://composer.github.io/installer.sig)"
- php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
- sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
- Execute o build
- ./build.sh
#Teste Commit

View File

@ -1,5 +1,7 @@
#!/bin/bash
#Teste commit
# Executa o comando 'sass' para verificar se existe (veja http://stackoverflow.com/a/677212/329911)
command -v sass >/dev/null 2>&1 || {
echo >&2 "REQUIRE: SASS installed to compile the SCSS archives to CSS.";

View File

@ -2,9 +2,9 @@
php -r '
echo "\n ..::Tainacan Theme::..\n";
echo "\nStarting installation with composer ... please wait!!\n";
echo "\nInitiating the installation with composer ... please wait!!\n";
echo "\nStarting Copying Files...\n\n";
echo "\nInitiating the copying of files...\n\n";
echo "\nCopy Frameword CSS - Bootstrap ...\n\n";

View File

@ -1,8 +1,15 @@
(function($) {
$.fn.tainacan_interface_truncate = function (settings) {
if(window.innerWidth <= 576) {
count = 150;
}else if(window.innerWidth <= 360) {
count = 87;
} else {
count = 350;
}
var config = {
showChars: 350,
minChars: 100,
showChars: count,
minChars: count,
ellipsesText: "...",
moreText: tainacan_trucanteVars.moreText,
lessText: tainacan_trucanteVars.lessText
@ -15,8 +22,8 @@
var minimized_elements = $( this );
minimized_elements.each(function(){
var t = $( this ).text();
if (t.length < config.minChars) { return };
var t = minimized_elements.html();
if (t.length <= config.minChars) { return };
$( this ).html(
t.slice( 0,config.showChars ) + '<span>' + config.ellipsesText + ' </span><a href="#" class="tainacan-interface-more">[ ' + config.moreText + ' ]</a>' + '<span style="display:none;">' + t.slice( config.showChars,t.length ) + ' <a href="#" class="tainacan-interface-less">[ ' + config.lessText + ' ]</a></span>'

View File

@ -98,7 +98,7 @@
margin-top: 0.5rem;
}
&.tainacan-interface-truncate {
height: 65px;
min-height: 65px;
margin-bottom: 2rem;
.tainacan-interface-more, .tainacan-interface-less {
color: rgba(255, 255, 255, 0.60);

View File

@ -336,13 +336,14 @@
}
}
.tainacan-embed-container{
@media only screen and (min-width: 768px){
iframe {
position: absolute;
position: relative;
top: 0;
left: 0;
width: 100%;
height: 100%;
@media only screen and (min-width: 768px){
width: 70vw;
height: 70vh;
}
}
}
@ -417,11 +418,14 @@
}
.s-item-collection--metadata{
div {
/* -webkit-column-break-inside: avoid;
-moz-column-break-inside:avoid;
-moz-page-break-inside:avoid;
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid-column; */
break-inside: avoid;
&:last-child {
-webkit-column-break-inside: auto;
page-break-inside: auto;
break-inside: auto;
}
}
@media only screen and (min-width: 768px){
-moz-column-count: 2;

View File

@ -11,6 +11,9 @@ if ( ! function_exists( 'tainacan_setup' ) ) {
* Observe que esta função está conectada ao gancho after_setup_theme, que é executado antes do gancho de init.
*/
function tainacan_setup() {
load_theme_textdomain( 'tainacan-interface', get_template_directory() . '/languages' );
/**
* Display in gutenberg plugin the full width for image
*/
@ -24,10 +27,10 @@ if ( ! function_exists( 'tainacan_setup' ) ) {
*/
$header_args = array(
//'default-text-color' => '000',
'width' => 1280,
'width' => 2000,
'height' => 280,
'header-text' => false,
'flex-width' => false,
'flex-width' => true,
'flex-height' => true,
);
add_theme_support( 'custom-header', $header_args );

View File

@ -706,6 +706,24 @@ function tainacan_get_color_scheme_css( $colors ) {
color: {$colors['tainacan_link_color']} !important;
}
.slide-control-arrow .icon .mdi::before {
color: {$colors['tainacan_link_color']};
}
#tainacan-slide-container .tainacan-slide-item.active-item img {
border-bottom: 4px solid {$colors['tainacan_link_color']};
}
.metadata-menu .metadata-menu-header hr {
background-color: {$colors['backtransparent']};
}
.slide-title-area .play-button .icon {
border: 3px solid {$colors['tainacan_link_color']};
}
#return-to-top {
background-color: {$colors['tainacan_link_color']};
}
{$filter}
CSS;

View File

@ -47,8 +47,8 @@ if ( ! function_exists( 'tainacan_enqueues' ) ) {
*/
wp_enqueue_script( 'tainacan_tainacanTruncate', get_template_directory_uri() . '/assets/js/tainacan-interface-truncate.js', array( 'jquery' ), '1.0', false );
wp_localize_script( 'tainacan_tainacanTruncate', 'tainacan_trucanteVars', array(
'moreText' => __( 'More', 'tainacan-interface' ),
'lessText' => __( 'Less', 'tainacan-interface' ),
'moreText' => __( 'Show more', 'tainacan-interface' ),
'lessText' => __( 'Show less', 'tainacan-interface' ),
));
wp_register_style( 'tainacan_tainacanStyle', get_stylesheet_uri(), array( 'tainacan_bootstrap4CSS' ) );

View File

@ -99,15 +99,19 @@ function tainacan_social_meta() {
if ( is_single() || is_tax() || is_archive() ) {
$logo = get_template_directory_uri() . '/assets/images/social-logo.png';
$excerpt = get_bloginfo( 'description' );
$url_src = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
global $wp;
if ( is_post_type_archive( 'tainacan-collection' ) ) {
// TODO: this is wrong, we should check if it a archive of collection items, not archive of collections
if ( is_post_type_archive() ) {
$collection_id = tainacan_get_collection_id();
if ($collection_id) {
$title = tainacan_get_the_collection_name();
$img_info = ( has_post_thumbnail( tainacan_get_collection_id() ) ) ? wp_get_attachment_image_src( get_post_thumbnail_id( tainacan_get_collection_id() ), 'full' ) : $logo;
$url_src = home_url( $wp->request );
$excerpt = tainacan_get_the_collection_description();
} else {
}
} elseif ( is_singular() ) {
global $post;
if ( !is_object($post) ) { return; }
@ -119,9 +123,38 @@ function tainacan_social_meta() {
if ( $content ) {
$excerpt = strip_tags( $content );
$excerpt = str_replace( '', "'", $excerpt );
} else {
$excerpt = get_bloginfo( 'description' );
}
} elseif ( is_tax() ) {
$term = get_queried_object();
$tainacan_term = tainacan_get_term();
$title = $term->name;
$excerpt = $term->description;
$url_src = get_term_link($term->term_id, $term->taxonomy);
if ($tainacan_term) {
$_term = new \Tainacan\Entities\Term( $tainacan_term );
$img_id = $_term->get_header_image_id();
if ($img_id) {
$img_info = wp_get_attachment_image_src( $img_id, 'full' );
}
}
} else {
if ( is_day() ) :
$title = sprintf( __( 'Daily Archives: %s', 'tainacan-interface' ), get_the_date() );
elseif ( is_month() ) :
$title = sprintf( __( 'Monthly Archives: %s', 'tainacan-interface' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'tainacan-interface' ) ) );
elseif ( is_year() ) :
$title = sprintf( __( 'Yearly Archives: %s', 'tainacan-interface' ), get_the_date( _x( 'Y', 'yearly archives date format', 'tainacan-interface' ) ) );
elseif ( is_author() ) :
$title = get_the_author();
else :
$title = get_the_archive_title();
endif;
}
$image = array(

BIN
src/languages/pt_BR.mo Normal file

Binary file not shown.

View File

@ -21,7 +21,7 @@ msgstr ""
"_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,"
"_nc:4c,1,2\n"
"X-Poedit-Basepath: ..\n"
"X-Generator: Poedit 2.0.3\n"
"X-Generator: Poedit 1.8.7.1\n"
"X-Poedit-SearchPath-0: .\n"
#: 404.php:9
@ -135,10 +135,8 @@ msgid "Collection Background Color"
msgstr "Cor de fundo da coleção"
#: functions/collection-color.php:48
#, fuzzy
#| msgid "Collection Text Color"
msgid "Collection header fill color"
msgstr "Cor de texto da coleção"
msgstr "Cor de preenchimento do cabeçalho da coleção"
#: functions/collection-color.php:53
msgid "Suggested colors"
@ -185,8 +183,6 @@ msgid "Upload a logo to the footer"
msgstr "Suba uma imagem de logo para o rodapé"
#: functions/customizer.php:86
#, fuzzy
#| msgid "Display \"Proudly Powered by\""
msgid "Display \"Proudly Powered by...\""
msgstr "Exibir \"Orgulhosamente feito com...\""

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 463 KiB

View File

@ -27,6 +27,7 @@
}
} ?>
</h2>
<?php do_action( 'tainacan-interface-banner-header-description' ); ?>
</div>
</div>
</div>

View File

@ -1,11 +1,5 @@
<?php
echo '<style>
.t-bg-collection .t-collection--info .t-collection--info-description-text.dotmore .toggle::before {
content: "[ ' . __( 'Show more', 'tainacan-interface' ) . ' ]";
}
.t-bg-collection .t-collection--info .t-collection--info-description-text.dotmore.full-story .toggle::before {
content: "[ ' . __( 'Show less', 'tainacan-interface' ) . ' ]";
}
nav.menu-belowheader #menubelowHeader ul.dropdown-menu {
min-width: 10rem !important;
}';
@ -95,11 +89,8 @@ echo '</style>';
<?php $tainacan_collection_description = tainacan_get_the_collection_description(); ?>
<?php if ( ! empty( $tainacan_collection_description ) || has_action( 'tainacan-interface-collection-description' ) ) : ?>
<div class="text-white t-collection--info-description-text tainacan-interface-truncate">
<?php
tainacan_the_collection_description();
?>
<?php tainacan_the_collection_description(); ?>
<?php do_action( 'tainacan-interface-collection-description' ); ?>
<a class="toggle" href="#"></a>
</div>
<?php endif; ?>
</div>

View File

@ -1,10 +1,4 @@
<?php echo '<style>
.t-bg-collection .t-collection--info .t-collection--info-description-text.dotmore .toggle::before {
content: "[ ' . __( 'Show more', 'tainacan-interface' ) . ' ]";
}
.t-bg-collection .t-collection--info .t-collection--info-description-text.dotmore.full-story .toggle::before {
content: "[ ' . __( 'Show less', 'tainacan-interface' ) . ' ]";
}
nav.menu-belowheader #menubelowHeader ul.dropdown-menu {
min-width: 10rem !important;
}
@ -31,7 +25,7 @@ $taxonomy = get_taxonomy( $term->taxonomy );
</h2>
<?php $tainacan_term_description = tainacan_get_the_term_description(); ?>
<?php if ( ! empty( $tainacan_term_description ) || has_action( 'tainacan-interface-taxonoy-description' ) ) : ?>
<div class="text-white t-collection--info-description-text dotmore">
<div class="text-white t-collection--info-description-text tainacan-interface-truncate">
<?php
echo $tainacan_term_description;
?>

View File

@ -13,10 +13,12 @@
<div class="mt-3 tainacan-single-post">
<?php get_template_part( 'template-parts/single-post' ); ?>
</div>
<?php if ( ! is_singular( 'page' ) ) : ?>
<div class="row justify-content-between">
<span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">&larr;</span> Previous', 'tainacan-interface' ) ); ?></span>
<span class="nav-next"><?php next_post_link( '%link', __( 'Next <span class="meta-nav">&rarr;</span>', 'tainacan-interface' ) ); ?></span>
</div>
<?php endif; ?>
<?php endwhile; ?>
<?php else : ?>
<?php _e( 'Nothing found', 'tainacan-interface' ); ?>