Compare commits

..

No commits in common. "482e1e30e98352374a9409a50cc162177ce23f38" and "d205cf49d5626c487014b99d7a6cce40c9b1d27b" have entirely different histories.

37 changed files with 1450 additions and 2917 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -21,20 +21,21 @@ get_header();
<section id="filteredassociats" class="xarxaprod-filtered-content xarxaprod-filtered-associats xarxaprod-associats-filtrats"> <section id="filteredassociats" class="xarxaprod-filtered-content xarxaprod-filtered-associats xarxaprod-associats-filtrats">
<aside id="associatsfilter" class="xarxaprod-filter-associats xarxaprod-filtre-associats"> <aside id="associatsfilter" class="xarxaprod-filter-associats xarxaprod-filtre-associats">
<?php xarxaprod_associats_filters_form(); // function defined in the plugin ?> <?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) { // if plugin active do?>
<?php xarxaprod_associats_filters_form(); // function defined in the plugin ?>
<?php } //end if is_plugin_active ?>
</aside> </aside>
<content class="archive-posts <?php xarxaprod_class_posttype(); ?>"> <content class="archive-posts <?php xarxaprod_class_posttype(); ?>">
<figure id="xarxaprod-associats-map" class="xarxaprod-associats-map">
<?php xarxaprod_show_leaflet_map(); // function defined in the plugin ?>
</figure>
<?php if ( have_posts() ) : ?> <?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); <?php while ( have_posts() ) : the_post();
//get_template_part( 'template-parts/section', 'eachmember' );
xarxaprod_show_leaflet_associat_blob(); // function defined in the plugin get_template_part( 'template-parts/section', 'eachmember' );
endwhile; endwhile;
//the_posts_navigation(); the_posts_navigation();
else : else :

File diff suppressed because one or more lines are too long

View File

