Compare commits

...

198 Commits

Author SHA1 Message Date
jorge 6c117bfb67 removed arxiu general link and title to convos to pre 2024 2024-06-20 12:23:52 +02:00
jorge 9ec63579ad Revert "changed loop to avoid dates issues"
This reverts commit 9cb18552d0.
2024-05-27 16:42:08 +02:00
jorge 9cb18552d0 changed loop to avoid dates issues 2024-05-27 16:26:30 +02:00
jorge 0ee5eadd60 solved archvie activities showing wrong order 2024-05-27 10:33:23 +02:00
jorge 8afcb066d5 changed loop qery name from agenda to activitats 2024-05-24 10:53:09 +02:00
jorge 881494e427 edited archive, added template for archived convos and activities. styled 2024-05-23 12:47:29 +02:00
jorge 1dd1cd99ea added more info, edited arxiu and styled category convocatories 2024-05-22 19:30:00 +02:00
jorge c766b45be8 removed before in faqs link 2024-05-16 21:05:29 +02:00
jorge 2e3cf194fe proper loop in archive ajut 2024-04-19 23:22:48 +02:00
jorge 9f44b092bd removed typos, proper loop in archive convo 2024-04-19 23:14:35 +02:00
jorge 16b6d1a1e0 bumped styles version 2024-04-19 22:39:49 +02:00
jorge b6fd88179c order FAQS by date publish, newer first 2024-04-19 22:38:08 +02:00
jorge b2d7bae117 removed unnicessary styles 2024-04-19 22:30:54 +02:00
jorge 95f13e85b0 added old funds to fund search view, styled 2024-04-19 22:28:30 +02:00
jorge 1eb53cc5a4 edited admin styles 2024-04-19 21:27:33 +02:00
jorge 882a16de77 edited npm json to compile proper css in frontend and admin 2024-04-19 21:26:02 +02:00
jorge fc64b2a859 removed lowercase in xarxarec category 2024-04-19 16:45:26 +02:00
jorge 52f8a73b91 added date and free text to agenda activitats category posts, styled and organized posts template 2024-04-19 16:43:22 +02:00
jorge 4215736f24 changed who to free text in agenda last 2024-04-19 15:52:31 +02:00
jorge 72cea08e62 typo in title 2024-04-19 11:05:08 +02:00
jorge 7c88cab713 updated code to safe html and social links open in new window 2024-04-19 10:59:46 +02:00
jorge bf101f4cb1 added and styled social links in associats 2024-04-18 20:35:10 +02:00
jorge 62e087dd80 changed loops in archive category and convos, ajut, agenda to properly show today and future content 2024-04-18 19:24:55 +02:00
jorge 7a5eb14956 added termini end date to each fund view 2024-04-17 08:27:49 +02:00
jorge a1c402ebe2 ordered funds, ajuts, convos, agenda by date as in meta field 2024-04-15 12:13:51 +02:00
jorge 8da89e0ff4 agenda ordered by meta value 2024-04-15 11:41:27 +02:00
jorge db6dc06d56 added corporate colors and defined bubble colors 2024-04-12 12:43:46 +02:00
jorge 7e88861955 styled bubbles in more views 2024-04-11 13:36:48 +02:00
jorge e0595f8a32 styled bubles 2024-04-11 13:30:03 +02:00
jorge 5f274d8632 enhaced the function to output classes 2024-04-11 13:29:41 +02:00
jorge b4222d8506 added styles in footer for bubbles 2024-04-11 13:29:14 +02:00
jorge efc571b6c1 some changes in background bubbles colors 2024-04-11 12:24:10 +02:00
jorge de29d69817 espais associats maps and buttons in search 2024-04-08 21:48:02 +02:00
jorge a029f9f615 added title to fund search 2024-04-08 21:22:28 +02:00
jorge ee41f6eb15 edited associats view and styled li squares 2024-04-08 21:04:46 +02:00
jorge 83a4c787d1 styled columns in associats members all view 2024-04-08 16:21:31 +02:00
jorge b9237194a8 styled columns in associats members all view 2024-04-08 16:18:02 +02:00
jorge 9d2f99448e changed template loop calls, styled memembers 2024-04-08 16:13:33 +02:00
jorge d21f02c536 Merge branch 'main' into dev 2024-04-08 14:45:50 +02:00
jorge d738a8b7b1 styled filter button in funds ajus filters 2024-04-08 11:35:57 +02:00
jorge 59dd7801df added page template arxiu general - genral achive xarxaprod 2024-04-08 11:34:42 +02:00
jorge dbe3083b11 added filter by end date of activitat 2024-04-08 09:57:08 +02:00
jorge 55918060d9 renamed templates and restructured logic 2024-04-08 09:36:26 +02:00
jorge 250f591e69 styled lists in convo and agenda 2024-04-05 12:35:13 +02:00
jorge 2d0a64ecc2 styled height in convos ajuts headers 2024-04-05 11:46:08 +02:00
jorge a8f08b3207 styled header space in big screens 2024-04-03 16:02:37 +02:00
jorge 2062871066 reduced the agenda thumbnail size 2024-04-03 15:51:42 +02:00
jorge 5d18708030 applied changes in heading lines, aligments and heading space and intro text 2024-04-03 15:32:35 +02:00
jorge 077bbebf99 created new data fields in convo and styles 2024-04-03 15:07:53 +02:00
jorge 4c0d0df31e changed name in template gui view 2024-04-03 12:19:36 +02:00
jorge 8e2d0c0603 changed scss for agenda, rec and activities categories 2024-04-03 11:27:43 +02:00
jorge 5a70fc6d09 removed styles for activitat agenda if query from wordpress loop 2024-04-03 11:05:50 +02:00
jorge 021860fefc added more post to agenda view 2024-04-03 03:39:33 +02:00
jorge 5a508ec76a added more post to agenda view 2024-04-03 03:38:09 +02:00
jorge ca2cb8419b add agenda page template, archive view and styles 2024-04-03 03:21:48 +02:00
jorge fa52f880d6 changed name for better understanding 2024-04-02 23:30:30 +02:00
jorge 4bf20447f3 added documentation 2024-04-02 21:50:31 +02:00
jorge 327308950e edited faq categroy id so now is shown 2024-04-02 21:33:40 +02:00
jorge d07eb65504 removed category view, using archive 2024-04-02 21:24:42 +02:00
jorge 6cde4194b1 added case 2024-04-02 21:24:17 +02:00
jorge 151a243cdf removed all code from importing espais assesorament 2024-04-02 21:19:07 +02:00
jorge 4313f488c1 edited archive view 2024-04-02 20:44:57 +02:00
jorge 10298cd016 added conditonals for begin or en date and free text in agenda category showin 3 posts 2024-04-02 20:15:21 +02:00
jorge b54d5de214 styled and modified convos dates 2024-04-02 19:41:17 +02:00
jorge 2a7d702e6f styled forms and imput fields 2024-04-02 19:15:43 +02:00
jorge 1140149ac9 styles last convos in home as 3 cols 2024-04-02 18:16:43 +02:00
jorge f9534ddbbb styled all archives and categories the same, made order in scss files 2024-04-02 18:13:10 +02:00
jorge af0186d8d1 changed how styles are sent to clients, now based on time stamp 2024-04-02 15:03:22 +02:00
jorge bdeeb2645a styled ratlla abaix border bottom class 2024-04-02 14:18:21 +02:00
jorge 41b5db2800 updated styles for home, ratllas, etc... 2024-04-02 14:04:49 +02:00
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
jorge d205cf49d5 odered convos by due date and hide once finished. create automatic archive 2024-03-13 19:41:07 +01:00
jorge 219d5b60b0 bumped version number 1.1.8 2024-03-13 17:52:25 +01:00
jorge b4f5785ceb styled osm link in map view 2024-03-13 17:48:58 +01:00
jorge 322fb0b683 styled header with link button after 2024-03-13 09:57:08 +01:00
jorge f34f5e3dfb removed typo in convos dates 2024-03-13 00:28:10 +01:00
jorge 5ab5baa8f5 styled map ordered location, clean up files 2024-03-13 00:23:21 +01:00
jorge 4886490ef9 cleaned up file 2024-03-12 23:45:52 +01:00
jorge bebeb0afff show in espais associat the convos that belong to them 2024-03-12 23:33:12 +01:00
jorge b612a464f1 updated associats view, convos view and styles 2024-03-12 20:23:55 +01:00
jorge 1b31cdf4b8 edited spaces in heder views small and bigger screens 2024-03-12 14:49:56 +01:00
jorge 29849849ef added capabilities to user editor 2024-03-12 14:48:43 +01:00
jorge 032308252b bumped version added features 2024-03-12 14:21:52 +01:00
jorge 7addbb6ed6 edited page grid columns structure 2024-03-12 14:21:26 +01:00
jorge 2f3caed771 edited menu lines and view in small screens 2024-03-12 14:20:42 +01:00
jorge 2f4861857a edited post elements 2024-03-12 14:20:12 +01:00
jorge 8dc7d50403 edited backend button style 2024-03-12 14:18:37 +01:00
jorge 96ada7b5c7 styled premsa i comunciacio and dowloadable elements 2024-03-11 22:07:29 +01:00
jorge 2171c18401 styled headers and grid for squared content 2024-03-11 20:52:57 +01:00
jorge 0b3227f54f styled each agenda post with place and date 2024-03-11 19:23:10 +01:00
jorge cde97cf526 styled category view for agenda, activitats, defined view xarxaprod-cards 2024-03-11 16:54:57 +01:00
jorge a232911d5e increased space and areas in convocatoreis-pre-2024 2024-03-11 16:43:30 +01:00
jorge c621ade809 styled convos pre 2024 2024-03-11 16:36:50 +01:00
jorge e35eb0f223 styled and developed convo view 2024-03-11 16:10:46 +01:00
jorge 765904018c styled custom post types view in search 2024-03-11 13:27:52 +01:00
jorge ed9cb8d92a nested properly and tagged class for search view of custom post types 2024-03-11 13:27:23 +01:00
jorge 422b62edf2 coded sections for each custom post type 2024-03-11 13:26:27 +01:00
jorge 510a92d4dd coded properly the custom post type slug 2024-03-11 13:25:20 +01:00
jorge e61ae7787a removed calls to $font__black in sass 2024-03-11 12:05:14 +01:00
jorge 5071aa99a9 spaced vertical columns in pages 2024-03-11 09:06:49 +01:00
jorge c57a313185 changed fields ins memebers custom post type fields 2024-03-11 08:48:54 +01:00
jorge eba74110d2 edited typos in css 2024-03-10 19:15:52 +01:00
jorge 406448faff edited typo in if call 2024-03-10 19:11:20 +01:00
jorge a9fe35c4eb spaced entry content h6 2024-03-10 18:28:46 +01:00
jorge 164196db21 styled cards in home page 2024-03-10 13:34:02 +01:00
jorge 8c7ed17aa0 styled tittles with button in home page 2024-03-10 13:22:11 +01:00
jorge bfe52af939 styled agenda aspect ratio of images and spaces 2024-03-09 23:28:18 +01:00
jorge dde4cf4f9b add support for post thumbnail 2024-03-09 22:56:35 +01:00
jorge f2fdebc680 styled contact form 2024-03-07 13:59:53 +01:00
jorge c45a94516f styled spaces in footer 2024-03-05 14:12:45 +01:00
jorge 0ab8d777eb styled footer 2024-03-05 13:14:35 +01:00
jorge 17912acdc4 styled navigation in small screens 2024-02-29 12:35:23 +01:00
jorge 7d44d111ea bumped sylesheet version number 2024-02-29 12:06:40 +01:00
jorge 4c5fbefc99 home page moved sections into main content. styled css for screen sizes 2024-02-29 12:04:10 +01:00
jorge 23217498c5 configured properly styes for admin view 2024-02-28 16:18:23 +01:00
jorge b02d072f54 added to gitignore 2024-02-28 16:17:56 +01:00
jorge cc1441b34c configured translation files for theme 2024-02-28 16:16:50 +01:00
jorge 30620b0743 added translations to agenda section 2024-02-27 11:17:55 +01:00
jorge 8ea3ac084c changed theme`s screenshot 2024-02-27 09:41:08 +01:00
jorge c26c85dfae upgraded styles version number 2024-02-26 13:24:28 +01:00
jorge 05083d5f96 styled header white when scrolling down 2024-02-26 13:22:25 +01:00
jorge effba9e575 added agenda fields and its front page styles 2024-02-25 19:01:01 +01:00
jorge b083e86d79 created links for the acf labels and fields so they can be followed 2024-02-25 16:57:13 +01:00
jorge d65bfb35d3 updated queries and css for custom post types 2024-02-25 14:32:02 +01:00
jorge 6f41ee9d7d added map view in associat 2024-02-24 09:50:04 +01:00
jorge 221fb8393b copiled styles for associat 2024-02-23 17:17:49 +01:00
jorge b9275a0abb added associat post type and presentation 2024-02-23 17:16:41 +01:00
jorge e0bd632c29 added associat post type and presentation 2024-02-23 17:15:07 +01:00
jorge 4676445afa styled headings with proper weight 2024-02-23 11:53:50 +01:00
jorge 8bed7763f6 added espais associats custom post type 2024-02-23 11:09:38 +01:00
jorge 1dc052093a styled buttons, lists paddings, site grid, and nav 2024-02-23 09:58:08 +01:00
jorge 79cd3f78ff migrated os_ to xxp_ queries 2024-02-22 23:36:56 +01:00
jorge 2e5d004522 migrated db and queries from os_ to xxp_ 2024-02-22 23:20:46 +01:00
jorge 7a2a92c589 added agenda seciont template 2024-02-22 18:42:56 +01:00
jorge 86c753a7ff edited spacing, renamed properly a query 2024-02-22 18:42:34 +01:00
jorge a84bfeb0f6 styled footer 2024-02-22 12:44:46 +01:00
jorge 839e0b27d1 created view for convos in home page and styled them 2024-02-20 23:13:06 +01:00
jorge f73bd434a7 ordered logic in home page 2024-02-20 21:13:13 +01:00
jorge 9f8e40aec0 styled headings plugins typography 2024-02-20 20:52:43 +01:00
jorge 3c8acf4beb styled front page slider and title 2024-02-20 20:15:50 +01:00
jorge c12480e7ab upgraded stylesheet version 2024-02-02 14:20:28 +01:00
jorge e7d417337a added movement random to background 2024-02-02 14:15:50 +01:00
jorge 4748b3b4ac edited bubbles baackground and styles. addes file for css vars 2024-02-02 12:59:57 +01:00
jorge f9ee128c15 styled yellow color 2024-02-02 00:56:13 +01:00
jorge b9d3fcc9d0 created background colored in css stucked at bottom. typo in category 2024-02-02 00:53:19 +01:00
jorge 9a37872926 added background colors as css elements 2024-02-01 22:36:38 +01:00
jorge ebdee1ff01 hide filters in ajuts/funds and convos 2024-01-29 20:54:10 +01:00
jorge 834ad1a55d edited styles for filterecontent, ajuts and convos 2024-01-27 18:33:49 +01:00
jorge fa41e57803 added comvo template for search and archives 2024-01-27 17:46:53 +01:00
jorge 6d0791e03c edited ajut and each post 2024-01-26 10:26:45 +01:00
jorge bffaa38328 styled navigatio and guttemberg styles 2024-01-26 10:23:29 +01:00
jorge 391d999466 modified header template 2024-01-26 10:22:21 +01:00
jorge cc45de2901 added convo templates 2024-01-26 10:21:27 +01:00
87 changed files with 8816 additions and 2889 deletions

4
.gitignore vendored
View File

@ -29,6 +29,7 @@ node_modules/
.DS_Store
theme/
_gitignore*
_ignore*
# htaccess
@ -43,6 +44,9 @@ yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Backups
*backup*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

View File

@ -30,15 +30,15 @@ A WordPress theme for the Xarxaprod.cat
### Colors
The colors used in the design are:
- black: #000000
- white: #ffffff
- salmon: #ff866f
- yellow: #ffcb1f
- pink: #ff6bc3
- violet: #651aff
- cyan: #00d1ec
- green: #00f274
- red: #ff5a69
- black: `#000000` `rgb(0,0,0)`
- white: `#ffffff` `rgb(255,255,255)`
- red: `#f27173` `rgb(242,113,115)`
- yellow: `#f6cc4c` `rgb(246,204,076)`
- green: `#84c779` `rgb(132,199,121)`
- cyan: `#61cae4` `rgb(97,202,228)`
- lila: `#de7fb4` `rgb(222,127,180)`
- pink: `#f58b77` `rgb(245,139,119)`
- violet: `#5859a7` `rgb(88,89,167)`
### Fonts

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@
get_header();
?>
<!-- archive-xarxaprod-ajut-php -->
<main id="primary" class="site-main">
<?php
// Detect plugin. For use on Front End only.
@ -19,7 +19,11 @@ get_header();
//plugin is activated do
?>
<section id="filteredfunds" class="xarxaprod-filtered-funds xarxaprod-ajuts-filtrats">
<header class="page-header">
<h1><?php _e( 'Buscant finançament:', 'xarxaprod' ); //single_term_title(''); ?></h1>
</header>
<aside id="fundsfilter" class="xarxaprod-filter-funds xarxaprod-filtre-ajuts">
<?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_ajuts_filters_form(); // function defined in the plugin ?>
@ -28,10 +32,10 @@ get_header();
<content class="archive-posts <?php xarxaprod_class_posttype(); ?>">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post();
<?php if ( have_posts() ) :
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/section', 'eachpost' );
get_template_part( 'template-parts/section', 'eachfund' );
endwhile;
@ -45,6 +49,82 @@ get_header();
?>
</content>
<content class="archive-posts <?php xarxaprod_class_posttype(); ?>">
<?php
// very wired, need to output
// 1. today's events 'compare' => '='
// 2. then after today 'compare' => '>'
//
// if done with '>=' outputs
// 1. older dates in asc order
// 2. at the end today
?>
<?php
// https://support.advancedcustomfields.com/forums/topic/wp_query-using-meta_query-for-an-acf-checkbox-field/#post-145830
// https://www.advancedcustomfields.com/resources/checkbox/#query-posts
// https://barn2.com/blog/querying-posts-by-custom-field-acfi/
$the_query_ajut = new WP_Query(
array(
'post_type' => 'xarxaprod-ajut',
'posts_per_page' => '-1',
'meta_key' => 'xxp_fund_apply_end', // order by meta key convo apply end
'meta_query' => array(
array( //filter results show only older than today
'key' => 'xxp_fund_apply_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '=', //show events from today and later
'type' => 'DATE',
)
),
//https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
'orderby' => 'meta_value', //order by meta value
'order' => 'ASC', //order ascendent
)
);
?>
<?php if ( $the_query_ajut->have_posts() ) : ?>
<?php while ( $the_query_ajut->have_posts() ) : $the_query_ajut->the_post(); ?>
<?php //get_template_part( 'template-parts/section', 'eachfund' ); ?>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
<?php endif; //end query ajut ?>
<?php
$the_query_ajut = new WP_Query(
array(
'post_type' => 'xarxaprod-ajut',
'posts_per_page' => '-1',
'meta_key' => 'xxp_fund_apply_end', // order by meta key convo apply end
'meta_query' => array(
array( //filter results show only older than today
'key' => 'xxp_fund_apply_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '>', //show events from today and later
'type' => 'DATE',
)
),
//https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
'orderby' => 'meta_value', //order by meta value
'order' => 'ASC', //order ascendent
)
);
?>
<?php if ( $the_query_ajut->have_posts() ) : ?>
<?php while ( $the_query_ajut->have_posts() ) : $the_query_ajut->the_post(); ?>
<?php //get_template_part( 'template-parts/section', 'eachfund' ); ?>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
<?php endif; //end query ajut ?>
</content>
<section id="filteredfunds" class="xarxaprod-filtered-content xarxaprod-filtered-funds xarxaprod-ajuts-filtrats">
</section>
<?php } //end plugin is activated do ?>

