Compare commits

...

46 Commits

Author SHA1 Message Date
jorge 482e1e30e9 bumped version 1.5 2024-04-01 19:37:19 +02:00
jorge ba7db45cc5 styled menus, shadows, border boxex, and leaflet 2024-04-01 19:35:54 +02:00
jorge a68e86c448 styled ajuts funds post type 2024-04-01 18:49:43 +02:00
jorge 3577f51e90 removed scroolbar in webkit overflow scroll 2024-04-01 18:24:06 +02:00
jorge da21ef92e2 styled convo view with images and other convos 2024-04-01 18:15:52 +02:00
jorge 51d0ba24e2 unified borders gaps and modified spaces 2024-04-01 15:54:23 +02:00
jorge 54922ca5f1 added dashicons to front-end 2024-04-01 14:51:41 +02:00
jorge 0d9095bfc6 q 2024-04-01 14:08:43 +02:00
jorge 6befb60ce5 styled height in gallery carousel nav 2024-04-01 11:54:19 +02:00
jorge ebd0bbe819 added and styled galleries in associat member view 2024-04-01 11:05:33 +02:00
jorge 9a740f5fee added multiply effect 2024-03-31 20:22:22 +02:00
jorge 44c69e7ea9 stiling associats members 2024-03-31 19:45:28 +02:00
jorge 7d2c29b858 added multiply effetc to pictures. clean up styles 2024-03-31 19:44:17 +02:00
jorge 85b44d7f72 added style for lang menu 2024-03-31 17:01:45 +02:00
jorge 228ffece25 show sidebar in associats members if exists 2024-03-31 16:33:41 +02:00
jorge 3ad6632cc6 added new widget area. renamed general widget areas. aplly general widget areas to page templates 2024-03-31 16:20:10 +02:00
jorge db32cad184 styled margins before and after headers 2024-03-31 16:18:36 +02:00
jorge 7fe9ffc741 moved call to script to inc, cleaner structure 2024-03-31 14:41:36 +02:00
jorge a7e4455e73 styled agenda images 2024-03-30 18:41:37 +01:00
jorge b0abdf06ef styled Intro when .xarxaprod-intro .big or .small are added to groups 2024-03-30 17:11:03 +01:00
jorge e1433745ac styled paragraphs, tytles and gaps, added case intro in posts and pages 2024-03-30 15:13:17 +01:00
jorge 8a451a1138 styled front page elements that combine headers, buttons and moved all font-sizes to rem (avoid em) 2024-03-30 14:29:34 +01:00
jorge de4f2a16ac styled maps and post pages archives for memembers 2024-03-28 22:53:21 +01:00
jorge 85d4b072d7 added support for maps on theme through xarxaprod-wp-plugin functions 2024-03-28 22:52:32 +01:00
jorge 2dbdf30fa3 created map for all associats template page 2024-03-28 20:20:22 +01:00
jorge 60a586ef6f typo error in heding h3 links 2024-03-28 14:03:46 +01:00
jorge b3219db0f9 increased logo size in header. reduced heading sizes 2024-03-28 14:01:41 +01:00
jorge 4f8481b220 bumped version number 1.3 2024-03-14 21:00:13 +01:00
jorge f4a50c2d90 styled form and border as variable 2024-03-14 20:54:11 +01:00
jorge 590d0fbe7b styled menu for small screens 2024-03-14 20:30:26 +01:00
jorge 5b1262e01b navigation js breaks apart navigation logic in small screens 2024-03-14 20:27:09 +01:00
jorge 7d25caa7f5 modified header and menus on big and small screens 2024-03-14 18:55:12 +01:00
jorge e120687f58 darkened placeholder and ordered view in small screens 2024-03-14 18:54:24 +01:00
jorge 84f6205721 styled header and widths with better solution for scroll and possitions 2024-03-14 17:21:02 +01:00
jorge b40bb55e74 revert lang to right side 2024-03-14 14:46:54 +01:00
jorge 7a767bda29 bumped stylesheet version 1.2 2024-03-14 13:37:13 +01:00
jorge 192aaf33ee styled size of symbols in black-bloc css 2024-03-14 13:36:34 +01:00
jorge c640648331 ordered lang in first position to avoid missplacement 2024-03-14 13:35:44 +01:00
jorge f1432bc8d0 edited info in confo and styled code 2024-03-14 11:46:00 +01:00
jorge 0d0113f9de styled convos and members 2024-03-14 11:37:22 +01:00
jorge ab2042f727 edited file compile coding styles 2024-03-14 11:36:43 +01:00
jorge 91ba0e1791 coded each member and styled 2024-03-14 11:35:49 +01:00
jorge b8d13620ff coding styles 2024-03-14 11:35:02 +01:00
jorge 2f84acda90 styled socialmedia menu as icons 2024-03-13 21:27:01 +01:00
jorge b7cd4bdf8c ordered layout css properties 2024-03-13 20:31:52 +01:00
jorge 7b67eb1895 styled site columns width, global gap 2024-03-13 20:24:02 +01:00
37 changed files with 2918 additions and 1451 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,21 +21,20 @@ 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' );
//get_template_part( 'template-parts/section', 'eachmember' );
xarxaprod_show_leaflet_associat_blob(); // function defined in the plugin
endwhile;
the_posts_navigation();
//the_posts_navigation();
else :