@ -121,12 +121,37 @@ add_action( 'after_setup_theme', 'xarxaprod_content_width', 0 );
* *
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/ */
require get_template_directory() . '/inc/widgets-register.php'; require get_template_directory() . '/inc/widgets-register.php';
/** /**
* Enqueue scripts and styles. * Enqueue scripts and styles.
*/ */
require get_template_directory() . '/inc/theme-css-scripts.php'; function xarxaprod_theme_scripts() {
wp_enqueue_style( 'xarxaprod-style', get_stylesheet_uri(), array(), _S_VERSION );
//https://developer.wordpress.org/reference/functions/wp_enqueue_style/#comment-2056
//wp_enqueue_style('main-styles', get_template_directory_uri() . '/css/style.css', array(), filemtime(get_template_directory() . '/css/style.css'), false);
//wp_enqueue_style( 'xarxaprod-style', get_stylesheet_uri(), array(), filemtime(get_stylesheet_uri() . 'style.css'), false);
wp_style_add_data( 'xarxaprod-style', 'rtl', 'replace' );
// https://stackoverflow.com/a/24994304
// deregister default jQuery included with Wordpress
//wp_deregister_script( 'jquery' );
// register our jQuery minified from theme directory
//wp_enqueue_script('jquery', get_template_directory_uri().'/js/jquery.min.js', array(),'3.7.1',true);
// navigation scripts
wp_enqueue_script( 'xarxaprod-navigation', get_template_directory_uri() . '/js/navigation.js', array(), _S_VERSION, true );
// scroll detection script
// https://css-tricks.com/styling-based-on-scroll-position/
wp_enqueue_script( 'xarxaprod-scrollposition', get_template_directory_uri() . '/js/scrollposition.js', array(), _S_VERSION, true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'xarxaprod_theme_scripts' );
/** /**
* Implement the Custom Header feature. * Implement the Custom Header feature.
@ -168,6 +193,7 @@ require get_template_directory() . '/inc/user-role-capabilities-mod.php';
/** /**
* Functions to personalize the_archive_title() function * Functions to personalize the_archive_title() function
*/ */
require get_template_directory() . '/inc/archive-title.php'; require get_template_directory() . '/inc/archive-title.php';
/** /**

View File

@ -1,35 +0,0 @@
<?php
/**
* Enqueue scripts and styles.
*/
if ( ! function_exists( 'xarxaprod_theme_css_scripts' ) ){
function xarxaprod_theme_css_scripts() {
wp_enqueue_style( 'xarxaprod-style', get_stylesheet_uri(), array(), _S_VERSION );
//https://developer.wordpress.org/reference/functions/wp_enqueue_style/#comment-2056
//wp_enqueue_style('main-styles', get_template_directory_uri() . '/css/style.css', array(), filemtime(get_template_directory() . '/css/style.css'), false);
//wp_enqueue_style( 'xarxaprod-style', get_stylesheet_uri(), array(), filemtime(get_stylesheet_uri() . 'style.css'), false);
wp_style_add_data( 'xarxaprod-style', 'rtl', 'replace' );
// https://stackoverflow.com/a/24994304
// deregister default jQuery included with Wordpress
//wp_deregister_script( 'jquery' );
// register our jQuery minified from theme directory
//wp_enqueue_script('jquery', get_template_directory_uri().'/js/jquery.min.js', array(),'3.7.1',true);
// enqueue dashicons to load on the front end
// used by maps
wp_enqueue_style( 'dashicons' );
// navigation scripts
wp_enqueue_script( 'xarxaprod-navigation', get_template_directory_uri() . '/js/navigation.js', array(), _S_VERSION, true );
// scroll detection script
// https://css-tricks.com/styling-based-on-scroll-position/
wp_enqueue_script( 'xarxaprod-scrollposition', get_template_directory_uri() . '/js/scrollposition.js', array(), _S_VERSION, true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
}
add_action( 'wp_enqueue_scripts', 'xarxaprod_theme_css_scripts' );

View File

@ -7,7 +7,7 @@
function xarxaprod_widgets_init() { function xarxaprod_widgets_init() {
register_sidebar( register_sidebar(
array( array(
'name' => esc_html__( 'Front Page - Despres del contingut a la Pagina principal', 'xarxaprod' ), 'name' => esc_html__( 'Front Page - principal', 'xarxaprod' ),
'id' => 'front-page-widgets', 'id' => 'front-page-widgets',
'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ), 'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">', 'before_widget' => '<section id="%1$s" class="widget %2$s">',
@ -18,8 +18,8 @@
); );
register_sidebar( register_sidebar(
array( array(
'name' => esc_html__( 'After content - Despres del contingut i abans del peu. A tota la web.', 'xarxaprod' ), 'name' => esc_html__( 'Sidebar funds - Lateral ajuts', 'xarxaprod' ),
'id' => 'after-content', 'id' => 'sidebar-funds',
'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ), 'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">', 'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>', 'after_widget' => '</section>',
@ -29,18 +29,7 @@
); );
register_sidebar( register_sidebar(
array( array(
'name' => esc_html__( 'After Associats - Despres del contingut als Espais Associats i abans del peu', 'xarxaprod' ), 'name' => esc_html__( 'Footer - Peu', 'xarxaprod' ),
'id' => 'after-content-members',
'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
)
);
register_sidebar(
array(
'name' => esc_html__( 'Footer - Peu de página', 'xarxaprod' ),
'id' => 'footer-widgets', 'id' => 'footer-widgets',
'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ), 'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">', 'before_widget' => '<section id="%1$s" class="widget %2$s">',

View File

@ -64,18 +64,10 @@
link.addEventListener( 'blur', toggleFocus, true ); link.addEventListener( 'blur', toggleFocus, true );
} }
//
// DO NOT ACTIVATE IT
// if so it will not focus thus work when link has sub elements
//
//
// Toggle focus each time a menu link with children receive a touch event. // Toggle focus each time a menu link with children receive a touch event.
// for ( const link of linksWithChildren ) {
//for ( const link of linksWithChildren ) { link.addEventListener( 'touchstart', toggleFocus, false );
// link.addEventListener( 'touchstart', toggleFocus, false ); }
//}
//
/** /**
* Sets or removes .focus class on an element. * Sets or removes .focus class on an element.

View File

@ -37,63 +37,40 @@ get_header();
endif; endif;
?> ?>
<section id="filteredassociats" class="xarxaprod-filtered-content xarxaprod-filtered-content xarxaprod-filtered-associats xarxaprod-associats-filtrats"> <section id="filteredassociats" class="xarxaprod-filtered-content xarxaprod-filtered-content xarxaprod-filtered-associats xarxaprod-associats-filtrats">
<aside id="associatsfilter" class="xarxaprod-filter-associats xarxaprod-fitre-associats"> <aside id="associatsfilter" class="xarxaprod-filter-associats xarxaprod-fitre-associats">
<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) { // if plugin active do?> <?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) { // if plugin active do?>
<?php xarxaprod_associats_filters_form(); // function defined in the plugin ?> <?php xarxaprod_associats_filters_form(); // function defined in the plugin ?>
<?php } //end if is_plugin_active ?> <?php } //end if is_plugin_active ?>
</aside> </aside>
<?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_associat = new WP_Query(
array(
'post_type' => 'xarxaprod-associat',
'order' => 'ASC', //order a b c d ...
'order_by' => 'name', // by name slug
'posts_per_page' => '-1' //all of them
)
);
?>
<?php if ( $the_query_associat->have_posts() ) : ?>
<content class="archive-posts archive-posts-map archive-xarxaprod-members archive-xarxaprod-associats <?php xarxaprod_class_posttype(); ?>">
<figure id="espais-associats-map" class="xarxaprod-associats-map xarxaprod-espais-map">
<?php xarxaprod_show_leaflet_map(); // function defined in the plugin ?>
<?php while ( $the_query_associat->have_posts() ) : $the_query_associat->the_post(); ?>
<?php xarxaprod_show_leaflet_associat_blob(); ?>
<?php endwhile;//end of the loop ?> <?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/
</figure> $the_query_associat = new WP_Query(
<?php wp_reset_postdata(); ?> array(
</content> 'post_type' => 'xarxaprod-associat',
<?php 'posts_per_page' => '-1'
//the loop for text output )
//echo '<content class="archive-posts archive-xarxaprod-members archive-xarxaprod-associats' . xarxaprod_class_posttype() . '">'; );
//while ( $the_query_associat->have_posts() ) : $the_query_associat->the_post(); ?>
//get_template_part( 'template-parts/section', 'eachmember' ); <?php if ( $the_query_associat->have_posts() ) : ?>
//endwhile;//end of the loop <content class="archive-posts archive-xarxaprod-members archive-xarxaprod-associats <?php //xarxaprod_class_posttype(); ?>">
//echo '</content>'; <?php while ( $the_query_associat->have_posts() ) : $the_query_associat->the_post(); ?>
?>
<?php endif; //end query associat ?>
</section>
</main><!-- #main --> <?php get_template_part( 'template-parts/section', 'eachmember' ); ?>
<?php if ( is_active_sidebar( 'after-content-members' ) ):?>
<aside id="secondary" class="widget-area widget-area-members"> <?php endwhile;//end of the loop ?>
<?php dynamic_sidebar( 'after-content-members' ); ?> <?php wp_reset_postdata(); ?>
</aside><!-- #secondary --> </content>
<?php endif; //end sidebar ?> <?php endif; //end query associat ?>
</section>
</main><!-- #main -->
<?php <?php
get_sidebar();
get_footer(); get_footer();

View File

@ -71,7 +71,6 @@ get_header();
</section> </section>
</main><!-- #main --> </main><!-- #main -->
<?php <?php
get_sidebar();
get_footer(); get_footer();

View File

@ -27,13 +27,13 @@ get_header();
endif; // End if have_post. endif; // End if have_post.
?> ?>
<?php <?php
if ( is_front_page() ) : if ( is_front_page() ) :
//get_template_part( 'template-parts/section', 'featured' ); //get_template_part( 'template-parts/section', 'featured' );
get_template_part( 'template-parts/section', 'last-convos' ); get_template_part( 'template-parts/section', 'last-convos' );
get_template_part( 'template-parts/section', 'agenda' ); get_template_part( 'template-parts/section', 'agenda' );
endif; endif;
?> ?>
</main><!-- #main --> </main><!-- #main -->

View File

@ -48,8 +48,4 @@ $color__border-button-hover: $color__black-grey;
$color__border-button-focus: $color__black-light; $color__border-button-focus: $color__black-light;
$color__border-input: $color__black; $color__border-input: $color__black;
$color__border-abbr: $color__grey-dark; $color__border-abbr: $color__grey-dark;
//other
$border__radius: 0.2rem;
$border__line: 0.05em solid $color__black; $border__line: 0.05em solid $color__black;
$box__shadow: 0 3px 10px rgba(0,0,0,0.2);

View File

@ -9,9 +9,8 @@ input[type="submit"],
border-radius: 0; border-radius: 0;
background: $color__background-button; background: $color__background-button;
color: $color__white; color: $color__white;
font-size: $font__size-body * 0.9;
line-height: 1; line-height: 1;
padding: 0.6em; padding: 0.5em;
margin: 0; margin: 0;
&:hover { &:hover {
@ -43,7 +42,7 @@ input[type="submit"],
} }
.search-submit{ .search-submit{
z-index: 10; z-index: 10;
margin: 0 0 0 -3rem; margin: 0rem;
border: none; border: none;
width: 2.5rem; width: 2.5rem;
height: 2.5rem; height: 2.5rem;
@ -63,7 +62,6 @@ input[type="submit"],
min-height: 2.5rem; min-height: 2.5rem;
font-size: 2rem; font-size: 2rem;
content: "\26b2"; content: "\26b2";
color: $color__grey-dark;
-webkit-transform: rotate(45deg); -webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg); -moz-transform: rotate(45deg);
-o-transform: rotate(45deg); -o-transform: rotate(45deg);

View File

@ -27,7 +27,7 @@ textarea {
} }
select { select {
border: $border__line; border: 1px solid $color__border-input;
} }
textarea { textarea {

View File

@ -21,19 +21,3 @@ a {
outline: 0; outline: 0;
} }
} }
@media screen {
}
@media screen and (max-width: 48em) {
//only smaller than 48em
a {
overflow-wrap: anywhere;
word-break: normal;
}
}
@media screen and (min-width: 48em) {
//only bigger than 48em
}
@media screen and (min-width: 80em) {
//only bigger than 80rem
}

View File

@ -36,7 +36,7 @@ dd {
margin:0.1em 0; margin:0.1em 0;
padding: 0.2em 0.2em 0 0.2em; padding: 0.2em 0.2em 0 0.2em;
color: $color__text-screen; color: $color__text-screen;
border: $border__line; border: 1px solid $color__black;
background-color: none; background-color: none;
font-size: $font__size-body*0.8; font-size: $font__size-body*0.8;
} }
@ -89,68 +89,4 @@ dd {
} }
} }
} }
ul[id*="menu-footer"] {
column-count: 3;
a {
text-decoration: underline;
}
}
ul[id*="menu-legal"] li {
float: left;
padding-left: 0.8em;
font-size: $font__size-body*0.8;
}
ul[id*="menu-social-media"] {
display:flex;
flex-flow: row;
li {
height: 1.5em;
width: 1.5em;
background-color: $color__white;
border-radius: 5em;
margin-right: 0.3em;
position: relative;
//&:before {
// content:"";
// display: block;
// color: $color__black;
// font-size: $font__size-body*1;
// width: 2em;
// height: 2em;
// text-align:center;
//}
a {
margin-left: -10000em;
&:before {
content:"";
display: inline-flex;
align-content: center;
justify-content: center;
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
color: $color__black;
font-size: $font__size-body*1;
font-weight: 900;
}
&[href*="instagram.com"]:before{
content: "in";
}
&[href*="youtube.com"]:before{
content: "yt";
}
&[href*="facebook.com"]:before{
content: "fb";
}
&[href*="twitter.com"]:before{
content: "tw";
}
&[href*="mastodon"]:before{
content: "mt";
}
}
}
}
} }

View File

@ -13,29 +13,3 @@ img {
figure { figure {
margin: 1em 0; // Extra wide images within figure tags don't overflow the content area. margin: 1em 0; // Extra wide images within figure tags don't overflow the content area.
} }
.fotocopia,.multiply {
//http://stackoverflow.com/questions/52936926/ddg#52936970
img{
//filter: grayscale(1) contrast(1) brightness(1);
//filter: saturate(150) grayscale(1) contrast(1);
filter: grayscale(1) contrast(1);
mix-blend-mode: multiply;
}
}
//mapas leaflet
//.xarxaprod-associats-map,.xarxaprod-espais-map {
// aspect-ratio: 4 / 3;
// background-color: rgba(200,200,200,0.4); //place holder background color
//}
//.page-template-associats-search{
// .xarxaprod-associats-map,.xarxaprod-espais-map {
// aspect-ratio: 4 / 3;
// }
//}
//.single-xarxaprod-associat {
// .xarxaprod-associats-map,.xarxaprod-espais-map {
// aspect-ratio: 16 / 9;
// }
//}

View File

@ -1,12 +1,5 @@
p { p {
margin-top: 0;
margin-bottom: 1.5em; margin-bottom: 1.5em;
&.big {
font-size: $font__size-body*1.25;
}
&.small{
font-size: $font__size-body*0.8;
}
} }
dfn, dfn,
@ -58,21 +51,9 @@ ins {
text-decoration: none; text-decoration: none;
} }
.big { big {
font-size: 125%; font-size: 125%;
p {
font-size: $font__size-body*1.25;
}
} }
.small { .small {
font-size: 80%; font-size: 80%;
p {
font-size: $font__size-body*0.8;
}
}
.xarxaprod-intro {
p {
font-size: $font__size-body*1.8;
}
} }

View File

@ -7,8 +7,6 @@
h6, h6,
.h1,.h2,.h3,.h4,.h5,.h6{ .h1,.h2,.h3,.h4,.h5,.h6{
clear: both; clear: both;
margin-top: 0;
margin-bottom: 0;
line-height: $font__line-height-header; line-height: $font__line-height-header;
} }
h1,.h1 { h1,.h1 {
@ -31,6 +29,7 @@
} }
h4,.h4 { h4,.h4 {
font-size: $font__size-body*1.2; font-size: $font__size-body*1.2;
//font-weight: 500;
&.small { &.small {
font-size: $font__size-body*0.9; font-size: $font__size-body*0.9;
} }
@ -39,104 +38,31 @@
font-size: $font__size-body*1.1; font-size: $font__size-body*1.1;
font-weight: 500; font-weight: 500;
&.small { &.small {
font-size: $font__size-body*0.9; font-size: $font__size-body*0.8;
} }
} }
h6,.h6 { h6,.h6 {
font-size: $font__size-body*1; font-size: $font__size-body*1.1;
font-weight: 100; font-weight: 100;
&.small { &.small {
font-size: $font__size-body*0.8; font-size: $font__size-body*0.8;
} }
} }
.small { .site-main {
h1,.h1 { h1,h2,h3,h4,h5,h6,
font-size: $font__size-body*1.5; .h1,.h2,.h3,.h4,.h5,.h6 {
} margin: 0;
h2,.h2 { }
font-size: $font__size-body*1.2; }
}
h3,.h3 {
font-size: $font__size-body*1;
}
h4,.h4 {
font-size: $font__size-body*0.9;
}
h5,.h5 {
font-size: $font__size-body*0.9;
}
h6,.h6 {
font-size: $font__size-body*0.8;
}
}
.big {
h1,.h1 {
font-size: $font__size-body*2.2;
}
h2,.h2 {
font-size: $font__size-body*2;
}
h3,.h3 {
font-size: $font__size-body*1.6;
}
h4,.h4 {
font-size: $font__size-body*1.4;
}
h5,.h5 {
font-size: $font__size-body*1.2;
}
h6,.h6 {
font-size: $font__size-body*1.1;
}
}
//.site-main {
// h1,h2,h3,h4,h5,h6,
// .h1,.h2,.h3,.h4,.h5,.h6 {
// margin: 0;
// }
//}
.home-featured { .home-featured {
h2,.h2 { h2,.h2 {
margin: 1.2rem 0; margin: 1.2rem 0;
font-size: $font__size-body*2; font-size: $font__size-body*2;
line-height: 1.2; line-height: 1.2;
border-bottom: $border__line; border-bottom: 0.6rem solid $color__black;
//border-bottom: 0.6rem solid $color__black;
} }
} }
/* used in
/* entry content */
.entry-content h6 {
padding: 0.5em 0;
}
/*
* big lletters block below titles
* */
.xarxaprod-intro {
// h1,h2,h3,h4,h5,h6,
//.h1,.h2,.h3,.h4,.h5,.h6 {
// margin: 0;
//}
h1 {}
h2 {}
h3 {
font-size: $font__size-body*2.3;
}
h4 {
font-size: $font__size-body*2.1;
}
h5 {
font-size: $font__size-body*2;
}
h6 {
font-size: $font__size-body*2;
padding: 0;
}
}
/* used in
* ./template-parts/section-agenda.php * ./template-parts/section-agenda.php
* ./template-parts/section-last-convos.php * ./template-parts/section-last-convos.php
* */ * */
@ -150,27 +76,31 @@
&::after { &::after {
display: inline-block; display: inline-block;
align-self: center; align-self: center;
//justify-self: center; justify-self: center;
font-size: 0.8rem; font-size: 0.4em;
color: $color__white; color: $color__white;
background-color: $color__black; background-color: $color__black;
padding: 0.6em 0.8em; padding: 0.4em;
} }
} }
} }
[lang="ca"] section.agenda h2 a::after { [lang="ca"] section.agenda h2 a::after {
content: "Veure totes les activitas"; content: "Verure totes les activitas";
} }
[lang*="es"] section.agenda h2 a::after { [lang*="es"] section.agenda h2 a::after {
content: "Ver todas las actividades"; content: "Ver todas las actividades";
} }
[lang="ca"] section.last-convos h2 a::after { [lang="ca"] section.last-convos h2 a::after {
content: "Veure totes les convocatories"; content: "Verure totes les convocatories";
} }
[lang*="es"] section.last-convos h2 a::after { [lang*="es"] section.last-convos h2 a::after {
content: "Ver todas las convocatorias"; content: "Ver todas las convocatorias";
} }
/* entry content */
.entry-content h6 {
padding: 0.5em 0;
}
} }
@media screen and (min-width: 48em) { @media screen and (min-width: 48em) {
h1,.h1 { h1,.h1 {
@ -180,22 +110,21 @@
font-size: $font__size-body*2.5; font-size: $font__size-body*2.5;
} }
h3,.h3 { h3,.h3 {
font-size: $font__size-body*1.4; font-size: $font__size-body*2;
} }
h4,.h4 { h4,.h4 {
font-size: $font__size-body*1.3; font-size: $font__size-body*1.7;
} }
h5,.h5 { h5,.h5 {
font-size: $font__size-body*1.2; font-size: $font__size-body*1.4;
} }
h6,.h6 { h6,.h6 {
font-size: $font__size-body*1; font-size: $font__size-body*1.2;
} }
.home-featured { .home-featured {
h2,.h2 { h2,.h2 {
font-size: $font__size-body*3.5; font-size: $font__size-body*3.5;
//border-bottom: 0.8rem solid $color__black; border-bottom: 0.8rem solid $color__black;
border-bottom: $border__line;
} }
} }
} }

View File

@ -42,14 +42,6 @@ textarea {
background: none; background: none;
background-color: transparent; background-color: transparent;
} }
.strong,.bold {
font-weight: bold;
font-weight: 700;
}
.light,.thin,.estreta {
font-weight: light;
font-weight: 100;
}
@import "headings"; @import "headings";
@import "copy"; @import "copy";
@import "fonts"; @import "fonts";

View File

@ -1,6 +1,4 @@
@media screen { @media screen {
//any screen
.sticky { .sticky {
display: block; display: block;
} }
@ -15,76 +13,65 @@
} }
.page-content, .page-content,
.entry-content,
.entry-summary { .entry-summary {
margin: 1.5em 0 0; margin: 1.5em 0 0;
} }
.site-main { .site-main {
.entry-title { .entry-title {
margin: 0.5em 0 0 0; margin: 0.5em 0;
} }
} }
.page-links { .page-links {
clear: both; clear: both;
margin: 0 0 1.5em; margin: 0 0 1.5em;
} }
.home-featured {
padding: 0 1rem;
}
/* /*
* big lletters block below titles * blocks columns with line below each block
* */ * see Que oferim?
* */
.xarxaprod-intro { .ratlla-abaix,.border-bottom {
line-height: 1.2; .wp-block-column {
margin-top: 0; position:relative;
margin-bottom: 0; }
} .wp-block-heading {
/* padding-top: 1em;
* blocks columns with line below each block padding-bottom: 2em;
* see Que oferim? display:inline-grid;
* */ &:after {
content: "";
.ratlla-abaix,.border-bottom { border-bottom:0.05em solid $color__black;
.wp-block-column { width: 100%;
position:relative; position: absolute;
} bottom: 0;
.wp-block-heading { }
padding-top: 1em;
padding-bottom: 2em;
display:inline-grid;
&:after {
content: "";
border-bottom: $border__line;
width: 100%;
position: absolute;
bottom: 0;
} }
} }
}
/*
/* * download files
* download files * line and icon to show download
* line and icon to show download *
* * * * * * * * */
* * * * * * * */ .descarregar-fitxers,.descarga-fichero,.download-files {
.descarregar-fitxers,.descarga-fichero,.download-files { a {
a { display: inline-block;
display: inline-block; width: 100%;
width: 100%; border-bottom: $border__line;
border-bottom: $border__line; &:after {
&:after { content: "";
content: ""; display:inline-block;
display:inline-block; float: right;
float: right; width: 1em;
width: 1em; height: 1em;
height: 1em; background-image: url(./assets/img/icon-download.svg);
background-image: url(./assets/img/icon-download.svg); background-repeat: none;
background-repeat: none; background-size: contain;
background-size: contain; }
} }
} }
}
/* used in /* used in
* ./template-parts/section-eachpost.php * ./template-parts/section-eachpost.php
@ -92,29 +79,21 @@
.xarxaprod-card-each { .xarxaprod-card-each {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.entry-title { .entry-title,h6 {
margin: 0; margin: 0;
padding: 0 0 0.5rem 0; padding: 0.5rem 0;
border-bottom: $border__line; border-bottom: 1px solid $color__black;
}
h6 {
padding: 0.5rem 1rem 0.5rem 0;
border-bottom: $border__line;
}
.xarxaprod-deadline {
text-transform: uppercase;
} }
p { p {
padding: 0.5rem 0; padding: 0.5rem 0;
margin:0; margin:0;
} }
.excerpt { .excerpt {
border-bottom: $border__line; border-bottom: 1px solid $color__black;
margin-bottom: 0.5em; margin-bottom: 0.5em;
padding: 0.5em 0;
} }
.more-link { .more-link {
margin-top: 1rem; margin-top: 1rem;
} }
} }
@ -126,25 +105,19 @@
.xarxaprod-fund-info-fields, .xarxaprod-fund-info-fields,
.xarxaprod-fund-info-contact-fields { .xarxaprod-fund-info-contact-fields {
display: grid; display: grid;
margin-bottom: 2rem;
.xarxaprod-fund-info-field { .xarxaprod-fund-info-field {
padding: 1rem 0; padding-bottom: 1rem;
border-bottom: $border__line; border-bottom: 1px solid $color__black;
} }
h6 { h6 {
//display: inline; font-size: 2.4rem;
font-size: $font__size-body*2.4;
font-variant: all-petite-caps; font-variant: all-petite-caps;
~ p .button {
display: inline-block;
margin-top: 0.5rem;
}
} }
p { p {
margin: 0; margin: 0.5rem 0 0 0;
} }
li { li {
font-size: $font__size-body*1.3; font-size: 1.3rem;
} }
} }
.xarxaprod-fund-info-contact-fields { .xarxaprod-fund-info-contact-fields {
@ -154,7 +127,7 @@
} }
.xarxaprod-fund-info-fields { .xarxaprod-fund-info-fields {
.xarxaprod-fund-info-field { .xarxaprod-fund-info-field {
margin: 0; margin: 1rem 0 0.5rem 0;
} }
} }
.xarxaprod-funder-name, .xarxaprod-funder-name,
@ -164,35 +137,15 @@
margin:0; margin:0;
padding: 0; padding: 0;
font-variant: all-petite-caps; font-variant: all-petite-caps;
font-size: $font__size-body*1.1; font-size: 1.1rem;
line-height: 0.9; line-height: 0.9;
align-items: center; align-items: center;
a { a {
text-decoration: none; text-decoration: none;
font-size: $font__size-body*0.8; font-size: 0.8rem;
}
}
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-convo-info-fields,
.xarxaprod-agenda-info { .xarxaprod-agenda-info {
margin-bottom: 2em; margin-bottom: 2em;
@ -200,12 +153,10 @@
display:grid; display:grid;
grid-template-columns: 0.75fr 2.25fr; grid-template-columns: 0.75fr 2.25fr;
padding: 0.2em 0; padding: 0.2em 0;
//border-top: 0.05em solid $color__black; border-top: 0.05em solid $color__black;
border-top: $border__line; font-size: 1em;
font-size: $font__size-body*1;
&:last-of-type{ &:last-of-type{
//border-bottom: 0.05em solid $color__black; border-bottom: 0.05em solid $color__black;
border-bottom: $border__line;
} }
.xarxaprod-label li { .xarxaprod-label li {
display: inherit; display: inherit;
@ -224,7 +175,7 @@
dt { dt {
grid-row: 1 / 1; grid-row: 1 / 1;
font-weight: 100; font-weight: 100;
} }
dd { dd {
grid-row: 1 / 2; grid-row: 1 / 2;
margin: 0; margin: 0;
@ -237,100 +188,57 @@
} }
/* used in /* used in
* template-parts/content-xarxaprod-associat.php * ./template-parts/content-xarxaprod-associat.php
* * * * * * * * * */ * */
.single-xarxaprod-associat { .single-xarxaprod-associat {
.xarxaprod-associat { .xarxaprod-associat {
> section { > section {
margin-top: 4em; margin-top: 4em;
} }
} .xarxaprod-associat-info {
.xarxaprod-associat-info {
display: grid;
grid-template-columns: 1fr;
gap: $grid__gap * 1 ;
.xarxaprod-associat-contact,
.xarxaprod-associat-services {
dt {
height: $font__size-body*1.5;
}
li {
display: grid;
font-size: $font__size-body*1;
border: none;
border-top: $border__line;
margin: 0;
padding: 0.5em 0;
}
h6,p {
font-size: $font__size-body*1;
margin: 0;
padding: 0;
}
}
.xarxaprod-associat-contact li {
grid-template-columns: 1fr 2.5fr;
}
.xarxaprod-associat-services li {
}
.xarxaprod-associat-logo {
display: inline-flex;
align-content: center;
justify-content: center;
max-height: 11rem;
img {
object-fit: contain;
}
}
}
.xarxaprod-associat-convos {
}
.xarxaprod-associat-location {
.xarxaprod-associat-osm-map {
}
.xarxaprod-associat-osm-link {
display: grid; display: grid;
grid-template-columns: auto; grid-template-columns: 1fr 1fr 1fr;
align-items: center; gap: $grid__gap * 2;
h6,p,a { .xarxaprod-associat-contact,
margin: 0.5em ; .xarxaprod-associat-services {
font-size: $font__size-body*1; li {
display: grid;
font-size: 1em;
border: none;
border-top: $border__line;
margin: 0;
padding: 0.5em 0;
}
h6,p {
font-size: 1em;
margin: 0;
padding: 0;
}
}
.xarxaprod-associat-contact li {
grid-template-columns: 1fr 2fr;
}
.xarxaprod-associat-services li {
}
.xarxaprod-associat-logo {
} }
} }
} .xarxaprod-associat-convos {
} }
/* .xarxaprod-associat-location {
* used in .xarxaprod-associat-osm-map {
* archive-xarxaprod-associat.php }
* page-templates/associats-search.php .xarxaprod-associat-osm-link {
* display: grid;
* */ grid-template-columns: min-content auto;
.xarxaprod-associat { align-items: center;
} h6,p,a {
.xarxaprod-associat-contact { margin: 0.5em ;
font-size: $font__size-body*0.9; font-size: 1em;
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
}
.page-template-associats-search{
.xarxaprod-associats-map,.xarxaprod-espais-map {
aspect-ratio: 4 / 3;
}
}
.single-xarxaprod-associat {
.xarxaprod-associats-map,.xarxaprod-espais-map {
aspect-ratio: 16 / 9;
} }
} }
/* /*
@ -348,16 +256,14 @@
padding-bottom: 4em; padding-bottom: 4em;
.wp-block-post-title { .wp-block-post-title {
text-transform: lowercase; text-transform: lowercase;
font-size: $font__size-body*1.5; font-size: 1.5em;
margin-bottom: 0.5em; margin-bottom: 0.5em;
padding-bottom: 0.5em; padding-bottom: 0.5em;
//border-bottom: 0.05em solid $color__black; border-bottom: 0.05em solid $color__black;
border-bottom: $border__line;
} }
.wp-block-post-excerpt { .wp-block-post-excerpt {
margin: 0.5em 0; margin: 0.5em 0;
//border-bottom: 0.05em solid $color__black; border-bottom: 0.05em solid $color__black;
border-bottom: $border__line;
} }
.wp-block-read-more { .wp-block-read-more {
margin: 1em 0; margin: 1em 0;
@ -372,16 +278,10 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
padding: 0.2em 0; padding: 1em 0;
//border-bottom: 0.1em solid $color__black; border-bottom: 0.1em solid $color__black;
border-bottom: $border__line;
&:first-of-type { &:first-of-type {
//border-top: 0.1em solid $color__black; border-top: 0.1em solid $color__black;
border-top: $border__line;
}
> * {
display: inline-flex;
align-items: center;
} }
header,.entry-header { header,.entry-header {
} }
@ -389,7 +289,7 @@
border-bottom: none; border-bottom: none;
} }
p { p {
//font-size: $font__size-body * 1.5; font-size: 1.5em;
} }
.activity-organizer, .organiza-activitat { .activity-organizer, .organiza-activitat {
} }
@ -400,14 +300,10 @@
li.category-activitats, li.category-activitats,
li[class*='category-agenda'] { li[class*='category-agenda'] {
position: relative; position: relative;
display: flex;
align-content: space-between;
.wp-block-post-featured-image { .wp-block-post-featured-image {
position: absolute; position: absolute;
top: 0; top: 0;
margin: 0; margin: 0;
aspect-ratio: 16/9;
overflow: hidden;
} }
.wp-block-post-title { .wp-block-post-title {
} }
@ -416,9 +312,9 @@
display: inline-block; display: inline-block;
min-width: 100%; min-width: 100%;
height: auto; height: auto;
aspect-ratio: 16/9; aspect-ratio: 1/1;
margin-bottom: 2em; margin-bottom: 2em;
background-color: rgba(230,230,230,0.4); background-color: rgba(240,240,240,0.2);
border-radius: 0.3em; border-radius: 0.3em;
} }
} }
@ -435,7 +331,7 @@
} }
.xarxaprod-filters { .xarxaprod-filters {
section { section {
margin: 0; margin: 1em 0;
.filter { .filter {
display: none; display: none;
} }
@ -450,14 +346,15 @@
// applied in forms and contactforms // applied in forms and contactforms
display: inline-block; display: inline-block;
width: 100%; width: 100%;
max-width: 13em;
margin-bottom: 0; margin-bottom: 0;
margin-bottom: 0.5rem; margin-bottom: 1rem;
padding: 0.6em 1em 0.4em; padding: 0.6em 1em 0.4em;
clear: both; clear: both;
cursor: pointer; cursor: pointer;
font-weight: 900; font-weight: 900;
font-size: $font__size-body*0.9; font-size: $font__size-body*0.9;
border: $border__line; border: 1px solid $color__border-button;
&:after { &:after {
content: ">"; content: ">";
display: inline; display: inline;
@ -479,6 +376,7 @@
} }
} }
} }
@media screen and (max-width: 48em) { @media screen and (max-width: 48em) {
//only smaller than 48em //only smaller than 48em
@ -516,11 +414,11 @@
.xarxaprod-filters { .xarxaprod-filters {
padding-right: 2em; padding-right: 2em;
section { section {
margin: 1em 0;
} }
} }
.xarxaprod-filtered-content { .xarxaprod-filtered-content {
grid-template-columns: 1fr 2fr; grid-template-columns: 1fr 2fr;
gap: $grid__gap * 4;
} }
.archive-posts { .archive-posts {
grid-template-columns: repeat(2 , minmax(0,1fr)); grid-template-columns: repeat(2 , minmax(0,1fr));
@ -528,50 +426,35 @@
.xarxaprod-convo-info-fields, .xarxaprod-convo-info-fields,
.xarxaprod-agenda-info { .xarxaprod-agenda-info {
li { li {
font-size: $font__size-body*1.5; font-size: 1.5em;
}
}
.single-xarxaprod-associat {
.xarxaprod-associat {
.xarxaprod-associat-info {
grid-template-columns: 1fr 1fr 1fr;
}
.xarxaprod-associat-location {
.xarxaprod-associat-osm-link {
grid-template-columns: min-content auto;
}
}
} }
} }
.xarxaprod-agenda { .xarxaprod-agenda {
.xarxaprod-card-each { .xarxaprod-card-each {
flex-direction: row-reverse; flex-direction: row-reverse;
header,.entry-header { header,.entry-header {
width: 50%; width: 60%;
} }
.activity-organizer, .organiza-activitat { .activity-organizer, .organiza-activitat {
width: 30%; width: 24%;
} }
.agenda-date, .agenda-data { .agenda-date, .agenda-data {
width: 17%; width: 15%;
} }
} }
} }
} }
@media screen and (min-width: 80em) { @media screen and (min-width: 80em) {
//only bigger than 80rem //only bigger than 80rem
.xarxaprod-filtered-content { .xarxaprod-filtered-content {
grid-template-columns: 1fr 3fr; grid-template-columns: 1fr 3fr;
gap: $grid__gap * 6; .archive-posts {
.archive-posts { grid-template-columns: repeat(2 , minmax(0,1fr));
grid-template-columns: repeat(2 , minmax(0,1fr));
&.archive-xarxaprod-associats,&.archive-custom-post-type-associat {
grid-template-columns: repeat(1 , minmax(0,1fr));
} }
} }
} .archive-posts {
.archive-posts { grid-template-columns: repeat(3 , minmax(0,1fr));
grid-template-columns: repeat(3 , minmax(0,1fr)); }
}
} }

View File

@ -21,80 +21,3 @@
.gallery-caption { .gallery-caption {
display: block; display: block;
} }
// carousel
//.xarxaprod-associat-gallery-images { //section
// .xarxaprod-associat-slides-nav{ //navigation
// }
// .xarxaprod-associat-slides { //the slides
// > .xarxaprod-associat-image { //each slide
// img {
// }
// p{
// }
// }
// }
//}
// carousel v01
// https://css-tricks.com/how-to-make-a-css-only-carousel/
.xarxaprod-associat-gallery-images { //section
--this-aspect-ratio: 16 / 9;
display: grid;
//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
display: flex;
//height: 4rem;
grid-row-start: 2;
overflow-x: scroll;
overflow-y: hidden;
&::-webkit-scrollbar {
display: none;
}
a {
aspect-ratio: var(--this-aspect-ratio);
margin-right: 0.5rem;
}
img {
aspect-ratio: var(--this-aspect-ratio);
object-fit: cover;
height: 100%;
width: auto;
}
}
.xarxaprod-associat-slides { //the slides
overflow-x: scroll;
overflow-y: hidden;
scroll-snap-type: x mandatory;
scroll-behavior: smooth;
&::-webkit-scrollbar {
display: none;
}
display: flex;
aspect-ratio: var(--this-aspect-ratio);
.xarxaprod-associat-image { //each slide
position: relative;
margin: 0;
min-width: 100%;
img {
display: block;
max-width: 100%;
width: 100%;
min-height: 100%;
scroll-snap-align: start;
object-fit: cover;
}
p{
position: absolute;
bottom: 1rem;
left: 1rem;
backdrop-filter: blur(5px);
padding: 0.5rem;
}
}
}
}

View File

@ -8,24 +8,41 @@
overflow:hidden; overflow:hidden;
} }
.custom-logo { .custom-logo {
min-width: 60vw; min-width: 11rem;
margin: 1rem; margin: 1rem;
} }
.main-navigation,.secondary-navigation { .main-navigation,.secondary-navigation {
.main-navigation-content { ul {
display: none; display: none;
list-style: none;
margin: 0;
padding-left: 0;
ul.sub-menu {
padding-top: 0.5rem;
padding-left: 1rem;
}
}
li {
position: relative;
&:hover > a,
&.focus > a {
}
}
a {
display: flex;
align-items: center;
min-height: 100%;
text-decoration: none;
font-size: 1rem;
} }
} }
.main-navigation { .main-navigation {
&.toggled { &.toggled {
ul { ul {
display: block; display: block;
position: relative;
} }
.menu-toggle {
position: relative;
z-index: 999;
}
.main-navigation-content { .main-navigation-content {
display: inline-block; display: inline-block;
position: absolute; position: absolute;
@ -37,104 +54,106 @@
background-color: rgba(255,255,255,0.95); background-color: rgba(255,255,255,0.95);
overflow: auto; overflow: auto;
} }
li { .menu-toggle {
display: block; position: relative;
} z-index: 9999;
a { }
display: block;
min-height: 100%;
padding: 0.5em 0;
}
.current-menu-ancestor > a::after { .current-menu-ancestor > a::after {
background-color: transparent; background-color: transparent;
} }
.current-menu-item > a { .current-menu-item > a::after {
//border-bottom: $border__line; display: inline-block;
} content: "";
.current-menu-item { position: absolute;
position: relative; left: 0;
> a::after { top: 2em;
display: inline-block; height: 2px;
content: ""; width: 100%;
position: absolute; background-color: $color__black;
left: 0;
top: 2em;
height: 2px;
width: 100%;
background-color: $color__black;
}
} }
} }
} }
.secondary-navigation { .secondary-navigation {
padding: 0 1em 1em 0;
ul {
display: inline-block;
li {
padding: 0.5em 0;
}
}
a {
text-transform: uppercase;
}
} }
.menu-item-has-children { .menu-item-has-children {
} }
/* begin of menu-hidden */ /* begin of menu-hidden */
//.toggle-secondary-navigation .show-mobile{ .toggle-secondary-navigation .show-mobile{
// display:inherit; display:inherit;
//} }
//.toggle, .toggle,
//.toggled-menu { .toggled-menu {
// display: none; display: none;
//} }
//.toggle:checked+.toggled-menu{ .toggle:checked+.toggled-menu{
// display: block; display: block;
// position: absolute; position: absolute;
// left:0; left:0;
// top:0; top:0;
// width: 100%; width: 100%;
// height: 100vh; height: 100vh;
// margin-top: 0; margin-top: 0;
// padding: 0 2rem; padding: 0 2rem;
//} }
//.toggle-show { .toggle-show {
// position: relative; position: relative;
// display: inline-block; display: inline-block;
// width: 1.8em; width: 1.8em;
// height: 1.4em; height: 1.4em;
// margin-right: 0.3em; margin-right: 0.3em;
// border-top: 0.3em solid $color__black; border-top: 0.3em solid $color__black;
// border-bottom: 0.3em solid $color__black; border-bottom: 0.3em solid $color__black;
//} }
//.toggle-show::before { .toggle-show::before {
// content: ""; content: "";
// position: absolute; position: absolute;
// top: 0.3em; top: 0.3em;
// left: 0; left: 0;
// width: 100%; width: 100%;
// border-top: 0.3em solid $color__black; border-top: 0.3em solid $color__black;
//} }
//.toggle-hide { .toggle-hide {
// display: flex; display: flex;
// justify-content: end; justify-content: end;
// margin-right: -0.5em; margin-right: -0.5em;
//} }
//.toggle-hide::after{ .toggle-hide::after{
// content: "x"; content: "x";
// padding: 0; padding: 0;
// font-size: 3rem; font-size: 3rem;
// font-weight: bold; font-weight: bold;
//} }
/* end of menu hidden*/ /* end of menu hidden*/
} }
@media screen and (max-width: 48em) { @media screen and (max-width: 47.99em) {
.site-branding { .site-branding {
} }
.main-navigation-content { .main-navigation-content {
li { li {
padding: 0.5rem 0;
} }
} }
.secondary-navigation-content { .secondary-navigation-content {
padding: 4rem 2rem;
} }
} }
@media screen and (min-width: 48em) { @media screen and (min-width: 48em) {
.site-branding { .site-branding {
} }
.custom-logo { .custom-logo {
min-width: 16rem; min-width: 11rem;
margin: 1rem 1rem 1rem 0; margin: 1rem 1rem 1rem 0;
} }
.menu-toggle { .menu-toggle {
@ -142,66 +161,52 @@
} }
.main-navigation,.secondary-navigation { .main-navigation,.secondary-navigation {
.main-navigation-content {
display: inline-block;
}
ul { ul {
display: flex; display: flex;
flex-flow: row;
.menu-item-has-children > ul { .menu-item-has-children > ul {
background-color: rgba(255,255,255,0.95); background-color: rgba(255,255,255,0.95);
box-shadow: $box__shadow;
border-radius: $border__radius;
} }
ul.sub-menu { .sub-menu {
float: left; float: left;
position: absolute; position: absolute;
top: 100%; top: 100%;
left: -999em; left: -999em;
z-index: 99999; z-index: 99999;
padding: 0.5rem;
ul { ul {
left: -999em; left: -999em;
top: 0; top: 0;
} }
li { li {
&:hover > ul, &:hover > ul,
&.focus > ul { &.focus > ul {
display: block; display: block;
left: 4em; left: 4em;
top: 3em; top: 1em;
} }
} }
a {
display: flex; a {
align-items: center;
min-height: 100%;
width: 200px; width: 200px;
} }
:hover > a,
.focus > a {
}
a:hover,
a.focus {
}
} }
li { li {
position: relative; padding: 0 1em;
padding: 1em; &:hover > ul,
&:hover > ul, &.focus > ul {
&.focus > ul {
left: auto; left: auto;
} }
&.lang-item {
position: absolute;
right: -3rem;
float: none;
font-weight: 100;
}
} }
a {
display: flex;
align-items: center;
min-height: 100%;
text-decoration: none;
font-size: 1rem;
}
} }
} }
@ -211,7 +216,9 @@
justify-content: end; justify-content: end;
ul.sub-menu { ul.sub-menu {
flex-direction: column; flex-direction: column;
padding: 0.5rem;
li { li {
margin: 0.5rem 0;
} }
} }
} }
@ -221,7 +228,8 @@
content: ""; content: "";
position: absolute; position: absolute;
left: 1em; left: 1em;
bottom: 0.5em; bottom: -0.5em;
min-height: 2px;
height: 2px; height: 2px;
width: calc(100% - 2em); width: calc(100% - 2em);
background-color: $color__black; background-color: $color__black;
@ -244,7 +252,7 @@
right: 0.3em; right: 0.3em;
width: 0.3em; width: 0.3em;
height: 0.3em; height: 0.3em;
border: $border__line; //1px solid $color__black; border: 1px solid $color__black;
border-top: none; border-top: none;
border-left: none; border-left: none;
-moz-transform: rotate(45deg); -moz-transform: rotate(45deg);

View File

@ -1,28 +1,14 @@
@media screen { @media screen {
//any screen
html:not([data-scroll='0']) { html:not([data-scroll='0']) {
.site-header:before { .site-header {
content: ""; background-color: $color__white;
display:inline-block;
position: absolute;
width: 100vw;
top: 0;
left: 50%;
right: 50%;
margin-left: -50vw;
margin-right:-50vw;
height: 100%;
z-index: -1;
background-color: $color__white;
} }
} }
.no-sidebar { .no-sidebar {
} }
.site { .site {
position: relative;
display: grid; display: grid;
grid-template-columns: auto minmax(min-content, 30em) minmax(min-content, 30em) auto; grid-template-columns: 1fr minmax(0,35em) minmax(0,35em) 1fr;
grid-auto-rows: min-content auto min-content min-content; grid-auto-rows: min-content auto min-content min-content;
grid-template-areas: grid-template-areas:
"header" "header"
@ -50,8 +36,14 @@
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 500; z-index: 500;
width: 100%; display: grid;
padding: 0.5rem 0; grid-template-areas:
"main"
"secondary ";
grid-row: auto;
align-items: center;
padding: 0.5rem 0;
width: 100vw;
background-color: transparent; background-color: transparent;
.main { .main {
@ -72,25 +64,28 @@
> section { > section {
padding: 0; padding: 0;
> header { > header {
padding: 1em 0; padding: 2em 0;
} }
} }
} }
.site-footer { .site-footer {
display: flex; display: flex;
flex-flow: row; flex-flow: row;
background: $color__black; background: $color__black;
color: $color__white; color: $color__white;
margin-top: 4em; margin-top: 4em;
:where(.wp-block-columns.is-layout-flex) { :where(.wp-block-columns.is-layout-flex) {
gap: $grid__gap * 5; gap: $grid__gap * 5; //8em;
} }
.wp-block-column:last-of-type {
//padding-left: 4em;
}
.site-info { .site-info {
&> section { &> section {
margin-top: 2em; margin-top: 2em;
padding: 2em 4em; padding: 2em 4em;
border-top: $border__line; border-top: 0.1em solid $color__white;
} }
} }
a { a {
color: $color__white; color: $color__white;
@ -99,21 +94,50 @@
} }
} }
ul[id*="menu-footer"] { ul[id*="menu-footer"] {
column-count: 3; column-count: 3;
a { a {
text-decoration: underline; text-decoration: underline;
} }
} }
}//end .site-footer ul[id*="menu-legal"] li {
:where(.wp-block-columns.is-layout-flex) { float: left;
gap: $grid__gap * 1.5; padding-left: 0.8em;
font-size: 0.8em;
}
ul[id*="menu-social-media"] {
display:flex;
flex-flow: row;
li {
height: 1.5em;
width: 1.5em;
background-color: $color__white;
border-radius: 5em;
margin-right: 0.3em;
&:before {
content:"A";
display: block;
color: $color__black;
font-size: 1em;
width: 2em;
height: 2em;
text-align:center;
}
a {
font-size: 0px;
}
}
}
}
.home-featured {
padding: 0 1rem;
} }
.xarxaprod-destacats,.xarxaprod-featured, .xarxaprod-destacats,.xarxaprod-featured,
.xarxaprod-last-convos,.xarxaprod-ultimes-convocatories, .xarxaprod-last-convos,.xarxaprod-ultimes-convocatories,
.archive-posts { .archive-posts {
display: grid; display: grid;
grid-template-columns: repeat(1 , 1fr); grid-template-columns: repeat(1 , 1fr);
gap: $grid__gap * 1.5; gap: $grid__gap * 3;
} }
} }
@media screen and (max-width: 48em) { @media screen and (max-width: 48em) {
@ -123,34 +147,25 @@
padding-right: 1em; padding-right: 1em;
} }
} }
.site-main {
}
.site-footer { .site-footer {
.is-layout-flex { .is-layout-flex {
flex-flow: column; flex-flow: column;
align-items: flex-start; align-items: flex-start;
} }
} }
.page-template-funds-search {
}
.home-featured {
}
} }
@media screen and (min-width: 48em) { @media screen and (min-width: 48em) {
//only bigger than 48em //only bigger than 48em
html:not([data-scroll='0']) {
.site-header:before {
content: "";
display:inline-block;
position: absolute;
width: 100vw;
top: 0;
left: 50%;
right: 50%;
margin-left: -50vw;
margin-right:-50vw;
height: 100%;
z-index: -1;
background-color: $color__white;
}
}
.site { .site {
grid-template-columns: 1fr 2fr 2fr 1fr;
> header { > header {
grid-column: 2 / 4; grid-column: 1 / -1;
} }
> main { > main {
grid-column: 2 / 4; grid-column: 2 / 4;
@ -163,48 +178,29 @@
} }
} }
.site-header { .site-header {
padding: 0; display: grid;
grid-template-columns: 1fr 2fr 2fr 1fr;
grid-template-areas:
"main "
"secondary ";
margin: auto;
margin-bottom: 2rem;
padding: 0;
.main { .main {
grid-column: 2/4; grid-column: 2/4;
width: 100%; width: 100%;
} }
.secondary { .secondary {
grid-column: 2/4; grid-column: 2/4;
align-items: center; align-items: center;
width: 100%; width: 100%;
} }
} }
.site-main { .site-main {
padding: 0; padding: 0 2rem;
> article {
padding-bottom: 4rem;
&.xarxaprod-ajut {
display: grid;
> * {
max-width: 40rem;
}
}
&.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 { > section {
padding-bottom: 4rem; padding: 4em 0;
} }
} }
.site-footer { .site-footer {
@ -215,6 +211,7 @@
} }
&.single { &.single {
.site-main { .site-main {
//width: 45rem;
margin: 0 auto; margin: 0 auto;
} }
} }
@ -223,17 +220,17 @@
.archive-posts { .archive-posts {
grid-template-columns: repeat(3 , 1fr); grid-template-columns: repeat(3 , 1fr);
} }
.xarxaprod-faqs-aside { .xarxaprod-faqs-aside {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.xarxaprod-search-form { .xarxaprod-search-form {
&:hover,&:active,&:focus,&:target { &:hover,&:active,&:focus,&:target {
flex-grow: 1; flex-grow: 1;
} }
} }
} }
} }
@media screen and (min-width: 80em) { @media screen and (min-width: 80em) {
//only bigger than 80rem //only bigger than 80rem

View File

@ -1,151 +1,126 @@
@media screen { /* contact forms styles used in wp backend with CF7 */
/* contact forms styles used in wp backend with CF7 */
.wpcf7-not-valid:not(:focus) {
.wpcf7-not-valid:not(:focus) { background-color: $color__red;
background-color: $color__red; }
.wpcf7-not-valid-tip {
color: $color__red;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
border-color: $color__yellow;
background-color: $color__yellow;
color: $color__white;
font-family: $font__main;
font-weight: bold;
text-align: center;
margin: 0em;
padding: 0rem;
}
.wpcf7-form {
.wpcf7-submit {
margin-left: 1rem;
} }
.wpcf7-not-valid-tip { .wpcf7-spinner {
color: $color__red; margin: 0 -24px 0 0;
} }
.wpcf7 form.invalid .wpcf7-response-output, }
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output { .wpcf7-list-item-label {
border-color: $color__yellow; margin: 0 0.3rem;
background-color: $color__yellow; }
color: $color__white; .wpcf7-form {
font-family: $font__main; text-align: center;
font-weight: bold; input:not([type="submit"]),textarea {
text-align: center; background: transparent;
margin: 0em; border: 0.1em solid $color__black;
padding: 0rem; padding: 1em;
//&[type="email"] {
// text-align: center;
//}
} }
.wpcf7-form { }
.wpcf7-submit {
margin-left: 1rem; /* styles applied if written in wp backend
} * class="contactform contactform-WHATEVER"
.wpcf7-spinner { * */
margin: 0 -24px 0 0; .contactform {
} margin-bottom: 1rem;
br {
display: none;
} }
p {
.wpcf7-list-item-label { display: block;
margin: 0 0.3rem; break-inside: avoid-column;
margin-top: 0;
} }
.wpcf7-form { .break-after-column, .saltar-columna{
//text-align: center; break-after:column;
input:not([type="submit"]),textarea {
background: transparent;
border: $border__line;
padding: 1em;
}
} }
}
/* styles applied if written in wp backend .contactform-consultoria {
* class="contactform contactform-WHATEVER" .contactform-name, .contactform-email {
* */ max-width: 40%;
.contactform {
margin-bottom: 1rem;
br {
display: none;
}
p {
display: block;
break-inside: avoid-column;
margin-top: 0;
}
.break-after-column, .saltar-columna{
break-after:column;
}
}
.contactform-consultoria {
.contactform-name, .contactform-email {
max-width: 40%;
display: inline-block;
}
.contactform-name {
float: left;
}
.contactform-email {
float:right;
margin-bottom: 1rem;
}
.contactform-message {
}
}
.contactform-acceptance {
display: flex;
align-items: center;
justify-content: end;
}
.contactform-fund-info {
display: inline-block; display: inline-block;
column-count: 1;
column-gap: $grid__gap;
width: 100%;
.contactform-descripcio textarea {
display: inline-block;
min-height: 23.5em;
}
} }
.contactform-fund-options { .contactform-name {
display: flex; float: left;
flex-direction: column; }
justify-content: space-between; .contactform-email {
p{ float:right;
display: inline-block; margin-bottom: 1rem;
} }
label.oficinasuport-titol-opcions { .contactform-message {
border: $border__line;
width: 100%;
display: inline-block;
margin-bottom: 1em;
}
.wpcf7-list-item {
display:block;
label {
display: flex;
flex-direction: row-reverse;
justify-content: left;
}
}
.wpcf7-form-control-wrap {
&[data-name="oferta-data-start"],&[data-name="oferta-data-end"] {
display: block;
input[type="date"] {
width: auto;
//background-color: $color__white;
}
&::before {
display: inline-block;
width: 2rem;
}
}
&[data-name="oferta-data-start"]::before {
content:"inici: ";
}
&[data-name="oferta-data-end"]::before {
content:"fi: ";
}
}
} }
} }
@media screen and (max-width: 48em) { .contactform-acceptance {
//only smaller than 48em display: flex;
align-items: center;
justify-content: end;
} }
@media screen and (min-width: 48em) { .contactform-fund-info {
//only bigger than 48em display: inline-block;
.wpcf7-form { column-count: 2;
text-align: center; column-gap: $grid__gap;
} width: 100%;
.contactform-fund-info { .contactform-descripcio textarea {
column-count: 2; display: inline-block;
} min-height: 15.5em;
.contactform-fund-options {
flex-direction: row;
} }
} }
@media screen and (min-width: 80em) { .contactform-fund-options {
//only bigger than 80rem display: flex;
justify-content: space-between;
p{
display: inline-block;
}
.wpcf7-list-item {
display:block;
label {
display: flex;
flex-direction: row-reverse;
justify-content: left;
}
}
.wpcf7-form-control-wrap {
&[data-name="oferta-data-start"],&[data-name="oferta-data-end"] {
display: block;
input[type="date"] {
width: auto;
background-color: $color__white;
}
&::before {
display: inline-block;
width: 2rem;
}
}
&[data-name="oferta-data-start"]::before {
content:"inici: ";
}
&[data-name="oferta-data-end"]::before {
content:"fi: ";
}
}
} }

View File

@ -35,7 +35,7 @@
position: absolute; position: absolute;
bottom: 0rem; bottom: 0rem;
left: 0.7rem; left: 0.7rem;
font-size: 3rem; font-size: 5rem;
} }
&:hover { &:hover {

View File

@ -7,25 +7,3 @@
width: 0px !important; width: 0px !important;
display: none !important; display: none !important;
} }
.leaflet-marker-pane {
.leaflet-interactive > svg {
max-width: 0px;
width: 0px;
max-height: 0px;
height: 0px;
}
.dashicons,.dashicons-before::before {
width: $font__size-body*2;
height: $font__size-body*2;
font-size: $font__size-body*2;
}
}
.xarxaprod-associats-map {
.leaflet-popup-content-wrapper {
border-radius: $border__radius;
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
box-shadow: none;
box-shadow: $box__shadow;
}
}