View File

@ -0,0 +1,69 @@
<?php
/**
* The template for displaying archive custom post type xarxaprod-associat
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Xarxaprod_theme
*/
get_header();
?>
<!-- archive-xarxaprod-associat-php -->
<main id="primary" class="site-main">
<?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( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) {
//plugin is activated do
?>
<header class="page-header">
<h1><?php _e( 'Espais associats', 'xarxaprod' ); //single_term_title(''); ?></h1>
</header>
<aside id="associatsfilter" class="xarxaprod-filter-associats xarxaprod-filtre-associats">
<?php xarxaprod_associats_filters_form(); // function defined in the plugin ?>
</aside>
<content class="archive-posts archive-posts-map archive-xarxaprod-members archive-xarxaprod-associats <?php xarxaprod_class_posttype(); ?>">
<figure id="xarxaprod-associats-map" class="xarxaprod-associats-map">
<?php xarxaprod_show_leaflet_map(); // function defined in the plugin ?>
</figure>
<?php if ( have_posts() ) :?>
<?php
//if ( have_posts() ) :
while ( have_posts() ) : the_post();
xarxaprod_show_leaflet_associat_blob(); // function defined in the plugin
endwhile;
//endif;
?>
<?php
// nuvol de nom de fabriques
echo '<ul class="xarxaprod-label">';
while ( have_posts() ) : the_post();
echo '<li>';
echo '<a href="';
the_permalink();
echo '" title="';
the_title();
echo '" rel="bookmark">';
the_title();
echo '</a>';
echo '</li>';
endwhile;
echo '</ul>';
?>
<?php endif; //have_posts ?>
</content>
<section id="filteredassociats" class="xarxaprod-filtered-content xarxaprod-filtered-associats xarxaprod-associats-filtrats">
</section>
<?php } //end plugin is activated do ?>
</main><!-- #main -->
<?php
get_footer();

134
archive-xarxaprod-convo.php Normal file
View File

@ -0,0 +1,134 @@
<?php
/**
* The template for displaying archive custom post type xarxaprod-convo
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Xarxaprod_theme
*/
get_header();
?>
<!-- archive-xarxaprod-convo-php -->
<main id="primary" class="site-main">
<?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( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) {
//plugin is activated do
?>
<header class="page-header">
<h1><?php //single_term_title( ' ' ); ?></h1>
</header>
<aside id="convosfilter" class="xarxaprod-filter-convos xarxaprod-filtre-convos">
<?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_convos_filters_form(); // function defined in the plugin ?>
<?php } //end if is_plugin_active ?>
</aside>
<content class="archive-posts <?php xarxaprod_class_posttype(); ?>">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post();
get_template_part( 'template-parts/section', 'eachconvo' , $the_query_convo);
endwhile;
the_posts_navigation();
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
</content>
<content class="archive-posts <?php xarxaprod_class_posttype(); ?>">
<?php
// very wired, need to output
// 1. today's events 'compare' => '='
// 2. then after today 'compare' => '>'
//
// if done with '>=' outputs
// 1. older dates in asc order
// 2. at the end today
?>
<?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_convo = new WP_Query(
array(
'post_type' => 'xarxaprod-convo',
'posts_per_page' => '-1', //show all
'meta_key' => 'xxp_convo_apply_end', // order by meta key convo apply end
'meta_query' => array(
array( //filter results show only older than today
'key' => 'xxp_convo_apply_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '=', //show events from today and later
'type' => 'DATE',
)
),
'order_by' => 'meta_value', //order by meta value
'order' => 'ASC', //order ascendent
)
);
?>
<?php if ( $the_query_convo->have_posts() ) : ?>
<?php while ( $the_query_convo->have_posts() ) : $the_query_convo->the_post(); ?>
<?php //get_template_part( 'template-parts/section', 'eachconvo' , $the_query_convo); ?>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
<?php endif; ?>
<?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_convo = new WP_Query(
array(
'post_type' => 'xarxaprod-convo',
'posts_per_page' => '-1', //show all
'meta_key' => 'xxp_convo_apply_end', // order by meta key convo apply end
'meta_query' => array(
array( //filter results show only older than today
'key' => 'xxp_convo_apply_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '>', //show events from today and later
'type' => 'DATE',
)
),
'order_by' => 'meta_value', //order by meta value
'order' => 'ASC', //order ascendent
)
);
?>
<?php if ( $the_query_convo->have_posts() ) : ?>
<?php while ( $the_query_convo->have_posts() ) : $the_query_convo->the_post(); ?>
<?php //get_template_part( 'template-parts/section', 'eachconvo' , $the_query_convo); ?>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
<?php endif; ?>
</content>
<section id="filteredcall" class="xarxaprod-filtered-content xarxaprod-filtered-convos xarxaprod-convos-filtrats">
</section>
<?php } //end plugin is activated do ?>
</main><!-- #main -->
<?php
get_footer();

View File

@ -12,35 +12,104 @@ get_header();
<main id="primary" class="site-main">
<header class="page-header">
<h1><?php single_term_title( ' ' ); ?></h1>
</header>
<aside>
<?php if( in_category('faq') ) : ?>
<?php xarxaprod_display_faqs_labels();//display all faq subcategories as labels ?>
<?php xarxaprod_display_faqs_search(); ?>
<?php endif; //end if is_category faq ?>
<?php if ( in_category( array( 'agenda', 'agenda-es','activitats') ) ) : ?>
<?php wp_nav_menu(
array(
'theme_location' => 'menu-3',
'menu_id' => 'agenda-menu',
)
); ?>
<?php endif; //end in_category agenda activitats ?>
</aside>
<?php if ( have_posts() ) : ?>
<header class="page-header">
</header><!-- .page-header -->
<content class="archive-posts <?php xarxaprod_class_posttype(); ?>">
<?php
/* Start the Loop */
//while ( have_posts() ) :
// the_post();
if( in_category('faq') ) {
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/section', 'each-faq' );
endwhile;
the_posts_navigation();
//end if is_category faq
} elseif (in_category( array( 'activitats') ) ) {
function xxp_order_by_date_end( $query ){
if ( ! is_admin() && $query->is_main_query() ){
$query->set( 'order_by', 'meta_value' );
$query->set( 'order', 'ASC' );
$query->set( 'meta_query', array(
array(
'key' => 'xxp_agenda_date_end',
'value' => date("Y-m-d"),
'compare' => '>', //show events before today
'type' => 'DATE',
)
) );
}
}
add_action( 'pre_get_posts', 'xxp_order_by_date_end');
get_template_part( 'template-parts/section', 'each-agenda-entry' );
//end in_category agenda activitats
} elseif (in_category( array( 'convocatories') ) ) {
$the_query_archive_convocatories = new WP_Query(
array(
'post_type' => 'post',
'posts_per_page' => '-1', //show all => -1
'tax_query' => array(
array(
'taxonomy' => 'category',
'field' => 'slug',
'terms' => 'convocatories'
)
),
)
);
if ( $the_query_archive_convocatories->have_posts() ) :
while ( $the_query_archive_convocatories->have_posts() ) : $the_query_archive_convocatories->the_post();
get_template_part( 'template-parts/section', 'eachconvo' );
endwhile;//end of the loop
endif; //end if the_query_archive_activitats
wp_reset_postdata(); //reset custom query
//end in_category convocatories
}else{
//the rest of archives
while ( have_posts() ) :
the_post();
/*
* Include the Post-Type-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Type name) and that will be used instead.
*/
get_template_part( 'template-parts/content', get_post_type() );
//get_template_part( 'template-parts/content', get_post_type() );
get_template_part( 'template-parts/section', 'each-entry' );
endwhile;
the_posts_navigation();
echo '</content>';//end content ajuts
}
else :
get_template_part( 'template-parts/content', 'none' );
else : //no if have_posts
endif;
get_template_part( 'template-parts/content', 'none' ); ?>
?>
</content>
<?php endif; //end if have_posts?>
</main><!-- #main -->

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,9 @@
<?xml version="1.0" ?>
<svg width="" height="" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<title/>
<g id="download">
<path d="M3,12.3v7a2,2,0,0,0,2,2H19a2,2,0,0,0,2-2v-7" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<polyline data-name="Right" fill="none" id="Right-2" points="7.9 12.3 12 16.3 16.1 12.3" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<line fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="12" x2="12" y1="2.7" y2="14.2"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 608 B

View File

@ -1,43 +0,0 @@
<?php
/**
* The template for displaying archive FAQS
*
* Template Name: PAFs, consells, tutorials...
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Xarxaprod_theme
* @since 1.0
*/
get_header();
?>
<main id="primary" class="site-main">
<?php if( in_category('faq') ) : ?>
<?php xarxaprod_display_faqs_labels(); ?>
<?php xarxaprod_display_faqs_search(); ?>
<?php endif; //end if is_category faq ?>
<content class="archive-posts ">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post();
get_template_part( 'template-parts/section', 'eachpost' );
endwhile;
the_posts_navigation();
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
</content>
</main><!-- #main -->
<?php
get_sidebar();
get_footer();

View File

@ -10,26 +10,19 @@
*/
?>
<footer id="colophon" class="site-footer">
<div class="site-info">
<?php dynamic_sidebar( 'footer' ); ?>
<?php //echo '<a href="' . esc_url( __( 'https://wordpress.org/', 'xarxaprod' ) ) . '">'; ?>
<?php
/* translators: %s: CMS name, i.e. WordPress. */
//printf( esc_html__( 'Proudly powered by %s', 'xarxaprod' ), 'WordPress' );
?>
<?php //echo '</a>'; ?>
<!--span class="sep"></span-->
<?php
/* translators: 1: Theme name, 2: Theme author. */
//printf( esc_html__( 'Theme: %1$s by %2$s.', 'xarxaprod' ), 'xarxaprod', '<a href="https://vitrubio.net">jorge-vitrubio.net</a>' );
?>
<?php dynamic_sidebar( 'footer-widgets' ); ?>
</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->
<?php wp_footer(); ?>
<div class="liquid-bubbles <?php xarxaprod_class_posttype(); ?>">
<div class="bubbles bubble-01"></div>
<div class="bubbles bubble-02"></div>
<div class="bubbles bubble-03"></div>
<div class="bubbles bubble-04"></div>
</div>
</body>
</html>

View File

@ -44,13 +44,14 @@ function xarxaprod_setup() {
*
* @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
*/
// add_theme_support( 'post-thumbnails' );
add_theme_support( 'post-thumbnails' );
// This theme uses wp_nav_menu()
register_nav_menus(
array(
'menu-1' => esc_html__( 'Primary', 'xarxaprod' ),
'menu-2' => esc_html__( 'Secondary', 'xarxaprod' ),
'menu-3' => esc_html__( 'Agenda', 'xarxaprod' ),
)
);
@ -121,32 +122,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);
wp_enqueue_script( 'xarxaprod-navigation', get_template_directory_uri() . '/js/navigation.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.
@ -180,13 +161,22 @@ if ( defined( 'JETPACK__VERSION' ) ) {
*/
require get_template_directory() . '/inc/login-functions.php';
/**
* Functions to modify user role capabilities
*/
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';
/**
* Functions to add admin styles
*/
require get_template_directory() . '/inc/admin-style.php';
/**
* Function to get the first post image, used when there is no featured image
*/
require get_template_directory() . '/inc/catch-first-image.php';

View File

@ -54,7 +54,9 @@
</div><!-- .site-branding -->
<nav id="site-navigation-main" class="main-navigation">
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false" style="background-image: url('<?php echo esc_url( wp_get_attachment_url( get_theme_mod( 'custom_logo' ) ) ); ?>');" ><?php esc_html_e( 'Menu XarxaProd', 'xarxaprod' ); ?></button>
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false">
<?php esc_html_e( 'Menu', 'xarxaprod' ); ?>
</button>
<section class="main-navigation-content">
<?php
wp_nav_menu(
@ -68,27 +70,30 @@
</nav><!--primary #site-navigation -->
</div>
<div class="secondary">
<nav id="site-navigation-secondary" class="site-navigation secondary-navigation toggle-secondary-navigation">
<legend class="hide-content">menu</legend>
<input id="hide-menu-mobile" class="hide-not-mobile toggle" name="toggle" type="radio">
<label for="show-menu-mobile" class="hide-not-mobile toggle-show"><span class="hide-content">open</span></label>
<input id="show-menu-mobile" class="hide-not-mobile toggle" name="toggle" type="radio">
<div class="toggled-menu">
<label for="hide-menu-mobile" class="hide-not-mobile toggle-hide"><span class="hide-content">close</span></label>
<section class="secondary-navigation-content">
<?php
// <nav id="site-navigation-secondary" class="site-navigation secondary-navigation toggle-secondary-navigation">
// <legend class="hide-content">menu</legend>
// <input id="hide-menu-mobile" class="hide-not-mobile toggle" name="toggle" type="radio">
// <label for="show-menu-mobile" class="hide-not-mobile toggle-show"><span class="hide-content">open</span></label>
// <input id="show-menu-mobile" class="hide-not-mobile toggle" name="toggle" type="radio">
// <div class="toggled-menu">
// <label for="hide-menu-mobile" class="hide-not-mobile toggle-hide"><span class="hide-content">close</span></label>
// <section class="secondary-navigation-content">
;?>
<?php // here content to hide or show ?>
<?php
wp_nav_menu(
array(
'theme_location' => 'menu-2',
'menu_id' => 'secondary-menu',
)
);
?>
</section>
</div><!--toggled-menu-->
</nav><!--secondary #site-navigation -->
// wp_nav_menu(
// array(
// 'theme_location' => 'menu-2',
// 'menu_id' => 'secondary-menu',
// )
// );
// ?>
<?php
// </section>
// </div><!--toggled-menu-->
// </nav><!--secondary #site-navigation -->
;?>
<?php the_header_image_tag(); // header image to show below menus before title ?>
</div><!--secondary-->

27
inc/catch-first-image.php Normal file
View File

@ -0,0 +1,27 @@
<?php
/**
* Start catch up first image in a post else get the custom logo
* ----------------------------------------------------------------------------
* @package Xarxaprod_theme
* @used by template-parts/section-each-agenda-entry.php
*/
if ( ! function_exists( 'catch_post_first_image' ) ) :
function catch_post_first_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
$first_img = $matches [1] [0];
if(!empty($first_img)){
return $first_img;
}
if(empty($first_img)){ //Defines a default image
// https://developer.wordpress.org/reference/functions/the_custom_logo/
$custom_logo_image = wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ) , 'full' );
$first_img = $custom_logo_image[0];
return $first_img;
}
}
endif;
?>

View File

@ -52,6 +52,77 @@ function xarxaprod_customize_partial_blogdescription() {
bloginfo( 'description' );
}
/**
* https://diveinwp.com/add-wordpress-customizer-color-picker-palette/
*/
function fons_customizer_add_colorPicker( $wp_customize){
// Add New Section: Fons Colors
$wp_customize->add_section( 'fons_color_section', array(
'title' => 'Fons Colors',
'description' => 'Set Colors For Background',
'priority' => '40'
));
// Add Settings
$wp_customize->add_setting( 'fons_bubble01_color', array(
'default' => 'var(--bubble-color-01)',
));
$wp_customize->add_setting( 'fons_bubble02_color', array(
'default' => 'var(--bubble-color-02)',
));
$wp_customize->add_setting( 'fons_bubble03_color', array(
'default' => 'var(--bubble-color-03)',
));
$wp_customize->add_setting( 'fons_bubble04_color', array(
'default' => 'var(--bubble-color-04)',
));
// Add Controls
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'fons_bubble01_color', array(
'label' => 'Color 01',
'section' => 'fons_color_section',
'settings' => 'fons_bubble01_color'
)));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'fons_bubble02_color', array(
'label' => 'Color 02',
'section' => 'fons_color_section',
'settings' => 'fons_bubble02_color'
)));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'fons_bubble03_color', array(
'label' => 'Color 03',
'section' => 'fons_color_section',
'settings' => 'fons_bubble03_color'
)));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'fons_bubble04_color', array(
'label' => 'Color 04',
'section' => 'fons_color_section',
'settings' => 'fons_bubble04_color'
)));
}
add_action( 'customize_register', 'fons_customizer_add_colorPicker' );
/**
* Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
*/

View File