File diff suppressed because one or more lines are too long

View File

@ -121,37 +121,12 @@ 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.
*/
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' );
require get_template_directory() . '/inc/theme-css-scripts.php';
/**
* Implement the Custom Header feature.
@ -193,7 +168,6 @@ 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';
/**

35
inc/theme-css-scripts.php Normal file
View File

@ -0,0 +1,35 @@
<?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 - principal', 'xarxaprod' ),
'name' => esc_html__( 'Front Page - Despres del contingut a la Pagina 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__( 'Sidebar funds - Lateral ajuts', 'xarxaprod' ),
'id' => 'sidebar-funds',
'name' => esc_html__( 'After content - Despres del contingut i abans del peu. A tota la web.', 'xarxaprod' ),
'id' => 'after-content',
'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
@ -29,7 +29,18 @@
);
register_sidebar(
array(
'name' => esc_html__( 'Footer - Peu', 'xarxaprod' ),
'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' ),
'id' => 'footer-widgets',
'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',

View File

@ -64,10 +64,18 @@
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,24 +53,47 @@ get_header();
$the_query_associat = new WP_Query(
array(
'post_type' => 'xarxaprod-associat',
'posts_per_page' => '-1'
'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-xarxaprod-members archive-xarxaprod-associats <?php //xarxaprod_class_posttype(); ?>">
<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 get_template_part( 'template-parts/section', 'eachmember' ); ?>
<?php xarxaprod_show_leaflet_associat_blob(); ?>
<?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 ?>
<?php
get_sidebar();
get_footer();

View File

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

View File

@ -48,4 +48,8 @@ $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,8 +9,9 @@ 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.5em;
padding: 0.6em;
margin: 0;
&:hover {
@ -42,7 +43,7 @@ input[type="submit"],
}
.search-submit{
z-index: 10;
margin: 0rem;
margin: 0 0 0 -3rem;
border: none;
width: 2.5rem;
height: 2.5rem;
@ -62,6 +63,7 @@ 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: 1px solid $color__border-input;
border: $border__line;
}
textarea {

View File

@ -21,3 +21,19 @@ 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: 1px solid $color__black;
border: $border__line;
background-color: none;
font-size: $font__size-body*0.8;
}
@ -89,4 +89,68 @@ 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,3 +13,29 @@ 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,5 +1,12 @@
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,
@ -51,9 +58,21 @@ 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,6 +7,8 @@
h6,
.h1,.h2,.h3,.h4,.h5,.h6{
clear: both;
margin-top: 0;
margin-bottom: 0;
line-height: $font__line-height-header;
}
h1,.h1 {
@ -29,7 +31,6 @@
}
h4,.h4 {
font-size: $font__size-body*1.2;
//font-weight: 500;
&.small {
font-size: $font__size-body*0.9;
}
@ -38,30 +39,103 @@
font-size: $font__size-body*1.1;
font-weight: 500;
&.small {
font-size: $font__size-body*0.8;
font-size: $font__size-body*0.9;
}
}
h6,.h6 {
font-size: $font__size-body*1.1;
font-size: $font__size-body*1;
font-weight: 100;
&.small {
font-size: $font__size-body*0.8;
}
}
.site-main {
h1,h2,h3,h4,h5,h6,
.h1,.h2,.h3,.h4,.h5,.h6 {
margin: 0;
.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;
}
}
.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: 0.6rem solid $color__black;
border-bottom: $border__line;
//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
@ -76,31 +150,27 @@
&::after {
display: inline-block;
align-self: center;
justify-self: center;
font-size: 0.4em;
//justify-self: center;
font-size: 0.8rem;
color: $color__white;
background-color: $color__black;
padding: 0.4em;
padding: 0.6em 0.8em;
}
}
}
[lang="ca"] section.agenda h2 a::after {
content: "Verure totes les activitas";
content: "Veure totes les activitas";
}
[lang*="es"] section.agenda h2 a::after {
content: "Ver todas las actividades";
}
[lang="ca"] section.last-convos h2 a::after {
content: "Verure totes les convocatories";
content: "Veure 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 {
@ -110,21 +180,22 @@
font-size: $font__size-body*2.5;
}
h3,.h3 {
font-size: $font__size-body*2;
}
h4,.h4 {
font-size: $font__size-body*1.7;
}
h5,.h5 {
font-size: $font__size-body*1.4;
}
h6,.h6 {
h4,.h4 {
font-size: $font__size-body*1.3;
}
h5,.h5 {
font-size: $font__size-body*1.2;
}
h6,.h6 {
font-size: $font__size-body*1;
}
.home-featured {
h2,.h2 {
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,6 +42,14 @@ 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,4 +1,6 @@
@media screen {
//any screen
.sticky {
display: block;
}
@ -13,20 +15,31 @@
}
.page-content,
.entry-content,
.entry-summary {
margin: 1.5em 0 0;
}
.site-main {
.entry-title {
margin: 0.5em 0;
margin: 0.5em 0 0 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?
@ -42,7 +55,7 @@
display:inline-grid;
&:after {
content: "";
border-bottom:0.05em solid $color__black;
border-bottom: $border__line;
width: 100%;
position: absolute;
bottom: 0;
@ -79,18 +92,26 @@
.xarxaprod-card-each {
display: flex;
flex-direction: column;
.entry-title,h6 {
.entry-title {
margin: 0;
padding: 0.5rem 0;
border-bottom: 1px solid $color__black;
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;
}
p {
padding: 0.5rem 0;
margin:0;
}
.excerpt {
border-bottom: 1px solid $color__black;
border-bottom: $border__line;
margin-bottom: 0.5em;
padding: 0.5em 0;
}
.more-link {
margin-top: 1rem;
@ -105,19 +126,25 @@
.xarxaprod-fund-info-fields,
.xarxaprod-fund-info-contact-fields {
display: grid;
margin-bottom: 2rem;
.xarxaprod-fund-info-field {
padding-bottom: 1rem;
border-bottom: 1px solid $color__black;
padding: 1rem 0;
border-bottom: $border__line;
}
h6 {
font-size: 2.4rem;
//display: inline;
font-size: $font__size-body*2.4;
font-variant: all-petite-caps;
~ p .button {
display: inline-block;
margin-top: 0.5rem;
}
}
p {
margin: 0.5rem 0 0 0;
margin: 0;
}
li {
font-size: 1.3rem;
font-size: $font__size-body*1.3;
}
}
.xarxaprod-fund-info-contact-fields {
@ -127,7 +154,7 @@
}
.xarxaprod-fund-info-fields {
.xarxaprod-fund-info-field {
margin: 1rem 0 0.5rem 0;
margin: 0;
}
}
.xarxaprod-funder-name,
@ -137,15 +164,35 @@
margin:0;
padding: 0;
font-variant: all-petite-caps;
font-size: 1.1rem;
font-size: $font__size-body*1.1;
line-height: 0.9;
align-items: center;
a {
text-decoration: none;
font-size: 0.8rem;
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;
}
}
}
}
.xarxaprod-convo-info-fields,
.xarxaprod-agenda-info {
margin-bottom: 2em;
@ -153,10 +200,12 @@
display:grid;
grid-template-columns: 0.75fr 2.25fr;
padding: 0.2em 0;
border-top: 0.05em solid $color__black;
font-size: 1em;
//border-top: 0.05em solid $color__black;
border-top: $border__line;
font-size: $font__size-body*1;
&:last-of-type{
border-bottom: 0.05em solid $color__black;
//border-bottom: 0.05em solid $color__black;
border-bottom: $border__line;
}
.xarxaprod-label li {
display: inherit;
@ -188,39 +237,50 @@
}
/* 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 1fr 1fr;
gap: $grid__gap * 2;
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: 1em;
font-size: $font__size-body*1;
border: none;
border-top: $border__line;
margin: 0;
padding: 0.5em 0;
}
h6,p {
font-size: 1em;
font-size: $font__size-body*1;
margin: 0;
padding: 0;
}
}
.xarxaprod-associat-contact li {
grid-template-columns: 1fr 2fr;
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 {
@ -230,15 +290,47 @@
}
.xarxaprod-associat-osm-link {
display: grid;
grid-template-columns: min-content auto;
grid-template-columns: auto;
align-items: center;
h6,p,a {
margin: 0.5em ;
font-size: 1em;
font-size: $font__size-body*1;
}
}
}
}
/*
* 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;
}
}
/*
@ -256,14 +348,16 @@
padding-bottom: 4em;
.wp-block-post-title {
text-transform: lowercase;
font-size: 1.5em;
font-size: $font__size-body*1.5;
margin-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 {
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 {
margin: 1em 0;
@ -278,10 +372,16 @@
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 1em 0;
border-bottom: 0.1em solid $color__black;
padding: 0.2em 0;
//border-bottom: 0.1em solid $color__black;
border-bottom: $border__line;
&: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 {
}
@ -289,7 +389,7 @@
border-bottom: none;
}
p {
font-size: 1.5em;
//font-size: $font__size-body * 1.5;
}
.activity-organizer, .organiza-activitat {
}
@ -300,10 +400,14 @@
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 {
}
@ -312,9 +416,9 @@
display: inline-block;
min-width: 100%;
height: auto;
aspect-ratio: 1/1;
aspect-ratio: 16/9;
margin-bottom: 2em;
background-color: rgba(240,240,240,0.2);
background-color: rgba(230,230,230,0.4);
border-radius: 0.3em;
}
}
@ -331,7 +435,7 @@
}
.xarxaprod-filters {
section {
margin: 1em 0;
margin: 0;
.filter {
display: none;
}
@ -346,15 +450,14 @@
// applied in forms and contactforms
display: inline-block;
width: 100%;
max-width: 13em;
margin-bottom: 0;
margin-bottom: 1rem;
margin-bottom: 0.5rem;
padding: 0.6em 1em 0.4em;
clear: both;
cursor: pointer;
font-weight: 900;
font-size: $font__size-body*0.9;
border: 1px solid $color__border-button;
border: $border__line;
&:after {
content: ">";
display: inline;
@ -376,7 +479,6 @@
}
}
}
@media screen and (max-width: 48em) {
//only smaller than 48em
@ -414,11 +516,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));
@ -426,21 +528,33 @@
.xarxaprod-convo-info-fields,
.xarxaprod-agenda-info {
li {
font-size: 1.5em;
font-size: $font__size-body*1.5;
}
}
.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: 60%;
width: 50%;
}
.activity-organizer, .organiza-activitat {
width: 24%;
width: 30%;
}
.agenda-date, .agenda-data {
width: 15%;
width: 17%;
}
}
}
@ -449,12 +563,15 @@
//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,3 +21,80 @@
.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,40 +8,23 @@
overflow:hidden;
}
.custom-logo {
min-width: 11rem;
min-width: 60vw;
margin: 1rem;
}
.main-navigation,.secondary-navigation {
ul {
.main-navigation-content {
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;
@ -54,14 +37,23 @@
background-color: rgba(255,255,255,0.95);
overflow: auto;
}
.menu-toggle {
position: relative;
z-index: 9999;
li {
display: block;
}
a {
display: block;
min-height: 100%;
padding: 0.5em 0;
}
.current-menu-ancestor > a::after {
background-color: transparent;
}
.current-menu-item > a::after {
.current-menu-item > a {
//border-bottom: $border__line;
}
.current-menu-item {
position: relative;
> a::after {
display: inline-block;
content: "";
position: absolute;
@ -73,87 +65,76 @@
}
}
}
}
.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: 47.99em) {
@media screen and (max-width: 48em) {
.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: 11rem;
min-width: 16rem;
margin: 1rem 1rem 1rem 0;
}
.menu-toggle {
@ -161,53 +142,67 @@
}
.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;
}
.sub-menu {
ul.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: 1em;
top: 3em;
}
}
a {
display: flex;
align-items: center;
min-height: 100%;
width: 200px;
}
:hover > a,
.focus > a {
}
a:hover,
a.focus {
}
}
li {
padding: 0 1em;
position: relative;
padding: 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 {
@ -216,9 +211,7 @@
justify-content: end;
ul.sub-menu {
flex-direction: column;
padding: 0.5rem;
li {
margin: 0.5rem 0;
}
}
}
@ -228,8 +221,7 @@
content: "";
position: absolute;
left: 1em;
bottom: -0.5em;
min-height: 2px;
bottom: 0.5em;
height: 2px;
width: calc(100% - 2em);
background-color: $color__black;
@ -252,7 +244,7 @@
right: 0.3em;
width: 0.3em;
height: 0.3em;
border: 1px solid $color__black;
border: $border__line; //1px solid $color__black;
border-top: none;
border-left: none;
-moz-transform: rotate(45deg);

View File

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

View File

@ -1,3 +1,4 @@
@media screen {
/* contact forms styles used in wp backend with CF7 */
.wpcf7-not-valid:not(:focus) {
@ -31,14 +32,11 @@
margin: 0 0.3rem;
}
.wpcf7-form {
text-align: center;
//text-align: center;
input:not([type="submit"]),textarea {
background: transparent;
border: 0.1em solid $color__black;
border: $border__line;
padding: 1em;
//&[type="email"] {
// text-align: center;
//}
}
}
@ -81,20 +79,28 @@
}
.contactform-fund-info {
display: inline-block;
column-count: 2;
column-count: 1;
column-gap: $grid__gap;
width: 100%;
.contactform-descripcio textarea {
display: inline-block;
min-height: 15.5em;
min-height: 23.5em;
}
}
.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 {
@ -108,7 +114,7 @@
display: block;
input[type="date"] {
width: auto;
background-color: $color__white;
//background-color: $color__white;
}
&::before {
display: inline-block;
@ -123,4 +129,23 @@
}
}
}
}
@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: 5rem;
font-size: 3rem;
}
&:hover {

View File

@ -7,3 +7,25 @@
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.1.8
Version: 1.5.0
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( 'sidebar-funds' ) ) {
if ( ! is_active_sidebar( 'after-content' ) ) {
return;
}
?>
<aside id="secondary" class="widget-area">
<?php dynamic_sidebar( 'sidebar-funds' ); ?>
<?php dynamic_sidebar( 'after-content' ); ?>
</aside><!-- #secondary -->

928
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,37 +47,48 @@
<ul class="xarxaprod-associat-contact-fields">
<?php if( get_field('xxp_associat_address') ): ?>
<li class="xarxaprod-associat-address">
<h6>adreça / direccion:</h6>
<h6>Adreça:</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>
<h6>Eail:</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:</h6>
<h6>Telèfon:</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">
@ -89,6 +100,30 @@
</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>
@ -97,7 +132,13 @@
<?php if( get_field('xxp_associat_osm_map') ): ?>
<div class="xarxaprod-associat-osm-map">
<h6 class="">Mapa:</h6>
<figure><?php the_field('xxp_associat_osm_map'); ?></figure>
<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>
</div>
<?php endif; ?>
<?php if( get_field('xxp_associat_osm_link') ): ?>

View File

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

View File

@ -15,22 +15,48 @@
<?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 //the_excerpt() ?>
<?php echo wp_trim_words(get_the_excerpt(), 30); // https://developer.wordpress.org/reference/functions/wp_trim_words/?>
</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,36 +10,61 @@
?>
<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 //the_excerpt() ?>
<?php echo wp_trim_words(get_the_excerpt(), 22); // https://developer.wordpress.org/reference/functions/wp_trim_words/?>
</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>
<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_fund_call') ): ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_call') ); ?>
<?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>
<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 @@
)
);
?>
<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>
<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>
</header>
<main class="xarxaprod-last-convos xarxaprod-ultimes-convocatories">
<?php } //end populate WP_Query custom post type xarxaprod-associat
@ -90,18 +90,20 @@
<?php if( get_field('xxp_convo_apply_begin') || get_field('xxp_convo_apply_end') ): ?>
<h6>Deadline:
<h6 class="xarxaprod-deadline">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') ): ?>
<p class="item-xxp_convo_apply_text"><?php the_field('xxp_convo_apply_text'); ?></p>
<h6 class="item-xxp_convo_apply_text"><?php the_field('xxp_convo_apply_text'); ?></h6>
<?php endif; ?>
<section class="excerpt post-excerpt">
<?php the_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>
</section>
<aside class="convo-sector convo-field">
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_field') ); ?>

View File

@ -0,0 +1,96 @@
<?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