View File

@ -5,7 +5,7 @@ Theme URI: https://git.hangar.org/xarxaprod/
Author: Hangar.org Tech Lab - hangar.org Author: Hangar.org Tech Lab - hangar.org
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.5.0 Version: 1.1.8
Tested up to: 6.4 Tested up to: 6.4
Requires PHP: 7.4 Requires PHP: 7.4
License: GNU General Public License v3 or later License: GNU General Public License v3 or later

View File

@ -7,11 +7,11 @@
* @package Xarxaprod_theme * @package Xarxaprod_theme
*/ */
if ( ! is_active_sidebar( 'after-content' ) ) { if ( ! is_active_sidebar( 'sidebar-funds' ) ) {
return; return;
} }
?> ?>
<aside id="secondary" class="widget-area"> <aside id="secondary" class="widget-area">
<?php dynamic_sidebar( 'after-content' ); ?> <?php dynamic_sidebar( 'sidebar-funds' ); ?>
</aside><!-- #secondary --> </aside><!-- #secondary -->

1204
style.css

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -47,48 +47,37 @@
<ul class="xarxaprod-associat-contact-fields"> <ul class="xarxaprod-associat-contact-fields">
<?php if( get_field('xxp_associat_address') ): ?> <?php if( get_field('xxp_associat_address') ): ?>
<li class="xarxaprod-associat-address"> <li class="xarxaprod-associat-address">
<h6>Adreça:</h6> <h6>adreça / direccion:</h6>
<p><?php the_field('xxp_associat_address'); ?></p> <p><?php the_field('xxp_associat_address'); ?></p>
</li> </li>
<?php endif; ?> <?php endif; ?>
<?php if( get_field('xxp_associat_mail') ): ?> <?php if( get_field('xxp_associat_mail') ): ?>
<li class="xarxaprod-associat-mail"> <li class="xarxaprod-associat-mail">
<h6>Eail:</h6> <h6>mail:</h6>
<p><a href="mailto:<?php the_field('xxp_associat_mail'); ?>"><?php the_field('xxp_associat_mail'); ?></a></p> <p><a href="mailto:<?php the_field('xxp_associat_mail'); ?>"><?php the_field('xxp_associat_mail'); ?></a></p>
</li> </li>
<?php endif; ?> <?php endif; ?>
<?php if( get_field('xxp_associat_web') ): ?> <?php if( get_field('xxp_associat_web') ): ?>
<li class="xarxaprod-associat-web"> <li class="xarxaprod-associat-web">
<h6>Web:</h6> <h6>web:</h6>
<p><a href="<?php the_field('xxp_associat_web'); ?>" class=""><?php the_field('xxp_associat_web') ;?></a></p> <p><a href="<?php the_field('xxp_associat_web'); ?>" class=""><?php the_field('xxp_associat_web') ;?></a></p>
</li> </li>
<?php endif; ?> <?php endif; ?>
<?php if( get_field('xxp_associat_tel') ): ?> <?php if( get_field('xxp_associat_tel') ): ?>
<li class="xarxaprod-associat-tel"> <li class="xarxaprod-associat-tel">
<h6>Telèfon:</h6> <h6>tel:</h6>
<p><?php the_field('xxp_associat_tel'); ?></p> <p><?php the_field('xxp_associat_tel'); ?></p>
</li> </li>
<?php endif; ?> <?php endif; ?>
<?php if( get_field('xxp_associat_xarxes') ): ?>
<li class="xarxaprod-associat-tel">
<h6>Xarxes socials:</h6>
<p><?php the_field('xxp_associat_xarxes'); ?></p>
</li>
<?php endif; ?>
</ul> </ul>
</section> </section>
<section class="xarxaprod-associat-services"> <section class="xarxaprod-associat-services">
<dt>Serveis</dt> <dt>Serveis</dt>
<?php get_template_part( <?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_associat_service') ); ?>
'template-parts/section',
'list-checkbox',
array('iterate_field' => 'xxp_associat_service')
); ?>
</section> </section>
<section class="xarxaprod-associat-logo"> <section class="xarxaprod-associat-logo">
@ -100,30 +89,6 @@
</section> </section>
</section> </section>
<?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'); ?>
<a href="#<?php echo acf_esc_html( $image['filename'] );?>">
<?php echo wp_get_attachment_image( $image['ID'], 'thumbnail' ); ?>
</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'); ?>
<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 ?>
<section class="xarxaprod-associat-convos"> <section class="xarxaprod-associat-convos">
<?php get_template_part( 'template-parts/section', 'last-convos' ); ?> <?php get_template_part( 'template-parts/section', 'last-convos' ); ?>
</section> </section>
@ -132,13 +97,7 @@
<?php if( get_field('xxp_associat_osm_map') ): ?> <?php if( get_field('xxp_associat_osm_map') ): ?>
<div class="xarxaprod-associat-osm-map"> <div class="xarxaprod-associat-osm-map">
<h6 class="">Mapa:</h6> <h6 class="">Mapa:</h6>
<figure class="xarxaprod-associats-map"> <figure><?php the_field('xxp_associat_osm_map'); ?></figure>
<?php
xarxaprod_show_leaflet_map(); //defined in pluggin
xarxaprod_show_leaflet_associat_blob(); //defined in pluggin
?>
<?php //the_field('xxp_associat_osm_map'); ?>
</figure>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if( get_field('xxp_associat_osm_link') ): ?> <?php if( get_field('xxp_associat_osm_link') ): ?>