@ -57,12 +57,27 @@ function xarxaprod_plugin_active() {
/**
* Echo the post type slug
*/
if ( ! function_exists( 'xarxaprod_class_posttype' ) ):
function xarxaprod_class_posttype (){
if( is_post_type_archive( array('xarxaprod-ajut') )) {
if( is_post_type_archive( array('xarxaprod-ajut') ) || is_post_type_archive( array('xarxaprod-convo') ) || is_post_type_archive( array( 'xarxaprod-associat') )) {
//if( get_post_type() == 'xarxaprod-ajut' || get_post_type() == 'xarxaprod-convo' || get_post_type() == 'xarxaprod-associat' ){
echo 'archive-custom-post-type-';
printf (get_post_type_object( get_post_type() )->rewrite['slug']);
} elseif( get_post_type() == 'xarxaprod-ajut' || get_post_type() == 'xarxaprod-convo' || get_post_type() == 'xarxaprod-associat' ) {
echo 'custom-post-type-';
printf (get_post_type_object( get_post_type() )->rewrite['slug']);
} else {
$categories = get_the_category();
if ( ! empty( $categories ) ) {
echo 'category-';
echo esc_html( $categories[0]->slug );
}
//printf (get_post_type_object( get_post_type() )->rewrite['slug']);
}
}
endif; //end xarxaprod_calss_posttype
/**
* Displays the FAQS subcategories from category id=1
*/
@ -76,7 +91,7 @@ if ( ! function_exists( 'xarxaprod_display_faqs_labels' ) ) :
// https://developer.wordpress.org/reference%2Ffunctions%2Fwp_list_categories%2F/
wp_list_categories(
array(
'child_of' => 38, // category FAQ id=1
'child_of' => 39, // category FAQ id=1
'hide_empty' => 1,
'hide_title_if_empty' => true,
'separator' => '<li>',

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

@ -0,0 +1,38 @@
<?php
/**
* Enqueue scripts and styles.
*/
if ( ! function_exists( 'xarxaprod_theme_css_scripts' ) ){
function xarxaprod_theme_css_scripts() {
// css loaded depending on version number
//wp_enqueue_style( 'xarxaprod-style', get_stylesheet_uri(), array(), _S_VERSION );
// css loaded depending on modified time stamp -> reload on each update of file
// 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

@ -0,0 +1,20 @@
<?php
/**
* Modify user roles capabilities
*
* Docs: https://wordpress.org/documentation/article/roles-and-capabilities/
*
* @package Xarxaprod_theme
* @since Xarxaprod_theme 1.0.0
*/
// https://wordpress.stackexchange.com/questions/4191/allow-editors-to-edit-menus
// add editor the privilege to edit theme
// get the the role object
$role_object = get_role( 'editor' );
// add $cap capability to this role object
// add edit theme
$role_object->add_cap( 'edit_theme_options' );
// add export CF7 DB
$role_object->add_cap( 'cfdb7_access' );

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

@ -13,13 +13,13 @@ function my_pre_get_posts( $query ) {
// allow the url to alter the query
if( isset($_GET['os_fund_target']) )
if( isset($_GET['xxp_fund_target']) )
{
// get original meta query
$meta_query = [];
$meta_query[] = array('relation' => 'OR');
$meta_query[] = $query->get('meta_query');
$fieldsearchvalues= explode(',', $_GET['os_fund_target']);
$fieldsearchvalues= explode(',', $_GET['xxp_fund_target']);
foreach( $fieldsearchvalues as $fieldsearchvalue ){
$os_search_value = $fieldsearchvalue; //'entitat-publica'; // whatever
$os_field_value = sprintf( '^%1$s$|s:%2$u:"%1$s";', $os_search_value, strlen( $os_search_value ) );
@ -27,7 +27,7 @@ function my_pre_get_posts( $query ) {
// add aur meta query to the original meta queries
$meta_query[] = array(
array(
'key' => 'os_fund_target',
'key' => 'xxp_fund_target',
'value' => $os_field_value,
'compare' => 'REGEXP',
),

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.

40
js/scrollposition.js Normal file
View File

@ -0,0 +1,40 @@
// https://css-tricks.com/styling-based-on-scroll-position/
// script to detect the scroll position and then call for it in css
// The debounce function receives our function as a parameter
const debounce = (fn) => {
// This holds the requestAnimationFrame reference, so we can cancel it if we wish
let frame;
// The debounce function returns a new function that can receive a variable number of arguments
return (...params) => {
// If the frame variable has been defined, clear it now, and queue for next frame
if (frame) {
cancelAnimationFrame(frame);
}
// Queue our function call for the next frame
frame = requestAnimationFrame(() => {
// Call our function and pass any params we received
fn(...params);
});
}
};
// Reads out the scroll position and stores it in the data attribute
// so we can use it in our stylesheets
const storeScroll = () => {
document.documentElement.dataset.scroll = window.scrollY;
}
// Listen for new scroll events, here we debounce our `storeScroll` function
document.addEventListener('scroll', debounce(storeScroll), { passive: true });
// Update scroll position for first time
storeScroll();

BIN
languages/ca.mo Normal file

Binary file not shown.

38
languages/ca.po Normal file
View File

@ -0,0 +1,38 @@
# Copyright (C) 2022 Jorge - vitrubio.net
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Xarxaprod 1.0.0\n"
"Report-Msgid-Bugs-To: https://git.hangar.org/xarxaprod/xarxaprod-wp-theme\n"
"Last-Translator: \n"
"Language-Team: Català\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2022-10-25T20:51:09+02:00\n"
"PO-Revision-Date: 2024-02-28 14:25+0000\n"
"X-Generator: Loco https://localise.biz/\n"
"X-Domain: ofsupxxp\n"
"Language: ca\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Loco-Version: 2.6.6; wp-6.4.3"
#. Theme Name of the theme
msgid "Xarxaprod"
msgstr "Xarxaprod"
#. Theme URI of the theme
msgid "https://git.hangar.org/xarxaprod/xarxaprod-wp-theme"
msgstr "https://git.hangar.org/xarxaprod/xarxaprod-wp-theme"
#. Description of the theme
msgid "Theme for the Xarxaprod.cat"
msgstr "Tema per Xarxaprod.cat."
#. Author of the theme
msgid "Jorge - vitrubio.net"
msgstr "Jorge - vitrubio.net"
#. Author URI of the theme
msgid "https://vitrubio.net"
msgstr "https://vitrubio.net"

BIN
languages/es_ES.mo Normal file

Binary file not shown.

38
languages/es_ES.po Normal file
View File

@ -0,0 +1,38 @@
# Copyright (C) 2022 Jorge - vitrubio.net
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Xarxaprod 1.0.0\n"
"Report-Msgid-Bugs-To: https://git.hangar.org/xarxaprod/xarxaprod-wp-theme\n"
"Last-Translator: \n"
"Language-Team: Spanish (Spain)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2022-10-25T20:51:09+02:00\n"
"PO-Revision-Date: 2024-02-28 14:27+0000\n"
"X-Generator: Loco https://localise.biz/\n"
"X-Domain: ofsupxxp\n"
"Language: es_ES\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Loco-Version: 2.6.6; wp-6.4.3"
#. Theme Name of the theme
msgid "Xarxaprod"
msgstr "Xarxaprod"
#. Theme URI of the theme
msgid "https://git.hangar.org/xarxaprod/xarxaprod-wp-theme"
msgstr "https://git.hangar.org/xarxaprod/xarxaprod-wp-theme"
#. Description of the theme
msgid "Theme for the Xarxaprod.cat"
msgstr "Tema per Xarxaprod.cat"
#. Author of the theme
msgid "Jorge - vitrubio.net"
msgstr "Jorge - vitrubio.net"
#. Author URI of the theme
msgid "https://vitrubio.net"
msgstr "https://vitrubio.net"

View File

@ -37,7 +37,7 @@
},
"scripts": {
"watch": "node-sass sass/ -o ./ --source-map true --output-style expanded --indent-type tab --indent-width 1 -w",
"compile:css": "node-sass sass/ -o ./ && stylelint '*.css' --fix || true && stylelint '*.css' --fix",
"compile:css": "node-sass sass/style.scss -o ./ && stylelint '*.css' --fix || true && stylelint '*.css' --fix",
"compile:cssadmin": "node-sass -r --output-style compressed sass/adminstyles.scss -o assets/css/ && stylelint '*.css' --fix || true && stylelint '*.css' --fix",
"compile:rtl": "rtlcss style.css style-rtl.css",
"lint:scss": "wp-scripts lint-style 'sass/**/*.scss'",

View File

@ -0,0 +1,96 @@
<?php
/**
* The template for displaying the "agenda" activities with search capabilities
*
* Template Name: Agenda actual cercador
*
* @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
*/
get_header();
?>
<!-- page-templates convos-search-php -->
<main id="primary" class="site-main">
<?php if ( have_posts() ) : ?>
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'page' );
endwhile;
the_posts_navigation();
else :
//get_template_part( 'template-parts/content', 'none' );
endif;
?>
<section id="filteredagenda" class="xarxaprod-filtered-content xarxaprod-filtered-agenda xarxaprod-activitats-filtrats category-agenda xarxaprod-activitats">
<aside id="agendafilter" class="xarxaprod-filter-agenda xarxaprod-fitre-agenda">
<?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 } //end if is_plugin_active ?>
<?php wp_nav_menu(
array(
'theme_location' => 'menu-3',
'menu_id' => 'agenda-menu',
)
); ?>
</aside>
<content class="archive-posts <?php //xarxaprod_class_posttype(); ?>">
<?php
$the_query_archive_agenda = new WP_Query(
array(
'post_type' => 'post',
'posts_per_page' => '40', //show all => -1
'tax_query' => array(
array(
'taxonomy' => 'category',
'field' => 'slug',
'terms' => 'activitats'
)
),
'meta_query' => array(
array( //filter results show only older than today
'key' => 'xxp_agenda_date_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '>=', //show events before today
'type' => 'DATE',
)
),
//https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
'orderby' => 'meta_value', //order by meta value
'order' => 'ASC', //order ascendent
)
);
?>
<?php if ( $the_query_archive_agenda->have_posts() ) : ?>
<?php while ( $the_query_archive_agenda->have_posts() ) : $the_query_archive_agenda->the_post(); ?>
<?php get_template_part( 'template-parts/section', 'each-agenda-entry' ); ?>
<?php endwhile;//end of the loop ?>
<?php
// pagination will not work for custom_query
// https://wordpress.stackexchange.com/a/120408
// how to fix it
the_posts_navigation();
?>
<?php wp_reset_postdata(); ?>
<?php endif; //end query convo ?>
</content>
</section>
</main><!-- #main -->
<?php
get_footer();

View File

@ -0,0 +1,125 @@
<?php
/**
* The template for displaying the "ajuts" funds with search capabilities
*
* Template Name: Ajuts actuals cercador
*
* @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
*/
get_header();
?>
<!-- page-templates funds-search-php -->
<main id="primary" class="site-main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
</header><!-- .page-header -->
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'page' );
endwhile;
the_posts_navigation();
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
<section id="filteredfunds" class="xarxaprod-filtered-content xarxaprod-filtered-funds xarxaprod-ajuts-filtrats">
<aside id="fundsfilter" class="xarxaprod-filter-funds xarxaprod-fitre-ajuts">
<?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_ajuts_filters_form(); // function defined in the plugin ?>
<?php } //end if is_plugin_active ?>
</aside>
<content class="archive-posts archive-xarxaprod-fund archive-xarxaprod-ajut <?php //xarxaprod_class_posttype(); ?>">
<?php
// https://support.advancedcustomfields.com/forums/topic/wp_query-using-meta_query-for-an-acf-checkbox-field/#post-145830
// https://www.advancedcustomfields.com/resources/checkbox/#query-posts
// https://barn2.com/blog/querying-posts-by-custom-field-acfi/
$the_query_ajut = new WP_Query(
array(
'post_type' => 'xarxaprod-ajut',
'posts_per_page' => '-1',
'meta_key' => 'xxp_fund_apply_end', // order by meta key convo apply end
'meta_query' => array(
array( //filter results show only older than today
'key' => 'xxp_fund_apply_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '>=', //show events from today and later
'type' => 'DATE',
)
),
//https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
'orderby' => 'meta_value', //order by meta value
'order' => 'ASC', //order ascendent
)
);
?>
<?php if ( $the_query_ajut->have_posts() ) : ?>
<?php while ( $the_query_ajut->have_posts() ) : $the_query_ajut->the_post(); ?>
<?php get_template_part( 'template-parts/section', 'eachfund' ); ?>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
<?php endif; //end query ajut ?>
</content>
</section>
<section id="teminis-passats" class="terminis-tancats">
<content class="archive-posts archive-posts-old archive-xarxaprod-fund archive-xarxaprod-ajut <?php //xarxaprod_class_posttype(); ?>">
<h2>Terminis tancats</h2>
<?php
// https://support.advancedcustomfields.com/forums/topic/wp_query-using-meta_query-for-an-acf-checkbox-field/#post-145830
// https://www.advancedcustomfields.com/resources/checkbox/#query-posts
// https://barn2.com/blog/querying-posts-by-custom-field-acfi/
$the_query_ajut_old = new WP_Query(
array(
'post_type' => 'xarxaprod-ajut',
'posts_per_page' => '-1',
'meta_key' => 'xxp_fund_apply_end', // order by meta key convo apply end
'meta_query' => array(
array( //filter results show only older than today
'key' => 'xxp_fund_apply_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '<', //show events from today and later
'type' => 'DATE',
)
),
//https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
'orderby' => 'meta_value', //order by meta value
'order' => 'DESC', //order ascendent
)
);
?>
<?php if ( $the_query_ajut_old->have_posts() ) : ?>
<?php while ( $the_query_ajut_old->have_posts() ) : $the_query_ajut_old->the_post(); ?>
<?php get_template_part( 'template-parts/section', 'eachfund' ); ?>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
<?php endif; //end query ajut ?>
</content>
</section>
</main><!-- #main -->
<?php
get_sidebar();
get_footer();

View File

@ -0,0 +1,93 @@
<?php
/**
* The template for displaying the "convos" calls with search capabilities
*
* Template Name: Arxiu Activitats
*
* @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
*/
get_header();
?>
<!-- page-templates convos-search-php -->
<main id="primary" class="site-main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
</header><!-- .page-header -->
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'page' );
endwhile;
the_posts_navigation();
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
<section id="arxiuactivitats" class="xarxaprod-filtered-content xarxaprod-filtered-arxiu xarxaprod-arxiu-agenda xarxaprod-arxiu-activitats">
<header>
</header>
<aside id="agendafilter" class="xarxaprod-filter-agenda xarxaprod-fitre-agenda">
</aside>
<?php
$the_query_archive_activitats = new WP_Query(
array(
'post_type' => 'post',
'posts_per_page' => '-1', //show all => -1
'tax_query' => array(
array(
'taxonomy' => 'category',
'field' => 'slug',
'terms' => 'activitats'
)
),
'order_by' => 'meta_value', //order by meta value
'order' => 'ASC', //order ascendent
'meta_query' => array(
array( //filter results show only older than today
'key' => 'xxp_agenda_date_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '<', //show events before today
'type' => 'DATE',
)
)
)
);
?>
<?php if ( $the_query_archive_activitats->have_posts() ) : ?>
<content class="archive-posts <?php //xarxaprod_class_posttype(); ?>">
<?php while ( $the_query_archive_activitats->have_posts() ) : $the_query_archive_activitats->the_post(); ?>
<?php get_template_part( 'template-parts/section', 'each-agenda-entry' ); ?>
<?php endwhile;//end of the loop ?>
<?php
// pagination will not work for custom_query
// https://wordpress.stackexchange.com/a/120408
// how to fix it
the_posts_navigation();
?>
<?php wp_reset_postdata(); ?>
</content>
<?php endif; //end query agenda ?>
</section>
</main><!-- #main -->
<?php
get_footer();

View File

@ -0,0 +1,83 @@
<?php
/**
* The template for displaying the "convos" calls with search capabilities
*
* Template Name: Arxiu Convos
*
* @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
*/
get_header();
?>
<!-- page-templates convos-search-php -->
<main id="primary" class="site-main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
</header><!-- .page-header -->
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'page' );
endwhile;
the_posts_navigation();
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
<section id="filteredcalls" class="xarxaprod-filtered-content xarxaprod-filtered-arxiu xarxaprod-arxiu-convos">
<aside id="callsfilter" class="xarxaprod-filter-calls xarxaprod-fitre-convos">
<?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_convos_filters_form(); // function defined in the plugin ?>
<?php //} //end if is_plugin_active ?>
</aside>
<?php
// comparing dates
// https://wordpress.stackexchange.com/a/12305
$the_query_archive_convo = new WP_Query(
array(
'post_type' => 'xarxaprod-convo',
'order_by' => 'meta_value', //order by meta value
'meta_key' => 'xxp_convo_apply_end', // order by meta key convo apply end
'order' => 'ASC', //order ascendent
'posts_per_page' => '-1', //show all
'meta_query' => array(
array( //filter results show only older than today
'key' => 'xxp_convo_apply_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '<', //show events before today
'type' => 'DATE',
)
)
)
);
?>
<?php if ( $the_query_archive_convo->have_posts() ) : ?>
<content class="archive-posts archive-xarxaprod-convo <?php //xarxaprod_class_posttype(); ?>">
<?php while ( $the_query_archive_convo->have_posts() ) : $the_query_archive_convo->the_post(); ?>
<?php get_template_part( 'template-parts/section', 'eachconvo' ); ?>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
</content>
<?php endif; //end query convo ?>
</section>
</main><!-- #main -->
<?php
get_footer();

View File

@ -0,0 +1,184 @@
<?php
/**
* The template for displaying the "convos" calls with search capabilities
*
* Template Name: Arxiu general
*
* @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
*/
get_header();
?>
<!-- page-templates convos-search-php -->
<main id="primary" class="site-main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
</header><!-- .page-header -->
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'page' );
endwhile;
the_posts_navigation();
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
<section id="filteredagenda" class="xarxaprod-filtered-content xarxaprod-filtered-arxiu xarxaprod-arxiu-agenda xarxaprod-arxiu-activitats">
<header>
<h2 class="section-title"><a href="<?php echo site_url(); ?>/arxiu-activitats">Activitats pasades</a></h2>
</header>
<aside id="agendafilter" class="xarxaprod-filter-agenda xarxaprod-fitre-agenda">
</aside>
<?php
$the_query_archive_agenda = new WP_Query(
array(
'post_type' => 'post',
'posts_per_page' => '3', //show all => -1
'tax_query' => array(
array(
'taxonomy' => 'category',
'field' => 'slug',
'terms' => 'activitats'
)
),
'order_by' => 'meta_value', //order by meta value
'order' => 'ASC', //order ascendent
'meta_query' => array(
array( //filter results show only older than today
'key' => 'xxp_agenda_date_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '<', //show events before today
'type' => 'DATE',
)
)
)
);
?>
<?php if ( $the_query_archive_agenda->have_posts() ) : ?>
<content class="archive-posts <?php //xarxaprod_class_posttype(); ?>">
<?php while ( $the_query_archive_agenda->have_posts() ) : $the_query_archive_agenda->the_post(); ?>
<?php get_template_part( 'template-parts/section', 'each-agenda-entry' ); ?>
<?php endwhile;//end of the loop ?>
<?php
// pagination will not work for custom_query
// https://wordpress.stackexchange.com/a/120408
// how to fix it
the_posts_navigation();
?>
<?php wp_reset_postdata(); ?>
</content>
<?php endif; //end query agenda ?>
</section>
<section id="filteredcalls" class="xarxaprod-filtered-content xarxaprod-filtered-arxiu xarxaprod-arxiu-convos">
<header>
<h2 class="section-title"><a href="<?php echo site_url(); ?>/arxiu-convocatories">Convocatories pasades</a></h2>
</header>
<aside id="callsfilter" class="xarxaprod-filter-calls xarxaprod-fitre-convos">
</aside>
<?php
// comparing dates
// https://wordpress.stackexchange.com/a/12305
$the_query_archive_convo = new WP_Query(
array(
'post_type' => 'xarxaprod-convo',
'order_by' => 'meta_value', //order by meta value
'meta_key' => 'xxp_convo_apply_end', // order by meta key convo apply end
'order' => 'ASC', //order ascendent
//'posts_per_page' => '-1', //show all
'posts_per_page' => '3',
'meta_query' => array(
array( //filter results show only older than today
'key' => 'xxp_convo_apply_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '<', //show events before today
'type' => 'DATE',
)
)
)
);
?>
<?php if ( $the_query_archive_convo->have_posts() ) : ?>
<content class="archive-posts archive-xarxaprod-convo <?php //xarxaprod_class_posttype(); ?>">
<?php while ( $the_query_archive_convo->have_posts() ) : $the_query_archive_convo->the_post(); ?>
<?php get_template_part( 'template-parts/section', 'eachconvo' ); ?>
<?php endwhile;//end of the loop ?>
<?php
// pagination will not work for custom_query
// https://wordpress.stackexchange.com/a/120408
// how to fix it
the_posts_navigation();
?>
<?php wp_reset_postdata(); ?>
</content>
<?php endif; //end query convo ?>
</section>
<?php
// comparing dates
// https://wordpress.stackexchange.com/a/12305
$the_query_archive_convopre2024 = new WP_Query(
// uncomment below to activate preview of pre 2024 convos
// array(
// 'post_type' => 'post',
// 'posts_per_page' => '4', //show all => -1
// 'tax_query' => array(
// array(
// 'taxonomy' => 'category',
// 'field' => 'slug',
// 'terms' => 'convocatories'
// )
// ),
// )
// uncomment above to activate preview of pre 2024 convos
);
?>
<?php if ( $the_query_archive_convopre2024->have_posts() ) : ?>
<section id="filteredcalls-pre2024" class="xarxaprod-filtered-content xarxaprod-filtered-content xarxaprod-filtered-calls xarxaprod-convos-filtrats">
<header>
<h2 class="section-title"><a href="<?php echo site_url(); ?>/convocatories-pre-2024/">Convocatories pre 2024</a></h2>
</header>
<aside id="callsfilter" class="xarxaprod-filter-calls xarxaprod-fitre-convos">
</aside>
<content class="archive-posts category-convocatoriespre2024">
<?php while ( $the_query_archive_convopre2024->have_posts() ) : $the_query_archive_convopre2024->the_post(); ?>
<?php get_template_part( 'template-parts/section', 'eachconvo' ); ?>
<?php endwhile;//end of the loop ?>
<?php
// pagination will not work for custom_query
// https://wordpress.stackexchange.com/a/120408
// how to fix it
the_posts_navigation();
?>
<?php wp_reset_postdata(); ?>
</content>
</section>
<?php endif; //end query convopre2024 ?>
</main><!-- #main -->
<?php
get_footer();

View File

@ -0,0 +1,108 @@
<?php
/**
* The template for displaying the "associats" associats with search capabilities
*
* Template Name: Associats Cercador
*
* @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
*/
get_header();
?>
<!-- page-templates associats-search-php -->
<main id="primary" class="site-main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
</header><!-- .page-header -->
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'page' );
endwhile;
the_posts_navigation();
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
<section id="filteredassociats" class="xarxaprod-filtered-content xarxaprod-filtered-content xarxaprod-filtered-associats xarxaprod-associats-filtrats">
<aside id="associatsfilter" class="xarxaprod-filter-associats xarxaprod-fitre-associats">
<?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 archive-posts-map archive-xarxaprod-members archive-xarxaprod-associats <?php xarxaprod_class_posttype(); ?>">
<?php
// https://support.advancedcustomfields.com/forums/topic/wp_query-using-meta_query-for-an-acf-checkbox-field/#post-145830
// https://www.advancedcustomfields.com/resources/checkbox/#query-posts
// 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() ) : ?>
<figure id="espais-associats-map" class="xarxaprod-associats-map xarxaprod-espais-map">
<?php xarxaprod_show_leaflet_map(); // function defined in the plugin ?>
<?php while ( $the_query_associat->have_posts() ) : $the_query_associat->the_post(); ?>
<?php xarxaprod_show_leaflet_associat_blob(); ?>
<?php endwhile;//end of the loop ?>
</figure>
<?php
// nuvol de nomb sde fabriques
echo '<ul class="xarxaprod-label">';
while ( $the_query_associat->have_posts() ) : $the_query_associat->the_post();
echo '<li>';
echo '<a href="';
the_permalink();
echo '" title="';
the_title();
echo '" rel="bookmark">';
the_title();
echo '</a>';
echo '</li>';
endwhile;
echo '</ul>';
?>
<?php wp_reset_postdata(); ?>
<?php endif; //end query associat ?>
</content>
</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

@ -0,0 +1,84 @@
<?php
/**
* The template for displaying the "convos" calls with search capabilities
*
* Template Name: Convos actuals cercador
*
* @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
*/
get_header();
?>
<!-- page-templates convos-search-php -->
<main id="primary" class="site-main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
</header><!-- .page-header -->
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'page' );
endwhile;
the_posts_navigation();
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
<section id="filteredcalls" class="xarxaprod-filtered-content xarxaprod-filtered-content xarxaprod-filtered-calls xarxaprod-convos-filtrats">
<aside id="callsfilter" class="xarxaprod-filter-calls xarxaprod-fitre-convos">
<?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_convos_filters_form(); // function defined in the plugin ?>
<?php } //end if is_plugin_active ?>
</aside>
<content class="archive-posts archive-xarxaprod-convo <?php //xarxaprod_class_posttype(); ?>">
<?php
// https://support.advancedcustomfields.com/forums/topic/wp_query-using-meta_query-for-an-acf-checkbox-field/#post-145830
// https://www.advancedcustomfields.com/resources/checkbox/#query-posts
// https://barn2.com/blog/querying-posts-by-custom-field-acfi/
$the_query_convo = new WP_Query(
array(
'post_type' => 'xarxaprod-convo',
'posts_per_page' => '-1', //show all
'meta_key' => 'xxp_convo_apply_end', // order by meta key convo apply end
'meta_query' => array(
array( //filter results show only older than today
'key' => 'xxp_convo_apply_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '>=', //show events from today and later
'type' => 'DATE',
)
),
//https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
'orderby' => 'meta_value', //order by meta value
'order' => 'ASC', //order ascendent
)
);
?>
<?php if ( $the_query_convo->have_posts() ) : ?>
<?php while ( $the_query_convo->have_posts() ) : $the_query_convo->the_post(); ?>
<?php get_template_part( 'template-parts/section', 'eachconvo' , $the_query_convo); ?>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
<?php endif; //end query convo ?>
</content>
</section>
</main><!-- #main -->
<?php
get_footer();

View File

@ -2,7 +2,7 @@
/**
* The template for displaying the "ajuts" funds with search capabilities
*
* Template Name: PAFs, consells, tutorials...
* Template Name: PAFs, FAQs, consells, tutorials...
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
* @link https://developer.wordpress.org/themes/template-files-section/page-template-files/
@ -54,13 +54,15 @@ get_header();
array(
'post_type' => 'post',
'category_name' => 'faq',
'post_per_page' => '8'
'post_per_page' => '-1',
'orderby' => 'date',
'order' => 'DESC',
) );
?>
<?php if ( $the_query_faq->have_posts() ) : ?>
<?php while ( $the_query_faq->have_posts() ) : $the_query_faq->the_post(); ?>
<?php get_template_part( 'template-parts/section', 'eachpost' ); ?>
<?php get_template_part( 'template-parts/section', 'eachfund' ); ?>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>

View File

@ -1,53 +0,0 @@
<?php
/**
* The template for page declared as front-page
*
*
* @link https://developer.wordpress.org/themes/template-files-section/page-template-files/
*
* @package Xarxaprod_theme
*/
get_header();
?>
<main id="primary" class="site-main">
<?php
if ( have_posts() ) :
if ( is_home() && ! is_front_page() ) :
?>
<header>
<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
</header>
<?php
endif;
/* Start the Loop */
while ( have_posts() ) :
the_post();
/*
* Include the Post-Type-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Type name) and that will be used instead.
*/
get_template_part( 'template-parts/content', get_post_type() );
endwhile;
the_posts_navigation();
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
</main><!-- #main -->
<?php
get_sidebar();
get_footer();

View File

@ -1,75 +0,0 @@
<?php
/**
* The template for displaying the "ajuts" funds with search capabilities
*
* Template Name: Cercador ajuts
*
* @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
*/
get_header();
?>
<main id="primary" class="site-main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
</header><!-- .page-header -->
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'page' );
endwhile;
the_posts_navigation();
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
<section id="filteredfunds" class="xarxaprod-filtered-funds xarxaprod-ajuts-filtrats">
<aside id="fundsfilter" class="xarxaprod-filter-funds xarxaprod-fitre-ajuts">
<?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_ajuts_filters_form(); // function defined in the plugin ?>
<?php } //end if is_plugin_active ?>
</aside>
<content class="archive-posts <?php xarxaprod_class_posttype(); ?>">
<?php
// https://support.advancedcustomfields.com/forums/topic/wp_query-using-meta_query-for-an-acf-checkbox-field/#post-145830
// https://www.advancedcustomfields.com/resources/checkbox/#query-posts
// https://barn2.com/blog/querying-posts-by-custom-field-acfi/
$the_query_ajut = new WP_Query(
array(
'post_type' => 'xarxaprod-ajut',
'posts_per_page' => '-1'
)
);
?>
<?php if ( $the_query_ajut->have_posts() ) : ?>
<?php while ( $the_query_ajut->have_posts() ) : $the_query_ajut->the_post(); ?>
<?php get_template_part( 'template-parts/section', 'eachpost' ); ?>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
<?php endif; //end query ajut ?>
</content>
</section>
</main><!-- #main -->
<?php
get_footer();

