Compare commits

...

2 Commits

14 changed files with 4685 additions and 5431 deletions

View File

@ -26,6 +26,13 @@ get_header(); ?>
<?php echo category_description(); ?> <?php echo category_description(); ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if (is_category('peephole')) : ?>
<div class="bfr_category_tags">
<?php // wp_tag_cloud( 'unit=rem&smallest=1&largest=1&number=0&orderby=name' ); ?>
</div>
<?php endif; ?>
<div class="bfr_category_archive"> <div class="bfr_category_archive">
<?php if ( have_posts() ) : ?> <?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?> <?php /* Start the Loop */ ?>

View File

@ -27,6 +27,7 @@ require_once( 'library/class-foundationpress-comments.php' );
require_once( 'library/navigation.php' ); require_once( 'library/navigation.php' );
/** Add menu walkers for top-bar and off-canvas */ /** Add menu walkers for top-bar and off-canvas */
require_once( 'library/class-foundationpress-center-top-bar-walker.php' );
require_once( 'library/class-foundationpress-top-bar-walker.php' ); require_once( 'library/class-foundationpress-top-bar-walker.php' );
require_once( 'library/class-foundationpress-mobile-walker.php' ); require_once( 'library/class-foundationpress-mobile-walker.php' );

View File

@ -157,6 +157,15 @@ const webpack = {
gulp.task('webpack:build', webpack.build); gulp.task('webpack:build', webpack.build);
gulp.task('webpack:watch', webpack.watch); gulp.task('webpack:watch', webpack.watch);
// Include fontawesome
// https://stackoverflow.com/questions/49195144/add-font-awesome-to-gulp-project-correctly#51491927
gulp.task('icons', function() {
return gulp.src('node_modules/@fortawesome/fontawesome-free/webfonts/*')
.pipe(gulp.dest(dist+'/assets/webfonts/'));
});
// Copy images to the "dist" folder // Copy images to the "dist" folder
// In production, the images are compressed // In production, the images are compressed
function images() { function images() {

View File

@ -1,50 +0,0 @@
<?php
/**
* The template for displaying the header
*
* Displays all of the head element and everything up until the "container" div.
*
* @package Biofriction
* @since Biofriction 1.0.0
*/
?>
<!doctype html>
<html class="no-js" <?php language_attributes(); ?> >
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php if ( get_theme_mod( 'wpt_mobile_menu_layout' ) === 'offcanvas' ) : ?>
<?php get_template_part( 'template-parts/mobile-off-canvas' ); ?>
<?php endif; ?>
<header class="site-header" role="banner">
<div class="site-title-bar title-bar" <?php foundationpress_title_bar_responsive_toggle(); ?>>
<div class="title-bar-left">
<button aria-label="<?php _e( 'Main Menu', 'foundationpress' ); ?>" class="menu-icon" type="button" data-toggle="<?php foundationpress_mobile_menu_id(); ?>"></button>
<span class="site-mobile-title title-bar-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</span>
</div>
</div>
<nav class="site-navigation top-bar" role="navigation" id="<?php foundationpress_mobile_menu_id(); ?>">
<div class="top-bar-left">
<div class="site-desktop-title top-bar-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</div>
</div>
<div class="top-bar-right">
<?php foundationpress_top_bar_r(); ?>
<?php if ( ! get_theme_mod( 'wpt_mobile_menu_layout' ) || get_theme_mod( 'wpt_mobile_menu_layout' ) === 'topbar' ) : ?>
<?php get_template_part( 'template-parts/mobile-top-bar' ); ?>
<?php endif; ?>
</div>
</nav>
</header>

View File

@ -22,10 +22,19 @@
<header class="site-header-container"> <header class="site-header-container">
<content class="site-header-grid grid-x align-justify align-middle" role="banner"> <content class="site-header-grid grid-x align-justify align-middle" role="banner">
<button aria-label="<?php _e( 'Main Menu', 'foundationpress' ); ?>" class="show-for-small-only menu-icon" type="button" data-toggle="<?php foundationpress_mobile_menu_id(); ?>"></button> <button aria-label="<?php _e( 'Main Menu', 'foundationpress' ); ?>" class="show-for-small-only menu-icon" type="button" data-toggle="<?php foundationpress_mobile_menu_id(); ?>"></button>
<div class="site-custom-logo biofriction-logo-moving-transp cell small-6 medium-3 shrink"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php //the_custom_logo(); ?></a></div> <div class="site-custom-logo biofriction-logo-moving-transp cell small-12 medium-3 shrink"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php //the_custom_logo(); ?></a></div>
<div class="site-name"><h1><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1></div> <div class="site-name"><h1><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1></div>
<div class="site-description"><h2><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'description' ); ?></a></h2></div> <div class="site-description"><h2><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'description' ); ?></a></h2></div>
<nav class="site-top-widgets"><?php dynamic_sidebar( 'header-widgets' ); ?></nav> <!--nav class="site-top-widgets"--><?php //dynamic_sidebar( 'header-widgets' ); ?><!--/nav-->
<nav class="site-center-top-nav medium-6 grid-x align-center">
<?php foundationpress_top_bar_c(); ?>
<aside class="bfr_category_tags">
<?php if (is_category('peephole') || is_tag() ) : ?>
<?php wp_tag_cloud( 'unit=rem&smallest=1&largest=1&number=0&orderby=name' ); ?>
<?php endif; ?>
</aside>
</nav>
<nav class="site-top-nav menu"><?php foundationpress_top_bar_r(); ?></nav> <nav class="site-top-nav menu"><?php foundationpress_top_bar_r(); ?></nav>
</content> </content>
</header> </header>

View File

@ -0,0 +1,20 @@
<?php
/**
* Customize the output of menus for Foundation top bar
*
* @package Biofriction
* @since Biofriction 1.0.0
*/
/**
* Big thanks to Brett Mason (https://github.com/brettsmason) for the awesome walker
*/
if ( ! class_exists( 'Foundationpress_Center_Top_Bar_Walker' ) ) :
class Foundationpress_Center_Top_Bar_Walker extends Walker_Nav_Menu {
function start_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat( "\t", $depth );
$output .= "\n$indent<ul id=\"menu-center-top\" class=\"dropdown menu vertical\" data-toggle>\n";
}
}
endif;