View File

@ -15,53 +15,6 @@
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header --> </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"> <section class="xarxaprod-convo-info-fields">
<ul> <ul>
<?php if( get_field('xxp_convo_espai_associat') ): <?php if( get_field('xxp_convo_espai_associat') ):
@ -130,7 +83,7 @@
</ul> </ul>
</section> </section>
<main class="entry-content"> <div class="entry-content">
<?php <?php
the_content( the_content(
sprintf( sprintf(
@ -153,15 +106,9 @@
) )
); );
?> ?>
</main><!-- .entry-content --> </div><!-- .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' ); ?>
<footer class="entry-footer">
<?php xarxaprod_entry_footer(); ?> <?php xarxaprod_entry_footer(); ?>
</footer><!-- .entry-footer --> </footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> --> </article><!-- #post-<?php the_ID(); ?> -->

View File

@ -15,48 +15,22 @@
<?php the_title(); ?> <?php the_title(); ?>
</a> </a>
</h3> </h3>
<?php if( get_field('xxp_convo_apply_end') ): ?> <?php if( get_field('xxp_convo_apply_end') ): ?>
<h6 class="xarxaprod-convo-date"><?php the_field('xxp_convo_apply_end'); ?></h6> <h6 class="xarxaprod-convo-date"><?php the_field('xxp_convo_apply_end'); ?></h6>
<?php endif; ?> <?php endif; ?>
<section class="excerpt post-excerpt"> <section class="excerpt post-excerpt">
<?php //the_excerpt() ?> <?php the_excerpt() ?>
<?php echo wp_trim_words(get_the_excerpt(), 30); // https://developer.wordpress.org/reference/functions/wp_trim_words/?>
</section> </section>
<aside> <aside>
<?php get_template_part( <?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_field') ); ?>
'template-parts/section', <?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_territory') ); ?>
'list-checkbox', <?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_service') ); ?>
array('iterate_field' => 'xxp_convo_field') <?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_center') ); ?>
); ?>
<?php get_template_part(
'template-parts/section',
'list-checkbox',
array('iterate_field' => 'xxp_convo_territory')
); ?>
<?php get_template_part(
'template-parts/section',
'list-checkbox',
array('iterate_field' => 'xxp_convo_service')
); ?>
<?php get_template_part(
'template-parts/section',
'list-checkbox',
array('iterate_field' => 'xxp_convo_center')
); ?>
</aside> </aside>
<nav class="more-link"> <nav class="more-link">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark" class="button button-more"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark" class="button button-more">
Més info Més info
<span class="hide"><?php the_title(); ?></span> <span class="hide"><?php the_title(); ?></span>
</a> </a>
</nav> </nav>
</article><!-- #post-<?php the_ID(); ?> --> </article><!-- #post-<?php the_ID(); ?> -->

