Compare commits

...

3 Commits

Author SHA1 Message Date
jorge 1a448fedec added sidebar in fund ajut page for options filter 2023-01-02 14:51:58 +01:00
jorge d984747b23 added footer widget area 2023-01-02 14:50:40 +01:00
jorge c883c11091 added footer widget area 2023-01-02 14:49:16 +01:00
11 changed files with 331 additions and 190 deletions

View File

@ -4,6 +4,10 @@
filter: invert(1); filter: invert(1);
} }
.site-icon-preview .app-icon-preview {
background-color: #fff;
}
.edit-post-visual-editor__content-area { .edit-post-visual-editor__content-area {
/* /*
@ -1033,7 +1037,7 @@ Add your custom styles in this file so it is easier to update the theme.
@media screen { @media screen {
.edit-post-visual-editor__content-area .no-sidebar .site { .edit-post-visual-editor__content-area .site {
display: grid; display: grid;
grid-template-columns: 1fr minmax(0, 35em) minmax(0, 35em) 1fr; grid-template-columns: 1fr minmax(0, 35em) minmax(0, 35em) 1fr;
grid-template-areas: "header" "main" "aside" "footer"; grid-template-areas: "header" "main" "aside" "footer";
@ -1041,23 +1045,23 @@ Add your custom styles in this file so it is easier to update the theme.
padding: 0; padding: 0;
} }
.edit-post-visual-editor__content-area .no-sidebar .site > header { .edit-post-visual-editor__content-area .site > header {
grid-column: 1 / -1; grid-column: 1 / -1;
} }
.edit-post-visual-editor__content-area .no-sidebar .site > main { .edit-post-visual-editor__content-area .site > main {
grid-column: 2 / 4; grid-column: 2 / 4;
} }
.edit-post-visual-editor__content-area .no-sidebar .site > aside { .edit-post-visual-editor__content-area .site > aside {
grid-column: 2 / 4; grid-column: 2 / 4;
} }
.edit-post-visual-editor__content-area .no-sidebar .site > footer { .edit-post-visual-editor__content-area .site > footer {
grid-column: 1 / -1; grid-column: 1 / -1;
} }
.edit-post-visual-editor__content-area .no-sidebar .site-header { .edit-post-visual-editor__content-area .site-header {
position: sticky; position: sticky;
z-index: 900; z-index: 900;
top: 0; top: 0;
@ -1066,34 +1070,34 @@ Add your custom styles in this file so it is easier to update the theme.
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05), 0 1px 0 0 rgba(0, 0, 0, 0); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05), 0 1px 0 0 rgba(0, 0, 0, 0);
} }
.edit-post-visual-editor__content-area .no-sidebar .site-header .main { .edit-post-visual-editor__content-area .site-header .main {
display: flex; display: flex;
flex-flow: row; flex-flow: row;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
} }
.edit-post-visual-editor__content-area .no-sidebar .site-header .secondary { .edit-post-visual-editor__content-area .site-header .secondary {
display: flex; display: flex;
flex-flow: column; flex-flow: column;
align-items: center; align-items: center;
} }
.edit-post-visual-editor__content-area .no-sidebar .site-main { .edit-post-visual-editor__content-area .site-main {
padding: 0 1rem; padding: 0 1rem;
} }
.edit-post-visual-editor__content-area .no-sidebar .site-main h1, .edit-post-visual-editor__content-area .site-main h1,
.edit-post-visual-editor__content-area .no-sidebar .site-main h2, .edit-post-visual-editor__content-area .site-main h2,
.edit-post-visual-editor__content-area .no-sidebar .site-main h3, .edit-post-visual-editor__content-area .site-main h3,
.edit-post-visual-editor__content-area .no-sidebar .site-main h4, .edit-post-visual-editor__content-area .site-main h4,
.edit-post-visual-editor__content-area .no-sidebar .site-main h5, .edit-post-visual-editor__content-area .site-main h5,
.edit-post-visual-editor__content-area .no-sidebar .site-main h6, .edit-post-visual-editor__content-area .site-main h6,
.edit-post-visual-editor__content-area .no-sidebar .site-main .entry-content { .edit-post-visual-editor__content-area .site-main .entry-content {
margin: 0; margin: 0;
} }
.edit-post-visual-editor__content-area .no-sidebar .home-featured { .edit-post-visual-editor__content-area .home-featured {
padding: 0 1rem; padding: 0 1rem;
} }
@ -1151,37 +1155,52 @@ Add your custom styles in this file so it is easier to update the theme.
text-decoration: none; text-decoration: none;
font-size: 0.8rem; font-size: 0.8rem;
} }
.edit-post-visual-editor__content-area .page-template-funds-search .ofisuport-filtered-funds {
display: grid;
grid-template-columns: 1fr 1fr;
}
.edit-post-visual-editor__content-area .page-template-funds-search .ofisuport-fund-filter {
display: grid;
grid-template-columns: repeat(1, 1fr);
gap: 1rem;
}
.edit-post-visual-editor__content-area .page-template-funds-search .archive-posts {
grid-template-columns: repeat(1, 1fr);
}
} }
@media screen and (min-width: 48em) { @media screen and (min-width: 48em) {
.edit-post-visual-editor__content-area .no-sidebar .site-header .main { .edit-post-visual-editor__content-area .site-header .main {
flex-flow: column; flex-flow: column;
} }
.edit-post-visual-editor__content-area .no-sidebar .site-header .secondary { .edit-post-visual-editor__content-area .site-header .secondary {
border-top: 1px solid #eee; border-top: 1px solid #eee;
} }
.edit-post-visual-editor__content-area .no-sidebar .site-main { .edit-post-visual-editor__content-area .site-main {
padding: 0 2rem; padding: 0 2rem;
} }
.edit-post-visual-editor__content-area .no-sidebar .site-main h1, .edit-post-visual-editor__content-area .site-main h1,
.edit-post-visual-editor__content-area .no-sidebar .site-main h2, .edit-post-visual-editor__content-area .site-main h2,
.edit-post-visual-editor__content-area .no-sidebar .site-main h3, .edit-post-visual-editor__content-area .site-main h3,
.edit-post-visual-editor__content-area .no-sidebar .site-main h4, .edit-post-visual-editor__content-area .site-main h4,
.edit-post-visual-editor__content-area .no-sidebar .site-main h5, .edit-post-visual-editor__content-area .site-main h5,
.edit-post-visual-editor__content-area .no-sidebar .site-main h6, .edit-post-visual-editor__content-area .site-main h6,
.edit-post-visual-editor__content-area .no-sidebar .site-main .entry-content { .edit-post-visual-editor__content-area .site-main .entry-content {
margin: 0; margin: 0;
} }
.edit-post-visual-editor__content-area .no-sidebar .home-featured { .edit-post-visual-editor__content-area .home-featured {
padding: 0 2rem; padding: 0 2rem;
} }
.edit-post-visual-editor__content-area .no-sidebar.single .site-main { .edit-post-visual-editor__content-area.single .site-main {
width: 45rem; width: 45rem;
margin: 0 auto; margin: 0 auto;
} }
@ -1191,23 +1210,39 @@ Add your custom styles in this file so it is easier to update the theme.
.edit-post-visual-editor__content-area .archive-posts { .edit-post-visual-editor__content-area .archive-posts {
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
} }
.edit-post-visual-editor__content-area .page-template-funds-search .ofisuport-filtered-funds {
grid-template-columns: 1fr 2fr;
}
.edit-post-visual-editor__content-area .page-template-funds-search .archive-posts {
grid-template-columns: repeat(2, 1fr);
}
} }
@media screen and (min-width: 80em) { @media screen and (min-width: 80em) {
.edit-post-visual-editor__content-area .no-sidebar .site-header .main { .edit-post-visual-editor__content-area .site-header .main {
width: 80em; width: 80em;
margin: auto; margin: auto;
flex-flow: row; flex-flow: row;
} }
.edit-post-visual-editor__content-area .no-sidebar .site-main { .edit-post-visual-editor__content-area .site-main {
padding: 0; padding: 0;
} }
.edit-post-visual-editor__content-area .no-sidebar .home-featured { .edit-post-visual-editor__content-area .home-featured {
padding: 0; padding: 0;
} }
.edit-post-visual-editor__content-area .page-template-funds-search .ofisuport-filtered-funds {
grid-template-columns: 1fr 3fr;
}
.edit-post-visual-editor__content-area .page-template-funds-search .archive-posts {
grid-template-columns: repeat(3, 1fr);
}
} }
@media screen { @media screen {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -13,6 +13,7 @@
<footer id="colophon" class="site-footer"> <footer id="colophon" class="site-footer">
<div class="site-info"> <div class="site-info">
<?php dynamic_sidebar( 'footer' ); ?>
<!--a href="<?php //echo esc_url( __( 'https://wordpress.org/', 'ofisuport' ) ); ?>"> <!--a href="<?php //echo esc_url( __( 'https://wordpress.org/', 'ofisuport' ) ); ?>">
<?php <?php
/* translators: %s: CMS name, i.e. WordPress. */ /* translators: %s: CMS name, i.e. WordPress. */

View File

@ -37,9 +37,29 @@ function ofisuport_pingback_header() {
add_action( 'wp_head', 'ofisuport_pingback_header' ); add_action( 'wp_head', 'ofisuport_pingback_header' );
/**
* Detect if the Oficina de Suport "ofisuport" plugin is active
*/
function ofisuport_plugin_active() {
// 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( 'oficinasuport-wp-plugin/ofisuport-wp-plugin.php' ) ) {
//plugin is activated do
}
//do stuff here
} //closing if is_plugin_active
//add_action( 'wp_head', 'ofisuport_plugin_active' );
/**
* Echo the post type slug
*/
function ofisuport_class_posttype (){ function ofisuport_class_posttype (){
if( is_post_type_archive( array('ofisuport-ajut') )) { if( is_post_type_archive( array('ofisuport-ajut') )) {
echo ' archive-custom-post-type-'; echo 'archive-custom-post-type-';
printf(get_post_type_object( get_post_type() )->rewrite['slug'] ); printf(get_post_type_object( get_post_type() )->rewrite['slug'] );
} }
} }

View File

@ -27,6 +27,17 @@
'after_title' => '</h2>', 'after_title' => '</h2>',
) )
); );
register_sidebar(
array(
'name' => esc_html__( 'Footer - Peu', 'ofisuport' ),
'id' => 'footer-widgets',
'description' => esc_html__( 'Add widgets here.', 'ofisuport' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
)
);
} }
add_action( 'widgets_init', 'ofisuport_widgets_init' ); add_action( 'widgets_init', 'ofisuport_widgets_init' );

