Compare commits

...

5 Commits

Author SHA1 Message Date
jorge 16b6d1a1e0 bumped styles version 2024-04-19 22:39:49 +02:00
jorge b6fd88179c order FAQS by date publish, newer first 2024-04-19 22:38:08 +02:00
jorge b2d7bae117 removed unnicessary styles 2024-04-19 22:30:54 +02:00
jorge 95f13e85b0 added old funds to fund search view, styled 2024-04-19 22:28:30 +02:00
jorge 1eb53cc5a4 edited admin styles 2024-04-19 21:27:33 +02:00
10 changed files with 106 additions and 92 deletions

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> </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 <?php
// https://support.advancedcustomfields.com/forums/topic/wp_query-using-meta_query-for-an-acf-checkbox-field/#post-145830 // 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://www.advancedcustomfields.com/resources/checkbox/#query-posts
@ -79,7 +79,43 @@ get_header();
<?php wp_reset_postdata(); ?> <?php wp_reset_postdata(); ?>
<?php endif; //end query ajut ?> <?php endif; //end query ajut ?>
</content> </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> </section>
</main><!-- #main --> </main><!-- #main -->

View File

@ -54,7 +54,9 @@ get_header();
array( array(
'post_type' => 'post', 'post_type' => 'post',
'category_name' => 'faq', 'category_name' => 'faq',
'post_per_page' => '8' 'post_per_page' => '-1',
'orderby' => 'date',
'order' => 'DESC',
) ); ) );
?> ?>
<?php if ( $the_query_faq->have_posts() ) : ?> <?php if ( $the_query_faq->have_posts() ) : ?>

View File

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

View File

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

View File

@ -5,8 +5,8 @@ Theme URI: https://git.hangar.org/xarxaprod/
Author: Hangar Tech Lab Author: Hangar Tech Lab
Author URI: https://hangar.org Author URI: https://hangar.org
Description: theme for the <a href="https://xarxaprod.cat">XarxaProd</a>. Inclou la possibilitat de publicar, catalogar i cercar ajuts, resoldre dubtes amb FAQs i altres. Design by Eudald Van der Pla <a href="https://vanderpla.com">vanderpla.com</a>. Coding template and theme by <a href="https://vitrubio.net">Jorge - vitrubio.net</a> Description: theme for the <a href="https://xarxaprod.cat">XarxaProd</a>. Inclou la possibilitat de publicar, catalogar i cercar ajuts, resoldre dubtes amb FAQs i altres. Design by Eudald Van der Pla <a href="https://vanderpla.com">vanderpla.com</a>. Coding template and theme by <a href="https://vitrubio.net">Jorge - vitrubio.net</a>
Version: 1.7.2 Version: 1.7.5
Tested up to: 6.5 Tested up to: 6.5.2
Requires PHP: 7.4 Requires PHP: 7.4
License: GNU General Public License v3 or later License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html License URI: https://www.gnu.org/licenses/gpl-3.0.html

View File

@ -5,8 +5,8 @@ Theme URI: https://git.hangar.org/xarxaprod/
Author: Hangar Tech Lab Author: Hangar Tech Lab
Author URI: https://hangar.org Author URI: https://hangar.org
Description: theme for the <a href="https://xarxaprod.cat">XarxaProd</a>. Inclou la possibilitat de publicar, catalogar i cercar ajuts, resoldre dubtes amb FAQs i altres. Design by Eudald Van der Pla <a href="https://vanderpla.com">vanderpla.com</a>. Coding template and theme by <a href="https://vitrubio.net">Jorge - vitrubio.net</a> Description: theme for the <a href="https://xarxaprod.cat">XarxaProd</a>. Inclou la possibilitat de publicar, catalogar i cercar ajuts, resoldre dubtes amb FAQs i altres. Design by Eudald Van der Pla <a href="https://vanderpla.com">vanderpla.com</a>. Coding template and theme by <a href="https://vitrubio.net">Jorge - vitrubio.net</a>
Version: 1.7.2 Version: 1.7.5
Tested up to: 6.5 Tested up to: 6.5.2
Requires PHP: 7.4 Requires PHP: 7.4
License: GNU General Public License v3 or later License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html License URI: https://www.gnu.org/licenses/gpl-3.0.html
@ -1717,6 +1717,12 @@ textarea {
grid-template-columns: repeat(1, 1fr); grid-template-columns: repeat(1, 1fr);
gap: 1.5rem; gap: 1.5rem;
} }
.archive-posts-old {
margin-top: 2rem;
padding-top: 1rem;
border-top: 0.05rem solid #000;
}
} }
@media screen and (max-width: 48em) { @media screen and (max-width: 48em) {
@ -1870,6 +1876,15 @@ textarea {
grid-template-columns: 1fr; 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 { .xarxaprod-faqs-aside {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -2351,6 +2366,7 @@ textarea {
.xarxaprod-fund-info-fields .xarxaprod-fund-info-field, .xarxaprod-fund-info-fields .xarxaprod-fund-info-field,
.xarxaprod-fund-info-contact-fields .xarxaprod-fund-info-field { .xarxaprod-fund-info-contact-fields .xarxaprod-fund-info-field {
margin: 0;
padding: 1rem 0; padding: 1rem 0;
border-bottom: 0.05rem solid #000; border-bottom: 0.05rem solid #000;
} }
@ -2372,19 +2388,16 @@ textarea {
margin: 0; 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-fields li,
.xarxaprod-fund-info-contact-fields li { .xarxaprod-fund-info-contact-fields li {
font-size: 1.3rem; 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-funder-name,
.xarxaprod-fund-contact-name, .xarxaprod-fund-contact-name,
.xarxaprod-fund-web { .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') ); ?> <?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_call') ); ?>
</div> </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') ): ?> <?php if( get_field('xxp_funder_name') ): ?>
<div class="xarxaprod-fund-info-field"> <div class="xarxaprod-fund-info-field">
<p class="xarxaprod-funder-name"><?php the_field('xxp_funder_name'); ?></p> <p class="xarxaprod-funder-name"><?php the_field('xxp_funder_name'); ?></p>
@ -77,21 +83,6 @@
<section class="xarxaprod-fund-info-fields"> <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"> <div class="xarxaprod-fund-info-field">
<h6>Termini</h6> <h6>Termini</h6>
<?php if( get_field('xxp_fund_apply_begin') || get_field('xxp_fund_apply_end') ): ?> <?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') ): ?> <?php if( get_field('xxp_fund_web') ): ?>
<div class="xarxaprod-fund-info-field"> <div class="xarxaprod-fund-info-field">
<h6>+ Informació</h6> <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> </div>
<?php endif; ?> <?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"> <div class="xarxaprod-fund-info-field">
<h6>Necessites assesorament?</h6> <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> <p><a href="<?php echo esc_url( home_url( '/consultoria/' ) ); ?>" class="button button-more button-ourservices">Oferim serveis de consultoria</a></p>