Skip to content

Commit

Permalink
Merge branch 'staging' into 152-custom-user-roles-ltw
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Darby committed Jul 1, 2020
2 parents bce366e + 443d2f6 commit af3d371
Show file tree
Hide file tree
Showing 10 changed files with 116 additions and 6 deletions.
3 changes: 2 additions & 1 deletion wp-content/themes/currentorg/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ module.exports = function(grunt) {

var CSS_LESS_FILES = {
'css/wpbdp.css': 'less/wpbdp.less',
'css/current-ltw-projects.css': 'less/current-ltw-projects.less'
'css/current-ltw-projects.css': 'less/current-ltw-projects.less',
'css/current-ltw-template.css': 'less/current-ltw-template.less'
};

grunt.initConfig({
Expand Down
19 changes: 16 additions & 3 deletions wp-content/themes/currentorg/archive-projects.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,26 @@
* @since 0.1
* @filter largo_partial_by_post_type
*/
get_header();

wp_head();

// enqueue stylesheet for this template
wp_enqueue_style('current-ltw-template-stylesheet');

// dequeue nav script since there is no nav here
wp_dequeue_script('largo-navigation');

$queried_object = get_queried_object();
?>

<div class="clearfix">
<body <?php body_class(); ?>>
<div id="page" class="hfeed clearfix">

<?php

do_action( 'largo_before_header' );
get_template_part( 'partials/largo-header' );
do_action( 'largo_after_header' );

if ( have_posts() || largo_have_featured_posts() ) {

/*
Expand Down

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions wp-content/themes/currentorg/css/current-ltw-template.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function current_ltw_projects_shortcode( $atts = [], $content = null, $tag = '')

// start output
wp_enqueue_style('current-ltw-stylesheet');
wp_enqueue_style('current-ltw-template-stylesheet');
wp_enqueue_script('current-ltw-script');
ob_start();

Expand Down Expand Up @@ -83,6 +84,12 @@ function current_ltw_projects_assets() {
array(),
filemtime( get_stylesheet_directory() . '/css/current-ltw-projects.css' )
);
wp_register_style(
'current-ltw-template-stylesheet',
get_stylesheet_directory_uri() . '/css/current-ltw-template.css',
array(),
filemtime( get_stylesheet_directory() . '/css/current-ltw-template.css' )
);
wp_register_script(
'current-ltw-script',
get_stylesheet_directory_uri() . '/js/current-ltw-projects.js',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,4 +353,4 @@
[class*=project-category] {
background: @white;
}
}
}
15 changes: 15 additions & 0 deletions wp-content/themes/currentorg/less/current-ltw-template.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// styling for LTW page template
.page-template-template-page-ltw,
.post-type-archive-projects {
#site-header {
.header_img {
max-width: 20%;
}
@media (max-width: 768px) {
display: inherit;
.header_img {
max-width: 50%;
}
}
}
}
57 changes: 57 additions & 0 deletions wp-content/themes/currentorg/template-page-ltw.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php
/**
* Template Name: Local That Works Template
* Description: No sidebars, only logo and page content. Does not include global, main and secondary navs.
*/
wp_head();

// enqueue stylesheet for this template
wp_enqueue_style('current-ltw-template-stylesheet');

// dequeue nav script since there is no nav here
wp_dequeue_script('largo-navigation');

$queried_object = get_queried_object();
?>
<body <?php body_class(); ?>>
<div id="page" class="hfeed clearfix">

<?php
do_action( 'largo_before_header' );
get_template_part( 'partials/largo-header' );
do_action( 'largo_after_header' );
?>
<div id="main" class="row-fluid clearfix">
<div id="content" role="main">
<?php
while ( have_posts() ) : the_post();

$shown_ids[] = get_the_ID();

$partial = ( is_page() ) ? 'page' : 'single';

get_template_part( 'partials/content', $partial );

if ( $partial === 'single' ) {

do_action( 'largo_before_post_bottom_widget_area' );

do_action( 'largo_post_bottom_widget_area' );

do_action( 'largo_after_post_bottom_widget_area' );

do_action( 'largo_before_comments' );

comments_template( '', true );

do_action( 'largo_after_comments' );
}

endwhile;
?>
</div>
</div>

<?php
// End of page
get_footer();

0 comments on commit af3d371

Please sign in to comment.