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);
}
.site-icon-preview .app-icon-preview {
background-color: #fff;
}
.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 {
.edit-post-visual-editor__content-area .no-sidebar .site {
.edit-post-visual-editor__content-area .site {
display: grid;
grid-template-columns: 1fr minmax(0, 35em) minmax(0, 35em) 1fr;
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;
}
.edit-post-visual-editor__content-area .no-sidebar .site > header {
.edit-post-visual-editor__content-area .site > header {
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;
}
.edit-post-visual-editor__content-area .no-sidebar .site > aside {
.edit-post-visual-editor__content-area .site > aside {
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;
}
.edit-post-visual-editor__content-area .no-sidebar .site-header {
.edit-post-visual-editor__content-area .site-header {
position: sticky;
z-index: 900;
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);
}
.edit-post-visual-editor__content-area .no-sidebar .site-header .main {
.edit-post-visual-editor__content-area .site-header .main {
display: flex;
flex-flow: row;
align-items: center;
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;
flex-flow: column;
align-items: center;
}
.edit-post-visual-editor__content-area .no-sidebar .site-main {
.edit-post-visual-editor__content-area .site-main {
padding: 0 1rem;
}
.edit-post-visual-editor__content-area .no-sidebar .site-main h1,
.edit-post-visual-editor__content-area .no-sidebar .site-main h2,
.edit-post-visual-editor__content-area .no-sidebar .site-main h3,
.edit-post-visual-editor__content-area .no-sidebar .site-main h4,
.edit-post-visual-editor__content-area .no-sidebar .site-main h5,
.edit-post-visual-editor__content-area .no-sidebar .site-main h6,
.edit-post-visual-editor__content-area .no-sidebar .site-main .entry-content {
.edit-post-visual-editor__content-area .site-main h1,
.edit-post-visual-editor__content-area .site-main h2,
.edit-post-visual-editor__content-area .site-main h3,
.edit-post-visual-editor__content-area .site-main h4,
.edit-post-visual-editor__content-area .site-main h5,
.edit-post-visual-editor__content-area .site-main h6,
.edit-post-visual-editor__content-area .site-main .entry-content {
margin: 0;
}
.edit-post-visual-editor__content-area .no-sidebar .home-featured {
.edit-post-visual-editor__content-area .home-featured {
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;
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) {
.edit-post-visual-editor__content-area .no-sidebar .site-header .main {
.edit-post-visual-editor__content-area .site-header .main {
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;
}
.edit-post-visual-editor__content-area .no-sidebar .site-main {
.edit-post-visual-editor__content-area .site-main {
padding: 0 2rem;
}
.edit-post-visual-editor__content-area .no-sidebar .site-main h1,
.edit-post-visual-editor__content-area .no-sidebar .site-main h2,
.edit-post-visual-editor__content-area .no-sidebar .site-main h3,
.edit-post-visual-editor__content-area .no-sidebar .site-main h4,
.edit-post-visual-editor__content-area .no-sidebar .site-main h5,
.edit-post-visual-editor__content-area .no-sidebar .site-main h6,
.edit-post-visual-editor__content-area .no-sidebar .site-main .entry-content {
.edit-post-visual-editor__content-area .site-main h1,
.edit-post-visual-editor__content-area .site-main h2,
.edit-post-visual-editor__content-area .site-main h3,
.edit-post-visual-editor__content-area .site-main h4,
.edit-post-visual-editor__content-area .site-main h5,
.edit-post-visual-editor__content-area .site-main h6,
.edit-post-visual-editor__content-area .site-main .entry-content {
margin: 0;
}
.edit-post-visual-editor__content-area .no-sidebar .home-featured {
.edit-post-visual-editor__content-area .home-featured {
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;
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 {
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) {
.edit-post-visual-editor__content-area .no-sidebar .site-header .main {
.edit-post-visual-editor__content-area .site-header .main {
width: 80em;
margin: auto;
flex-flow: row;
}
.edit-post-visual-editor__content-area .no-sidebar .site-main {
.edit-post-visual-editor__content-area .site-main {
padding: 0;
}
.edit-post-visual-editor__content-area .no-sidebar .home-featured {
.edit-post-visual-editor__content-area .home-featured {
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 {

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' );
/**
* 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 (){
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'] );
}
}

View File

@ -41,7 +41,20 @@ get_header();
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(); ?>">
<?php
@ -60,9 +73,10 @@ get_header();
<?php wp_reset_postdata(); ?>
<?php endif; //end query ajut ?>
</content>
</main><!-- #main -->
</content>
</section>
</main><!-- #main -->
<?php
get_sidebar();
get_footer();

View File

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

View File

@ -1,58 +1,56 @@
@media screen {
.no-sidebar {
.site {
display: grid;
grid-template-columns: 1fr minmax(0,35em) minmax(0,35em) 1fr;
grid-template-areas:
"header"
"main"
"aside"
"footer";
margin: auto;
padding: 0;
> header {
grid-column: 1 / -1;
}
> main {
grid-column: 2 / 4;
}
> aside {
grid-column: 2 / 4;
}
> footer {
grid-column: 1 / -1;
}
.site {
display: grid;
grid-template-columns: 1fr minmax(0,35em) minmax(0,35em) 1fr;
grid-template-areas:
"header"
"main"
"aside"
"footer";
margin: auto;
padding: 0;
> header {
grid-column: 1 / -1;
}
.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;
}
> main {
grid-column: 2 / 4;
}
.site-main {
padding: 0 1rem;
h1,h2,h3,h4,h5,h6,.entry-content {
margin: 0;
}
> aside {
grid-column: 2 / 4;
}
.home-featured {
padding: 0 1rem;
> footer {
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 {
display: grid;
@ -95,92 +93,120 @@
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) {
//only smaller than 48em
.no-sidebar {
.site-header {
}
.site-main {
}
.home-featured {
}
.site-footer {
}
.site-header {
}
.site-main {
}
.home-featured {
}
.site-footer {
}
}
@media screen and (min-width: 48em) {
//only bigger than 48em
.no-sidebar {
.site {
> header {
}
> main {
}
> aside {
}
> footer {
}
.site {
> header {
}
.site-header {
.main {
flex-flow: column;
}
.secondary {
border-top: 1px solid $color__grey-lighter;
}
> main {
}
> 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 {
padding: 0 2rem;
h1,h2,h3,h4,h5,h6,.entry-content {
margin:0;
}
}
.home-featured {
padding: 0 2rem;
}
.site-footer {
}
&.single {
.site-main {
width: 45rem;
margin: 0 auto;
}
width: 45rem;
margin: 0 auto;
}
}
.ofisuport-destacats,.ofisuport-featured,.archive-posts {
grid-template-columns: repeat(4 , 1fr);
}
}
@media screen and (min-width: 80em) {
//only bigger than 80rem
.no-sidebar {
.site {
> header {
}
> main {
}
> aside {
}
> footer {
}
.page-template-funds-search {
.ofisuport-filtered-funds {
grid-template-columns: 1fr 2fr;
}
.site-header {
.main {
width: 80em;
margin: auto;
flex-flow: row;
}
.secondary {
}
.ofisuport-fund-filter {
}
.site-main {
padding: 0;
}
.home-featured {
padding: 0;
}
.site-footer {
.archive-posts {
grid-template-columns: repeat(2 , 1fr);
}
}
}
@media screen and (min-width: 80em) {
//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 {
.no-sidebar .site {
.site {
display: grid;
grid-template-columns: 1fr minmax(0, 35em) minmax(0, 35em) 1fr;
grid-template-areas: "header" "main" "aside" "footer";
@ -919,23 +919,23 @@ textarea {
padding: 0;
}
.no-sidebar .site > header {
.site > header {
grid-column: 1 / -1;
}
.no-sidebar .site > main {
.site > main {
grid-column: 2 / 4;
}
.no-sidebar .site > aside {
.site > aside {
grid-column: 2 / 4;
}
.no-sidebar .site > footer {
.site > footer {
grid-column: 1 / -1;
}
.no-sidebar .site-header {
.site-header {
position: sticky;
z-index: 900;
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);
}
.no-sidebar .site-header .main {
.site-header .main {
display: flex;
flex-flow: row;
align-items: center;
justify-content: space-around;
}
.no-sidebar .site-header .secondary {
.site-header .secondary {
display: flex;
flex-flow: column;
align-items: center;
}
.no-sidebar .site-main {
.site-main {
padding: 0 1rem;
}
.no-sidebar .site-main h1,
.no-sidebar .site-main h2,
.no-sidebar .site-main h3,
.no-sidebar .site-main h4,
.no-sidebar .site-main h5,
.no-sidebar .site-main h6,
.no-sidebar .site-main .entry-content {
.site-main h1,
.site-main h2,
.site-main h3,
.site-main h4,
.site-main h5,
.site-main h6,
.site-main .entry-content {
margin: 0;
}
.no-sidebar .home-featured {
.home-featured {
padding: 0 1rem;
}
@ -1029,37 +1029,52 @@ textarea {
text-decoration: none;
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) {
.no-sidebar .site-header .main {
.site-header .main {
flex-flow: column;
}
.no-sidebar .site-header .secondary {
.site-header .secondary {
border-top: 1px solid #eee;
}
.no-sidebar .site-main {
.site-main {
padding: 0 2rem;
}
.no-sidebar .site-main h1,
.no-sidebar .site-main h2,
.no-sidebar .site-main h3,
.no-sidebar .site-main h4,
.no-sidebar .site-main h5,
.no-sidebar .site-main h6,
.no-sidebar .site-main .entry-content {
.site-main h1,
.site-main h2,
.site-main h3,
.site-main h4,
.site-main h5,
.site-main h6,
.site-main .entry-content {
margin: 0;
}
.no-sidebar .home-featured {
.home-featured {
padding: 0 2rem;
}
.no-sidebar.single .site-main {
.single .site-main {
width: 45rem;
margin: 0 auto;
}
@ -1069,23 +1084,39 @@ textarea {
.archive-posts {
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) {
.no-sidebar .site-header .main {
.site-header .main {
width: 80em;
margin: auto;
flex-flow: row;
}
.no-sidebar .site-main {
.site-main {
padding: 0;
}
.no-sidebar .home-featured {
.home-featured {
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