View File

@ -27,10 +27,21 @@ get_header();
endif; // End if have_post.
?>
<?php
if ( is_front_page() ) :
//get_template_part( 'template-parts/section', 'featured' );
get_template_part( 'template-parts/section', 'last-convos' );
get_template_part( 'template-parts/section', 'last-agenda' );
endif;
?>
</main><!-- #main -->
<?php
if ( is_front_page() ) :
get_template_part( 'template-parts/section', 'featured' );
echo '<aside id="extra" class="extra-content contingut-extra">';
dynamic_sidebar( 'front-page-widgets' ); // including widget front page
echo '</aside>';
endif;
?>

View File

@ -1,12 +1,21 @@
$color__xxp_black: #000000;
$color__xxp_white: #ffffff;
$color__xxp_salmon: #ff866f;
$color__xxp_yellow: #ffcb1f;
$color__xxp_pink: #ff6bc3;
$color__xxp_violet: #651aff;
$color__xxp_cyan: #00d1ec;
$color__xxp_green: #00f274;
$color__xxp_red: #ff5a69;
$color__xxp-black: #000000;
$color__xxp-black-rgb: rgb(0,0,0);
$color__xxp-white: #ffffff;
$color__xxp-white-rgb: rgb(255,255,255);
$color__xxp-red: #f27173;
$color__xxp-red-rgb: rgb(242,113,115);
$color__xxp-yellow: #f6cc4c;
$color__xxp-yellow-rgb: rgb(246,204,076);
$color__xxp-green: #84c779;
$color__xxp-green-rgb: rgb(132,199,121);
$color__xxp-cyan: #61cae4;
$color__xxp-cyan-rgb: rgb(97,202,228);
$color__xxp-lila: #de7fb4;
$color__xxp-lila-rgb: rgb(222,127,180);
$color__xxp-pink: #f58b77;
$color__xxp-pink-rgb: rgb(245,139,119);
$color__xxp-violet: #5859a7;
$color__xxp-violet-rgb: rgb(88,89,167);
$color__white: #fff;
$color__white-dark: #fdfdfd;
@ -30,10 +39,10 @@ $color__red: #ff686e;
$color__background-body: none;
$color__background-screen: none;
$color__background-hr: $color__black;
$color__background-button: none;
$color__background-button: $color__black;
$color__background-pre: $color__grey-lighter;
$color__background-ins: $color__white-dark;
$color__background-input: $color__grey-lighter;
$color__background-input: transparent;
$color__text-screen: $color__black;
$color__text-input: $color__black-grey;
@ -43,9 +52,13 @@ $color__link-visited: $color__link;
$color__link-hover: $color__black-light;
$color__text-main: $color__black;
$color__border-button: #000;
$color__border-button-hover: #111;
$color__border-button-focus: #222;
$color__border-button: $color__black;
$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.05rem solid $color__black;
$box__shadow: 0 3px 10px rgba(0,0,0,0.2);

View File

@ -11,6 +11,6 @@ $font__header: $font__main;
$font__code: monaco, consolas, "Andale Mono", "DejaVu Sans Mono", monospace, mono;
$font__pre: "Courier 10 Pitch", courier, monospace;
$font__size-body: 1rem;
$font__line-height-body: 1.3;
$font__line-height-pre: 1.4;
$font__line-height-body: 1.4;
$font__line-height-pre: 1.5;
$font__line-height-header: 1.1;

View File

