styled convo view with images and other convos

This commit is contained in:
Jorge vitrubio.net 2024-04-01 18:15:52 +02:00
parent 51d0ba24e2
commit da21ef92e2
10 changed files with 346 additions and 173 deletions

View File

@ -1615,6 +1615,23 @@ Add your custom styles in this file so it is easier to update the theme.
padding-bottom: 4rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .site-main > article.xarxaprod-convo {
display: grid;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .site-main > article.xarxaprod-convo > * {
max-width: 40rem;
margin: 0 auto;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .site-main > article.xarxaprod-convo > header {
grid-row-start: 2;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .site-main > article.xarxaprod-convo > footer {
max-width: unset;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .site-main > section {
padding-bottom: 4rem;
}
@ -1983,6 +2000,8 @@ Add your custom styles in this file so it is easier to update the theme.
*
* */
/* mapas leaflet associats */
/*
* categories:
*
@ -2167,6 +2186,30 @@ Add your custom styles in this file so it is easier to update the theme.
font-size: 0.8rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper article.xarxaprod-convo > .xarxaprod-convo-info-fields {
padding-top: 2rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper article.xarxaprod-convo > .entry-footer {
padding-top: 2rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper article.xarxaprod-convo > .entry-footer .xarxaprod-more-convos-header {
padding: 2rem 0;
font-size: 1.6rem;
text-align: center;
text-transform: uppercase;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper article.xarxaprod-convo > .entry-footer .last-convos {
padding: 2rem 0;
border-top: 0.05em solid #000;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper article.xarxaprod-convo > .entry-footer .last-convos > header {
display: none;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields,
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-agenda-info {
margin-bottom: 2em;
@ -2284,6 +2327,20 @@ Add your custom styles in this file so it is easier to update the theme.
font-size: 1rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-associat-contact {
font-size: 0.9rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-associat-contact h6 {
font-size: 0.9rem;
border: none;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-associat-contact li {
display: grid;
grid-template-columns: 1fr 2fr;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-associats-map,
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-espais-map {
aspect-ratio: 4 / 3;
@ -2300,20 +2357,6 @@ Add your custom styles in this file so it is easier to update the theme.
aspect-ratio: 16 / 9;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-associat-contact {
font-size: 0.9rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-associat-contact h6 {
font-size: 0.9rem;
border: none;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-associat-contact li {
display: grid;
grid-template-columns: 1fr 2fr;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-cards,
.edit-post-visual-editor__content-area .editor-styles-wrapper .category-convocatories,
.edit-post-visual-editor__content-area .editor-styles-wrapper .category-activitats,
@ -2663,7 +2706,6 @@ Add your custom styles in this file so it is easier to update the theme.
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-associat-gallery-images {
--this-aspect-ratio: 16 / 9;
display: grid;
grid-template-rows: 6fr 1fr;
grid-gap: 1rem;
overflow: hidden;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,6 @@
@media screen {
//any screen
.sticky {
display: block;
}
@ -13,7 +15,6 @@
}
.page-content,
//.entry-content,
.entry-summary {
margin: 1.5em 0 0;
}
@ -165,7 +166,27 @@
font-size: $font__size-body*0.8;
}
}
article.xarxaprod-convo {
> .xarxaprod-convo-info-fields, {
padding-top: 2rem;
}
> .entry-footer {
padding-top: 2rem;
.xarxaprod-more-convos-header {
padding: 2rem 0;
font-size: $font__size-body*1.6;
text-align: center;
text-transform: uppercase;
}
.last-convos{
padding: 2rem 0;
border-top: $border__line;
> header {
display:none;
}
}
}
}
.xarxaprod-convo-info-fields,
.xarxaprod-agenda-info {
margin-bottom: 2em;
@ -278,7 +299,20 @@
* page-templates/associats-search.php
*
* */
//mapas leaflet
.xarxaprod-associat {
}
.xarxaprod-associat-contact {
font-size: $font__size-body*0.9;
h6 {
font-size: $font__size-body*0.9;
border: none;
}
li {
display:grid;
grid-template-columns: 1fr 2fr;
}
}
/* mapas leaflet associats */
.xarxaprod-associats-map,.xarxaprod-espais-map {
aspect-ratio: 4 / 3;
background-color: rgba(200,200,200,0.4); //place holder background color
@ -293,19 +327,6 @@
aspect-ratio: 16 / 9;
}
}
.xarxaprod-associat {
}
.xarxaprod-associat-contact {
font-size: $font__size-body*0.9;
h6 {
font-size: $font__size-body*0.9;
border: none;
}
li {
display:grid;
grid-template-columns: 1fr 2fr;
}
}
/*
* categories:
*
@ -452,7 +473,6 @@
}
}
}
@media screen and (max-width: 48em) {
//only smaller than 48em
@ -548,5 +568,4 @@
.archive-posts {
grid-template-columns: repeat(3 , minmax(0,1fr));
}
}

View File

@ -41,7 +41,7 @@
.xarxaprod-associat-gallery-images { //section
--this-aspect-ratio: 16 / 9;
display: grid;
grid-template-rows: 6fr 1fr;
//grid-template-rows: 6fr 1fr; //no need to impose height, it will auto adapt
grid-gap: $grid__gap;
overflow: hidden;
.xarxaprod-associat-slides-nav{ //navigation

View File

@ -1,4 +1,6 @@
@media screen {
//any screen
html:not([data-scroll='0']) {
.site-header:before {
content: "";
@ -177,6 +179,23 @@
padding: 0;
> article {
padding-bottom: 4rem;
&.xarxaprod-convo {
display: grid;
> * {
max-width: 40rem;
margin: 0 auto;
}
> header {
grid-row-start: 2;
}
> aside, > .xarxaprod-espai-image {
}
> .entry-content {
}
> footer{
max-width: unset;
}
}
}
> section {
padding-bottom: 4rem;
@ -237,4 +256,3 @@
padding: 0;
}
}

View File

@ -1479,6 +1479,23 @@ textarea {
padding-bottom: 4rem;
}
.site-main > article.xarxaprod-convo {
display: grid;
}
.site-main > article.xarxaprod-convo > * {
max-width: 40rem;
margin: 0 auto;
}
.site-main > article.xarxaprod-convo > header {
grid-row-start: 2;
}
.site-main > article.xarxaprod-convo > footer {
max-width: unset;
}
.site-main > section {
padding-bottom: 4rem;
}
@ -1998,6 +2015,30 @@ textarea {
font-size: 0.8rem;
}
article.xarxaprod-convo > .xarxaprod-convo-info-fields {
padding-top: 2rem;
}
article.xarxaprod-convo > .entry-footer {
padding-top: 2rem;
}
article.xarxaprod-convo > .entry-footer .xarxaprod-more-convos-header {
padding: 2rem 0;
font-size: 1.6rem;
text-align: center;
text-transform: uppercase;
}
article.xarxaprod-convo > .entry-footer .last-convos {
padding: 2rem 0;
border-top: 0.05em solid #000;
}
article.xarxaprod-convo > .entry-footer .last-convos > header {
display: none;
}
.xarxaprod-convo-info-fields,
.xarxaprod-agenda-info {
margin-bottom: 2em;
@ -2124,6 +2165,21 @@ textarea {
* page-templates/associats-search.php
*
* */
.xarxaprod-associat-contact {
font-size: 0.9rem;
}
.xarxaprod-associat-contact h6 {
font-size: 0.9rem;
border: none;
}
.xarxaprod-associat-contact li {
display: grid;
grid-template-columns: 1fr 2fr;
}
/* mapas leaflet associats */
.xarxaprod-associats-map,
.xarxaprod-espais-map {
aspect-ratio: 4 / 3;
@ -2140,20 +2196,6 @@ textarea {
aspect-ratio: 16 / 9;
}
.xarxaprod-associat-contact {
font-size: 0.9rem;
}
.xarxaprod-associat-contact h6 {
font-size: 0.9rem;
border: none;
}
.xarxaprod-associat-contact li {
display: grid;
grid-template-columns: 1fr 2fr;
}
/*
* categories:
*
@ -2526,7 +2568,6 @@ textarea {
.xarxaprod-associat-gallery-images {
--this-aspect-ratio: 16 / 9;
display: grid;
grid-template-rows: 6fr 1fr;
grid-gap: 1rem;
overflow: hidden;
}

File diff suppressed because one or more lines are too long

View File

@ -100,8 +100,8 @@
</section>
</section>
<section class="xarxaprod-associat-gallery-images">
<?php if( have_rows('xxp_associat_gallery_images') ){ ?>
<section class="xarxaprod-associat-gallery-images">
<nav class="xarxaprod-associat-slides-nav">
<?php while( have_rows('xxp_associat_gallery_images') ): the_row(); ?>
<?php $image=get_sub_field('xxp_associat_image'); ?>
@ -110,7 +110,6 @@
</a>
<?php endwhile; //end while has rows ?>
</nav>
<ul class="xarxaprod-associat-slides">
<?php while( have_rows('xxp_associat_gallery_images') ): the_row(); ?>
<?php $image=get_sub_field('xxp_associat_image'); ?>
@ -122,8 +121,9 @@
</li>
<?php endwhile; //end while has rows ?>
</ul>
<?php }; //end if xxp_associat_gallery_images ?>
</section>
<?php }; //end if xxp_associat_gallery_images ?>
<section class="xarxaprod-associat-convos">
<?php get_template_part( 'template-parts/section', 'last-convos' ); ?>
</section>

View File

@ -15,6 +15,53 @@
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<aside cass="xarxaprod-espai-image">
<?php
if( get_field('xxp_convo_espai_associat') ):
// read here howto
// https://www.advancedcustomfields.com/resources/relationship/#display-list-of-posts-with-setuppostdata
$espai_associat_posts = get_field('xxp_convo_espai_associat');
if( $espai_associat_posts ):
foreach( $espai_associat_posts as $post ):
// Setup this post for WP functions (variable must be named $post).
setup_postdata($post); ?>
<?php
// search and output images
// check if has post_thumbnail
if ( has_post_thumbnail() ){
xarxaprod_post_thumbnail('full');
} else { ?>
<?php if( have_rows('xxp_associat_gallery_images') ){ ?>
<section class="xarxaprod-associat-gallery-images">
<ul class="xarxaprod-associat-slides">
<?php while( have_rows('xxp_associat_gallery_images') ): the_row(); ?>
<?php $image=get_sub_field('xxp_associat_image'); ?>
<li id="<?php echo acf_esc_html( $image['filename'] );?>" class="xarxaprod-associat-image">
<?php //print_r( $image ); //echo the whole array ?>
<?php //print_r( $image['ID'] ); // echo one fiels of the array?>
<?php echo wp_get_attachment_image( $image['ID'], 'full' ); ?>
<p class="caption"><?php //echo acf_esc_html( $image['caption'] );?></p>
</li>
<?php endwhile; //end while has rows ?>
</ul>
</section>
<?php }; //end if xxp_associat_gallery_images ?>
<?php };//end has_post_thumbnail ?>
<?php endforeach;
// Reset the global post object so that the rest of the page works correctly.
wp_reset_postdata();
endif;
endif;
?>
</aside>
<section class="xarxaprod-convo-info-fields">
<ul>
<?php if( get_field('xxp_convo_espai_associat') ):
@ -83,7 +130,7 @@
</ul>
</section>
<div class="entry-content">
<main class="entry-content">
<?php
the_content(
sprintf(
@ -106,9 +153,15 @@
)
);
?>
</div><!-- .entry-content -->
</main><!-- .entry-content -->
<section class="">
</section>
<footer class="entry-footer">
<h6 class="xarxaprod-more-convos-header big"> Altres convòcatories</h6>
<?php get_template_part( 'template-parts/section', 'last-convos' ); ?>
<?php xarxaprod_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->