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">
<aside id="associatsfilter" class="xarxaprod-filter-associats xarxaprod-filtre-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 xarxaprod_associats_filters_form(); // function defined in the plugin ?>
<?php } //end if is_plugin_active ?>
</aside>
<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 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;
//the_posts_navigation();
the_posts_navigation();
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
*/
require get_template_directory() . '/inc/widgets-register.php';
/**
* 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.
@ -168,6 +193,7 @@ require get_template_directory() . '/inc/user-role-capabilities-mod.php';
/**
* Functions to personalize the_archive_title() function
*/
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() {
register_sidebar(
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',
'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
@ -18,8 +18,8 @@
);
register_sidebar(
array(
'name' => esc_html__( 'After content - Despres del contingut i abans del peu. A tota la web.', 'xarxaprod' ),
'id' => 'after-content',
'name' => esc_html__( 'Sidebar funds - Lateral ajuts', 'xarxaprod' ),
'id' => 'sidebar-funds',
'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
@ -29,18 +29,7 @@
);
register_sidebar(
array(
'name' => esc_html__( 'After Associats - Despres del contingut als Espais Associats i abans del 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' ),
'name' => esc_html__( 'Footer - Peu', 'xarxaprod' ),
'id' => 'footer-widgets',
'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',

View File

@ -64,18 +64,10 @@
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.
//
//for ( const link of linksWithChildren ) {
// link.addEventListener( 'touchstart', toggleFocus, false );
//}
//
for ( const link of linksWithChildren ) {
link.addEventListener( 'touchstart', toggleFocus, false );
}
/**
* Sets or removes .focus class on an element.

View File

@ -53,47 +53,24 @@ get_header();
$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
'posts_per_page' => '-1'
)
);
?>
<?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 ?>
<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 xarxaprod_show_leaflet_associat_blob(); ?>
<?php get_template_part( 'template-parts/section', 'eachmember' ); ?>
<?php endwhile;//end of the loop ?>
</figure>
<?php wp_reset_postdata(); ?>
</content>
<?php
//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' );
//endwhile;//end of the loop
//echo '</content>';
?>
<?php endif; //end query associat ?>
</section>
</main><!-- #main -->
<?php if ( is_active_sidebar( 'after-content-members' ) ):?>
<aside id="secondary" class="widget-area widget-area-members">
<?php dynamic_sidebar( 'after-content-members' ); ?>
</aside><!-- #secondary -->
<?php endif; //end sidebar ?>
</main><!-- #main -->
<?php
get_sidebar();
get_footer();

View File

@ -73,5 +73,4 @@ get_header();
</main><!-- #main -->
<?php
get_sidebar();
get_footer();

View File

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

View File

@ -48,8 +48,4 @@ $color__border-button-hover: $color__black-grey;
$color__border-button-focus: $color__black-light;
$color__border-input: $color__black;
$color__border-abbr: $color__grey-dark;
//other
$border__radius: 0.2rem;
$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;
background: $color__background-button;
color: $color__white;
font-size: $font__size-body * 0.9;
line-height: 1;
padding: 0.6em;
padding: 0.5em;
margin: 0;
&:hover {
@ -43,7 +42,7 @@ input[type="submit"],
}
.search-submit{
z-index: 10;
margin: 0 0 0 -3rem;
margin: 0rem;
border: none;
width: 2.5rem;
height: 2.5rem;
@ -63,7 +62,6 @@ input[type="submit"],
min-height: 2.5rem;
font-size: 2rem;
content: "\26b2";
color: $color__grey-dark;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);

View File

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

View File

@ -21,19 +21,3 @@ a {
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;
padding: 0.2em 0.2em 0 0.2em;
color: $color__text-screen;
border: $border__line;
border: 1px solid $color__black;
background-color: none;
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 {
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 {
margin-top: 0;
margin-bottom: 1.5em;
&.big {
font-size: $font__size-body*1.25;
}
&.small{
font-size: $font__size-body*0.8;
}
}
dfn,
@ -58,21 +51,9 @@ ins {
text-decoration: none;
}
.big {
big {
font-size: 125%;
p {
font-size: $font__size-body*1.25;
}
}
.small {
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,
.h1,.h2,.h3,.h4,.h5,.h6{
clear: both;
margin-top: 0;
margin-bottom: 0;
line-height: $font__line-height-header;
}
h1,.h1 {
@ -31,6 +29,7 @@
}
h4,.h4 {
font-size: $font__size-body*1.2;
//font-weight: 500;
&.small {
font-size: $font__size-body*0.9;
}
@ -39,103 +38,30 @@
font-size: $font__size-body*1.1;
font-weight: 500;
&.small {
font-size: $font__size-body*0.9;
font-size: $font__size-body*0.8;
}
}
h6,.h6 {
font-size: $font__size-body*1;
font-size: $font__size-body*1.1;
font-weight: 100;
&.small {
font-size: $font__size-body*0.8;
}
}
.small {
h1,.h1 {
font-size: $font__size-body*1.5;
}
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;
.site-main {
h1,h2,h3,h4,h5,h6,
.h1,.h2,.h3,.h4,.h5,.h6 {
margin: 0;
}
}
.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 {
h2,.h2 {
margin: 1.2rem 0;
font-size: $font__size-body*2;
line-height: 1.2;
border-bottom: $border__line;
//border-bottom: 0.6rem solid $color__black;
border-bottom: 0.6rem solid $color__black;
}
}
/* 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-last-convos.php
@ -150,27 +76,31 @@
&::after {
display: inline-block;
align-self: center;
//justify-self: center;
font-size: 0.8rem;
justify-self: center;
font-size: 0.4em;
color: $color__white;
background-color: $color__black;
padding: 0.6em 0.8em;
padding: 0.4em;
}
}
}
[lang="ca"] section.agenda h2 a::after {
content: "Veure totes les activitas";
content: "Verure totes les activitas";
}
[lang*="es"] section.agenda h2 a::after {
content: "Ver todas las actividades";
}
[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 {
content: "Ver todas las convocatorias";
}
/* entry content */
.entry-content h6 {
padding: 0.5em 0;
}
}
@media screen and (min-width: 48em) {
h1,.h1 {
@ -180,22 +110,21 @@
font-size: $font__size-body*2.5;
}
h3,.h3 {
font-size: $font__size-body*1.4;
font-size: $font__size-body*2;
}
h4,.h4 {
font-size: $font__size-body*1.3;
font-size: $font__size-body*1.7;
}
h5,.h5 {
font-size: $font__size-body*1.2;
font-size: $font__size-body*1.4;
}
h6,.h6 {
font-size: $font__size-body*1;
font-size: $font__size-body*1.2;
}
.home-featured {
h2,.h2 {
font-size: $font__size-body*3.5;
//border-bottom: 0.8rem solid $color__black;
border-bottom: $border__line;
border-bottom: 0.8rem solid $color__black;
}
}
}

View File

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

View File

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

View File

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

View File

@ -1,28 +1,14 @@
@media screen {
//any screen
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;
.site-header {
background-color: $color__white;
}
}
.no-sidebar {
}
.site {
position: relative;
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-template-areas:
"header"
@ -50,8 +36,14 @@
position: sticky;
top: 0;
z-index: 500;
width: 100%;
display: grid;
grid-template-areas:
"main"
"secondary ";
grid-row: auto;
align-items: center;
padding: 0.5rem 0;
width: 100vw;
background-color: transparent;
.main {
@ -72,7 +64,7 @@
> section {
padding: 0;
> header {
padding: 1em 0;
padding: 2em 0;
}
}
}
@ -83,13 +75,16 @@
color: $color__white;
margin-top: 4em;
: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 {
&> section {
margin-top: 2em;
padding: 2em 4em;
border-top: $border__line;
border-top: 0.1em solid $color__white;
}
}
a {
@ -104,16 +99,45 @@
text-decoration: underline;
}
}
}//end .site-footer
:where(.wp-block-columns.is-layout-flex) {
gap: $grid__gap * 1.5;
ul[id*="menu-legal"] li {
float: left;
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-last-convos,.xarxaprod-ultimes-convocatories,
.archive-posts {
display: grid;
grid-template-columns: repeat(1 , 1fr);
gap: $grid__gap * 1.5;
gap: $grid__gap * 3;
}
}
@media screen and (max-width: 48em) {
@ -123,34 +147,25 @@
padding-right: 1em;
}
}
.site-main {
}
.site-footer {
.is-layout-flex {
flex-flow: column;
align-items: flex-start;
}
}
.page-template-funds-search {
}
.home-featured {
}
}
@media screen and (min-width: 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 {
grid-template-columns: 1fr 2fr 2fr 1fr;
> header {
grid-column: 2 / 4;
grid-column: 1 / -1;
}
> main {
grid-column: 2 / 4;
@ -163,6 +178,13 @@
}
}
.site-header {
display: grid;
grid-template-columns: 1fr 2fr 2fr 1fr;
grid-template-areas:
"main "
"secondary ";
margin: auto;
margin-bottom: 2rem;
padding: 0;
.main {
@ -176,35 +198,9 @@
}
}
.site-main {
padding: 0;
> 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;
}
}
}
padding: 0 2rem;
> section {
padding-bottom: 4rem;
padding: 4em 0;
}
}
.site-footer {
@ -215,6 +211,7 @@
}
&.single {
.site-main {
//width: 45rem;
margin: 0 auto;
}
}