View File

@ -9,62 +9,37 @@
*/ */
?> ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('xarxaprod-card-each'); ?> > <article id="post-<?php the_ID(); ?>" <?php post_class('xarxaprod-card-each'); ?> >
<h3 class="entry-title"> <h3 class="entry-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark">
<?php the_title(); ?> <?php the_title(); ?>
</a> </a>
</h3> </h3>
<?php if( get_field('xxp_funder_name') ): //case of ajuts fund ?>
<h6 class="xarxaprod-funder-name"><?php the_field('xxp_funder_name'); ?></h6>
<?php endif; ?>
<section class="excerpt post-excerpt"> <section class="excerpt post-excerpt">
<?php //the_excerpt() ?> <?php the_excerpt() ?>
<?php echo wp_trim_words(get_the_excerpt(), 22); // https://developer.wordpress.org/reference/functions/wp_trim_words/?>
</section> </section>
<aside>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_target') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_source') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_field') ); ?>
<?php if( get_field('xxp_fund_apply_begin') || get_field('xxp_fund_apply_end') ): ?>
<ul class="xarxaprod-label item-xxp_fund_dates">
<li>del <?php the_field('xxp_fund_apply_begin'); ?></li>
<li>al <?php the_field('xxp_fund_apply_end'); ?></li>
</ul>
<?php endif; ?>
<?php if( get_field('xxp_fund_apply_text') ): ?>
<ul class="xarxaprod-label item-xxp_fund_dates">
<li class=""><?php the_field('xxp_fund_apply_text'); ?></li>
</ul>
<?php endif; ?>
<aside class="xarxaprod-associat-info"> <?php if( get_field('xxp_fund_call') ): ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_call') ); ?>
<section class="xarxaprod-associat-contact"> <?php endif; ?>
<ul class="xarxaprod-associat-contact-fields">
<?php if( get_field('xxp_associat_address') ): ?>
<li class="xarxaprod-associat-address">
<h6>adreça / direccion:</h6>
<p><?php the_field('xxp_associat_address'); ?></p>
</li>
<?php endif; ?>
<?php if( get_field('xxp_associat_mail') ): ?>
<li class="xarxaprod-associat-mail">
<h6>mail:</h6>
<p><a href="mailto:<?php the_field('xxp_associat_mail'); ?>"><?php the_field('xxp_associat_mail'); ?></a></p>
</li>
<?php endif; ?>
<?php if( get_field('xxp_associat_web') ): ?>
<li class="xarxaprod-associat-web">
<h6>web:</h6>
<p><a href="<?php the_field('xxp_associat_web'); ?>" class=""><?php the_field('xxp_associat_web') ;?></a></p>
</li>
<?php endif; ?>
<?php if( get_field('xxp_associat_tel') ): ?>
<li class="xarxaprod-associat-tel">
<h6>tel:</h6>
<p><?php the_field('xxp_associat_tel'); ?></p>
</li>
<?php endif; ?>
</ul>
</section>
<section class="xarxaprod-associat-services">
<dt>Serveis</dt>
<?php get_template_part(
'template-parts/section',
'list-checkbox',
array('iterate_field' => 'xxp_associat_service')
); ?>
</section>
</aside> </aside>
<nav class="more-link"> <nav class="more-link">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark" class="button button-more"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark" class="button button-more">

