added old funds to fund search view, styled

This commit is contained in:
Jorge vitrubio.net 2024-04-19 22:28:30 +02:00
parent 1eb53cc5a4
commit 95f13e85b0
9 changed files with 3722 additions and 38 deletions

3573
adminstyles.css Normal file

File diff suppressed because it is too large Load Diff

50
adminstyles.css.map Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -45,7 +45,7 @@ get_header();
</aside>
<content class="archive-posts archive-xarxaprod-fund archive-xarxapdor-ajut <?php //xarxaprod_class_posttype(); ?>">
<content class="archive-posts archive-xarxaprod-fund archive-xarxaprod-ajut <?php //xarxaprod_class_posttype(); ?>">
<?php
// https://support.advancedcustomfields.com/forums/topic/wp_query-using-meta_query-for-an-acf-checkbox-field/#post-145830
// https://www.advancedcustomfields.com/resources/checkbox/#query-posts
@ -79,8 +79,44 @@ get_header();
<?php wp_reset_postdata(); ?>
<?php endif; //end query ajut ?>
</content>
</section>
<section id="teminis-passats" class="terminis-tancats">
<content class="archive-posts archive-posts-old archive-xarxaprod-fund archive-xarxaprod-ajut <?php //xarxaprod_class_posttype(); ?>">
<h2>Terminis tancats</h2>
<?php
// https://support.advancedcustomfields.com/forums/topic/wp_query-using-meta_query-for-an-acf-checkbox-field/#post-145830
// https://www.advancedcustomfields.com/resources/checkbox/#query-posts
// https://barn2.com/blog/querying-posts-by-custom-field-acfi/
$the_query_ajut_old = new WP_Query(
array(
'post_type' => 'xarxaprod-ajut',
'posts_per_page' => '-1',
'meta_key' => 'xxp_fund_apply_end', // order by meta key convo apply end
'meta_query' => array(
array( //filter results show only older than today
'key' => 'xxp_fund_apply_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '<', //show events from today and later
'type' => 'DATE',
)
),
//https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
'orderby' => 'meta_value', //order by meta value
'order' => 'DESC', //order ascendent
)
);
?>
<?php if ( $the_query_ajut_old->have_posts() ) : ?>
<?php while ( $the_query_ajut_old->have_posts() ) : $the_query_ajut_old->the_post(); ?>
<?php get_template_part( 'template-parts/section', 'eachfund' ); ?>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
<?php endif; //end query ajut ?>
</content>
</section>
</main><!-- #main -->

View File

