Skip to content

Commit

Permalink
Centered posts. Hid author.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jttpo2 committed Apr 27, 2017
1 parent 9bf5e17 commit 69f5586
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 161 deletions.
130 changes: 0 additions & 130 deletions content.php

This file was deleted.

43 changes: 35 additions & 8 deletions functions.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,45 @@
<?php
// Enqueue child theme css
function my_theme_enqueue_styles() {

$parent_style = 'shapely-style';
$parent_style = 'shapely-style';

wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css');
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css');
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );

// No admin bar on top
show_admin_bar( false );

?>
/**
* Removed author tag from posts
* Prints HTML with meta information for the current post-date/time and author.
*/
function shapely_posted_on_no_cat() {
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
}

$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
); ?>

<ul class="post-meta">
<li><span class="posted-on"><?php echo $time_string; ?></span></li>
<!-- <li><span><?php echo esc_html__( 'by', 'shapely' ); ?> <a
href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>"
title="<?php echo esc_attr( get_the_author() ); ?>"><?php esc_html( the_author() ); ?></a></span>
</li> -->
</ul><?php
}

?>
7 changes: 3 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ gulp.task('changed', function() {
});

gulp.task('sass', function () {
console.log("Sass change");
gulp.src('./sass/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('.'));
gulp.src('./sass/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('.'));
});
49 changes: 30 additions & 19 deletions sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,25 @@
display: none;
}

.module-group {
display: block;
.module-group {
display: block;

.module.right {
float: none;
width: 95%;
margin: auto;
}
.module.right {
float: none;
width: 95%;
margin: auto;
}

.module {
display: block;
}
}
.module {
display: block;
}
}


.module-group.right {
float: none;
width: 50%;
margin: auto;
float: none;
width: 50%;
margin: auto;
}
}

Expand All @@ -79,9 +79,20 @@
}
}

/* Center blog posts and other content - not working */
@media (min-width: 992px) {
.col-md-12 {
float: right;
// Posts
.entry-header {
.shapely-category {
// Hide category
display: none;
}
}
.post-meta-author {
display: none;
}

/* Center blog posts and other content */
#main {
.col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9 {
float: none;
}
}
}

0 comments on commit 69f5586

Please sign in to comment.