View File

@ -48,7 +48,7 @@
) )
); );
?> ?>
<h2> <a href="<?php echo home_url( '/convos/?xxp_convo_center=' ) . $slug_espai_associat ;?>"><?php echo esc_html__('Últimes convocatòries', 'xarxaprod'); ?> de <?php the_title(); ?></a></h2> <h3> <a href="<?php echo home_url( '/convos/?xxp_convo_center=' ) . $slug_espai_associat ;?>"><?php echo esc_html__('Últimes convocatòries', 'xarxaprod'); ?> de <?php the_title(); ?></a></h3>
</header> </header>
<main class="xarxaprod-last-convos xarxaprod-ultimes-convocatories"> <main class="xarxaprod-last-convos xarxaprod-ultimes-convocatories">
<?php } //end populate WP_Query custom post type xarxaprod-associat <?php } //end populate WP_Query custom post type xarxaprod-associat
@ -90,22 +90,20 @@
<?php if( get_field('xxp_convo_apply_begin') || get_field('xxp_convo_apply_end') ): ?> <?php if( get_field('xxp_convo_apply_begin') || get_field('xxp_convo_apply_end') ): ?>
<h6 class="xarxaprod-deadline">Deadline: <h6>Deadline:
<?php //the_field('xxp_convo_apply_begin'); ?> <?php //the_field('xxp_convo_apply_begin'); ?>
<?php the_field('xxp_convo_apply_end'); ?> <?php the_field('xxp_convo_apply_end'); ?>
</h6> </h6>
<?php endif; ?> <?php endif; ?>
<?php if( get_field('xxp_convo_apply_text') ): ?> <?php if( get_field('xxp_convo_apply_text') ): ?>
<h6 class="item-xxp_convo_apply_text"><?php the_field('xxp_convo_apply_text'); ?></h6> <p class="item-xxp_convo_apply_text"><?php the_field('xxp_convo_apply_text'); ?></p>
<?php endif; ?> <?php endif; ?>
<section class="excerpt post-excerpt"> <section class="excerpt post-excerpt">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark" class=""> <?php the_excerpt() ?>
<?php echo wp_trim_words(get_the_excerpt(), 16); // https://developer.wordpress.org/reference/functions/wp_trim_words/?>
</a>
</section> </section>
<aside class="convo-sector convo-field"> <aside class="convo-sector convo-field">
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_field') ); ?> <?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_field') ); ?>
</aside> </aside>

