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;
}
}
.container-xl:not(.container-lg) {
// @include media-breakpoint-up(xl) {
max-width: 1140px !important;
// }
}
/*
* top navbar css grid layout

View file

@ -1,3 +1,4 @@
/* 12 step meeting list (tsml) general & filter controls */
#tsml {
a {
@extend a;
@ -80,8 +81,16 @@
}
// for some reason this needs to be outside of the above styling
#tsml #meetings .results table {
/* 12 step meeting list (tsml) main table & widget table styling */
.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-dark;
@extend .table-striped;

View file

@ -31,7 +31,8 @@ a {
/* post styling */
article.post.sticky {
article.post.sticky,
.rpwwt-widget li.rpwwt-sticky {
border-radius: .25rem !important;
background-color: shade-color($gray-800, 50%);
border-bottom: inherit !important;
@ -258,3 +259,50 @@ select {
/* Meetings plugin styling changes */
@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 "./_hamburger-helper";
// highlight any code blocks tagged with class 'to-highlight'
// adjust some content
document.addEventListener('DOMContentLoaded', (event) => {
document.querySelectorAll('code.to-highlight').forEach((el) => {
hljs.highlightElement(el);
});
let tsmlwidget_morelink = document.querySelector('.tsml-widget-upcoming.widget_tsml_widget_upcoming.widget p a');
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">
<?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>
</footer>
<?php } ?>
<?php wp_footer(); ?>
</body>

View file

@ -9,28 +9,19 @@
namespace WP_RDNYC;
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
if ( have_posts() ) {
while ( have_posts() ) {
the_post(); ?>
<main id="fp-main" class="container-xl mt-4 mt-md-6 mt-lg-7 mb-3">
<div class="fp-grid">
<div class="col-auto mt-3 mt-lg-0">
<?php echo get_the_post_thumbnail( get_the_ID(), 'large' ); ?>
</div>
<!-- the_content(); -->
<div class="col-auto justify-content-start ms-lg-3">
<?php the_content(); ?>
</div>
<?php
if ( is_active_sidebar( 'front-page-widgets' ) ) :
dynamic_sidebar( 'front-page-widgets' );
endif;
?>
<?php }
}
?>
</div>
</main>
<?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
*/
require_once( WP_RDNYC_DIR . '/vendor/autoload.php' );
\A7\autoload( __DIR__ . '/src' );
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
require_once( WP_RDNYC_DIR . '/vendor/autoload.php' );
\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.
register_nav_menus( [
'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.

View file

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

View file

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