View File

@ -1,15 +1,14 @@
@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;
}
.wpcf7-not-valid-tip {
}
.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 {
}
.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;
@ -18,32 +17,35 @@
text-align: center;
margin: 0em;
padding: 0rem;
}
.wpcf7-form {
}
.wpcf7-form {
.wpcf7-submit {
margin-left: 1rem;
}
.wpcf7-spinner {
margin: 0 -24px 0 0;
}
}
}
.wpcf7-list-item-label {
.wpcf7-list-item-label {
margin: 0 0.3rem;
}
.wpcf7-form {
//text-align: center;
}
.wpcf7-form {
text-align: center;
input:not([type="submit"]),textarea {
background: transparent;
border: $border__line;
border: 0.1em solid $color__black;
padding: 1em;
//&[type="email"] {
// text-align: center;
//}
}
}
}
/* styles applied if written in wp backend
/* styles applied if written in wp backend
* class="contactform contactform-WHATEVER"
* */
.contactform {
.contactform {
margin-bottom: 1rem;
br {
display: none;
@ -56,8 +58,8 @@
.break-after-column, .saltar-columna{
break-after:column;
}
}
.contactform-consultoria {
}
.contactform-consultoria {
.contactform-name, .contactform-email {
max-width: 40%;
display: inline-block;
@ -71,36 +73,28 @@
}
.contactform-message {
}
}
.contactform-acceptance {
}
.contactform-acceptance {
display: flex;
align-items: center;
justify-content: end;
}
.contactform-fund-info {
}
.contactform-fund-info {
display: inline-block;
column-count: 1;
column-count: 2;
column-gap: $grid__gap;
width: 100%;
.contactform-descripcio textarea {
display: inline-block;
min-height: 23.5em;
min-height: 15.5em;
}
}
.contactform-fund-options {
}
.contactform-fund-options {
display: flex;
flex-direction: column;
justify-content: space-between;
p{
display: inline-block;
}
label.oficinasuport-titol-opcions {
border: $border__line;
width: 100%;
display: inline-block;
margin-bottom: 1em;
}
.wpcf7-list-item {
display:block;
label {
@ -114,7 +108,7 @@
display: block;
input[type="date"] {
width: auto;
//background-color: $color__white;
background-color: $color__white;
}
&::before {
display: inline-block;
@ -128,24 +122,5 @@
content:"fi: ";
}
}
}
}
@media screen and (max-width: 48em) {
//only smaller than 48em
}
@media screen and (min-width: 48em) {
//only bigger than 48em
.wpcf7-form {
text-align: center;
}
.contactform-fund-info {
column-count: 2;
}
.contactform-fund-options {
flex-direction: row;
}
}
@media screen and (min-width: 80em) {
//only bigger than 80rem
}

View File

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

View File

@ -7,25 +7,3 @@
width: 0px !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 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>
Version: 1.5.0
Version: 1.1.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v3 or later

View File

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

1066
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">
<?php if( get_field('xxp_associat_address') ): ?>
<li class="xarxaprod-associat-address">
<h6>Adreça:</h6>
<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>Eail:</h6>
<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>
<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èfon:</h6>
<h6>tel:</h6>
<p><?php the_field('xxp_associat_tel'); ?></p>
</li>
<?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>
</section>
<section class="xarxaprod-associat-services">
<dt>Serveis</dt>
<?php get_template_part(
'template-parts/section',
'list-checkbox',
array('iterate_field' => 'xxp_associat_service')
); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_associat_service') ); ?>
</section>
<section class="xarxaprod-associat-logo">
@ -100,30 +89,6 @@
</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">
<?php get_template_part( 'template-parts/section', 'last-convos' ); ?>
</section>
@ -132,13 +97,7 @@
<?php if( get_field('xxp_associat_osm_map') ): ?>
<div class="xarxaprod-associat-osm-map">
<h6 class="">Mapa:</h6>
<figure class="xarxaprod-associats-map">
<?php
xarxaprod_show_leaflet_map(); //defined in pluggin
xarxaprod_show_leaflet_associat_blob(); //defined in pluggin
?>
<?php //the_field('xxp_associat_osm_map'); ?>
</figure>
<figure><?php the_field('xxp_associat_osm_map'); ?></figure>
</div>
<?php endif; ?>
<?php if( get_field('xxp_associat_osm_link') ): ?>

View File

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

View File

@ -15,48 +15,22 @@
<?php the_title(); ?>
</a>
</h3>
<?php if( get_field('xxp_convo_apply_end') ): ?>
<h6 class="xarxaprod-convo-date"><?php the_field('xxp_convo_apply_end'); ?></h6>
<?php endif; ?>
<section class="excerpt post-excerpt">
<?php //the_excerpt() ?>
<?php echo wp_trim_words(get_the_excerpt(), 30); // https://developer.wordpress.org/reference/functions/wp_trim_words/?>
<?php the_excerpt() ?>
</section>
<aside>
<?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_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')
); ?>
<?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_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>
<nav class="more-link">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark" class="button button-more">
Més info
<span class="hide"><?php the_title(); ?></span>
</a>
</nav>
</article><!-- #post-<?php the_ID(); ?> -->

View File

@ -10,61 +10,36 @@
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('xarxaprod-card-each'); ?> >
<h3 class="entry-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark">
<?php the_title(); ?>
</a>
</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">
<?php //the_excerpt() ?>
<?php echo wp_trim_words(get_the_excerpt(), 22); // https://developer.wordpress.org/reference/functions/wp_trim_words/?>
<?php the_excerpt() ?>
</section>
<aside class="xarxaprod-associat-info">
<section class="xarxaprod-associat-contact">
<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; ?>
<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>
</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>
<?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; ?>
<?php if( get_field('xxp_fund_call') ): ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_call') ); ?>
<?php endif; ?>
</aside>
<nav class="more-link">
<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>
<main class="xarxaprod-last-convos xarxaprod-ultimes-convocatories">
<?php } //end populate WP_Query custom post type xarxaprod-associat
@ -90,20 +90,18 @@
<?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_end'); ?>
</h6>
<?php endif; ?>
<?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; ?>
<section class="excerpt post-excerpt">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark" class="">
<?php echo wp_trim_words(get_the_excerpt(), 16); // https://developer.wordpress.org/reference/functions/wp_trim_words/?>
</a>
<?php the_excerpt() ?>
</section>
<aside class="convo-sector convo-field">
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_field') ); ?>

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