front page progress

This commit is contained in:
Adam Piontek 2021-08-03 20:04:38 -04:00
parent 4e8c1c1917
commit 765073354c
10 changed files with 92 additions and 86 deletions

View file

@ -21,6 +21,11 @@
max-width: 960px; max-width: 960px;
} }
} }
.container-xl:not(.container-lg) {
// @include media-breakpoint-up(xl) {
max-width: 1140px !important;
// }
}
/* /*
* top navbar css grid layout * top navbar css grid layout

View file

@ -1,3 +1,4 @@
/* 12 step meeting list (tsml) general & filter controls */
#tsml { #tsml {
a { a {
@extend a; @extend a;
@ -80,8 +81,16 @@
} }
// for some reason this needs to be outside of the above styling /* 12 step meeting list (tsml) main table & widget table styling */
#tsml #meetings .results table { .tsml-widget-upcoming table.tsml_next_meetings tbody tr td {
margin-left: .5rem;
&:first-of-type {
margin-left: 0 !important;
}
}
.tsml-widget-upcoming h2 { margin-bottom: 1rem; }
#tsml #meetings .results table,
.tsml-widget-upcoming table.tsml_next_meetings {
@extend .table; @extend .table;
@extend .table-dark; @extend .table-dark;
@extend .table-striped; @extend .table-striped;

View file

@ -31,7 +31,8 @@ a {
/* post styling */ /* post styling */
article.post.sticky { article.post.sticky,
.rpwwt-widget li.rpwwt-sticky {
border-radius: .25rem !important; border-radius: .25rem !important;
background-color: shade-color($gray-800, 50%); background-color: shade-color($gray-800, 50%);
border-bottom: inherit !important; border-bottom: inherit !important;
@ -258,3 +259,50 @@ select {
/* Meetings plugin styling changes */ /* Meetings plugin styling changes */
@import "meetings-plugin"; @import "meetings-plugin";
/* Front page layout */
main#fp-main > div.fp-grid {
display: grid !important;
grid-template-columns: 1fr;
grid-column-gap: 2rem;
grid-row-gap: 2rem;
@include media-breakpoint-up(md) {
grid-template-columns: 20rem auto;
}
> section.tsml-widget-upcoming.widget_tsml_widget_upcoming.widget {
@include media-breakpoint-up(md) {
grid-column-start: 1;
grid-row-start: 1;
}
}
h2.widgettitle {
font-size: 1.75rem;
font-weight: 300 !important;
color: $text-muted;
margin-bottom: 0.5rem;
@include media-breakpoint-up(sm) {
margin-bottom: 1rem;
}
}
.rpwwt-widget {
li.rpwwt-sticky {
padding: 0.75rem !important;
}
.rpwwt-post-title {
font-size: 1.4rem;
}
.rpwwt-post-date {
color: $text-muted;
font-size: smaller;
}
}
.tsml-widget-upcoming.widget_tsml_widget_upcoming.widget p {
text-align: right;
a {
@extend .btn;
@extend .btn-primary;
font-family: $font-family-handbrush;
}
}
}

View file

@ -18,9 +18,8 @@ import 'bootstrap/js/dist/dropdown';
// import navbar burger code // import navbar burger code
import "./_hamburger-helper"; import "./_hamburger-helper";
// highlight any code blocks tagged with class 'to-highlight' // adjust some content
document.addEventListener('DOMContentLoaded', (event) => { document.addEventListener('DOMContentLoaded', (event) => {
document.querySelectorAll('code.to-highlight').forEach((el) => { let tsmlwidget_morelink = document.querySelector('.tsml-widget-upcoming.widget_tsml_widget_upcoming.widget p a');
hljs.highlightElement(el); tsmlwidget_morelink.innerHTML = 'View More Meetings'
});
}); });

View file

@ -13,55 +13,12 @@ namespace WP_RDNYC;
?> ?>
<?php
// FIRST: if this is frontpage, we just do the sticky bottom right copyright footer
if ($args && $args['frontpage']) {
?>
<footer class="tek-fixed-footer">
<div class="px-2 px-sm-3 text-gray-400">
&copy; <?php echo date("Y") ?> Recovery Dharma NYC
</div>
</footer>
<?php } else {
// Not frontpage? Then show regular footer
?>
<footer class="d-flex flex-column align-items-center mt-2 px-3 py-3"> <footer class="d-flex flex-column align-items-center mt-2 px-3 py-3">
<?php
// // widget content for blog content footers:
// if (!is_page()) :
?>
<!-- <div id="footer-widgets" class="col-12 col-sm-9 col-md-11 col-lg-10 col-xl-9 col-xxl-8 d-flex flex-column align-items-center">
<div class="px-3 pt-3 pb-1">
< ?php echo get_search_form(); ?>
</div>
<div class="d-flex flex-wrap flex-column flex-md-row justify-content-start justify-content-md-center align-items-start">
< ?php
if ( is_active_sidebar( 'footer-widgets' ) ) :
dynamic_sidebar( 'footer-widgets' );
endif;
?>
</div>
</div> -->
<?php
// endif;
// Regular footer content for all but front page:
?>
<span class="text-gray-400 mt-3">&copy; <?php echo date("Y") ?> Recovery Dharma NYC</span> <span class="text-gray-400 mt-3">&copy; <?php echo date("Y") ?> Recovery Dharma NYC</span>
</footer> </footer>
<?php } ?>
<?php wp_footer(); ?> <?php wp_footer(); ?>
</body> </body>

View file

@ -9,28 +9,19 @@
namespace WP_RDNYC; namespace WP_RDNYC;
get_header(); ?> get_header(); ?>
<main class="container-fluid">
<div class="d-flex flex-column-reverse flex-lg-row align-items-lg-end mt-sm-3 mt-md-4 pt-md-4 mt-lg-5 pt-lg-5 pb-5" id="tek-front-page">
<?php <main id="fp-main" class="container-xl mt-4 mt-md-6 mt-lg-7 mb-3">
if ( have_posts() ) { <div class="fp-grid">
while ( have_posts() ) {
the_post(); ?>
<div class="col-auto mt-3 mt-lg-0">
<?php echo get_the_post_thumbnail( get_the_ID(), 'large' ); ?>
</div>
<!-- the_content(); --> <?php
<div class="col-auto justify-content-start ms-lg-3"> if ( is_active_sidebar( 'front-page-widgets' ) ) :
<?php the_content(); ?> dynamic_sidebar( 'front-page-widgets' );
</div> endif;
?>
<?php }
}
?>
</div> </div>
</main> </main>
<?php <?php
get_footer('', array('frontpage'=>true)); get_footer();

View file

@ -17,6 +17,12 @@ require_once( WP_RDNYC_DIR . '/custom-functions.php' );
/** /**
* Autoloader for browersync * Autoloader for browersync
*/ */
require_once( WP_RDNYC_DIR . '/vendor/autoload.php' ); if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
require_once( WP_RDNYC_DIR . '/vendor/autoload.php' );
\A7\autoload( __DIR__ . '/src' ); \A7\autoload( __DIR__ . '/src' );
} else {
require_once( WP_RDNYC_DIR . '/src/classes.php' );
require_once( WP_RDNYC_DIR . '/src/enqueue.php' );
require_once( WP_RDNYC_DIR . '/src/setup.php' );
require_once( WP_RDNYC_DIR . '/src/sidebars.php' );
}

View file

@ -22,7 +22,6 @@ add_action( 'after_setup_theme', function () {
// This theme uses wp_nav_menu() in one location. // This theme uses wp_nav_menu() in one location.
register_nav_menus( [ register_nav_menus( [
'navbar-main-menu' => __( 'Navbar Main Menu', 'wp-rdnyc' ), 'navbar-main-menu' => __( 'Navbar Main Menu', 'wp-rdnyc' ),
// 'footer' => __( 'Footer Menu', 'wp-rdnyc' ),
] ); ] );
// Switch default core markup for search form, comment form, and comments to output valid HTML5. // Switch default core markup for search form, comment form, and comments to output valid HTML5.

View file

@ -16,9 +16,9 @@ add_action( 'widgets_init', function () {
] ); ] );
register_sidebar( [ register_sidebar( [
'name' => esc_html( 'Footer' ), 'name' => esc_html( 'Front Page' ),
'id' => 'footer-widgets', 'id' => 'front-page-widgets',
'description' => 'Blog page footer area for widgets', 'description' => 'Front page widget area',
'before_widget' => '<section id="%1$s" class="%2$s widget">', 'before_widget' => '<section id="%1$s" class="%2$s widget">',
'after_widget' => '</section>', 'after_widget' => '</section>',
] ); ] );

View file

@ -52,16 +52,8 @@ const config = {
type: 'asset/resource', type: 'asset/resource',
generator: { generator: {
filename: (pathData) => { filename: (pathData) => {
if (pathData.filename.includes('@mdi')) { if (pathData.filename.includes("bootstrap-icons")) {
return 'images/mdi-[name][ext]';
} else if (pathData.filename.includes("bootstrap-icons")) {
return 'images/bsi-[name][ext]'; return 'images/bsi-[name][ext]';
} else if (pathData.filename.includes("heroicons")) {
if (pathData.filename.includes("outline")) {
return 'images/hio-[name][ext]';
} else {
return 'images/his-[name][ext]';
}
} else { } else {
return 'images/svg-[name][ext]'; return 'images/svg-[name][ext]';
} }
@ -183,7 +175,7 @@ function getCSSWhitelistPatterns() {
/^children(-.*)?$/, /^children(-.*)?$/,
/^figure$/, /^figure$/,
/^blockquote$/, /^blockquote$/,
/^tsml$/, /^tsml(-.*)?$/,
/^label$/, /^label$/,
/^input$/, /^input$/,
/^textarea$/, /^textarea$/,