added sidebar in fund ajut page for options filter

This commit is contained in:
jorge 2023-01-02 14:51:58 +01:00
parent d984747b23
commit 1a448fedec
9 changed files with 319 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

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

@ -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
@ -60,9 +73,10 @@ get_header();
<?php wp_reset_postdata(); ?> <?php wp_reset_postdata(); ?>
<?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,58 +1,56 @@
@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:
grid-template-areas: "header"
"header" "main"
"main" "aside"
"aside" "footer";
"footer"; margin: auto;
margin: auto; padding: 0;
padding: 0; > header {
> header { grid-column: 1 / -1;
grid-column: 1 / -1;
}
> main {
grid-column: 2 / 4;
}
> aside {
grid-column: 2 / 4;
}
> footer {
grid-column: 1 / -1;
}
} }
.site-header { > main {
position: sticky; grid-column: 2 / 4;
z-index: 900;
top: 0;
margin-bottom: 2rem;
background-color: $color__white;
box-shadow: 0 15px 30px rgba(0,0,0,0.05), 0 1px 0 0 rgba(0,0,0,0.0);
.main {
display: flex;
flex-flow: row;
align-items: center;
justify-content: space-around;
}
.secondary {
display: flex;
flex-flow: column;
align-items: center;
}
} }
.site-main { > aside {
padding: 0 1rem; grid-column: 2 / 4;
h1,h2,h3,h4,h5,h6,.entry-content {
margin: 0;
}
} }
.home-featured { > footer {
padding: 0 1rem; grid-column: 1 / -1;
} }
.site-footer { }
.site-header {
position: sticky;
z-index: 900;
top: 0;
margin-bottom: 2rem;
background-color: $color__white;
box-shadow: 0 15px 30px rgba(0,0,0,0.05), 0 1px 0 0 rgba(0,0,0,0.0);
.main {
display: flex;
flex-flow: row;
align-items: center;
justify-content: space-around;
} }
.secondary {
display: flex;
flex-flow: column;
align-items: center;
}
}
.site-main {
padding: 0 1rem;
h1,h2,h3,h4,h5,h6,.entry-content {
margin: 0;
}
}
.home-featured {
padding: 0 1rem;
}
.site-footer {
} }
.ofisuport-destacats,.ofisuport-featured,.archive-posts { .ofisuport-destacats,.ofisuport-featured,.archive-posts {
display: grid; display: grid;
@ -95,92 +93,120 @@
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 { }
} .home-featured {
.home-featured { }
} .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 {
}
> main {
}
> aside {
}
> footer {
}
} }
.site-header { > main {
.main {
flex-flow: column;
}
.secondary {
border-top: 1px solid $color__grey-lighter;
}
} }
> aside {
}
> footer {
}
}
.site-header {
.main {
flex-flow: column;
}
.secondary {
border-top: 1px solid $color__grey-lighter;
}
}
.site-main {
padding: 0 2rem;
h1,h2,h3,h4,h5,h6,.entry-content {
margin:0;
}
}
.home-featured {
padding: 0 2rem;
}
.site-footer {
}
&.single {
.site-main { .site-main {
padding: 0 2rem; width: 45rem;
h1,h2,h3,h4,h5,h6,.entry-content { margin: 0 auto;
margin:0;
}
}
.home-featured {
padding: 0 2rem;
}
.site-footer {
}
&.single {
.site-main {
width: 45rem;
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 {
@media screen and (min-width: 80em) { .ofisuport-filtered-funds {
//only bigger than 80rem grid-template-columns: 1fr 2fr;
.no-sidebar {
.site {
> header {
}
> main {
}
> aside {
}
> footer {
}
} }
.site-header { .ofisuport-fund-filter {
.main {
width: 80em;
margin: auto;
flex-flow: row;
}
.secondary {
}
} }
.site-main { .archive-posts {
padding: 0; grid-template-columns: repeat(2 , 1fr);
} }
.home-featured { }
padding: 0; }
} @media screen and (min-width: 80em) {
.site-footer { //only bigger than 80rem
.site {
> header {
}
> main {
}
> aside {
}
> footer {
}
}
.site-header {
.main {
width: 80em;
margin: auto;
flex-flow: row;
}
.secondary {
}
}
.site-main {
padding: 0;
}
.home-featured {
padding: 0;
}
.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