added wider section title in pages style "Seccio ample"

This commit is contained in:
jorge-vitrubio 2022-07-08 16:30:53 +02:00
parent 98481bffe2
commit c162658ab3
12 changed files with 147 additions and 6877 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
table.cf7-db-table tbody td > div {
max-height: none;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,10 @@
<?php load_theme_textdomain('hangar', TEMPLATEPATH .'/languages');
<?php
/* add support for thumbnails */
//wp_set_password( 'testhangar', 1 );
load_theme_textdomain('hangar', TEMPLATEPATH .'/languages');
/* add support for thumbnails */
if ( function_exists( 'add_theme_support' ) )
add_theme_support( 'post-thumbnails' );
@ -40,7 +44,6 @@ function custom_login() {
//echo '<link rel="stylesheet" type="text/css" href="'.get_bloginfo('template_directory').'/custom-login/custom-login.css" />';
// time stamp for caching
// https://developer.wordpress.org/reference/functions/wp_enqueue_style/#comment-2056
// wp_enqueue_style( 'myCustomStyles', get_template_directory_uri() . '/css/styleHangar.css', array(), filemtime(get_template_directory() . '/css/styleHangar.css'), false);
echo '<link rel="stylesheet" type="text/css" href="'. get_template_directory_uri() .'/custom-login/custom-login.css" />';
}
@ -185,8 +188,6 @@ add_filter('tiny_mce_before_init', 'myCustomTinyMCE' );
add_filter( 'mce_css', 'tdav_css' );
// incluir o CSS no tema.
function mycustomStyles(){
// Se tiver dado ao seu ficheiros css um nome diferente do usado no exemplo, altere também aqui o nome do mesmo.
//wp_enqueue_style( 'myCustomStyles', get_bloginfo('template_url').'/css/styleHangar.css', '','','all' );
// time stamp for caching
// https://developer.wordpress.org/reference/functions/wp_enqueue_style/#comment-2056
wp_enqueue_style( 'myCustomStyles', get_template_directory_uri() . '/css/styleHangar.css', array(), filemtime(get_template_directory() . '/css/styleHangar.css'), false);

View File

@ -20,11 +20,11 @@
<?php endif; //end if is_home ?>
<div id="main" class="maingran">
<div id="content" class="narrowcolumn indexall"> <!-- esborrar class narrowcolumn -->
<div id="content" class="indexall">
<?php
global $wpdb; //seleccionem els posts pels camps creats Inici = 1 i ordenem els registres pel valor del camp Ordre (meta_key / meta_value)
$total = "
SELECT *
FROM $wpdb->posts wposts
@ -34,20 +34,20 @@
AND m1.meta_key = 'Inici'
AND m1.meta_value = '1'
AND m2.meta_key = 'Ordre_inici'
AND wposts.post_status = 'publish'
AND wposts.post_status = 'publish'
GROUP BY ID
ORDER BY CAST( m2.meta_value AS SIGNED ) ASC
ORDER BY CAST( m2.meta_value AS SIGNED ) ASC
";
$totalposts = $wpdb->get_results($total, OBJECT);
$ppp = intval(get_query_var('posts_per_page')); //sçon 11 per la resta de pàgines índex però a la home en volem 12
$ppp = intval(16);
$wp_query->found_posts = count($totalposts);
$wp_query->max_num_pages = ceil($wp_query->found_posts / $ppp);
$on_page = intval(get_query_var('paged'));
if($on_page == 0){ $on_page = 1; }
$wp_query->max_num_pages = ceil($wp_query->found_posts / $ppp);
$on_page = intval(get_query_var('paged'));
if($on_page == 0){ $on_page = 1; }
$offset = ($on_page-1) * $ppp;
$wp_query->request = "SELECT *
FROM $wpdb->posts wposts
INNER JOIN $wpdb->postmeta m1 ON wposts.ID = m1.post_id
@ -56,43 +56,43 @@
AND m1.meta_key = 'Inici'
AND m1.meta_value = '1'
AND m2.meta_key = 'Ordre_inici'
AND wposts.post_status = 'publish'
AND wposts.post_status = 'publish'
GROUP BY ID
ORDER BY CAST( m2.meta_value AS SIGNED ) ASC
ORDER BY CAST( m2.meta_value AS SIGNED ) ASC
LIMIT $ppp OFFSET $offset";
$pageposts = $wpdb->get_results($wp_query->request, OBJECT);
$pageposts = $wpdb->get_results($wp_query->request, OBJECT);
?>
<?php if ($pageposts): //amb els resultats trobats per la query distingim les categories de les pàgines pq s'han de pintar diferent
global $post;
global $post;
echo '<ul>';
foreach ($pageposts as $post):
setup_postdata($post);
$category = get_the_category();
if ($category) :
foreach ($pageposts as $post):
setup_postdata($post);
$category = get_the_category();
if ($category) :
$tipus = 'catt' ;
else:
if (is_page_child($post, 2)) :
$tipus = 'art'; //artistes
$tipus = 'art'; //artistes
elseif (is_page_child($post, 136)) :
$tipus = 'desc'; //descàrregues
$tipus = 'desc'; //descàrregues
elseif (is_page_child($post, 74)) :
$tipus = 'desc'; //equip
$tipus = 'desc'; //equip
else :
$tipus = 'pag';
endif;
endif;
include(TEMPLATEPATH . "/caixes.php");
include(TEMPLATEPATH . "/caixes.php");
endforeach; ?>
</ul>
<?php wp_pagenavi(); ?>
<?php else : ?>
<h2 class="center"><?php _e( 'Not found.', 'hangar' ); ?></h2>
<p class="center"><?php _e( "Sorry, but you are looking for something that isn't here.", 'hangar' ); ?></p>
@ -103,5 +103,5 @@
</div> <!-- content -->
</div><!-- fi main -->
<?php get_footer(); ?>

View File

@ -33,6 +33,5 @@ get_header('plain');
</div><!-- .content -->
</div><!--end Main-->
<!-- <link rel="stylesheet" type="text/css" media="all" href="http://hangar.org/webnou/wp-content/themes/hangar/style.jurado.css" /> -->
<?php get_footer(); ?>

86
seccions-wide.php Normal file
View File

@ -0,0 +1,86 @@
<?php
/**
* Template Name: Seccions ample
*
* Seccions de pàgines índex amb contingut i fills, però el contingut presentat com un índex
* @link http://themehybrid.com/themes/hybrid/page-templates/categories
*
* @package Hangar
* @subpackage Template
*/
get_header(); ?>
<!-- index pàgina pare-->
<div id="main">
<div id="content" class="indexall wide">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class("boxentry nofons"); ?>>
<div class="entry-content">
<h2 class="box index"><?php the_title(); ?></h2>
<?php if ( has_post_thumbnail() ) : // check if the post has a Post Thumbnail assigned to it.
the_post_thumbnail('thumbnail'); ?>
<p class="excerptbox"><?php echo get_the_excerpt(); ?></p>
<?php else : ?>
<div class="contentcurt"><?php echo get_the_content_with_formatting(); ?></div>
<?php endif; ?>
<?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hangar' ), 'after' => '</p>' ) ); ?>
</div><!-- .entry-content -->
</div><!-- post .hentry -->
<?php $pare = get_the_ID(); endwhile; ?>
<?php else: ?>
<p class="no-data">
<?php _e( 'Apologies, but no results were found.', 'hangar' ); ?>
</p><!-- .no-data -->
<?php endif; ?>
</div>
<div id="content" class="indexall fills">
<!--ara els fills-->
<?php
$indexseccions = new WP_Query();
$indexseccions->query('posts_per_page=-1&post_type=page&orderby=menu_order&order=asc&post_parent=' . $pare );
?>
<?php if ($indexseccions->have_posts()) : ?>
<?php echo '<ul>'; $i = 0; while ($indexseccions->have_posts()) : $indexseccions->the_post(); $i++;
if ($pare == 2) : //artistes residents post=2
$tipus = 'art';
elseif ($pare == 46565) : //artistes residents estada curta post=46565
$tipus = 'art';
elseif ($pare == 46572) : //artistes amb beca post=46572
$tipus = 'art';
elseif ($pare == 136) : //desc+arregues post=136
$tipus = 'desc';
elseif ($pare == 74) : //equip post=74
$tipus = 'equip';
elseif ($pare == 40378) : //patronat post=40378
$tipus = 'equip';
else:
$tipus = 'pag';
endif;
?>
<?php include(TEMPLATEPATH . "/caixes.php"); ?>
<?php endwhile; wp_reset_query(); ?>
</ul>
<?php else: ?>
<p class="no-data">
<?php _e( 'Apologies, but no results were found.', 'hangar' ); ?>
</p><!-- .no-data -->
<?php endif; ?>
</div><!-- .content -->
</div>
<!--end Main-->
<?php get_footer(); ?>

View File

@ -13,7 +13,7 @@ get_header(); ?>
<!-- index pàgina pare-->
<div id="main">
<div id="content" class="indexall tocada">
<div id="content" class="indexall">
<!-- la primera caixa és la de títol i descripció de la pàgina pare i hi haurà resum del contingut de la pàgina -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

120
style.css
View File

@ -71,15 +71,6 @@ body {
margin: 0 0 0 20px;
}
/*.single #wrap, .page #wrap {width: 990px;}*/
/*.page-template-seccions-php #wrap {
max-width: 1247px!important;
width:auto;
margin: 0 auto;
padding: 0px 5px 0px 15px;
}*/
.shadow {
-moz-box-shadow: 3px 3px 4px #91939a;
@ -94,20 +85,22 @@ body {
margin-right:16px;
/*position: fixed;*/
}
/*#main {
float:left;
margin: 3px 0 20px 0;
}*/
@media screen and (max-width:768px) {
#main {
margin-left: unset;
}
}
@media screen and (min-width:768px) {
#main {
margin-left: 250px;
}
}
/*#main.mainunic {width:65%;}
#main.mainmig {width:auto;}
#main.maingran {width:80%;}*/
#wrap.amplegrann, #wrap_topheader.amplegrann {max-width:1257px}
/*#wrap.amplemigg, #wrap_topheader.amplemigg {max-width:990px}*/
#wrap.ampleunicc, #wrap_topheader.ampleunicc {max-width:750px, margin-left:16px}
/*.single #main , .page #main {float:left; }*/
.page-template-seccions-php #main, .category #main {
width:auto;
@ -126,8 +119,6 @@ body {
}
.single #sidebar-secondary { width:232px; margin-right:0;}
/*.page #sidebar-secondary { width:212px; margin-right:0;}
*/
#footer {
@ -200,21 +191,23 @@ li.news a:hover{background: transparent url('images/newshover.png') no-repeat 0
/* contingut */
/*#content {
margin-bottom: 20px; float:left;}*/
#content .indexall{
/*#content .indexall{
width:88%;
margin:0px 0px 20px 0px;
padding:0px 0px 0px 2%;
float:left;
font-size: 12px;
}*/
.indexall.wide {
width: calc(100vw - 350px);
overflow: hidden;
}
#content.unic, #content.mix, #content.resultats {width:480px;
#content.unic, #content.mix, #content.resultats {
width:480px;
z-index:4;
float:left;
/* min-width: 780px;*/
}
@ -229,8 +222,6 @@ margin-bottom: 20px; float:left;}*/
/*strong {color: #333333;}
.pag strong {color: #ffffff;}*/
.pag a {color: #28b5d8;}
/* Headings
@ -300,17 +291,6 @@ ul.sidebar a, p.meta a, p.logged-in-as a, a.post-edit-link, #footer a {
}
.comment-meta a {color:#333333;}
/* s'ha de posar un hack per ie6 i 7 veure possible solució amb js http://wordpress.org/support/topic/pdf-icon-with-pdf-upload */
/* .desc p a[href$=".PDF"], a[href$=".pdf"], #pagina p a[href$=".PDF"], a[href$=".pdf"] {
display: inline-block;
padding:0 0 0 25px;
background: url("images/pdficon2.png") left top no-repeat;
text-align:center;
float:left;
margin-left:0;
height:17px;
overflow:hidden;
} */
a[href$=".PDF"]::before,
a[href$=".pdf"]::before {
@ -360,7 +340,6 @@ ul.segona {margin-top:15x;}
ul.sidebar li.widget-container, ul.sidebar li.pagenav, ul.sidebar li.categories {
margin:0px 0px 1px 0px;
padding:0px 0px 1px 0px;
/* border-bottom:1px dotted #333333;*/
overflow:hidden;
line-height:18px;
}
@ -415,9 +394,6 @@ ul.menu ul.sub-menu li a {color: #0000ff!important;
ul.menu ul.sub-menu li a:hover {text-decoration: underline;}
/*ul#menu-segonn li ul.sub-menu li a {font-size: 10px; color: #333333!important;}
ul#menu-segonn li ul.sub-menu li ul li a {font-size: 14px; color: #0000ff!important;}*/
@ -469,19 +445,7 @@ font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', FreeSans, sa
/* Sidebar Secondary
--------------------------------------------- */
/*#sidebar-secondary img {
max-width: 100%;
display: block;
margin:0px;
padding: 0;
}
#sidebar-secondary img.banner {
max-width: 100%;
display: block;
margin:0px 0px 10px 0px;
padding: 0;
}
*/
/* Sidebar Widgets (can be used for both Sidebars)
--------------------------------------------- */
ul.sidebar li.widget_archive ul li, ul.sidebar li.widget_pages ul li.page_item, ul.sidebar li.widget_categories ul li.cat-item, ul.sidebar li.widget_links ul.blogroll li, ul.sidebar li.widget_nav_menu ul#menu-navigation li.menu-item, ul.sidebar li.widget_meta ul li {
@ -676,6 +640,8 @@ ul.sidebar li.widget_sociallinks a.delicious {
border-right:1px solid #333333;
}
#content img {
background-color: #efefef; /*remove*/
max-width: 100%;
width: auto;
height: auto;
@ -783,20 +749,6 @@ p.peullarg {padding-bottom:20px;}
.home #content.indexall p.box, {clear:both; overflow:hidden;}
/*.home #content.indexall a.peubox img, #sidebar-secondary .boxentry a.peubox img {position:relative; bottom: 0;}
.home #content.indexall .boxentry p.excerptbox {height: 55px; margin-bottom: 25px; padding-bottom:0px; overflow:hidden;}
.home #content.indexall .boxentry p.contentbox {height:120px;margin-bottom: 15px; overflow:hidden;}
.home .boxentry .contentbox {height: 323px;margin-bottom: 20px; overflow:hidden; display:inline-block;}
.home .boxentry .contentbox p{height: 350px;margin-bottom: 15px; overflow:hidden; display:inline;}
.home .boxentry{line-height:15px; height:430px; margin-bottom:16px; margin-right: 16px;}
.home .entry-content {display:inline-block; height: 340px;}
.home #content.indexall .boxentry .contentllarg {height: 226px; margin-bottom:24px; overflow: hidden;}*/
/*.contentcurt { height: 237px;
margin-bottom: 38px; /*ull abanas 23 , veure com afecta */
/* overflow: hidden; }*/
img.topspimg {margin-top: 28px!important;}
.topstext {margin-bottom:41px!important; margin-top:25px!important;}
@ -820,9 +772,13 @@ img.topspimg {margin-top: 28px!important;}
box-shadow: 3px 3px 4px #91939a;
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=145, Color='#91939a');}
.indexall.wide .boxentry {
width: calc(100% - 85px);
}
.ie {
/*filter: progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=145, Color='#91939a');*/
}
.hentry
@ -876,16 +832,9 @@ span.cat a{text-transform: uppercase; letter-spacing:normal}
.alfa {line-height:19px!important;}
/*.pag{background-color: #363636!important; color:#FFFFFF!important;}
.pag h2 a{color:#FFFFFF!important;}
.pag h2 a {text-transform:uppercase; display:inline;font-weight:normal;}
.pag h2 a:after {content: " ─ ";}*/
.boxentry span.cat a:after {content: " ─ ";}
/*.desc span.cat a:after {content: " ";}
*/
.contentbox {display:block; height:331px; margin-bottom:15px:}
#content h3.equip {height:16px!important;}
@ -937,24 +886,7 @@ div.really_simple_share {width:220px; margin: 20px auto 5px auto; height:22px!im
div.really_simple_share iframe {height:22px!important;}
/*#content.indexall .boxentry {line-height:15px; height:398px; margin-bottom:16px;}
#content.mix .boxentry{height:348px;}
#content.tocada .boxentry {height:398px;}
#content.indexall .boxentry p, #content.mix .boxentry p, #sidebar-secondary .boxentry p{font-size:12px; line-height:14px;}
#content.indexall .boxentry h2.index, #content.mix .boxentry h2.index, #sidebar-secondary .boxentry h2.index {font-size:27px; float:none;text-transform: uppercase; margin-bottom:5px;padding-bottom: 5px; padding-top:0; margin-top:0; color:#333333; line-height:28px;}
#content.indexall .boxentry div.descseccio p, #content.mix .boxentry div.descseccio p, #sidebar-secondary .boxentry div.descseccio p{font-size:13px; line-height:14px}
#content.indexall .boxentry img, #content.mix .boxentry img, #sidebar-secondary .boxentry img {margin-bottom:20px;}
#content.indexall .boxentry .head-entry, #content.mix .boxentry .head-entry, #sidebar-secondary .boxentry .head-entry { height: 75px; display:inline-block; overflow: hidden;}
#content.indexall .boxentry h3, #content.mix .boxentry h3, #sidebar-secondary .boxentry h3{font-size:14px;line-height: 18px; padding: 0; color: #0000FF; display:inline-block; font-weight: normal;}
/*#content.indexall .boxentry h3, #content.mix .boxentry h3, #sidebar-secondary .boxentry h3{font-size:14px;line-height: 15px; padding: 0; color: #0000FF; height: 55px; display:inline-block; }*/ /*
#content.indexall p.box,#content.mix p.box, #sidebar-secondary .boxentry p.box {clear:both; overflow:hidden;}
#content.indexall.tocada .boxentry h3 a{text-transform:uppercase;}
#content.indexall a.peubox img, #content.mix .boxentry a.peubox img,#sidebar-secondary .boxentry a.peubox img {position:relative; bottom: 0;}
#content.indexall .boxentry p.excerptbox, #content.mix .boxentry p.excerptbox, #sidebar-secondary .boxentry p.excerptbox {height: 70px; margin-bottom: 20px; overflow:hidden; padding-bottom:15px;}*/
a.peutots {margin-bottom:15px;}
.nofons {background-color:transparent!important;}
.nopadding {padding-bottom:0px!important;}