View File

@ -41,7 +41,20 @@ get_header();
endif; endif;
?> ?>
<section id="filteredfunds" class="ofisuport-filtered-funds ofisuport-ajuts-filtrats">
<aside id="fundsfilter" class="ofisuport-filter-funds ofisuport-fitre-ajuts">
<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( 'oficinasuport-wp-plugin/ofisuport-wp-plugin.php' ) ) { // if plugin active do?>
<nav class="sidebar fund-filter">
<h5>filter options</h5>
<ul>
<li>item 01</li>
<li>item 02</li>
<li>item 03</li>
<li>item 04</li>
</ul>
</nav>
<?php } //end if is_plugin_active ?>
</aside>
<content class="archive-posts <?php ofisuport_class_posttype(); ?>"> <content class="archive-posts <?php ofisuport_class_posttype(); ?>">
<?php <?php
@ -61,8 +74,9 @@ get_header();
<?php endif; //end query ajut ?> <?php endif; //end query ajut ?>
</content> </content>
</main><!-- #main --> </section>
</main><!-- #main -->
<?php <?php
get_sidebar();
get_footer(); get_footer();

View File

@ -9,6 +9,9 @@
filter: invert(1); filter: invert(1);
} }
} }
.site-icon-preview .app-icon-preview {
background-color: #fff;
}
// editor styles // editor styles