@ -1,7 +1,8 @@
/////////////////////////////////////////////////////////////////////
// theme for editor admin, import style.sass and apply class before rest of it
// .wp-admin styles
// admin styles
.wp-admin {
.components-button.edit-post-fullscreen-mode-close.has-icon,
.edit-post-fullscreen-mode-close_site-icon {
@ -12,32 +13,17 @@
.site-icon-preview .app-icon-preview {
background-color: #fff;
}
// editor styles
.edit-post-visual-editor__content-area {
.editor-styles-wrapper {
// import theme styles
@import "style";
font-family: 'Neue Haas Grotesk Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
// apply differences when not rendered properly
:where(.wp-block) {
max-width: 80rem;
}
.black-blocs .wp-block-column a::after {
display:none;
h1,h2,h3,h4,h5,ul,figure,button {
margin-left: auto;
margin-right: auto;
}
}
.editor-styles-wrapper .wp-block-button__link {
color: #000 !important;
background-color: #fff !important;
border-radius: 0 !important;
box-shadow: none !important;
text-decoration: none !important;
padding: 0.6em 1em 0.4em !important;
font-size: inherit !important;
}
// modify internal paths to make objects locally available
@import "adminstyles/fonts";
////////////////////////////////////////

View File

@ -5,12 +5,12 @@ Add your custom styles in this file so it is easier to update the theme.
*/
@font-face {
font-family: Neue Haas Grotesk Pro;
src: url(assets/fonts/NeueHaasGroteskPro-45Light.eot);
src: url(assets/fonts/NeueHaasGroteskPro-45Light.eot?#iefix) format(embedded-opentype),
url(assets/fonts/NeueHaasGroteskPro-45Light.woff2) format(woff2),
url(assets/fonts/NeueHaasGroteskPro-45Light.woff) format(woff),
url(assets/fonts/NeueHaasGroteskPro-45Light.ttf) format(truetype),
url(assets/fonts/NeueHaasGroteskPro-45Light.svg#NeueHaasGroteskPro-45Light) format(svg);
src: url(../../assets/fonts/NeueHaasGroteskPro-45Light.eot);
src: url(../../assets/fonts/NeueHaasGroteskPro-45Light.eot?#iefix) format(embedded-opentype),
url(../../assets/fonts/NeueHaasGroteskPro-45Light.woff2) format(woff2),
url(../../assets/fonts/NeueHaasGroteskPro-45Light.woff) format(woff),
url(../../assets/fonts/NeueHaasGroteskPro-45Light.ttf) format(truetype),
url(../../assets/fonts/NeueHaasGroteskPro-45Light.svg#NeueHaasGroteskPro-45Light) format(svg);
font-weight: 300;
font-style: normal;
font-display: swap;
@ -18,12 +18,12 @@ Add your custom styles in this file so it is easier to update the theme.
@font-face {
font-family: Neue Haas Grotesk Pro;
src: url(assets/fonts/NeueHaasGroteskPro-55Roman.eot);
src: url(assets/fonts/NeueHaasGroteskPro-55Roman.eot?#iefix) format(embedded-opentype),
url(assets/fonts/NeueHaasGroteskPro-55Roman.woff2) format(woff2),
url(assets/fonts/NeueHaasGroteskPro-55Roman.woff) format(woff),
url(assets/fonts/NeueHaasGroteskPro-55Roman.ttf) format(truetype),
url(assets/fonts/NeueHaasGroteskPro-55Roman.svg#NeueHaasGroteskPro-55Roman) format(svg);
src: url(../../assets/fonts/NeueHaasGroteskPro-55Roman.eot);
src: url(../../assets/fonts/NeueHaasGroteskPro-55Roman.eot?#iefix) format(embedded-opentype),
url(../../assets/fonts/NeueHaasGroteskPro-55Roman.woff2) format(woff2),
url(../../assets/fonts/NeueHaasGroteskPro-55Roman.woff) format(woff),
url(../../assets/fonts/NeueHaasGroteskPro-55Roman.ttf) format(truetype),
url(../../assets/fonts/NeueHaasGroteskPro-55Roman.svg#NeueHaasGroteskPro-55Roman) format(svg);
font-weight: 500;
font-style: normal;
font-display: swap;
@ -31,12 +31,12 @@ Add your custom styles in this file so it is easier to update the theme.
@font-face {
font-family: Neue Haas Grotesk Pro;
src: url(assets/fonts/NeueHaasGroteskPro-75Bold.eot);
src: url(assets/fonts/NeueHaasGroteskPro-75Bold.eot?#iefix) format(embedded-opentype),
url(assets/fonts/NeueHaasGroteskPro-75Bold.woff2) format(woff2),
url(assets/fonts/NeueHaasGroteskPro-75Bold.woff) format(woff),
url(assets/fonts/NeueHaasGroteskPro-75Bold.ttf) format(truetype),
url(assets/fonts/NeueHaasGroteskPro-75Bold.svg#NeueHaasGroteskPro-75Bold) format(svg);
src: url(../../assets/fonts/NeueHaasGroteskPro-75Bold.eot);
src: url(../../assets/fonts/NeueHaasGroteskPro-75Bold.eot?#iefix) format(embedded-opentype),
url(../../assets/fonts/NeueHaasGroteskPro-75Bold.woff2) format(woff2),
url(../../assets/fonts/NeueHaasGroteskPro-75Bold.woff) format(woff),
url(../../assets/fonts/NeueHaasGroteskPro-75Bold.ttf) format(truetype),
url(../../assets/fonts/NeueHaasGroteskPro-75Bold.svg#NeueHaasGroteskPro-75Bold) format(svg);
font-weight: bold;
font-style: normal;
font-display: swap;

View File

@ -1,3 +1,7 @@
/* Css root vars
--------------------------------------------- */
@import "typography/css-root-vars";
/* Typography
--------------------------------------------- */
@import "typography/typography";

View File

@ -1,8 +1,271 @@
body {
background: $color__background-body; // Fallback for when there is no custom background color defined.
background-image: url(./assets/img/background-colors-02.jpg);
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
//Fallback for when there is no custom background color defined.
background: $color__background-body;
position: relative;
&.admin-bar {
//if else breaks the WordPress inline styles when front end editing
position: inherit;
}
}
:root{
//check colors at sass/abstracts/variables/_colors.scss
--color-xxp-black: #000000;
--color-xxp-white: #ffffff;
--color-xxp-red: #f27173;
--color-xxp-yellow: #f6cc4c;
--color-xxp-green: #84c779;
--color-xxp-cyan: #61cae4;
--color-xxp-lila: #de7fb4;
--color-xxp-pink: #f58b77;
--color-xxp-violet: #5859a7;
//default bubble color definition
--bubble-color-01: var(--color-xxp-red);
--bubble-color-02: var(--color-xxp-yellow);
--bubble-color-03: var(--color-xxp-cyan);
--bubble-color-04: var(--color-xxp-green);
}
@media screen {
.home {
--bubble-color-01: var(--color-xxp-white);
--bubble-color-02: var(--color-xxp-red);
--bubble-color-03: var(--color-xxp-yellow);
--bubble-color-04: var(--color-xxp-white);
}
.page-id-617 //que es xarxaprod
{
--bubble-color-01: var(--color-xxp-violet);
--bubble-color-02: var(--color-xxp-white);
--bubble-color-03: var(--color-xxp-white);
--bubble-color-04: var(--color-xxp-yellow);
}
.page-id-626, //qui som junta
.page-id-2936, //comisions
.page-id-2937 //ofi tecnica
{
--bubble-color-01: var(--color-xxp-yellow);
--bubble-color-02: var(--color-xxp-white);
--bubble-color-03: var(--color-xxp-yellow);
--bubble-color-04: var(--color-xxp-lila);
}
.page-id-634 //que oferim
{
--bubble-color-01: var(--color-xxp-white);
--bubble-color-02: var(--color-xxp-yellow);
--bubble-color-03: var(--color-xxp-violet);
--bubble-color-04: var(--color-xxp-white);
}
.page-id-659 //premsa
{
--bubble-color-01: var(--color-xxp-cyan);
--bubble-color-02: var(--color-xxp-cyan);
--bubble-color-03: var(--color-xxp-yellow);
--bubble-color-04: var(--color-xxp-white);
}
.page-template-associats-search,
.post-type-archive-xarxaprod-associat
{
--bubble-color-01: var(--color-xxp-white);
--bubble-color-02: var(--color-xxp-green);
--bubble-color-03: var(--color-xxp-pink);
--bubble-color-04: var(--color-xxp-pink);
}
.single-xarxaprod-associat {
--bubble-color-01: var(--color-xxp-pink);
--bubble-color-02: var(--color-xxp-yellow);
--bubble-color-03: var(--color-xxp-pink);
--bubble-color-04: var(--color-xxp-white);
}
.page-template-arxiu-general,
.page-id-643 //arxiu-convos vell
{
--bubble-color-01: var(--color-xxp-white);
--bubble-color-02: var(--color-xxp-red);
--bubble-color-03: var(--color-xxp-red);
--bubble-color-04: var(--color-xxp-white);
}
.page-template-convos-search,
.post-type-archive-xarxaprod-convo
{
--bubble-color-01: var(--color-xxp-white);
--bubble-color-02: var(--color-xxp-pink);
--bubble-color-03: var(--color-xxp-green);
--bubble-color-04: var(--color-xxp-white);
}
.single-xarxaprod-convo {
--bubble-color-01: var(--color-xxp-lila);
--bubble-color-02: var(--color-xxp-white);
--bubble-color-03: var(--color-xxp-violet);
--bubble-color-04: var(--color-xxp-lila);
}
.page-template-agenda-search {
--bubble-color-01: var(--color-xxp-lila);
--bubble-color-02: var(--color-xxp-white);
--bubble-color-03: var(--color-xxp-white);
--bubble-color-04: var(--color-xxp-red);
}
.category-activitats {
--bubble-color-01: var(--color-xxp-white);
--bubble-color-02: var(--color-xxp-green);
--bubble-color-03: var(--color-xxp-cyan);
--bubble-color-04: var(--color-xxp-white);
}
.page-id-28, //espai assesorament
.page-template-faqs-page
{
--bubble-color-01: var(--color-xxp-white);
--bubble-color-02: var(--color-xxp-cyan);
--bubble-color-03: var(--color-xxp-violet);
--bubble-color-04: var(--color-xxp-white);
}
.page-template-ajut-search,
.post-type-archive-xarxaprod-ajut,
.single-xarxaprod-ajut
//.custom-post-type-ajuts
{
--bubble-color-01: var(--color-xxp-cyan);
--bubble-color-02: var(--color-xxp-white);
--bubble-color-03: var(--color-xxp-white);
--bubble-color-04: var(--color-xxp-violet);
}
.page-id-1673 //XarxaREC
{
--bubble-color-01: var(--color-xxp-yellow);
--bubble-color-02: var(--color-xxp-white);
--bubble-color-03: var(--color-xxp-green);
--bubble-color-04: var(--color-xxp-yellow);
}
.page-id-2366 //Firas i mercats
{
--bubble-color-01: var(--color-xxp-white);
--bubble-color-02: var(--color-xxp-violet);
--bubble-color-03: var(--color-xxp-red);
--bubble-color-04: var(--color-xxp-white);
}
.page-id-2364 //Sostenibilitat
{
--bubble-color-01: var(--color-xxp-green);
--bubble-color-02: var(--color-xxp-white);
--bubble-color-03: var(--color-xxp-white);
--bubble-color-04: var(--color-xxp-violet);
}
.page-id-2365 //projecte educatiu
{
--bubble-color-01: var(--color-xxp-lila);
--bubble-color-02: var(--color-xxp-yellow);
--bubble-color-03: var(--color-xxp-lila);
--bubble-color-04: var(--color-xxp-yellow);
}
.page-id-1760 //Mentoratge
{
--bubble-color-01: var(--color-xxp-cyan);
--bubble-color-02: var(--color-xxp-white);
--bubble-color-03: var(--color-xxp-lila);
--bubble-color-04: var(--color-xxp-cyan);
}
.liquid-bubbles {
overflow: hidden;
float: left;
position: fixed;
top: 0;
left: 0;
z-index: -1000;
width: 100vw;
height: 100vh;
}
.bubbles {
//--size: 40vw;
//--position: -5vw;
//filter: blur(8rem);
position:absolute;
width: var(--size);
height: var(--size);
border-radius: 20%;
background: linear-gradient(var(--bgangle),var(--bgcolor), transparent);
//animation: 4s ease-in-out 4s infinite alternate bubble-move;
&.bubble-01{
top: var(--position);
left: var(--position);
--bgcolor: var(--bubble-color-01);
//--bgangle: to bottom right;
--bgangle: 135deg;
animation: 5s ease-in-out 2s infinite alternate bubble-move;
}
&.bubble-02{
top: var(--position);
right: var(--position);
--bgcolor: var(--bubble-color-02);
//--bgangle: to bottom left;
--bgangle: 225deg;
animation: 3s ease-in-out 0s infinite alternate bubble-move;
}
&.bubble-03{
bottom: var(--position);
left: var(--position);
--bgcolor: var(--bubble-color-03);
//--bgangle: to top right;
--bgangle: 45deg;
animation: 2s ease-in-out 3s infinite alternate bubble-move;
}
&.bubble-04{
bottom: var(--position);
right: var(--position);
--bgcolor: var(--bubble-color-04);
//--bgangle: to top left;
--bgangle: 325deg;
animation: 4s ease-in-out 1s infinite alternate bubble-move;
}
}
}
@media screen and (max-width: 48em) {
@keyframes bubble-move {
from {
width: 50vw;
height: 70vh;
filter: blur(3rem);
/* transform: rotate(0);*/
}
to {
width: 100vw;
height: 40vh;
filter: blur(8rem);
/* transform: rotate(5deg);*/
}
}
.bubbles {
--size: 50vw;
--position: 0vw;
height: 70vh;
filter: blur(3rem);
border-radius: 3%;
}
}
@media screen and (min-width: 48em) {
@keyframes bubble-move {
from {
width: 40vw;
height: 40vw;
filter: blur(10rem);
/* transform: rotate(0);*/
}
to {
width: 90vw;
height: 20vw;
filter: blur(20rem);
/* transform: rotate(5deg);*/
}
}
.bubbles {
--size: 40vw;
--position: -5vw;
filter: blur(20rem);
}
}
@media screen and (min-width: 80em) {
}

View File

@ -4,56 +4,36 @@ input[type="reset"],
input[type="submit"],
.button,
.wp-block-button__link {
border: 1px solid;
border: 0;
border-color: $color__border-button;
border-radius: 0;
background: $color__background-button;
color: $color__text-screen;
line-height: 1;
// padding: 0.6em 1em 0.4em;
padding: 0.5em;
color: $color__white;
font-size: $font__size-body * 0.9;
//line-height: 1;
padding: 0.6em;
margin: 0;
//text-transform: uppercase;
&:hover {
border-color: $color__border-button-hover;
color: $color__white;
}
&:visited {
color: $color__white;
}
&:active,
&:focus {
border-color: $color__border-button-focus;
color: $color__white;
}
}
.button-more {
// line-height: 2.5;
display: inline-block;
&::after {
content: "+";
display: inline-block;
font-weight: bold;
text-align: center;
}
&:hover::after {
content: ">";
}
}
.more-link {
.button-more {
&::after {
font-size: 4rem;
width: 4rem;
}
&:hover::after {
}
}
}
.category-faq {
.button-more {
&::before {
content: "accedir";
}
}
}
//.category-faq {
// .button-more {
// &::before {
// content: "accedir";
// }
// }
//}
.xarxaprod-search-form {
display: flex;
@ -63,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;
@ -83,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

@ -16,18 +16,19 @@ input[type="color"],
textarea {
color: $color__text-input;
background-color: $color__background-input;
border: none;
border: $border__line;
border-radius: 0;
width: 100%;
padding: 0.3rem;
&:focus {
&:focus,&:focus-within,&:focus-visible {
color: $color__text-input-focus;
box-shadow: none;
outline: unset;
}
}
select {
border: 1px solid $color__border-input;
border: $border__line;
}
textarea {

View File

@ -4,3 +4,6 @@ hr {
height: 1px;
margin-bottom: 1.5em;
}
.wp-block-separator {
border: none;
}

View File

@ -1,5 +1,6 @@
a {
color: $color__link;
text-decoration: none;
&:visited {
color: $color__link-visited;
@ -21,74 +22,18 @@ a {
}
}
@media screen {
}
@media screen and (max-width: 48em) {
//only smaller than 48em
a {
&.button {
text-decoration: none;
overflow-wrap: anywhere;
word-break: normal;
}
}
.button,
.excerpt,
.post-excerpt,
.entry-title {
a {
text-decoration: none;
@media screen and (min-width: 48em) {
//only bigger than 48em
}
@media screen and (min-width: 80em) {
//only bigger than 80rem
}
//.home-featured,.archive-posts {
// .category-faq,.type-xarxaprod-ajut {
// position: relative;
// padding-bottom: 4rem;
// .entry-title {
// a {
// &::after {
// content: "+";
// position:absolute;
// bottom: 0;
// left: 0;
// width: 3rem;
// height: 3rem;
// padding: 0 0.38rem;
// border: 1px solid $color__black;
// font-size: 4rem;
// line-height: 0.8;
// }
// &:hover::after {
// content: ">";
// padding: 0 0.38rem;
// font-size: 2.5rem;
// line-height: 1.3;
// }
// }
// }
// }
// .category-faq {
// .entry-title {
// a {
// &::before {
// content: "accedir";
// position: absolute;
// bottom: 1em;
// left: 0.5em;
// font-family: $font__light;
// font-size: 1rem;
// line-height: 0;
// }
// &::after {
// content: "+";
// width: 8rem;
// height: 2rem;
// padding: 0 0.5rem;
// text-align: right;
// font-size: 2.5rem;
// line-height: 0.7;
// }
// &:hover::after {
// content: ">";
// padding: 0 0.1rem;
// font-size: 1.5rem;
// line-height: 1.2;
// }
// }
// }
// }
//}

View File

@ -1,6 +1,6 @@
ul,
ol {
margin: 0 0 0.5em 0.5em;
margin: 0;
padding: 0;
}
@ -26,8 +26,7 @@ dd {
margin: 0 0 0.5em 0.5em;
padding: 0;
}
article:not(.type-post){
@media screen {
.xarxaprod-label {
margin: 0;
padding: 0;
@ -36,43 +35,27 @@ article:not(.type-post){
display:inline-block;
margin:0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
color: $color__white;
background-color: $color__black;
font-family: $font__black;
font-size: $font__size-body*0.7;
text-transform: uppercase;
color: $color__text-screen;
border: $border__line;
background-color: none;
font-size: $font__size-body*0.8;
}
}
.item-os_fund_target li {
background-color: $color__orange;
}
.item-os_fund_source li {
background-color: $color__lightblue;
}
.item-os_fund_field li {
background-color: $color__yellow;
}
.item-os_fund_dates li {
background-color: $color__green;
}
.item-os_fund_call {
.item-xxp_fund_call {
display: block;
margin:0.2rem 0;
li {
font-size: $font__size-body*1.2;
}
}
.item-os_fund_apply_text {
.item-xxp_fund_apply_text {
display:inline-block;
margin:0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
color: $color__white;
background-color: $color__green;
font-family: $font__black;
font-size: $font__size-body*0.7;
text-transform: uppercase;
}
}
.xarxaprod-faqs-types {
ul {
margin: 0;
@ -83,13 +66,9 @@ article:not(.type-post){
padding: 0.2em 0.2em 0 0.2em;
color: $color__white;
background-color: $color__black;
font-family: $font__black;
font-size: $font__size-body*1.1;
text-transform: uppercase;
}
.current-cat{
background-color: $color__orange;
}
a {
color: $color__white;
text-decoration: none;
@ -105,8 +84,117 @@ article:not(.type-post){
font-size: $font__size-body*1.1;
}
}
.item-os_fund_apply_text {
.item-xxp_fund_apply_text {
font-size: $font__size-body*1.1;
}
}
}
.archive-xarxaprod-associats,
.archive-xarxaprod-members {
li {
margin: 0.1rem;
}
}
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;
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";
}
}
}
}
ul[class*="xarxaprod-associat-social-links"] {
display:flex;
flex-flow: row;
margin: 0;
li {
height: 1.5em;
width: 1.5em;
background-color: inherit;
border-radius: 5em;
border: none !important;
margin-right: 0.3em;
position: relative;
a {
//margin-right: -10000em;
font-size: 0px;
&: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

@ -0,0 +1,3 @@
//:root {
// check also sass/abstracts/variables/_colors.scss
//}

View File

@ -7,70 +7,98 @@
h6,
.h1,.h2,.h3,.h4,.h5,.h6{
clear: both;
margin-top: 0;
margin-bottom: 0;
line-height: $font__line-height-header;
}
h1,.h1 {
font-family: $font__light;
font-size: $font__size-body*1.8;
text-transform: uppercase;
&.small {
font-size: $font__size-body*1.5;
}
}
h2,.h2 {
font-family: $font__light;
font-size: $font__size-body*1.5;
text-transform: uppercase;
&.small {
font-size: $font__size-body*1.2;
}
}
h3,.h3 {
font-family: $font__black;
font-size: $font__size-body*1.3;
text-transform: uppercase;
&.small {
font-size: $font__size-body*1;
}
}
h4,.h4 {
font-family: $font__bold;
font-size: $font__size-body*1.2;
text-transform: uppercase;
&.small {
font-size: $font__size-body*0.9;
}
}
h5,.h5 {
font-family: $font__medium;
font-size: $font__size-body*1.1;
text-transform: uppercase;
font-weight: 500;
&.small {
font-size: $font__size-body*0.8;
font-size: $font__size-body*0.9;
}
}
h6,.h6 {
font-family: $font__light;
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,
.entry-content {
margin: 0;
}
}
.single {
.small {
h1,.h1 {
font-family: $font__black;
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;
// }
//}
.archive,.category {
.page-header {
text-transform: capitalize;
}
}
.home-featured {
@ -78,64 +106,106 @@
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*1.8;
}
h6 {
font-size: $font__size-body*1.6;
padding: 0;
}
}
/* used in
* ./template-parts/section-agenda.php
* ./template-parts/section-last-convos.php
* */
section.agenda,
section.last-convos {
h2 a {
display: flex;
flex-wrap: wrap;
align-content: center;
justify-content: space-between;
&::after {
display: inline-block;
align-self: center;
//justify-self: center;
font-size: 0.8rem;
color: $color__white;
background-color: $color__black;
padding: 0.6em 0.8em;
}
}
}
[lang="ca"] section.agenda h2 a::after {
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: "Veure totes les convocatories";
}
[lang*="es"] section.last-convos h2 a::after {
content: "Ver todas las convocatorias";
}
}
@media screen and (min-width: 48em) {
h1,.h1 {
font-size: $font__size-body*3.5;
font-size: $font__size-body*3;
}
h2,.h2 {
font-size: $font__size-body*2.5;
}
h3,.h3 {
font-size: $font__size-body*1.5;
font-size: $font__size-body*1.4;
}
h4,.h4 {
font-family: $font__black;
font-size: $font__size-body*1.3;
}
h5,.h5 {
font-size: $font__size-body*1.3;
font-size: $font__size-body*1.2;
}
h6,.h6 {
font-size: $font__size-body*1.3;
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;
}
}
}
@media screen and (min-width: 1440px) {
h1,.h1 {
font-size: $font__size-body*3.5;
}
h2,.h2 {
font-size: $font__size-body*2.5;
}
h3,.h3 {
font-size: $font__size-body*1.6;
}
h4,.h4 {
font-family: $font__black;
font-size: $font__size-body*1.4;
}
h5,.h5 {
font-size: $font__size-body*1.4;
}
h6,.h6 {
font-size: $font__size-body*1.4;
}
.home-featured {
h2,.h2 {
font-size: $font__size-body*3.5;
border-bottom: 0.8rem solid $color__black;
}
}
}
@media screen and (min-width: 80em) {
}

View File

@ -1,3 +1,19 @@
//:root {
// //$color__xxp-black: #000000;
// //$color__xxp-white: #ffffff;
// //$color__xxp-salmon: #ff866f;
// //$color__xxp-yellow: #ffcb1f;
// //$color__xxp-pink: #ff6bc3;
// //$color__xxp-violet: #651aff;
// //$color__xxp-cyan: #00d1ec;
// //$color__xxp-green: #00f274;
// //$color__xxp-red: #ff5a69;
// --bubble-color-01: #ff5a69; //$color__xxp-red;
// --bubble-color-02: #ffcb1f; //$color__xxp-yellow;
// --bubble-color-03: #00d1ec; //$color__xxp-cyan;
// --bubble-color-04: #00f274; //$color__xxp-green;
//}
//
body,
button,
input,
@ -26,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,11 +1,13 @@
@media screen {
//any screen
.sticky {
display: block;
}
.post,
.page {
margin: 0 0 5em;
margin: 0;
}
.updated:not(.published) {
@ -13,70 +15,157 @@
}
.page-content,
.entry-content,
.entry-summary {
margin: 1.5em 0 0;
}
.site-main {
.entry-title {
//margin: 0.5em 0 0 0;
}
}
.page-links {
clear: both;
margin: 0 0 1.5em;
}
.home-featured {
padding: 0 1rem;
}
/*
* big letters 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?
* */
.ratlla-abaix,.border-bottom {
.wp-block-column {
position:relative;
padding-top: 1em;
padding-bottom: 1em;
> :last-child {
// border-bottom: $border__line;
&:after {
content: "";
border-bottom: $border__line;
width: 100%;
position: absolute;
bottom: 0;
left: 0;
}
}
}
.wp-block-heading {
display:inline-grid;
}
p {
margin-bottom: 0;
}
}
/*
* download files
* line and icon to show download
*
* * * * * * * */
.descarregar-fitxers,.descarga-fichero,.download-files {
a {
display: inline-block;
width: 100%;
border-bottom: $border__line;
&:after {
content: "";
display:inline-block;
float: right;
width: 1em;
height: 1em;
background-image: url(./assets/img/icon-download.svg);
background-repeat: none;
background-size: contain;
}
}
}
/* used in
* ./template-parts/section-eachpost.php
* template-parts/section-eachpost.php
* */
.xarxaprod-card-each {
display: flex;
flex-direction: column;
.entry-title,h6 {
border-bottom: 1px solid $color__black;
.entry-title {
margin: 0;
padding: 0.5rem 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;
}
p {
padding: 0.5rem 0;
margin:0;
}
.excerpt {
border-bottom: $border__line;
margin-bottom: 0.5em;
padding: 0.5em 0;
}
.more-link {
// display: inline-blocK;
margin-top: 2rem;
}
.button-more {
padding:0;
margin:0;
margin-top: 1rem;
}
}
/* used in
* ./template-parts/content-xarxaprod-ajut.php
* ./template-parts/section-eachpost.php
* template-parts/content-xarxaprod-ajut.php
* template-parts/content-xarxaprod-convo.php
* template-parts/section-eachpost.php
* */
.xarxaprod-card-each {
&.xarxaprod-ajut {
.entry-title {
display: inline-flex;
align-items: flex-start;
height: $font__size-body * 6.4;
border-bottom: $border__line;
overflow: hidden;
}
}
}
.xarxaprod-fund-info-fields,
.xarxaprod-fund-info-contact-fields {
display: grid;
.xarxaprod-fund-info-field {
padding-bottom: 1rem;
border-bottom: 1px solid $color__black;
}
h6 {
font-size: 2.4rem;
font-variant: all-petite-caps;
}
p {
margin: 0.5rem 0 0 0;
}
li {
font-size: 1.3rem;
}
}
.xarxaprod-fund-info-contact-fields {
margin-bottom: 2rem;
.xarxaprod-fund-info-field {
margin: 0;
padding: 1rem 0;
border-bottom: $border__line;
}
h6 {
//display: inline;
font-size: $font__size-body*2.4;
font-variant: all-petite-caps;
~ p .button {
display: inline-block;
margin-top: 0.5rem;
}
}
.xarxaprod-fund-info-fields {
.xarxaprod-fund-info-field {
margin: 1rem 0 0.5rem 0;
p {
margin: 0;
}
.xarxaprod-fund-original-title {
font-weight: bold;
}
li {
font-size: $font__size-body*1.3;
}
}
.xarxaprod-funder-name,
@ -86,58 +175,385 @@
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;
}
}
/* filters form custom fields
*/
.xarxaprod-filtered-funds {
display:grid;
grid: 1fr;
.os_fund_target,
.os_fund_source,
.os_fund_field {
.filter {
/* used in
* archive-xarxaprod-convo.php
* page-template/convo-search.php
* template-parts/content-xarxaprod-convo.php
* template-parts/section-eachconvo.php
* */
.xarxaprod-convo-info-fields,
.xarxaprod-agenda-info {
//margin-bottom: 2em;
li {
padding: 0.2em 0;
border-bottom: $border__line;
font-size: $font__size-body*1;
&:first-of-type {
border-top: $border__line;
}
.xarxaprod-label li {
display: inherit;
margin: 0;
padding: 0;
color: inherit;
border: none;
background-color: transparent;
font-size: inherit;
&:nth-child(n+2):before {
content:", ";
display:inline-block;
}
}
}
dt,dd {
display: inline;
font-weight: 100;
margin: 0;
span {
//padding-right: 0.5rem;
}
}
p {
grid-row: 1 / 2;
margin: 0;
}
}
.xarxaprod-card-each {
&.xarxaprod-convo {
.entry-title {
display: inline-flex;
align-items: flex-start;
min-height: $font__size-body * 3.6;
}
}
}
.single-xarxaprod-convo {
article.xarxaprod-convo {
> .xarxaprod-convo-info-fields {
width: 100%;
padding-top: 2rem;
padding-bottom: 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-filters {
section {
margin: 1em 0;
}
.button-more {
width: 100%;
max-width: 11.7em;
&::after {
margin-left: 1rem;
.xarxaprod-convo-info-fields,
.xarxaprod-agenda-info {
li {
display:grid;
grid-template-columns: 0.75fr 2.25fr;
}
dt {
grid-row: 1 / 1;
font-weight: 100;
}
dd {
grid-row: 1 / 2;
margin: 0;
font-weight: 700;
}
}
.archive-posts {
// https://stackoverflow.com/questions/47601564/equal-width-columns-in-css-grid#61240964
grid-template-columns: repeat(1 , minmax(0,1fr));
.xarxaprod-convo-info-fields,
.xarxaprod-agenda-info {
li {
&:first-of-type{
border-top: $border__line;
}
}
}
}
}
/* used in
* 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 ;
.xarxaprod-associat-contact,
.xarxaprod-associat-services {
dt {
height: $font__size-body*1.5;
}
li {
display: grid;
font-size: $font__size-body*1;
border: none;
border-top: $border__line;
margin: 0;
padding: 0.5em 0;
}
h6,p {
font-size: $font__size-body*1;
margin: 0;
padding: 0;
}
}
.xarxaprod-associat-contact li {
grid-template-columns: 1fr 2.5fr;
}
.xarxaprod-associat-services li {
}
.xarxaprod-associat-logo {
display: inline-flex;
align-content: center;
justify-content: center;
max-height: 11rem;
img {
object-fit: contain;
}
}
}
.xarxaprod-associat-convos {
}
.xarxaprod-associat-location {
.xarxaprod-associat-osm-map {
}
.xarxaprod-associat-osm-link {
display: grid;
grid-template-columns: auto;
align-items: center;
h6,p,a {
margin: 0.5em ;
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 {
margin:0;
grid-column: 1 / -1;
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;
}
}
/*
* Arxiu
* */
.xarxaprod-filtered-arxiu {
> header {
grid-column: -1 / 1;
}
> aside {
grid-column: -1 / 1;
}
> .archive-posts {
grid-column: -1 / 1;
grid-template-columns: repeat(3, 1fr);
}
}
/*
* categories:
* convocatorias pre 2024
* REC
*
* * * * * * * * * * * * * * * */
.archive.category-convocatories {
main {
> aside {
grid-column: -1 / 1;
}
> .archive-posts.category-convocatories {
grid-column: -1 / 1;
grid-template-columns: repeat(3, 1fr);
}
}
}
//.xarxaprod-cards,.category-convocatories, .category-rec {
.xarxaprod-cards,.category-rec {
display: flex;
flex-flow: column;
justify-content: flex-end;
padding-bottom: $font__size-body * 2;
.wp-block-post-title {
font-size: $font__size-body*1.5;
margin-bottom: 0.5em;
padding-bottom: 0.5em;
border-bottom: $border__line;
}
.post-excerpt,
.wp-block-post-excerpt {
min-height: $font__size-body * 7;
margin: 0.5em 0;
font-size: $font__size-body * 1;
border-bottom: $border__line;
}
.wp-block-read-more {
margin: 1em 0;
}
}
/*
* categories:
* agenda, activitats, agenda-es
*
* * * * * * * * * * * * * * * */
//.category-activitats,.category-agenda,.category-agenda-es
/* used in
* template-parts/section-last-agenda.php
* template-parts/section-each-agenda-entry.php
* */
.xarxaprod-agenda {
.xarxaprod-card-each {
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 0.2em 0;
border-bottom: $border__line;
&:first-of-type {
border-top: $border__line;
}
> * {
display: inline-flex;
align-items: center;
}
header,.entry-header {
}
.entry-title,h6 {
border-bottom: none;
padding: 0.5rem 0;
}
p {
}
.activity-organizer, .organiza-activitat {
}
.agenda-date, .agenda-data {
}
}
}
.xarxaprod-card-each{
&.category-activitats {
justify-content: flex-start;
.entry-title {
display: inline-flex;
align-items: flex-start;
min-height: $font__size-body * 5.5;
overflow: hidden;
border: none;
}
figure {
// position: absolute;
order: -1;
margin: 0 0 1rem 0;
width: 100%;
aspect-ratio: 16/9;
overflow: hidden;
img {
object-position: 50% 50%;
max-height: 100%;
object-fit: cover;
width: 100%;
}
}
.xarxaprod-agenda-info {
margin-bottom: 0;
}
li {
display: inline-flex;
width: 100%;
max-height: 2.9rem;
overflow: hidden;
font-weight: 100;
}
dt {
padding-right: 0.5rem;
text-transform: uppercase;
}
dd {
font-weight: 100;
}
.post-excerpt {
margin: 0;
min-height: 5rem;
}
}
}
/*
* filters form custom fields
* * */
.xarxaprod-filters {
section {
margin: 0;
.filter {
display: none;
}
}
}
.xarxaprod-titol-opcions {
// 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-family: $font__black;
font-weight: 900;
font-size: $font__size-body*0.9;
border: 1px solid $color__border-button;
text-transform: uppercase;
border: $border__line;
&:after {
content: ">";
display: inline;
@ -159,13 +575,12 @@
}
}
}
@media screen and (max-width: 48em) {
//only smaller than 48em
.post,
.page {
margin: 0 0 1em;
margin: 0;
}
.xarxaprod-filters {
@ -176,7 +591,6 @@
width: 100%;
}
.filter {
display: inline-block;
width: 45%;
margin-top: 0.5rem;
margin-right: 0.3em;
@ -185,32 +599,70 @@
margin-bottom: 2rem;
}
}
&:last-of-type:after {
content: "";
display: inline-block;
width: 100%;
}
}
}
}
@media screen and (min-width: 48em) {
//only bigger than 48em
.xarxaprod-filters {
padding-right: 2em;
section {
margin: 1em 0;
a.button-more {
display:inline-block;
margin-top: 1rem;
}
}
.xarxaprod-filtered-funds {
grid-template-columns: 1fr 2fr;
}
.archive-posts {
grid-template-columns: repeat(2 , minmax(0,1fr));
grid-gap: 3em;
//grid-template-columns: repeat(2 , minmax(0,1fr));
}
.single-xarxaprod-convo,
.single-post .category-activitats{
.xarxaprod-convo-info-fields,
.xarxaprod-agenda-info {
li {
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: 50%;
}
.activity-organizer, .organiza-activitat {
width: 30%;
}
.agenda-date, .agenda-data {
width: 17%;
}
}
}
}
@media screen and (min-width: 80em) {
//only bigger than 80rem
.xarxaprod-filtered-funds {
grid-template-columns: 1fr 3fr;
.xarxaprod-filtered-content {
//grid-template-columns: 1fr 3fr;
.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

@ -1,7 +1,7 @@
.gallery {
margin-bottom: 1.5em;
display: grid;
grid-gap: 1.5em;
grid-gap: $grid__gap;
}
.gallery-item {
@ -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,176 +8,159 @@
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%;
padding: 0 0.5rem;
text-decoration: none;
font-size: 1rem;
}
.current_page_item > a,
.current-menu-item > a,
.current_page_ancestor > a,
.current-menu-ancestor > a {
font-weight: bold;
font-family: $font__bold;
border-left: 1px solid $color__black;
}
}
.main-navigation {
a[href^="http://localhost"],
a[href^="http://xarxaprod.cat"],
a[href^="https://xarxaprod.cat"]
{
font-family: $font__bold;
border-left: 1px solid $color__black;
&.toggled {
ul {
display: block;
position: relative;
}
.menu-toggle {
position: relative;
z-index: 999;
}
.main-navigation-content {
display: inline-block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
padding: 4rem;
background-color: rgba(255,255,255,0.95);
overflow: auto;
}
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 {
//border-bottom: $border__line;
}
.current-menu-item {
position: relative;
> a::after {
display: inline-block;
content: "";
position: absolute;
left: 0;
top: 2em;
height: 2px;
width: 100%;
background-color: $color__black;
}
}
}
}
.secondary-navigation {
padding: 0 1em 1em 0;
ul {
display: inline-block;
li {
padding: 0.5em 0;
}
}
a {
text-transform: uppercase;
}
}
.menu-item-has-children {
}
.menu-menu-agenda-container {
.menu-item-has-children {
padding-right: 0;
}
> ul{
border-bottom: $border__line;
}
li {
> ul {
margin-left: 0;
}
> a {
display: block;
padding: 0.5rem 0;
border-top: $border__line;
&:last-of-type {
}
}
}
.current-menu-item {
> a {
font-weight: 900;
}
}
}
/* 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;
//background-color: $color__white;
}
.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*/
/* Small menu. */
.main-navigation.toggled {
ul {
display: block;
}
.main-navigation-content {
display: inline-block;
position: absolute;
top: 5rem;
left: 0;
width: 100%;
height: calc(100vh - 5rem);
padding: 3rem;
background-color: $color__white;
}
}
.menu-toggle {
display: inline-block;
width: 10rem;
height: 4rem;
margin: 0;
padding: 0;
font-size: 0;
border: none;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
}
}
@media screen and (max-width: 47.99em) {
@media screen and (max-width: 48em) {
.site-branding {
display: block;
width: 0px;
height: 0px;
overflow: hidden;
margin: 0;
padding: 0;
}
.main-navigation-content {
text-transform: uppercase;
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 {
@ -185,61 +168,68 @@
}
.main-navigation,.secondary-navigation {
.main-navigation-content {
display: inline-block;
}
ul {
display: flex;
ul {
background-color: rgba(255,255,255,0.9);
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
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 {
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:hover > ul,
li.focus > ul {
li {
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;
}
a {
padding: 0 0.5rem;
}
.current_page_item > a,
.current-menu-item > a,
.current_page_ancestor > a,
.current-menu-ancestor > a {
border-left: none;
}
}
.main-navigation {
padding-bottom: 1em;
@ -247,34 +237,20 @@
justify-content: end;
ul.sub-menu {
flex-direction: column;
padding-top: 2rem;
padding-left: 1rem;
padding-bottom: 1rem;
li {
margin: 0.5rem 0;
}
}
}
a[href^="http://localhost"],
a[href^="http://xarxaprod.cat"],
a[href^="https://xarxaprod.cat"]
{
font-family: $font__bold;
border-left:none;
}
a[href^="http://localhost"]::after,
a[href^="http://xarxaprod.cat"]::after,
a[href^="https://xarxaprod.cat"]::after,
.current-menu-item a::after {
.current-menu-ancestor > a::after,
.current-menu-item > a::after {
display: inline-block;
content: "";
position: absolute;
left: 5%;
min-height: 2px;
height: 100%;
width: 90%;
margin-top: 2.3em;
//border-bottom: 0.3rem solid $color__black;
left: 1em;
bottom: 0.5em;
height: 2px;
width: calc(100% - 2em);
background-color: $color__black;
}
.menu-item-has-children {
ul {
@ -285,6 +261,7 @@
padding: 1.5em 0;
}
.menu-item-has-children {
padding-right: 0.5em;
&::after {
content: "";
display: inline-block;
@ -293,7 +270,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);
@ -350,17 +327,11 @@
display:none;
}
a {
padding: 0 1rem;
}
//a {
// padding: 0 1rem;
//}
}
.main-navigation {
padding-bottom: 0;
a[href^="http://localhost"]::after,
a[href^="http://xarxaprod.cat"]::after,
a[href^="https://xarxaprod.cat"]::after,
.current-menu-item a::after {
margin-top: 5em;
}
}
}

View File

@ -1,9 +1,29 @@
@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;
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"
"main"
@ -11,14 +31,16 @@
"footer";
margin: auto;
padding: 0;
min-height: 100vh;
> header {
grid-column: 1 / -1;
}
> main {
grid-column: 2 / 4;
grid-column: 1 / -1;
}
> aside {
grid-column: 2 / 4;
grid-column: 1 / -1;
padding: 4em 0;
}
> footer {
grid-column: 1 / -1;
@ -26,15 +48,18 @@
}
.site-header {
position: sticky;
z-index: 900;
top: 0;
margin-bottom: 2rem;
z-index: 500;
width: 100%;
padding: 0.5rem 0;
background-color: transparent;
.main {
display: flex;
flex-flow: column;
align-items: initial;
flex-flow: row;
align-items: center;
justify-content: space-between;
padding-left: 1rem;
z-index: 900;
}
.secondary {
display: flex;
@ -44,60 +69,131 @@
}
.site-main {
padding: 0 1rem;
gap: $grid__gap;
> section {
padding: 0;
> header {
padding: 1em 0;
}
}
}
.archive,
.category {
.site-main {
display:grid;
grid-template-columns: 1fr;
> header {
grid-column: 1 / -1;
}
}
}
.xarxaprod-filtered-content {
display: grid;
grid-template-columns: 1fr;
gap: $grid__gap;
> header {
grid-column: -1 / 1;
}
.archive-posts {
}
}
.site-footer {
display: flex;
flex-flow: row;
background: $color__black;
color: $color__white;
margin-top: 4em;
:where(.wp-block-columns.is-layout-flex) {
gap: $grid__gap * 5;
}
.home-featured {
padding: 0 1rem;
.site-info {
&> section {
margin-top: 2em;
padding: 2em 4em;
border-top: $border__line;
}
.xarxaprod-destacats,.xarxaprod-featured,.archive-posts {
}
a {
color: $color__white;
&:hover,&:visited,&:active {
color: $color__white;
}
}
ul[id*="menu-footer"] {
column-count: 3;
a {
text-decoration: underline;
}
}
}//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;
gap: $grid__gap * 1.5;
}
.archive-posts-old {
margin-top: 2rem;
padding-top: 1rem;
border-top: $border__line;
}
}
@media screen and (max-width: 48em) {
//only smaller than 48em
.site-header {
display: grid;
grid-template-columns: 1fr 1fr;
padding: 0.5rem 0;
align-items: center;
.main{
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 {
> header {
grid-column: 2 / 4;
}
> main {
grid-column: 2 / 4;
}
> aside {
grid-column: 2 / 4;
}
> footer {
grid-column: 1 / -1;
}
}
.site-header {
display: grid;
grid-template-columns: 1fr minmax(0, 35em) minmax(0, 35em) 1fr;
grid-template-areas:
"main "
"secondary ";
margin: auto;
padding: 0;
.main {
grid-column: 2/4;
flex-flow: row;
align-items: center;
width: 100%;
}
.secondary {
@ -106,28 +202,101 @@
width: 100%;
}
}
.page-template-agenda-archive {
.site-main {
padding: 0 2rem;
> article {
padding-bottom: 1rem;
}
}
}
.site-main {
padding: 0;
padding-top: 4rem;
> article {
padding-bottom: 4rem;
&.xarxaprod-ajut,
&.category-activitats {
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;
}
}
> header {
margin-bottom: 1rem;
}
> aside {
margin-bottom: 1rem;
}
}
> section {
padding-bottom: 4rem;
}
}
.archive,
.category {
.site-main {
grid-template-columns: 1fr 3fr;
> header {
}
}
}
.xarxaprod-filtered-content {
grid-template-columns: 1fr 3fr;
.archive-posts {
}
}
.site-footer {
flex-flow: column;
}
.home-featured {
padding: 0 2rem;
}
&.single {
.site-main {
width: 45rem;
margin: 0 auto;
}
}
.xarxaprod-destacats,.xarxaprod-featured,.archive-posts {
grid-template-columns: repeat(4 , 1fr);
.xarxaprod-destacats,.xarxaprod-featured,
.xarxaprod-last-convos,.xarxaprod-ultimes-convocatories {
grid-template-columns: repeat(3 , 1fr);
}
.archive-posts {
grid-template-columns: repeat(2 , 1fr);
min-height: 40vh;
&.archive-posts-map,&.archive-xarxaprod-members,&archive-xarxaprod-associats {
grid-template-columns: 1fr;
}
&.archive-posts-old {
grid-template-columns: repeat(3 , 1fr);
margin-top: 2rem;
h2 {
grid-column: 1 / -1;
}
}
}
.xarxaprod-faqs-aside {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-bottom: 1rem;
.xarxaprod-search-form {
&:hover,&:active,&:focus,&:target {
flex-grow: 1;
@ -149,15 +318,11 @@
}
.site-header {
.main {
//width: 80em;
//margin: auto;
//flex-flow: row;
}
.secondary {
}
}
.site-main {
padding: 0;
}
.site-footer {
}

View File

@ -1,3 +1,4 @@
@media screen {
/* contact forms styles used in wp backend with CF7 */
.wpcf7-not-valid:not(:focus) {
@ -12,7 +13,7 @@
border-color: $color__yellow;
background-color: $color__yellow;
color: $color__white;
font-family: "din-medium";
font-family: $font__main;
font-weight: bold;
text-align: center;
margin: 0em;
@ -30,6 +31,14 @@
.wpcf7-list-item-label {
margin: 0 0.3rem;
}
.wpcf7-form {
//text-align: center;
input:not([type="submit"]),textarea {
background: transparent;
border: $border__line;
padding: 1em;
}
}
/* styles applied if written in wp backend
* class="contactform contactform-WHATEVER"
@ -70,20 +79,28 @@
}
.contactform-fund-info {
display: inline-block;
column-count: 2;
column-gap: 2em;
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 {
@ -97,7 +114,7 @@
display: block;
input[type="date"] {
width: auto;
background-color: $color__white;
//background-color: $color__white;
}
&::before {
display: inline-block;
@ -112,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

@ -17,7 +17,6 @@
h5,
h6 {
min-height: $font__size-body * 4.8;
font-family: $font__black;
font-size: $font__size-body * 2;
line-height: $font__line-height-body * 0.8;
}
@ -34,18 +33,18 @@
&::after {
content: "+";
position: absolute;
bottom: -1rem;
bottom: 0rem;
left: 0.7rem;
font-size: 5rem;
font-size: 3rem;
}
&:hover {
color: $color__grey-light;
//color: $color__grey-light;
&::after {
content: ">";
font-size: 3rem;
bottom: 0;
//font-size: 3rem;
//bottom: 0;
}
}
}

View File

@ -0,0 +1,18 @@
/* Gutten slider styles for xarxaprod */
body {
}
.home {
/* full width slides */
[id*="gutenslider"] {
width: 100vw;
position: relative;
left: 50%;
right: 50%;
margin-left: -50vw;
margin-right: -50vw;
.wp-block-eedee-block-gutenslider.arrow-position-sides .eedee-gutenslider-prev {
}
.wp-block-eedee-block-gutenslider.arrow-position-sides .eedee-gutenslider-next {
}
}
}

View File

@ -0,0 +1,31 @@
.leaflet-container a {
color: $color__link !important;
}
.leaflet-attribution-flag {
height: 0px !important;
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

@ -2,11 +2,11 @@
Theme Name: XarxaProd.cat 2024
Theme URI: https://git.hangar.org/xarxaprod/
Author: Hangar.org Tech Lab - hangar.org
Author: Hangar Tech Lab
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.0.7
Tested up to: 6.2
Version: 1.7.7
Tested up to: 6.5.2
Requires PHP: 7.4
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
@ -99,6 +99,14 @@ Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
--------------------------------------------- */
@import "plugins/contactform7/contactform7";
/* Guttenslider
--------------------------------------------- */
@import "plugins/guttenslider/guttenslider";
/* Leaflet
--------------------------------------------- */
@import "plugins/leaflet/leaflet";
/*--------------------------------------------------------------
# Utilities

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 KiB

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

@ -20,7 +20,7 @@ get_header();
<?php
// check if is xarxaprod-ajut
if ( get_post_type( get_the_ID() ) == 'xarxaprod-ajut'){ ?>
<section id="filteredfunds" class="xarxaprod-filtered-funds xarxaprod-ajuts-filtrats">
<section id="filteredfunds" class="xarxaprod-filtered-content xarxaprod-filtered-funds xarxaprod-ajuts-filtrats">
<aside id="fundsfilter" class="xarxaprod-filter-funds xarxaprod-fitre-ajuts">
<?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_ajuts_filters_form(); // function defined in the plugin ?>
@ -29,13 +29,10 @@ if ( get_post_type( get_the_ID() ) == 'xarxaprod-ajut'){ ?>
<?php } elseif ( in_category ( 'faq' ) ) { ?>
<section id="filteredsearch" class="xarxaprod-searched-query xarxaprod-search-faqs">
<aside id="xarxaprod-faqs-nav" class="xarxaprod-faqs-aside">
<?php //if( in_category('faq') ) : ?>
<?php xarxaprod_display_faqs_labels(); ?>
<?php xarxaprod_display_faqs_search(); ?>
<?php //endif; //end if is_category faq ?>
</aside>
<?php } else { ?>
<section id="filteredsearch" class="xarxaprod-searched-query">
<?php

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 -->

2231
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

@ -10,11 +10,12 @@
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if( ! is_front_page() ): ?>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<?php xarxaprod_post_thumbnail(); ?>
<?php endif; ?>
<?php //xarxaprod_post_thumbnail(); ?>
<div class="entry-content">
<?php
@ -28,6 +29,13 @@
);
?>
</div><!-- .entry-content -->
<?php if( get_field('xxp_moreinfo_url') ): ?>
<div class="xarxaprod-moreinfo-url">
<a href="<?php echo get_field('xxp_moreinfo_url'); ?>" class="button button-more button-letsgo">
<?php echo __( '+ Info', 'xarxaprod' ); ?>
</a>
</div>
<?php endif; ?>
<?php if ( get_edit_post_link() ) : ?>
<footer class="entry-footer">

View File

@ -11,24 +11,46 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title">
<?php the_title(); ?>
</h1>
</header><!-- .entry-header -->
<?php
//the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
the_title( '<h3 class="entry-title">', '</h3>' );
if ( 'post' === get_post_type() ) :
?>
<div class="entry-meta">
<?php
xarxaprod_display_each_faq_categories();
//xarxaprod_display_faqs_labels();
//xarxaprod_posted_on();
//xarxaprod_posted_by();
?>
</div><!-- .entry-meta -->
<?php if ( in_category('faq') ){ ?>
<aside class="entry-meta">
<?php xarxaprod_display_each_faq_categories(); // display each faq category of the post as label ?>
</aside><!-- .entry-meta -->
<?php } ;?>
<?php endif; ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php if ( in_category('activitats') ){ ?>
<aside class="xarxaprod-activity-info xarxaprod-agenda-info">
<ul>
<li class="activity-organizer organiza-activitat">
<?php if( get_field('xxp_agenda_free_text') ): ?>
<p class="item-xxp-agenda-free-text">
<?php the_field('xxp_agenda_free_text'); ?>
</p>
<?php endif; ?>
</li>
<?php if( get_field('xxp_agenda_date_start') || get_field('xxp_agenda_date_start') || get_field('xxp_agenda_free_text') ): ?>
<li class="agenda-date agenda-data">
<p>
<?php if( get_field('xxp_agenda_date_start') ){ ?>
<span class="item-xxp-agenda-date-start">el <?php the_field('xxp_agenda_date_start'); ?></span>
<?php } elseif ( get_field('xxp_agenda_date_end') ){ ?>
<span class="item-xxp-agenda-date-end">fins al<?php the_field('xxp_agenda_date_end'); ?></span>
<?php } elseif ( get_field('xxp_agenda_free_text') ){?>
<span class="item-xxp-agenda-free-text"><?php the_field('xxp_agenda_free_text'); ?></span>
<?php }; ?>
</p>
</li>
<?php endif; ?>
</ul>
</aside>
<?php }; ?>
<main class="entry-content">
<?php
the_content(
sprintf(
@ -52,7 +74,16 @@
)
);
?>
</div><!-- .entry-content -->
<?php if( get_field('xxp_moreinfo_url') ): ?>
<div class="xarxaprod-moreinfo-url">
<a href="<?php echo get_field('xxp_moreinfo_url'); ?>" class="button button-more button-letsgo">
<?php echo __( '+ Info', 'xarxaprod' ); ?>
</a>
</div>
<?php endif; ?>
</main><!-- .entry-content -->
<footer class="entry-footer">
<?php //xarxaprod_entry_footer(); ?>

View File

@ -8,7 +8,7 @@
*/
?>
<!-- template-parts content-xarxaprod-ajut-php -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
@ -18,30 +18,36 @@
<section class="xarxaprod-fund-info-contact-fields">
<div class="xarxaprod-fund-info-field">
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_call') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_call') ); ?>
</div>
<?php if( get_field('os_funder_name') ): ?>
<?php if( get_field('xxp_fund_original_title') ): ?>
<div class="xarxaprod-fund-info-field">
<p class="xarxaprod-funder-name"><?php the_field('os_funder_name'); ?></p>
<p class="xarxaprod-fund-original-title"><?php the_field('xxp_fund_original_title'); ?></p>
</div>
<?php endif; ?>
<?php if( get_field('os_fund_contact_name') ): ?>
<?php if( get_field('xxp_funder_name') ): ?>
<div class="xarxaprod-fund-info-field">
<p class="xarxaprod-fund-contact-name"><?php the_field('os_fund_contact_name'); ?></p>
<p class="xarxaprod-funder-name"><?php the_field('xxp_funder_name'); ?></p>
</div>
<?php endif; ?>
<?php if( get_field('os_fund_contact_mail') ): ?>
<?php if( get_field('xxp_fund_contact_name') ): ?>
<div class="xarxaprod-fund-info-field">
<p class="xarxaprod-fund-contact-mail"><?php the_field('os_fund_contact_mail'); ?></p>
<p class="xarxaprod-fund-contact-name"><?php the_field('xxp_fund_contact_name'); ?></p>
</div>
<?php endif; ?>
<?php if( get_field('os_fund_contact_tel') ): ?>
<?php if( get_field('xxp_fund_contact_mail') ): ?>
<div class="xarxaprod-fund-info-field">
<p class="xarxaprod-fund-contact-tel"><?php the_field('os_fund_contact_tel'); ?></p>
<p class="xarxaprod-fund-contact-mail"><?php the_field('xxp_fund_contact_mail'); ?></p>
</div>
<?php endif; ?>
<?php if( get_field('xxp_fund_contact_tel') ): ?>
<div class="xarxaprod-fund-info-field">
<p class="xarxaprod-fund-contact-tel"><?php the_field('xxp_fund_contact_tel'); ?></p>
</div>
<?php endif; ?>
@ -77,42 +83,42 @@
<section class="xarxaprod-fund-info-fields">
<div class="xarxaprod-fund-info-field">
<h6>Termini</h6>
<?php if( get_field('xxp_fund_apply_begin') || get_field('xxp_fund_apply_end') ): ?>
<ul class="xarxaprod-label item-xxp_fund_dates">
<li class="item-xxp_fund_apply_begin">del <?php the_field('xxp_fund_apply_begin'); ?> </li>
<li class="item-xxp_fund_apply_end">al <?php the_field('xxp_fund_apply_end'); ?> </li>
</ul>
<?php endif; ?>
<?php if( get_field('xxp_fund_apply_text') ): ?>
<p class="item-xxp_fund_apply_text"><?php the_field('xxp_fund_apply_text'); ?></p>
<?php endif; ?>
</div>
<?php if( get_field('xxp_fund_web') ): ?>
<div class="xarxaprod-fund-info-field">
<h6>+ Informació</h6>
<p><a href="<?php echo get_field('xxp_fund_web'); ?>" class="button button-more button-letsgo">convocatória</a></p>
</div>
<?php endif; ?>
<div class="xarxaprod-fund-info-field">
<h6>Dirigit a</h6>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_target') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_target') ); ?>
</div>
<div class="xarxaprod-fund-info-field">
<h6>Tipus d'ajuda</h6>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_source') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_source') ); ?>
</div>
<div class="xarxaprod-fund-info-field">
<h6>Sectors</h6>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_field') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_field') ); ?>
</div>
<div class="xarxaprod-fund-info-field">
<h6>Termini</h6>
<?php if( get_field('os_fund_apply_begin') || get_field('os_fund_apply_end') ): ?>
<ul class="xarxaprod-label item-os_fund_dates">
<li class="item-os_fund_apply_begin">del <?php the_field('os_fund_apply_begin'); ?> </li>
<li class="item-os_fund_apply_end">al <?php the_field('os_fund_apply_end'); ?> </li>
</ul>
<?php endif; ?>
<?php if( get_field('os_fund_apply_text') ): ?>
<p class="item-os_fund_apply_text"><?php the_field('os_fund_apply_text'); ?></p>
<?php endif; ?>
</div>
<?php if( get_field('os_fund_web') ): ?>
<div class="xarxaprod-fund-info-field">
<h6>+ Informació</h6>
<p><a href="<?php the_field('os_fund_web'); ?>" class="button button-more button-letsgo">ves-hi</a></p>
</div>
<?php endif; ?>
<div class="xarxaprod-fund-info-field">
<h6>Necessites assesorament?</h6>
<p><a href="<?php echo esc_url( home_url( '/consultoria/' ) ); ?>" class="button button-more button-ourservices">Oferim serveis de consultoria</a></p>

View File

@ -0,0 +1,162 @@
<?php
/**
* Template part for displaying associat post type
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Xarxaprod_theme
*/
?>
<!-- template-parts content-xarxaprod-associat-php -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<main class="entry-content">
<?php
the_content(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Continua llegin<span class="screen-reader-text"> "%s"</span>', 'xarxaprod' ),
array(
'span' => array(
'class' => array(),
),
)
),
wp_kses_post( get_the_title() )
)
);
wp_link_pages(
array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'xarxaprod' ),
'after' => '</div>',
)
);
?>
</main><!-- .entry-content -->
<section class="xarxaprod-associat-info">
<section class="xarxaprod-associat-contact">
<dt>&nbsp;</dt>
<ul class="xarxaprod-associat-contact-fields">
<?php if( get_field('xxp_associat_address') ): ?>
<li class="xarxaprod-associat-address">
<h6>Adreça:</h6>
<p><?php echo wp_kses_post( get_field('xxp_associat_address') ); ?></p>
</li>
<?php endif; ?>
<?php if( get_field('xxp_associat_mail') ): ?>
<li class="xarxaprod-associat-mail">
<h6>Email:</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èfon:</h6>
<p><a href="tel:<?php the_field('xxp_associat_tel'); ?>"><?php the_field('xxp_associat_tel'); ?></a></p>
</li>
<?php endif; ?>
<?php if( have_rows('xxp_asocciat_social_networks') ): ?>
<li class="xarxaprod-associat-social-networks">
<h6>Xarxes:</h6>
<ul class="xarxaprod-associat-social-links">
<?php while( have_rows('xxp_asocciat_social_networks') ): the_row(); ?>
<li>
<?php $eachlink=get_sub_field('xxp_associat_link_social'); ?>
<a href="<?php echo esc_attr($eachlink);?>" title="<?php echo esc_attr($eachlink);?>" target="_blank"><?php echo esc_attr($eachlink);?></a>
</li>
<?php endwhile; //end while has rows associat social networks ?>
</ul>
</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>
<section class="xarxaprod-associat-logo">
<?php if( get_field('xxp_associat_logo') ): ?>
<figure class="xarxaprod-associat-logo">
<img class="" src="<?php the_field('xxp_associat_logo'); ?>" />
</figure>
<?php endif; ?>
</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>
<section class="xarxaprod-associat-location">
<?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>
</div>
<?php endif; ?>
<?php if( get_field('xxp_associat_osm_link') ): ?>
<div class="xarxaprod-associat-osm-link">
<h6 class="">Localizatcio:</h6><p> <a href="<?php the_field('xxp_associat_osm_link'); ?>" target="_blank" title="Obre openstreetmaps.org"><?php the_field('xxp_associat_osm_link'); ?></a></p>
</div>
<?php endif; ?>
</section>
<footer class="entry-footer">
<?php xarxaprod_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->

View File

@ -0,0 +1,170 @@
<?php
/**
* Template part for displaying posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Xarxaprod_theme
*/
?>
<!-- template-parts content-xarxaprod-convo-php -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?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') ):
// 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); ?>
<li class="xarxaprod-convo-espai-associat">
<dt>Espai Associat</dt>
<dd><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></dd>
</li>
<li class="xarxaprod-convo-associat-address">
<dt>Lloc</dt>
<dd><a href="<?php the_permalink(); ?>"><?php echo wp_kses_post( get_field('xxp_associat_address') ); ?></a></dd>
</li>
<?php endforeach;
// Reset the global post object so that the rest of the page works correctly.
wp_reset_postdata();
else: ?>
<?php if( get_field('xxp_convoer_name') ): ?>
<li class="xarxaprod-convo-field">
<dt>Centre</dt>
<dd class="xarxaprod-convoer-name"><?php the_field('xxp_convoer_name'); ?></dd>
</li>
<?php endif; ?>
<?php endif; //end if has posts espai associat ?>
<?php endif; //end if has relation with other espai associat ?>
<li class="xarxaprod-convo-field">
<dt>Disciplines</dt>
<dd><?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_field') ); ?></dd>
</li>
<li class="xarxaprod-convo-info-date">
<dt>Termini</dt>
<?php if( get_field('xxp_convo_apply_begin') || get_field('xxp_convo_apply_end') ): ?>
<dd class="xarxaprod-label item-xxp_convo_dates">
<?php if( get_field('xxp_convo_apply_begin') ): ?>
<span class="item-xxp_convo_apply_begin">del <?php the_field('xxp_convo_apply_begin'); ?> </span>
<?php endif; ?>
<?php if( get_field('xxp_convo_apply_end') && !get_field('xxp_convo_apply_begin') ){ echo 'fins'; } ?>
<?php if( get_field('xxp_convo_apply_end') ): ?>
<span class="item-xxp_convo_apply_end">al <?php the_field('xxp_convo_apply_end'); ?> </span>
<?php endif; ?>
<?php if( get_field('xxp_convo_apply_text') ): ?>
<span class="item-xxp_convo_apply_text"><?php the_field('xxp_convo_apply_text'); ?></span>
<?php endif; ?>
</dd>
<?php endif; ?>
</li>
<li class="xarxaprod-convo-info-date">
<dt>Periode</dt>
<?php if( get_field('xxp_convo_date_begin') || get_field('xxp_convo_date_end') ): ?>
<dd class="xarxaprod-label item-xxp_convo_dates">
<?php if( get_field('xxp_convo_date_begin') ): ?>
<span class="item-xxp_convo_date_begin">del <?php the_field('xxp_convo_date_begin'); ?> </span>
<?php endif;?>
<?php if( get_field('xxp_convo_date_end') && !get_field('xxp_convo_date_begin') ){ echo 'fins'; } ?>
<?php if( get_field('xxp_convo_date_end') ): ?>
<span class="item-xxp_convo_date_end">al <?php the_field('xxp_convo_date_end'); ?> </span>
<?php endif;?>
</dd>
<?php endif; ?>
</li>
</ul>
</section>
<main class="entry-content">
<?php
the_content(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'xarxaprod' ),
array(
'span' => array(
'class' => array(),
),
)
),
wp_kses_post( get_the_title() )
)
);
wp_link_pages(
array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'xarxaprod' ),
'after' => '</div>',
)
);
?>
</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

@ -0,0 +1,70 @@
<?php
/**
* Template part for displaying posts from category "agenda"
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Xarxaprod_theme
* @used by template-parts/content-post.php
* @shown in : archive category
*
*/
?>
<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 ( has_post_thumbnail() ){?>
<figure class="xarxaprod-activitat-image">
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
</a>
<?php the_post_thumbnail('medium');?>
</figure>
<?php } else { ?>
<figure class="xarxaprod-activitat-image">
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
</a>
<img src="<?php echo catch_post_first_image();?>" title="<?php the_title(); ?>" alt="imatge ilustra <?php the_title(); ?>" />
</figure>
<?php };?>
<aside class="xarxaprod-agenda-info">
<ul>
<li>
<dt>Data:</dt>
<?php if( get_field('xxp_agenda_date_start') || get_field('xxp_agenda_date_start') ): ?>
<?php if( get_field('xxp_agenda_date_start') ){ ?>
<dd class="item-xxp-agenda-date-start"><?php the_field('xxp_agenda_date_start'); ?></dd>
<?php } elseif ( get_field('xxp_agenda_date_end') ){ ?>
<dt>Fins al</dt>
<dd class="item-xxp-agenda-date-end"><?php the_field('xxp_agenda_date_end'); ?></dd>
<?php }; ?>
<?php endif; ?>
</li>
<?php if ( get_field('xxp_agenda_free_text') ){?>
<li>
<span class="item-xxp-agenda-free-text"><?php the_field('xxp_agenda_free_text'); ?></span>
</li>
<?php }; ?>
</ul>
</aside>
<?php if ( get_the_excerpt() ){ ?>
<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/?>
</section>
<?php ; }?>
<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>

View File

@ -0,0 +1,35 @@
<?php
/**
* Template part for displaying posts from category "agenda"
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Xarxaprod_theme
* @used by template-parts/content-post.php
* @shown in : archive category
*
*/
?>
<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_the_excerpt() ){ ?>
<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/?>
</section>
<?php ; }?>
<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>

View File

@ -0,0 +1,37 @@
<?php
/**
* Template part for displaying posts from category "agenda"
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Xarxaprod_theme
* @used by template-parts/content-post.php
* @shown in : archive category
*
*/
?>
<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>
<aside class="xarxaprod-faq-info">
</aside>
<?php if ( get_the_excerpt() ){ ?>
<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/?>
</section>
<?php ; }?>
<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>

View File

@ -0,0 +1,103 @@
<?php
/**
* Template part for displaying each convo with each field in category, archive, search
* to be used inside the loop.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Xarxaprod_theme
* @used_by page-template/convo-serach.php
* @used_by page-template/convo-archive.php
*
*/
?>
<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_convo_apply_begin') || get_field('xxp_convo_apply_end') || get_field('xxp_convo_espai_associat') || get_field('xxp_convoer_name')): ?>
<section class="xarxaprod-convo-info-fields">
<ul>
<li class="xarxaprod-convo-info-date">
<?php if( get_field('xxp_convo_apply_begin') || get_field('xxp_convo_apply_end') ): ?>
<dt>Termini</dt>
<dd class="xarxaprod-label item-xxp_convo_dates">
<?php if( get_field('xxp_convo_apply_begin') ): ?>
<span class="item-xxp_convo_apply_begin">del <?php the_field('xxp_convo_apply_begin'); ?> </span>
<?php endif; ?>
<?php if( get_field('xxp_convo_apply_end') && !get_field('xxp_convo_apply_begin') ){ echo 'fins'; } ?>
<?php if( get_field('xxp_convo_apply_end') ): ?>
<span class="item-xxp_convo_apply_end">al <?php the_field('xxp_convo_apply_end'); ?> </span>
<?php endif; ?>
<?php if( get_field('xxp_convo_apply_text') ): ?>
<span class="item-xxp_convo_apply_text"><?php the_field('xxp_convo_apply_text'); ?></span>
<?php endif; ?>
</dd>
<?php endif;//end xxp_convo_apply_begin or xxp_convo_apply_end ?>
</li>
<?php if( ! get_field('xxp_convo_espai_associat') ): ?>
<?php // read here howto ?>
<?php // https://www.advancedcustomfields.com/resources/relationship/#display-list-of-posts-with-setuppostdata ?>
<?php if( get_field('xxp_convoer_name') ): ?>
<li class="xarxaprod-convo-field">
<dt></dt>
<dd class="xarxaprod-convoer-name"><?php the_field('xxp_convoer_name'); ?></dd>
</li>
<?php endif; ?>
<?php else: //exists get_field('xxp_convo_espai_associat')?>
<?php $espai_associat_posts = get_field('xxp_convo_espai_associat'); ?>
<?php foreach( $espai_associat_posts as $thispost ): ?>
<?php // Setup this post for WP functions (variable must be named $post).?>
<li class="xarxaprod-convo-espai-associat">
<dt></dt>
<dd><a href="<?php echo ($thispost->guid);//the_permalink(); ?>"><?php echo ($thispost->post_title); ?><?php //the_title(); ?></a></dd>
</li>
<?php endforeach; ?>
<?php // Reset the global post object so that the rest of the page works correctly.?>
<?php endif; //end get_field('xxp_convo_espai_associat') ?>
</ul>
</section>
<?php endif;//end xxp_convo_apply_begin or xxp_convo_apply_end ?>
<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/?>
</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')
); ?>
</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

@ -0,0 +1,55 @@
<?php
/**
* Template part for displaying each ajut with each field in category, archive, search
* to be used inside the loop.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Xarxaprod_theme
*/
?>
<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_fund_apply_end') ): ?>
<h6 class="item-xxp_fund_dates">
<span>Termini fins al <?php the_field('xxp_fund_apply_end'); ?></li>
</h6>
<?php endif; ?>
<?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() ?>
</section>
<aside>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_target') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_source') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_field') ); ?>
<?php if( get_field('xxp_fund_apply_begin') || get_field('xxp_fund_apply_end') ): ?>
<ul class="xarxaprod-label item-xxp_fund_dates">
<li>del <?php the_field('xxp_fund_apply_begin'); ?></li>
<li>al <?php the_field('xxp_fund_apply_end'); ?></li>
</ul>
<?php endif; ?>
<?php if( get_field('xxp_fund_apply_text') ): ?>
<ul class="xarxaprod-label item-xxp_fund_dates">
<li class=""><?php the_field('xxp_fund_apply_text'); ?></li>
</ul>
<?php endif; ?>
<?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">
Més info
<span class="hide"><?php the_title(); ?></span>
</a>
</nav>
</article><!-- #post-<?php the_ID(); ?> -->

View File

@ -0,0 +1,75 @@
<?php
/**
* Template part for displaying each ajut with each field in category, archive, search
* to be used inside the loop.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Xarxaprod_theme
*/
?>
<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>
<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/?>
</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 echo wp_kses_post( get_field('xxp_associat_address') ); ?></p>
</li>
<?php endif; ?>
<?php if( get_field('xxp_associat_mail') ): ?>
<li class="xarxaprod-associat-mail">
<h6>mail:</h6>
<p><a href="mailto:<?php the_field('xxp_associat_mail'); ?>"><?php the_field('xxp_associat_mail'); ?></a></p>
</li>
<?php endif; ?>
<?php if( get_field('xxp_associat_web') ): ?>
<li class="xarxaprod-associat-web">
<h6>web:</h6>
<p><a href="<?php the_field('xxp_associat_web'); ?>" class=""><?php the_field('xxp_associat_web') ;?></a></p>
</li>
<?php endif; ?>
<?php if( get_field('xxp_associat_tel') ): ?>
<li class="xarxaprod-associat-tel">
<h6>tel:</h6>
<p><?php the_field('xxp_associat_tel'); ?></p>
</li>
<?php endif; ?>
</ul>
</section>
<section class="xarxaprod-associat-services">
<dt>Serveis</dt>
<?php get_template_part(
'template-parts/section',
'list-checkbox',
array('iterate_field' => 'xxp_associat_service')
); ?>
</section>
</aside>
<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

@ -1,48 +0,0 @@
<?php /**
* Template part for displaying each ajut with each field.
* to be used inside the loop.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Xarxaprod_theme
*/
?>
<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('os_funder_name') ): ?>
<h6 class="xarxaprod-funder-name"><?php the_field('os_funder_name'); ?></h6>
<?php endif; ?>
<section class="excerpt post-excerpt">
<?php the_excerpt() ?>
</section>
<aside>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_target') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_source') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_field') ); ?>
<?php if( get_field('os_fund_apply_begin') || get_field('os_fund_apply_end') ): ?>
<ul class="xarxaprod-label item-os_fund_dates">
<li>del <?php the_field('os_fund_apply_begin'); ?></li>
<li>al <?php the_field('os_fund_apply_end'); ?></li>
</ul>
<?php endif; ?>
<?php if( get_field('os_fund_apply_text') ): ?>
<ul class="xarxaprod-label item-os_fund_dates">
<li class=""><?php the_field('os_fund_apply_text'); ?></li>
</ul>
<?php endif; ?>
<?php if( get_field('os_fund_call') ): ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_call') ); ?>
<?php endif; ?>
</aside>
<nav class="more-link">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark" class="button button-more">
<span class="hide"><?php the_title(); ?></span>
</a>
</nav>
</article><!-- #post-<?php the_ID(); ?> -->

View File

@ -31,7 +31,7 @@
'posts_per_page' => '4',
'meta_query' => array(
array(
'key' => 'os_home_show',
'key' => 'xxp_home_show',
'value'=> '1',
)
)
@ -40,7 +40,7 @@
<?php if ( $featured_query->have_posts() ) : ?>
<?php while ( $featured_query->have_posts() ) : $featured_query->the_post(); ?>
<?php get_template_part( 'template-parts/section', 'eachpost' ); ?>
<?php get_template_part( 'template-parts/section', 'eachfund' ); ?>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
@ -52,5 +52,4 @@
</main>
<?php } //closing if is_plugin_active ?>
<?php dynamic_sidebar( 'front-page-widgets' ); // including widget front page?>
</aside>

View File

@ -0,0 +1,86 @@
<?php
/**
* Template part for displaying 3 posts from category "agenda"
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Xarxaprod_theme
* @used by page.php
* @shown in : home
*
*/
?>
<section id="agenda" class="agenda ">
<header>
<h2><a href="<?php echo site_url() . '/activitats' ;?>"><?php echo esc_html__('Agenda', 'xarxaprod'); ?></a></h2>
</header>
<main class="xarxaprod-agenda">
<?php
// https://developer.wordpress.org/reference/functions/get_posts/
// https://www.advancedcustomfields.com/resources/true-false/
$agenda_query = new WP_Query(
array(
'post_type' => array( 'post' ),
'post_status' => 'publish',
'posts_per_page' => '3',
'tax_query' => array (
array (
'taxonomy' => 'category',
'field' => 'slug',
'terms' => 'activitats','actividades','agenda','agenda-es'
)
),
'meta_query' => array(
array ( //filter results older than yesterday
'key' => 'xxp_agenda_date_end',
'value' => date("Y-m-d"),
'compare' => '>=',
'type' => 'DATE',
)
),
// order by meta agenda_date_end
'orderby' => 'meta_value',
'order' => 'ASC',
)
);
?>
<?php if ( $agenda_query->have_posts() ) : ?>
<?php while ( $agenda_query->have_posts() ) : $agenda_query->the_post(); ?>
<div class="xarxaprod-card-each xarxaprod-agenda-info-field">
<header class="entry-header">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark" class="">
<?php the_title( '<h3 class="entry-title">', '</h3>' ); ?>
</a>
</header><!-- .entry-header -->
<section class="activity-organizer organiza-activitat">
<?php if( get_field('xxp_agenda_free_text') ): ?>
<p class="item-xxp-agenda-free-text">
<?php the_field('xxp_agenda_free_text'); ?>
</p>
<?php endif; ?>
</section>
<aside class="agenda-date agenda-data">
<?php if( get_field('xxp_agenda_date_start') || get_field('xxp_agenda_date_start') || get_field('xxp_agenda_free_text') ): ?>
<p>
<?php if( get_field('xxp_agenda_date_start') ){ ?>
<span class="item-xxp-agenda-date-start">el <?php the_field('xxp_agenda_date_start'); ?></span>
<?php } elseif ( get_field('xxp_agenda_date_end') ){ ?>
<span class="item-xxp-agenda-date-end">fins al<?php the_field('xxp_agenda_date_end'); ?></span>
<?php } elseif ( get_field('xxp_agenda_free_text') ){?>
<span class="item-xxp-agenda-free-text"><?php the_field('xxp_agenda_free_text'); ?></span>
<?php }; ?>
</p>
<?php endif; ?>
</aside>
</div>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
<?php else : //if no post in query ?>
<p class="no-content"></p>
<?php endif; //end query ?>
</main>
</section>

View File

@ -0,0 +1,167 @@
<?php
/**
* Template part for displaying "convos" and widgets
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Xarxaprod_theme
*/
?>
<section id="convos" class="last-convos ultimes-convocatories">
<?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( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) {
//plugin is activated do
?>
<header>
<?php //begin any query
// begin populate WP_Query if is custom post type xarxaprod-associat
if ( get_post_type( ) == 'xarxaprod-associat' ){
$slug_espai_associat =get_post_field( 'post_name', get_post() ) ;
// https://developer.wordpress.org/reference/functions/get_posts/
// query ACF relationsihp
// https://wordpress.stackexchange.com/a/213375
$convos_query = new WP_Query(
array(
'post_type' => 'xarxaprod-convo',
'posts_per_page' => '3',
'order_by' => 'meta_value', //order by meta value
'meta_key' => 'xxp_convo_apply_end', // order by meta key convo apply end
'order' => 'ASC', //order ascendent
'meta_query' => array(
'query_convo_apply_end' => array( //filter results show today and later
'key' => 'xxp_convo_apply_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '>=', //show events today and later
'type' => 'DATE',
),
'query_convo_espai_associat' => array( //filter convos with relation to espai associat
'key' => 'xxp_convo_espai_associat', // name of the custom field
'value' => '"' . get_the_ID() . '"', // in ACF select Return format "Post ID"
'compare'=> 'LIKE', // matches exaclty "123", not just 123. This prevents a match for "1234"
),
'orderby' => array (
'query_convo_apply_end' => 'ASC',
),
)
)
);
?>
<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
else { // begin populate WP_Query if others
// https://developer.wordpress.org/reference/functions/get_posts/
// https://www.advancedcustomfields.com/resources/true-false/
$convos_query = new WP_Query(
array(
'post_type' => 'xarxaprod-convo',
'posts_per_page' => '3',
'order_by' => 'meta_value', //order by meta value
'meta_key' => 'xxp_convo_apply_end', // order by meta key convo apply end
'order' => 'ASC', //order ascendent
'meta_query' => array(
array( //filter results show today and later
'key' => 'xxp_convo_apply_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '>=', //show events today and later
'type' => 'DATE',
),
),
//https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
'orderby' => 'meta_value', //order by meta value
'order' => 'ASC', //order ascendent
)
);
?>
<h2> <a href="<?php echo site_url() . '/convocatories' ;?>"><?php echo esc_html__('Últimes convocatòries', 'xarxaprod'); ?></a></h2>
</header>
<main class="xarxaprod-last-convos xarxaprod-ultimes-convocatories">
<?php }; //end populate WP_Query with others ?>
<?php //begin loop WP_Query ?>
<?php if ( $convos_query->have_posts() ) : ?>
<?php while ( $convos_query->have_posts() ) : $convos_query->the_post(); ?>
<div class="xarxaprod-card-each xarxaprod-convo-info-field">
<header class="entry-header">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark" class="">
<?php the_title( '<h3 class="entry-title">', '</h3>' ); ?>
</a>
</header><!-- .entry-header -->
<section class="xarxaprod-convo-info-fields">
<ul>
<li class="xarxaprod-convo-info-date">
<?php if( get_field('xxp_convo_apply_begin') || get_field('xxp_convo_apply_end') ): ?>
<dt>Termini</dt>
<dd class="xarxaprod-label item-xxp_convo_dates">
<?php if( get_field('xxp_convo_apply_begin') ): ?>
<span class="item-xxp_convo_apply_begin">del <?php the_field('xxp_convo_apply_begin'); ?> </span>
<?php endif; ?>
<?php if( get_field('xxp_convo_apply_end') && !get_field('xxp_convo_apply_begin') ){ echo 'fins'; } ?>
<?php if( get_field('xxp_convo_apply_end') ): ?>
<span class="item-xxp_convo_apply_end">al <?php the_field('xxp_convo_apply_end'); ?> </span>
<?php endif; ?>
<?php if( get_field('xxp_convo_apply_text') ): ?>
<span class="item-xxp_convo_apply_text"><?php the_field('xxp_convo_apply_text'); ?></span>
<?php endif; ?>
</dd>
<?php endif; ?>
</li>
<?php if( ! get_field('xxp_convo_espai_associat') ): ?>
<?php // read here howto ?>
<?php // https://www.advancedcustomfields.com/resources/relationship/#display-list-of-posts-with-setuppostdata ?>
<?php if( get_field('xxp_convoer_name') ): ?>
<li class="xarxaprod-convo-field">
<dt></dt>
<dd class="xarxaprod-convoer-name"><?php the_field('xxp_convoer_name'); ?></dd>
</li>
<?php endif; ?>
<?php else: //exists get_field('xxp_convo_espai_associat')?>
<?php $espai_associat_posts = get_field('xxp_convo_espai_associat'); ?>
<?php foreach( $espai_associat_posts as $thispost ): ?>
<?php // Setup this post for WP functions (variable must be named $post).?>
<li class="xarxaprod-convo-espai-associat">
<dt></dt>
<dd><a href="<?php echo ($thispost->guid);//the_permalink(); ?>"><?php echo ($thispost->post_title); ?><?php //the_title(); ?></a></dd>
</li>
<?php endforeach; ?>
<?php // Reset the global post object so that the rest of the page works correctly.?>
<?php endif; //end get_field('xxp_convo_espai_associat') ?>
</ul>
</section>
<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>
</section>
<aside class="convo-sector convo-field">
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_field') ); ?>
</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>
</div>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
<?php else : //if no post in query ?>
<p class="no-content"> No convos </p>
<?php endif; //end WP_Query ?>
</main>
<?php } //closing if is_plugin_active ?>
</section>

View File

@ -15,7 +15,11 @@
// get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'CHANGETHIS') );
$fielditerate = $args['iterate_field'];
?>
<?php
// get the current post-type slug
// https://wordpress.stackexchange.com/a/67412
$current_post_type_slug = get_post_type_object( get_post_type() )->rewrite['slug'];
?>
<?php
$fields= get_field($fielditerate);
if( $fields ):
@ -23,7 +27,9 @@
<ul class="xarxaprod-label item-<?php echo $fielditerate ?>">
<?php foreach( $fields as $field ): ?>
<li>
<a href="<?php echo home_url( '/'. $current_post_type_slug . '/?' . $fielditerate . '='. $field['value'] ); ?>">
<?php echo $field['label']; ?>
</a>
</li>
<?php endforeach; ?>
</ul>

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