Skip to content

Commit

Permalink
Add home.php and improve some strings
Browse files Browse the repository at this point in the history
  • Loading branch information
daviedR committed Aug 8, 2018
1 parent 745d477 commit ebf4f0e
Show file tree
Hide file tree
Showing 20 changed files with 211 additions and 185 deletions.
18 changes: 11 additions & 7 deletions assets/css/main-rtl.css
Expand Up @@ -163,21 +163,21 @@ html, body {
line-height: 1.7;
}

.entry-title, h1, .h1, h2, .h2, .wp-block-cover-image .wp-block-cover-image-text,
h1, .h1, h2, .h2, .wp-block-cover-image .wp-block-cover-image-text,
.wp-block-cover-image h2, .page-header .page-title, .suki-header-logo .site-title > a,
.suki-header-mobile-logo .site-title > a, .entry-small-title, .comments-title, .comment-reply-title, h3, .h3, h4, h5, h6, .h4 {
.suki-header-mobile-logo .site-title > a, .comments-title, .comment-reply-title, h3, .h3, h4, h5, h6, .h4 {
color: #333333;
}

.entry-title a, h1 a, .h1 a, h2 a, .h2 a, .wp-block-cover-image .wp-block-cover-image-text a, .wp-block-cover-image h2 a, .page-header .page-title a, .suki-header-logo .site-title > a a, .suki-header-mobile-logo .site-title > a a, .entry-small-title a, .comments-title a, .comment-reply-title a, h3 a, .h3 a, h4 a, h5 a, h6 a, .h4 a {
h1 a, .h1 a, h2 a, .h2 a, .wp-block-cover-image .wp-block-cover-image-text a, .wp-block-cover-image h2 a, .page-header .page-title a, .suki-header-logo .site-title > a a, .suki-header-mobile-logo .site-title > a a, .comments-title a, .comment-reply-title a, h3 a, .h3 a, h4 a, h5 a, h6 a, .h4 a {
color: #333333;
}

.entry-title a:hover, h1 a:hover, .h1 a:hover, .entry-title a:focus, h1 a:focus, .h1 a:focus, h2 a:hover, .h2 a:hover, .wp-block-cover-image .wp-block-cover-image-text a:hover, h2 a:focus, .h2 a:focus, .wp-block-cover-image .wp-block-cover-image-text a:focus, .page-header .page-title a:hover, .suki-header-logo .site-title > a a:hover, .suki-header-mobile-logo .site-title > a a:hover, .entry-small-title a:hover, .comments-title a:hover, .comment-reply-title a:hover, h3 a:hover, .h3 a:hover, .page-header .page-title a:focus, .suki-header-logo .site-title > a a:focus, .suki-header-mobile-logo .site-title > a a:focus, .entry-small-title a:focus, .comments-title a:focus, .comment-reply-title a:focus, h3 a:focus, .h3 a:focus, h4 a:hover, h5 a:hover, h6 a:hover, .h4 a:hover, h4 a:focus, h5 a:focus, h6 a:focus, .h4 a:focus {
h1 a:hover, .h1 a:hover, h1 a:focus, .h1 a:focus, h2 a:hover, .h2 a:hover, .wp-block-cover-image .wp-block-cover-image-text a:hover, h2 a:focus, .h2 a:focus, .wp-block-cover-image .wp-block-cover-image-text a:focus, .page-header .page-title a:hover, .suki-header-logo .site-title > a a:hover, .suki-header-mobile-logo .site-title > a a:hover, .comments-title a:hover, .comment-reply-title a:hover, h3 a:hover, .h3 a:hover, .page-header .page-title a:focus, .suki-header-logo .site-title > a a:focus, .suki-header-mobile-logo .site-title > a a:focus, .comments-title a:focus, .comment-reply-title a:focus, h3 a:focus, .h3 a:focus, h4 a:hover, h5 a:hover, h6 a:hover, .h4 a:hover, h4 a:focus, h5 a:focus, h6 a:focus, .h4 a:focus {
color: #666666;
}

.entry-title, h1, .h1 {
h1, .h1 {
font-size: 32px;
font-weight: 500;
line-height: 1.4;
Expand All @@ -191,7 +191,7 @@ h2, .h2, .wp-block-cover-image .wp-block-cover-image-text,
}

.page-header .page-title, .suki-header-logo .site-title > a,
.suki-header-mobile-logo .site-title > a, .entry-small-title, .comments-title, .comment-reply-title, h3, .h3 {
.suki-header-mobile-logo .site-title > a, .comments-title, .comment-reply-title, h3, .h3 {
font-size: 22px;
font-weight: 500;
line-height: 1.6;
Expand Down Expand Up @@ -2617,6 +2617,10 @@ a.entry-thumbnail:hover, a.entry-thumbnail:focus {
margin-top: 2rem;
}

.entry-content h1:first-child, .entry-content h2:first-child, .entry-content h3:first-child, .entry-content h4:first-child, .entry-content h5:first-child, .entry-content h6:first-child {
margin-top: 0;
}

.entry-content blockquote {
padding: 0.5em 2em;
border-right-width: 0.25em;
Expand All @@ -2634,7 +2638,7 @@ a.entry-thumbnail:hover, a.entry-thumbnail:focus {
}

.entry-excerpt {
margin: 0 0 0.75em;
margin: 0 0 1.25em;
}

.entry-excerpt p {
Expand Down
18 changes: 11 additions & 7 deletions assets/css/main.css
Expand Up @@ -163,21 +163,21 @@ html, body {
line-height: 1.7;
}

.entry-title, h1, .h1, h2, .h2, .wp-block-cover-image .wp-block-cover-image-text,
h1, .h1, h2, .h2, .wp-block-cover-image .wp-block-cover-image-text,
.wp-block-cover-image h2, .page-header .page-title, .suki-header-logo .site-title > a,
.suki-header-mobile-logo .site-title > a, .entry-small-title, .comments-title, .comment-reply-title, h3, .h3, h4, h5, h6, .h4 {
.suki-header-mobile-logo .site-title > a, .comments-title, .comment-reply-title, h3, .h3, h4, h5, h6, .h4 {
color: #333333;
}

.entry-title a, h1 a, .h1 a, h2 a, .h2 a, .wp-block-cover-image .wp-block-cover-image-text a, .wp-block-cover-image h2 a, .page-header .page-title a, .suki-header-logo .site-title > a a, .suki-header-mobile-logo .site-title > a a, .entry-small-title a, .comments-title a, .comment-reply-title a, h3 a, .h3 a, h4 a, h5 a, h6 a, .h4 a {
h1 a, .h1 a, h2 a, .h2 a, .wp-block-cover-image .wp-block-cover-image-text a, .wp-block-cover-image h2 a, .page-header .page-title a, .suki-header-logo .site-title > a a, .suki-header-mobile-logo .site-title > a a, .comments-title a, .comment-reply-title a, h3 a, .h3 a, h4 a, h5 a, h6 a, .h4 a {
color: #333333;
}

.entry-title a:hover, h1 a:hover, .h1 a:hover, .entry-title a:focus, h1 a:focus, .h1 a:focus, h2 a:hover, .h2 a:hover, .wp-block-cover-image .wp-block-cover-image-text a:hover, h2 a:focus, .h2 a:focus, .wp-block-cover-image .wp-block-cover-image-text a:focus, .page-header .page-title a:hover, .suki-header-logo .site-title > a a:hover, .suki-header-mobile-logo .site-title > a a:hover, .entry-small-title a:hover, .comments-title a:hover, .comment-reply-title a:hover, h3 a:hover, .h3 a:hover, .page-header .page-title a:focus, .suki-header-logo .site-title > a a:focus, .suki-header-mobile-logo .site-title > a a:focus, .entry-small-title a:focus, .comments-title a:focus, .comment-reply-title a:focus, h3 a:focus, .h3 a:focus, h4 a:hover, h5 a:hover, h6 a:hover, .h4 a:hover, h4 a:focus, h5 a:focus, h6 a:focus, .h4 a:focus {
h1 a:hover, .h1 a:hover, h1 a:focus, .h1 a:focus, h2 a:hover, .h2 a:hover, .wp-block-cover-image .wp-block-cover-image-text a:hover, h2 a:focus, .h2 a:focus, .wp-block-cover-image .wp-block-cover-image-text a:focus, .page-header .page-title a:hover, .suki-header-logo .site-title > a a:hover, .suki-header-mobile-logo .site-title > a a:hover, .comments-title a:hover, .comment-reply-title a:hover, h3 a:hover, .h3 a:hover, .page-header .page-title a:focus, .suki-header-logo .site-title > a a:focus, .suki-header-mobile-logo .site-title > a a:focus, .comments-title a:focus, .comment-reply-title a:focus, h3 a:focus, .h3 a:focus, h4 a:hover, h5 a:hover, h6 a:hover, .h4 a:hover, h4 a:focus, h5 a:focus, h6 a:focus, .h4 a:focus {
color: #666666;
}

.entry-title, h1, .h1 {
h1, .h1 {
font-size: 32px;
font-weight: 500;
line-height: 1.4;
Expand All @@ -191,7 +191,7 @@ h2, .h2, .wp-block-cover-image .wp-block-cover-image-text,
}

.page-header .page-title, .suki-header-logo .site-title > a,
.suki-header-mobile-logo .site-title > a, .entry-small-title, .comments-title, .comment-reply-title, h3, .h3 {
.suki-header-mobile-logo .site-title > a, .comments-title, .comment-reply-title, h3, .h3 {
font-size: 22px;
font-weight: 500;
line-height: 1.6;
Expand Down Expand Up @@ -2617,6 +2617,10 @@ a.entry-thumbnail:hover, a.entry-thumbnail:focus {
margin-top: 2rem;
}

.entry-content h1:first-child, .entry-content h2:first-child, .entry-content h3:first-child, .entry-content h4:first-child, .entry-content h5:first-child, .entry-content h6:first-child {
margin-top: 0;
}

.entry-content blockquote {
padding: 0.5em 2em;
border-left-width: 0.25em;
Expand All @@ -2634,7 +2638,7 @@ a.entry-thumbnail:hover, a.entry-thumbnail:focus {
}

.entry-excerpt {
margin: 0 0 0.75em;
margin: 0 0 1.25em;
}

.entry-excerpt p {
Expand Down
2 changes: 1 addition & 1 deletion assets/css/main.min-rtl.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/main.min.css

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions assets/scss/_entry.scss
Expand Up @@ -92,12 +92,10 @@

// Title
.entry-title {
@extend %title; // default
margin: 0 0 0.5rem;
}

.entry-small-title {
@extend %small-title; // default
margin: 0 0 0.25rem;
}

Expand Down Expand Up @@ -158,6 +156,10 @@ a.entry-thumbnail {

h1, h2, h3, h4, h5, h6 {
margin-top: 2rem;

&:first-child {
margin-top: 0;
}
}

blockquote {
Expand All @@ -177,7 +179,7 @@ a.entry-thumbnail {

// Excerpt
.entry-excerpt {
margin: 0 0 0.75em;
margin: 0 0 1.25em;

p {
margin: 0;
Expand Down
8 changes: 2 additions & 6 deletions functions.php
Expand Up @@ -16,11 +16,7 @@
* ====================================================
*/

define( 'SUKI_INCLUDES_PATH', get_template_directory() . '/inc' );

define( 'SUKI_PLUGINS_PATH', get_template_directory() . '/plugins' );

define( 'SUKI_PLUGINS_URL', get_template_directory_uri() . '/plugins' );
define( 'SUKI_INCLUDES_DIR', get_template_directory() . '/inc' );

define( 'SUKI_IMAGES_URL', get_template_directory_uri() . '/assets/images' );

Expand All @@ -40,4 +36,4 @@
* ====================================================
*/

require_once( SUKI_INCLUDES_PATH . '/class-suki.php' );
require_once( SUKI_INCLUDES_DIR . '/class-suki.php' );
5 changes: 3 additions & 2 deletions gulpfile.js
Expand Up @@ -4,6 +4,8 @@
* Define configurations
*/

const info = require( './package.json' );

const config = {
src: {
scss: [ './assets/scss/**/*.scss' ],
Expand Down Expand Up @@ -37,10 +39,9 @@ const config = {
scss: './assets/scss',
css: './assets/css',
js: './assets/js',
webfonts: './assets/webfonts',
icons: './assets/icons',
pot: './languages',
build: './__build/suki',
build: './__build/' + info.name,
zip: './__build/zip',
},
};
Expand Down
11 changes: 11 additions & 0 deletions home.php
@@ -0,0 +1,11 @@
<?php
/**
* The template for displaying blog posts (home) page.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Suki
*/

// Use same template as archive.php
get_template_part( 'archive' );
6 changes: 3 additions & 3 deletions inc/admin/class-suki-admin.php
Expand Up @@ -76,8 +76,8 @@ private function _includes() {

// Only include metabox on post add/edit page and term add/edit page.
if ( in_array( $pagenow, array( 'post.php', 'post-new.php', 'edit-tags.php', 'term.php' ) ) ) {
require_once( SUKI_INCLUDES_PATH . '/admin/class-suki-admin-fields.php' );
require_once( SUKI_INCLUDES_PATH . '/admin/class-suki-admin-metabox-page-settings.php' );
require_once( SUKI_INCLUDES_DIR . '/admin/class-suki-admin-fields.php' );
require_once( SUKI_INCLUDES_DIR . '/admin/class-suki-admin-metabox-page-settings.php' );
}
}

Expand All @@ -88,7 +88,7 @@ private function _includes() {
*/

/**
* Add admin submenu page: Suki > About.
* Add admin submenu page: Appearance > Suki.
*/
public function register_admin_menu() {
add_theme_page(
Expand Down
18 changes: 8 additions & 10 deletions inc/class-suki.php
@@ -1,8 +1,6 @@
<?php
/**
* Contains methods for customizing the theme customization screen.
*
* @link http://codex.wordpress.org/Theme_Customization_API
* Suki theme class.
*/

// Prevent direct access.
Expand Down Expand Up @@ -68,20 +66,20 @@ protected function __construct() {
*/
private function _includes() {
// Helper functions
require_once( SUKI_INCLUDES_PATH . '/helpers.php' );
require_once( SUKI_INCLUDES_DIR . '/helpers.php' );

// Customizer functions
require_once( SUKI_INCLUDES_PATH . '/customizer/class-suki-customizer.php' );
require_once( SUKI_INCLUDES_DIR . '/customizer/class-suki-customizer.php' );

// Template functions & hooks
require_once( SUKI_INCLUDES_PATH . '/template-tags.php' );
require_once( SUKI_INCLUDES_PATH . '/template-functions.php' );
require_once( SUKI_INCLUDES_DIR . '/template-tags.php' );
require_once( SUKI_INCLUDES_DIR . '/template-functions.php' );

// Plugins compatibility functions
foreach ( $this->get_compatible_plugins() as $plugin_slug => $plugin_class ) {
// Only include plugin's compatibility class if the plugin is active.
if ( class_exists( $plugin_class ) ) {
$compatibility_file = SUKI_INCLUDES_PATH . '/compatibilities/' . $plugin_slug . '/class-suki-compatibility-' . $plugin_slug . '.php';
$compatibility_file = SUKI_INCLUDES_DIR . '/compatibilities/' . $plugin_slug . '/class-suki-compatibility-' . $plugin_slug . '.php';

if ( file_exists( $compatibility_file ) ) {
require_once( $compatibility_file );
Expand All @@ -91,7 +89,7 @@ private function _includes() {

// Admin page functions
if ( is_admin() ) {
require_once( SUKI_INCLUDES_PATH . '/admin/class-suki-admin.php' );
require_once( SUKI_INCLUDES_DIR . '/admin/class-suki-admin.php' );
}
}

Expand Down Expand Up @@ -232,7 +230,7 @@ public function add_theme_supports() {
*/
public function register_widgets() {
// Include custom widgets.
require_once( SUKI_INCLUDES_PATH . '/widgets/class-suki-widget-posts.php' );
require_once( SUKI_INCLUDES_DIR . '/widgets/class-suki-widget-posts.php' );

// Register widgets.
register_widget( 'Suki_Widget_Posts' );
Expand Down
Expand Up @@ -101,15 +101,15 @@ public function register_sidebars() {
public function register_customizer_settings( $wp_customize ) {
$defaults = Suki_Customizer::instance()->get_setting_defaults();

require_once( SUKI_INCLUDES_PATH . '/compatibilities/woocommerce/customizer/options/_sections.php' );
require_once( SUKI_INCLUDES_PATH . '/compatibilities/woocommerce/customizer/options/header.php' );
require_once( SUKI_INCLUDES_PATH . '/compatibilities/woocommerce/customizer/options/woocommerce--store-notice.php' );
require_once( SUKI_INCLUDES_PATH . '/compatibilities/woocommerce/customizer/options/woocommerce--product-catalog.php' );
require_once( SUKI_INCLUDES_PATH . '/compatibilities/woocommerce/customizer/options/woocommerce--product-single.php' );
require_once( SUKI_INCLUDES_PATH . '/compatibilities/woocommerce/customizer/options/woocommerce--cart.php' );
require_once( SUKI_INCLUDES_PATH . '/compatibilities/woocommerce/customizer/options/woocommerce--checkout.php' );
require_once( SUKI_INCLUDES_PATH . '/compatibilities/woocommerce/customizer/options/woocommerce--products-grid.php' );
require_once( SUKI_INCLUDES_PATH . '/compatibilities/woocommerce/customizer/options/woocommerce--other-elements.php' );
require_once( SUKI_INCLUDES_DIR . '/compatibilities/woocommerce/customizer/options/_sections.php' );
require_once( SUKI_INCLUDES_DIR . '/compatibilities/woocommerce/customizer/options/header.php' );
require_once( SUKI_INCLUDES_DIR . '/compatibilities/woocommerce/customizer/options/woocommerce--store-notice.php' );
require_once( SUKI_INCLUDES_DIR . '/compatibilities/woocommerce/customizer/options/woocommerce--product-catalog.php' );
require_once( SUKI_INCLUDES_DIR . '/compatibilities/woocommerce/customizer/options/woocommerce--product-single.php' );
require_once( SUKI_INCLUDES_DIR . '/compatibilities/woocommerce/customizer/options/woocommerce--cart.php' );
require_once( SUKI_INCLUDES_DIR . '/compatibilities/woocommerce/customizer/options/woocommerce--checkout.php' );
require_once( SUKI_INCLUDES_DIR . '/compatibilities/woocommerce/customizer/options/woocommerce--products-grid.php' );
require_once( SUKI_INCLUDES_DIR . '/compatibilities/woocommerce/customizer/options/woocommerce--other-elements.php' );
}

/**
Expand Down Expand Up @@ -147,7 +147,7 @@ public function enqueue_css() {
* @return array
*/
public function add_customizer_setting_defaults( $defaults = array() ) {
include( SUKI_INCLUDES_PATH . '/compatibilities/woocommerce/customizer/defaults.php' );
include( SUKI_INCLUDES_DIR . '/compatibilities/woocommerce/customizer/defaults.php' );

return $defaults;
}
Expand All @@ -159,7 +159,7 @@ public function add_customizer_setting_defaults( $defaults = array() ) {
* @return array
*/
public function add_customizer_setting_postmessages( $postmessages = array() ) {
include( SUKI_INCLUDES_PATH . '/compatibilities/woocommerce/customizer/postmessages.php' );
include( SUKI_INCLUDES_DIR . '/compatibilities/woocommerce/customizer/postmessages.php' );

return $postmessages;
}
Expand Down
4 changes: 2 additions & 2 deletions inc/compatibilities/woocommerce/customizer/postmessages.php
Expand Up @@ -126,7 +126,7 @@

/**
* ====================================================
* General Elements > Form Inputs
* General Elements > Form Input
* ====================================================
*/

Expand Down Expand Up @@ -172,7 +172,7 @@

/**
* ====================================================
* General Elements > Buttons
* General Elements > Button
* ====================================================
*/

Expand Down

0 comments on commit ebf4f0e

Please sign in to comment.