View File

@ -1,5 +1,4 @@
@media screen { @media screen {
.no-sidebar {
.site { .site {
display: grid; display: grid;
grid-template-columns: 1fr minmax(0,35em) minmax(0,35em) 1fr; grid-template-columns: 1fr minmax(0,35em) minmax(0,35em) 1fr;
@ -53,7 +52,6 @@
} }
.site-footer { .site-footer {
} }
}
.ofisuport-destacats,.ofisuport-featured,.archive-posts { .ofisuport-destacats,.ofisuport-featured,.archive-posts {
display: grid; display: grid;
grid-template-columns: repeat(1 , 1fr); grid-template-columns: repeat(1 , 1fr);
@ -95,10 +93,23 @@
font-size: 0.8rem; font-size: 0.8rem;
} }
} }
.page-template-funds-search {
.ofisuport-filtered-funds {
display:grid;
grid-template-columns: 1fr 1fr;
}
.ofisuport-fund-filter {
display: grid;
grid-template-columns: repeat(1 , 1fr);
gap: $grid__gap;
}
.archive-posts {
grid-template-columns: repeat(1 , 1fr);
}
}
} }
@media screen and (max-width: 48em) { @media screen and (max-width: 48em) {
//only smaller than 48em //only smaller than 48em
.no-sidebar {
.site-header { .site-header {
} }
.site-main { .site-main {
@ -107,11 +118,9 @@
} }
.site-footer { .site-footer {
} }
}
} }
@media screen and (min-width: 48em) { @media screen and (min-width: 48em) {
//only bigger than 48em //only bigger than 48em
.no-sidebar {
.site { .site {
> header { > header {
} }
@ -147,14 +156,22 @@
margin: 0 auto; margin: 0 auto;
} }
} }
}
.ofisuport-destacats,.ofisuport-featured,.archive-posts { .ofisuport-destacats,.ofisuport-featured,.archive-posts {
grid-template-columns: repeat(4 , 1fr); grid-template-columns: repeat(4 , 1fr);
} }
.page-template-funds-search {
.ofisuport-filtered-funds {
grid-template-columns: 1fr 2fr;
}
.ofisuport-fund-filter {
}
.archive-posts {
grid-template-columns: repeat(2 , 1fr);
}
}
} }
@media screen and (min-width: 80em) { @media screen and (min-width: 80em) {
//only bigger than 80rem //only bigger than 80rem
.no-sidebar {
.site { .site {
> header { > header {
} }
@ -182,5 +199,14 @@
} }
.site-footer { .site-footer {
} }
.page-template-funds-search {
.ofisuport-filtered-funds {
grid-template-columns: 1fr 3fr;
}
.ofisuport-fund-filter {
}
.archive-posts {
grid-template-columns: repeat(3 , 1fr);
}
} }
} }