View File

@ -9,11 +9,32 @@
register_nav_menus( register_nav_menus(
array( array(
'top-bar-c' => esc_html__( 'Center Top Bar', 'foundationpress' ),
'top-bar-r' => esc_html__( 'Right Top Bar', 'foundationpress' ), 'top-bar-r' => esc_html__( 'Right Top Bar', 'foundationpress' ),
'mobile-nav' => esc_html__( 'Mobile', 'foundationpress' ), 'mobile-nav' => esc_html__( 'Mobile', 'foundationpress' ),
) )
); );
/**
* Desktop navigation - center top bar
*
* @link http://codex.wordpress.org/Function_Reference/wp_nav_menu
*/
if ( ! function_exists( 'foundationpress_top_bar_c' ) ) {
function foundationpress_top_bar_c() {
wp_nav_menu(
array(
'container' => false,
'menu_class' => 'center dropdown menu menu desktop-menu',
'items_wrap' => '<ul id="%1$s" class="%2$s" data-dropdown-menu>%3$s</ul>',
'theme_location' => 'top-bar-c',
'depth' => 3,
'fallback_cb' => false,
'walker' => new Foundationpress_Center_Top_Bar_Walker(),
)
);
}
}
/** /**
* Desktop navigation - right top bar * Desktop navigation - right top bar

File diff suppressed because it is too large Load Diff

View File

@ -25,43 +25,44 @@
], ],
"dependencies": { "dependencies": {
"foundation-sites": "6.5.1", "foundation-sites": "6.5.1",
"jquery": "~3.0.0", "jquery": "^3.6.0",
"motion-ui": "^2.0.3", "motion-ui": "^2.0.3",
"what-input": "^4.1.3" "what-input": "^4.1.3"
}, },
"devDependencies": { "devDependencies": {
"ansi-colors": "^1.0.1", "@fortawesome/fontawesome-free": "^5.15.3",
"ansi-colors": "^1.1.0",
"babel-core": "^6.26.3", "babel-core": "^6.26.3",
"babel-loader": "^7.1.2", "babel-loader": "^7.1.5",
"babel-preset-es2015": "^6.3.13", "babel-preset-es2015": "^6.3.13",
"babel-register": "^6.7.2", "babel-register": "^6.7.2",
"browser-sync": "^2.26.3", "browser-sync": "^2.26.14",
"dateformat": "^3.0.2", "dateformat": "^3.0.3",
"fancy-log": "^1.3.2", "fancy-log": "^1.3.3",
"gulp": "^4.0", "gulp": "^4.0.2",
"gulp-autoprefixer": "^3.1.0", "gulp-autoprefixer": "^7.0.1",
"gulp-babel": "^6.1.2", "gulp-babel": "^6.1.3",
"gulp-clean-css": "^4.0.0", "gulp-clean-css": "^4.3.0",
"gulp-cli": "^2.0.1", "gulp-cli": "^2.3.0",
"gulp-concat": "^2.5.2", "gulp-concat": "^2.5.2",
"gulp-extname": "^0.2.0", "gulp-extname": "^0.2.0",
"gulp-if": "^2.0.0", "gulp-if": "^2.0.0",
"gulp-imagemin": "^5.0.3", "gulp-imagemin": "^5.0.3",
"gulp-load-plugins": "^1.1.0", "gulp-load-plugins": "^2.0.6",
"gulp-phpcbf": "^0.1.2", "gulp-phpcbf": "^0.1.2",
"gulp-phpcs": "^2.1.0", "gulp-phpcs": "^3.1.0",
"gulp-rev": "^8.0.0", "gulp-rev": "^8.1.1",
"gulp-sass": "^3.1.0", "gulp-sass": "^4.1.0",
"gulp-sourcemaps": "^1.6.0", "gulp-sourcemaps": "^1.12.1",
"gulp-uglify": "^1.2.0", "gulp-uglify": "^3.0.2",
"gulp-zip": "^4.0.0", "gulp-zip": "^4.2.0",
"js-yaml": "^3.13.0", "js-yaml": "^3.14.1",
"panini": "^1.6.3", "panini": "^1.7.1",
"rimraf": "^2.4.3", "rimraf": "^2.7.1",
"style-sherpa": "^1.0.0", "style-sherpa": "^1.0.0",
"vinyl-named": "^1.1.0", "vinyl-named": "^1.1.0",
"webpack": "^3.10.0", "webpack": "^5.26.3",
"webpack-stream": "^4.0.0", "webpack-stream": "^6.1.2",
"yargs": "^3.8.0" "yargs": "^3.8.0"
}, },
"repository": { "repository": {

View File

@ -84,6 +84,7 @@
@import "components/formstype"; @import "components/formstype";
@import "components/gallery"; @import "components/gallery";
@import "components/links"; @import "components/links";
@import "components/tags";
@import "components/wpcf7"; // contact form 7 overrides @import "components/wpcf7"; // contact form 7 overrides
// Templates // Templates
@ -92,7 +93,16 @@
@import "templates/bfrtemplates"; @import "templates/bfrtemplates";
// Vendors // Vendors
@import "vendors/fontawesome/fontawesome.css"; //old fontawesome
@import "vendors/fontawesome/solid.css"; //@import "vendors/fontawesome/fontawesome.css";
@import "vendors/fontawesome/brands.css"; //@import "vendors/fontawesome/solid.css";
@import "vendors/fontawesome/regular.css"; //@import "vendors/fontawesome/brands.css";
//@import "vendors/fontawesome/regular.css";
//
// fontawesome as shown here:
// https://stackoverflow.com/questions/49195144/add-font-awesome-to-gulp-project-correctly#51491927
@import "../../../node_modules/@fortawesome/fontawesome-free/scss/fontawesome";
@import "../../../node_modules/@fortawesome/fontawesome-free/scss/brands";
@import "../../../node_modules/@fortawesome/fontawesome-free/scss/regular";
@import "../../../node_modules/@fortawesome/fontawesome-free/scss/solid";
@import "../../../node_modules/@fortawesome/fontawesome-free/scss/v4-shims";

View File

@ -0,0 +1,15 @@
.bfr_category_tags {
.tag-cloud-link::before {
content: '#';
display: inline-block;
}
a{
padding:0;
margin:0 0.5rem;
&:hover {
color:$primary-color;
background-color:$secondary-color;
}
}
}

View File

@ -17,6 +17,18 @@
height: 10rem; height: 10rem;
background-image: url('../images/biofriction-logo-moving-trans-loosy-100.gif'); background-image: url('../images/biofriction-logo-moving-trans-loosy-100.gif');
} }
.bfr_category_tags {
min-height: $global-margin * 6.5;
margin-bottom: -($global-margin * 6.5);
padding-top: $global-padding;
display:flex;
justify-content:center;
a {
display:inline-block;
margin-bottom: auto;
}
}
} }
} }
} }

View File

@ -15,6 +15,51 @@
} }
// Site top-navigation // Site top-navigation
.site-center-top-nav{
font-family: $header-font-family;
.menu-item {
&:hover {
background-color: scale-color($secondary-color, $lightness: +20%)
}
border-radius: $button-radius;
}
.dropdown.menu > {
li {
margin: 0 $global-margin/2;
border-width: $global-padding/6;
border-style: solid;
border-color: $primary-color;
&.current-menu-item {
background: $primary-color;
a {
color: $secondary-color;
}
&:hover {
background: $secondary-color;
a {
color:$primary-color;
}
}
}
a {
padding: $global-padding*0.7 $global-padding*1 ;
color:$primary-color;
}
}
li.current-menu-item.is-active > a {
// color:$secondary-color;
}
li.is-dropdown-submenu-parent > a::after {
border-color: $primary-color transparent transparent;
}
}
.submenu {
background:none;
li {
background-color: $body-background;
}
}
}
.site-top-widgets{ .site-top-widgets{
font-family: $header-font-family; font-family: $header-font-family;
.menu-item { .menu-item {
@ -31,7 +76,11 @@
&:hover { &:hover {
background: $secondary-color; background: $secondary-color;
} }
// &.is-active, &.is-active {
a {
color:$secondary-color;
}
}
&.current-menu-item { &.current-menu-item {
border-color: $primary-color; border-color: $primary-color;
background: $primary-color; background: $primary-color;
@ -48,6 +97,12 @@
} }
} }
} }
.submenu {
background:none;
li {
background-color: $body-background;
}
}
} }
.site-top-nav{ .site-top-nav{
font-family: $header-font-family; font-family: $header-font-family;
@ -76,11 +131,12 @@
nav.post-nav{ nav.post-nav{
.button{ .button{
position: fixed; position: fixed;
top:40%;
background-color: $primary-color; background-color: $primary-color;
border: none; border: none;
padding: 0; padding: 0;
margin: 0; margin: 0;
@include breakpoint(small) {top: 70vh;}
@include breakpoint(medium) {top: 40vh;}
a { a {
color: $secondary-color; color: $secondary-color;
font-size: 0px; font-size: 0px;
@ -91,10 +147,10 @@ nav.post-nav{
a::after { a::after {
display: inline-block; display: inline-block;
content: ''; content: '';
font-size: 2rem; font-size: 3.8rem;
line-height: 1.4rem;//half or font size line-height: 2.5rem;
height: $global-padding; height: $global-padding *2.5;
width: $global-padding * 1.5; width: $global-padding * 2.5;
} }
} }
.post-previous{ .post-previous{

View File

@ -91,14 +91,26 @@ $grid-column-width:$grid-row-width/$grid-column-count;
width: 100%; width: 100%;
} }
.bfr_post_thumbnail { .bfr_post_thumbnail {
float: right; @include breakpoint(small) {
max-width:35%; float: none;
max-width:unset;
border-radius:$button-radius; border-radius:$button-radius;
} }
@include breakpoint(medium) {
float: right;
max-width:35%;
}
}
footer{ footer{
@include breakpoint(small) {
float: none;
max-width: unset;
}
@include breakpoint(medium) {
float: left; float: left;
max-width: 60%; max-width: 60%;
} }
}
.post-excerpt { .post-excerpt {
max-height: 14rem; max-height: 14rem;
overflow: hidden; overflow: hidden;