styled each agenda post with place and date

This commit is contained in:
jorge 2024-03-11 19:23:10 +01:00
parent cde97cf526
commit 0b3227f54f
7 changed files with 89 additions and 31 deletions

View File

@ -1963,11 +1963,13 @@ 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 .xarxaprod-convo-info-fields {
.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;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields li {
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields li,
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-agenda-info li {
display: grid;
grid-template-columns: 0.75fr 2.25fr;
padding: 0.2em 0;
@ -1975,7 +1977,13 @@ Add your custom styles in this file so it is easier to update the theme.
font-size: 1.5em;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields li .xarxaprod-label li {
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields li:last-of-type,
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-agenda-info li:last-of-type {
border-bottom: 0.05em solid #000;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields li .xarxaprod-label li,
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-agenda-info li .xarxaprod-label li {
display: inherit;
margin: 0;
padding: 0;
@ -1985,23 +1993,27 @@ Add your custom styles in this file so it is easier to update the theme.
font-size: inherit;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields li .xarxaprod-label li::after {
content: ",";
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields li .xarxaprod-label li:nth-child(n+2)::before,
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-agenda-info li .xarxaprod-label li:nth-child(n+2)::before {
content: ", ";
display: inline-block;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields dt {
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields dt,
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-agenda-info dt {
grid-row: 1 / 1;
font-weight: 100;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields dd {
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields dd,
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-agenda-info dd {
grid-row: 1 / 2;
margin: 0;
font-weight: 700;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields p {
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields p,
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-agenda-info p {
grid-row: 1 / 2;
margin: 0;
}
@ -2014,7 +2026,7 @@ Add your custom styles in this file so it is easier to update the theme.
display: flex;
flex-flow: column;
justify-content: flex-end;
margin-bottom: 333;
padding-bottom: 4em;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-cards .wp-block-post-title,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -100,7 +100,8 @@
}
}
.xarxaprod-convo-info-fields {
.xarxaprod-convo-info-fields,
.xarxaprod-agenda-info {
margin-bottom: 2em;
li {
display:grid;
@ -108,6 +109,9 @@
padding: 0.2em 0;
border-top: 0.05em solid $color__black;
font-size: 1.5em;
&:last-of-type{
border-bottom: 0.05em solid $color__black;
}
.xarxaprod-label li {
display: inherit;
margin: 0;
@ -116,8 +120,8 @@
border: none;
background-color: none;
font-size: inherit;
&:after {
content:",";
&:nth-child(n+2):before {
content:", ";
display:inline-block;
}
}
@ -149,7 +153,7 @@
display: flex;
flex-flow: column;
justify-content: flex-end;
margin-bottom: 333;
padding-bottom: 4em;
.wp-block-post-title {
text-transform: lowercase;
font-size: 1.5em;

View File

@ -1804,11 +1804,13 @@ textarea {
font-size: 0.8rem;
}
.xarxaprod-convo-info-fields {
.xarxaprod-convo-info-fields,
.xarxaprod-agenda-info {
margin-bottom: 2em;
}
.xarxaprod-convo-info-fields li {
.xarxaprod-convo-info-fields li,
.xarxaprod-agenda-info li {
display: grid;
grid-template-columns: 0.75fr 2.25fr;
padding: 0.2em 0;
@ -1816,7 +1818,13 @@ textarea {
font-size: 1.5em;
}
.xarxaprod-convo-info-fields li .xarxaprod-label li {
.xarxaprod-convo-info-fields li:last-of-type,
.xarxaprod-agenda-info li:last-of-type {
border-bottom: 0.05em solid #000;
}
.xarxaprod-convo-info-fields li .xarxaprod-label li,
.xarxaprod-agenda-info li .xarxaprod-label li {
display: inherit;
margin: 0;
padding: 0;
@ -1826,23 +1834,27 @@ textarea {
font-size: inherit;
}
.xarxaprod-convo-info-fields li .xarxaprod-label li::after {
content: ",";
.xarxaprod-convo-info-fields li .xarxaprod-label li:nth-child(n+2)::before,
.xarxaprod-agenda-info li .xarxaprod-label li:nth-child(n+2)::before {
content: ", ";
display: inline-block;
}
.xarxaprod-convo-info-fields dt {
.xarxaprod-convo-info-fields dt,
.xarxaprod-agenda-info dt {
grid-row: 1 / 1;
font-weight: 100;
}
.xarxaprod-convo-info-fields dd {
.xarxaprod-convo-info-fields dd,
.xarxaprod-agenda-info dd {
grid-row: 1 / 2;
margin: 0;
font-weight: 700;
}
.xarxaprod-convo-info-fields p {
.xarxaprod-convo-info-fields p,
.xarxaprod-agenda-info p {
grid-row: 1 / 2;
margin: 0;
}
@ -1862,7 +1874,7 @@ textarea {
display: flex;
flex-flow: column;
justify-content: flex-end;
margin-bottom: 333;
padding-bottom: 4em;
}
.xarxaprod-cards .wp-block-post-title,

File diff suppressed because one or more lines are too long

View File

@ -12,22 +12,52 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
//the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
the_title( '<h3 class="entry-title">', '</h3>' );
if ( 'post' === get_post_type() ) :
?>
<div class="entry-meta">
<?php
<?php if ( in_category('faq') ){
xarxaprod_display_each_faq_categories();
//xarxaprod_display_faqs_labels();
//xarxaprod_posted_on();
//xarxaprod_posted_by();
?>
//xarxaprod_display_faqs_labels();
} ;?>
<?php if ( in_category( array( 'agenda', 'agenda-es','activitats') ) ) : ?>
<aside class="xarxaprod-agenda-info">
<ul>
<li>
<dt>Data</dt>
<dd><?php the_field('xxp_agenda_date_start'); ?> </dd>
</li>
<li>
<dt>Lloc</dt>
<dd>
<?php //output xxp_agenda_who who is doing the activity
$fielditerate='xxp_agenda_who';
$fields= get_field($fielditerate);
if( $fields ):
?>
<ul class="xarxaprod-label item-<?php echo $fielditerate ?>">
<?php foreach( $fields as $field ): ?>
<li>
<?php echo $field['label']; ?>
<?php //echo '<a href="' . get_category_link( get_the_category()[0]->term_id ) . '?' . $fielditerate . '=' . $field['value'] . '">'; ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; // end list xxp_agena_who?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
</dd>
</li>
</ul>
</aside>
<?php endif; //end in_category agenda activitats ?>
<div class="entry-content">
<?php
the_content(