View File

@ -911,7 +911,7 @@ textarea {
--------------------------------------------------------------*/ --------------------------------------------------------------*/
@media screen { @media screen {
.no-sidebar .site { .site {
display: grid; display: grid;
grid-template-columns: 1fr minmax(0, 35em) minmax(0, 35em) 1fr; grid-template-columns: 1fr minmax(0, 35em) minmax(0, 35em) 1fr;
grid-template-areas: "header" "main" "aside" "footer"; grid-template-areas: "header" "main" "aside" "footer";
@ -919,23 +919,23 @@ textarea {
padding: 0; padding: 0;
} }
.no-sidebar .site > header { .site > header {
grid-column: 1 / -1; grid-column: 1 / -1;
} }
.no-sidebar .site > main { .site > main {
grid-column: 2 / 4; grid-column: 2 / 4;
} }
.no-sidebar .site > aside { .site > aside {
grid-column: 2 / 4; grid-column: 2 / 4;
} }
.no-sidebar .site > footer { .site > footer {
grid-column: 1 / -1; grid-column: 1 / -1;
} }
.no-sidebar .site-header { .site-header {
position: sticky; position: sticky;
z-index: 900; z-index: 900;
top: 0; top: 0;
@ -944,34 +944,34 @@ textarea {
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05), 0 1px 0 0 rgba(0, 0, 0, 0); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05), 0 1px 0 0 rgba(0, 0, 0, 0);
} }
.no-sidebar .site-header .main { .site-header .main {
display: flex; display: flex;
flex-flow: row; flex-flow: row;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
} }
.no-sidebar .site-header .secondary { .site-header .secondary {
display: flex; display: flex;
flex-flow: column; flex-flow: column;
align-items: center; align-items: center;
} }
.no-sidebar .site-main { .site-main {
padding: 0 1rem; padding: 0 1rem;
} }
.no-sidebar .site-main h1, .site-main h1,
.no-sidebar .site-main h2, .site-main h2,
.no-sidebar .site-main h3, .site-main h3,
.no-sidebar .site-main h4, .site-main h4,
.no-sidebar .site-main h5, .site-main h5,
.no-sidebar .site-main h6, .site-main h6,
.no-sidebar .site-main .entry-content { .site-main .entry-content {
margin: 0; margin: 0;
} }
.no-sidebar .home-featured { .home-featured {
padding: 0 1rem; padding: 0 1rem;
} }
@ -1029,37 +1029,52 @@ textarea {
text-decoration: none; text-decoration: none;
font-size: 0.8rem; font-size: 0.8rem;
} }
.page-template-funds-search .ofisuport-filtered-funds {
display: grid;
grid-template-columns: 1fr 1fr;
}
.page-template-funds-search .ofisuport-fund-filter {
display: grid;
grid-template-columns: repeat(1, 1fr);
gap: 1rem;
}
.page-template-funds-search .archive-posts {
grid-template-columns: repeat(1, 1fr);
}
} }
@media screen and (min-width: 48em) { @media screen and (min-width: 48em) {
.no-sidebar .site-header .main { .site-header .main {
flex-flow: column; flex-flow: column;
} }
.no-sidebar .site-header .secondary { .site-header .secondary {
border-top: 1px solid #eee; border-top: 1px solid #eee;
} }
.no-sidebar .site-main { .site-main {
padding: 0 2rem; padding: 0 2rem;
} }
.no-sidebar .site-main h1, .site-main h1,
.no-sidebar .site-main h2, .site-main h2,
.no-sidebar .site-main h3, .site-main h3,
.no-sidebar .site-main h4, .site-main h4,
.no-sidebar .site-main h5, .site-main h5,
.no-sidebar .site-main h6, .site-main h6,
.no-sidebar .site-main .entry-content { .site-main .entry-content {
margin: 0; margin: 0;
} }
.no-sidebar .home-featured { .home-featured {
padding: 0 2rem; padding: 0 2rem;
} }
.no-sidebar.single .site-main { .single .site-main {
width: 45rem; width: 45rem;
margin: 0 auto; margin: 0 auto;
} }
@ -1069,23 +1084,39 @@ textarea {
.archive-posts { .archive-posts {
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
} }
.page-template-funds-search .ofisuport-filtered-funds {
grid-template-columns: 1fr 2fr;
}
.page-template-funds-search .archive-posts {
grid-template-columns: repeat(2, 1fr);
}
} }
@media screen and (min-width: 80em) { @media screen and (min-width: 80em) {
.no-sidebar .site-header .main { .site-header .main {
width: 80em; width: 80em;
margin: auto; margin: auto;
flex-flow: row; flex-flow: row;
} }
.no-sidebar .site-main { .site-main {
padding: 0; padding: 0;
} }
.no-sidebar .home-featured { .home-featured {
padding: 0; padding: 0;
} }
.page-template-funds-search .ofisuport-filtered-funds {
grid-template-columns: 1fr 3fr;
}
.page-template-funds-search .archive-posts {
grid-template-columns: repeat(3, 1fr);
}
} }
/*-------------------------------------------------------------- /*--------------------------------------------------------------

File diff suppressed because one or more lines are too long