@ -145,6 +145,7 @@
display: grid;
margin-bottom: 2rem;
.xarxaprod-fund-info-field {
margin: 0;
padding: 1rem 0;
border-bottom: $border__line;
}
@ -160,20 +161,13 @@
p {
margin: 0;
}
.xarxaprod-fund-original-title {
font-weight: bold;
}
li {
font-size: $font__size-body*1.3;
}
}
.xarxaprod-fund-info-contact-fields {
.xarxaprod-fund-info-field {
margin: 0;
}
}
.xarxaprod-fund-info-fields {
.xarxaprod-fund-info-field {
margin: 0;
}
}
.xarxaprod-funder-name,
.xarxaprod-fund-contact-name,
.xarxaprod-fund-web {

View File

@ -134,6 +134,11 @@
grid-template-columns: repeat(1 , 1fr);
gap: $grid__gap * 1.5;
}
.archive-posts-old {
margin-top: 2rem;
padding-top: 1rem;
border-top: $border__line;
}
}
@media screen and (max-width: 48em) {
//only smaller than 48em
@ -275,6 +280,13 @@
&.archive-posts-map,&.archive-xarxaprod-members,&archive-xarxaprod-associats {
grid-template-columns: 1fr;
}
&.archive-posts-old {
grid-template-columns: repeat(3 , 1fr);
margin-top: 2rem;
h2 {
grid-column: 1 / -1;
}
}
}
.xarxaprod-faqs-aside {
display: flex;

View File

@ -1717,6 +1717,12 @@ textarea {
grid-template-columns: repeat(1, 1fr);
gap: 1.5rem;
}
.archive-posts-old {
margin-top: 2rem;
padding-top: 1rem;
border-top: 0.05rem solid #000;
}
}
@media screen and (max-width: 48em) {
@ -1870,6 +1876,15 @@ textarea {
grid-template-columns: 1fr;
}
.archive-posts.archive-posts-old {
grid-template-columns: repeat(3, 1fr);
margin-top: 2rem;
}
.archive-posts.archive-posts-old h2 {
grid-column: 1 / -1;
}
.xarxaprod-faqs-aside {
display: flex;
flex-direction: row;
@ -2351,6 +2366,7 @@ textarea {
.xarxaprod-fund-info-fields .xarxaprod-fund-info-field,
.xarxaprod-fund-info-contact-fields .xarxaprod-fund-info-field {
margin: 0;
padding: 1rem 0;
border-bottom: 0.05rem solid #000;
}
@ -2372,19 +2388,16 @@ textarea {
margin: 0;
}
.xarxaprod-fund-info-fields .xarxaprod-fund-original-title,
.xarxaprod-fund-info-contact-fields .xarxaprod-fund-original-title {
font-weight: 700;
}
.xarxaprod-fund-info-fields li,
.xarxaprod-fund-info-contact-fields li {
font-size: 1.3rem;
}
.xarxaprod-fund-info-contact-fields .xarxaprod-fund-info-field {
margin: 0;
}
.xarxaprod-fund-info-fields .xarxaprod-fund-info-field {
margin: 0;
}
.xarxaprod-funder-name,
.xarxaprod-fund-contact-name,
.xarxaprod-fund-web {

File diff suppressed because one or more lines are too long

View File

@ -21,6 +21,12 @@
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_call') ); ?>
</div>
<?php if( get_field('xxp_fund_original_title') ): ?>
<div class="xarxaprod-fund-info-field">
<p class="xarxaprod-fund-original-title"><?php the_field('xxp_fund_original_title'); ?></p>
</div>
<?php endif; ?>
<?php if( get_field('xxp_funder_name') ): ?>
<div class="xarxaprod-fund-info-field">
<p class="xarxaprod-funder-name"><?php the_field('xxp_funder_name'); ?></p>
@ -77,21 +83,6 @@
<section class="xarxaprod-fund-info-fields">
<div class="xarxaprod-fund-info-field">
<h6>Dirigit a</h6>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_target') ); ?>
</div>
<div class="xarxaprod-fund-info-field">
<h6>Tipus d'ajuda</h6>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_source') ); ?>
</div>
<div class="xarxaprod-fund-info-field">
<h6>Sectors</h6>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_field') ); ?>
</div>
<div class="xarxaprod-fund-info-field">
<h6>Termini</h6>
<?php if( get_field('xxp_fund_apply_begin') || get_field('xxp_fund_apply_end') ): ?>
@ -109,10 +100,25 @@
<?php if( get_field('xxp_fund_web') ): ?>
<div class="xarxaprod-fund-info-field">
<h6>+ Informació</h6>
<p><a href="<?php echo get_field('xxp_fund_web'); ?>" class="button button-more button-letsgo">ves-hi</a></p>
<p><a href="<?php echo get_field('xxp_fund_web'); ?>" class="button button-more button-letsgo">convocatória</a></p>
</div>
<?php endif; ?>
<div class="xarxaprod-fund-info-field">
<h6>Dirigit a</h6>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_target') ); ?>
</div>
<div class="xarxaprod-fund-info-field">
<h6>Tipus d'ajuda</h6>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_source') ); ?>
</div>
<div class="xarxaprod-fund-info-field">
<h6>Sectors</h6>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_field') ); ?>
</div>
<div class="xarxaprod-fund-info-field">
<h6>Necessites assesorament?</h6>
<p><a href="<?php echo esc_url( home_url( '/consultoria/' ) ); ?>" class="button button-more button-ourservices">Oferim serveis de consultoria</a></p>