View File

@ -1,96 +0,0 @@
<?php
/**
*
* Section displaying the map with all members
* depens on plugins: LeafletMaps, ACF fields and Xarxaprod
* if not pressent LeafletMaps shows template-parts/section-eachmember.php
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
* @link https://developer.wordpress.org/themes/template-files-section/page-template-files/
*
* @package Xarxaprod_theme
* @since 1.0
*/
?>
<?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_associat = new WP_Query(
array(
'post_type' => 'xarxaprod-associat',
'order' => 'ASC', //order a b c d ...
'order_by' => 'name', // by name slug
'posts_per_page' => '-1' //all of them
)
);
?>
<?php if ( $the_query_associat->have_posts() ) : ?>
<?php
// Detect plugin. For use on Front End only.
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
// check for plugin using plugin name
if ( is_plugin_active( 'leaflet-map/leaflet-map.php' ) ) { ?>
<content>
<main id="espais-associats-map" class="espais-map" style="height: 55vh; widht: 100%;">
<?php
// show the map even if empty
echo do_shortcode( '[leaflet-map fitbounds lat="41.3922" lng="2.1755" height="100%" width="100%" tileurl=https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png scrollwheel detect-retina]');
?>
<?php while ( $the_query_associat->have_posts() ) : $the_query_associat->the_post(); ?>
<?php
// get the field values
// https://www.advancedcustomfields.com/resources/get_field/
// var_dump get_field('');
$args = get_field('xxp_associat_osm_map',false, false);
if ( count( $args['markers'] ) ) {
foreach ( $args['markers'] as $marker ) {
// define the fields for the blob
if ( get_field('xxp_associat_citymap') ){
// if city for map written use it
$associat_address = get_field('xxp_associat_citymap');
} else {
// else use the ACF OpenStreetMap nominatim value
$associat_address = $marker['label'];
};
$associat_xxp_weblink = '<a href="'. get_the_permalink() . '">' . get_the_title() . '</a>';
$associat_own_weblink = '<a href="' . get_field('xxp_associat_web') . '" class="">' . get_field('xxp_associat_web') . '</a>';
$associat_email = '<a href="mailto:' . get_field('xxp_associat_mail') . '" class="">' . get_field('xxp_associat_mail') . '</a>';
$associat_lat = $marker['lat'];
$associat_lng = $marker['lng'];
$associat_blobcolor = get_field('xxp_associat_colormap');
echo do_shortcode( '
[leaflet-marker svg background="#555" color="#555" iconSize="17,19" iconClass="dashicons dashicons-marker" opacity="0.6" lat=' . $associat_lat . ' lng=' . $associat_lng . ']'
. '<p>' . $associat_address . '</p>'
. '<h5><b>' . $associat_xxp_weblink . '</b></h5>'
. '<p>' . $associat_own_weblink . '</p>'
. '<p>' . $associat_email . '</p>'
. '[/leaflet-marker]'
); // end shortcode each marker
}; // end each marker
}; // end count all markers
?>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
</main>
</content>
<?php
} else {
// if no leaflet plugin, show card with each member
?>
<content class="archive-posts archive-xarxaprod-members archive-xarxaprod-associats <?php //xarxaprod_class_posttype(); ?>">
<?php while ( $the_query_associat->have_posts() ) : $the_query_associat->the_post(); ?>
<?php get_template_part( 'template-parts/section', 'eachmember' ); ?>
<?php endwhile;//end of the loop ?>
</content>
<?php }//end else plugin control?>
<?php endif; //end query associat ?>
<?php