Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Themezee maxwell 2.4.0 #4

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules/
.idea/

.DS_Store
7 changes: 6 additions & 1 deletion assets/css/customizer.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

#customize-control-maxwell_theme_options-blog_description,
#customize-control-maxwell_theme_options-post_layout,
#customize-control-maxwell_theme_options-excerpt_length,
#customize-control-maxwell_theme_options-read_more_text,
#customize-control-maxwell_theme_options-blog_excerpt_settings_title,
#customize-control-maxwell_theme_options-blog_magazine_widgets_title,
#customize-control-maxwell_theme_options-single_post_headline,
#customize-control-maxwell_theme_options-featured_images,
Expand All @@ -31,8 +31,13 @@
margin-top: 16px;
}

#customize-control-maxwell_theme_options-excerpt_length {
margin-top: 0;
}

#customize-control-maxwell_theme_options-retina_logo_title,
#customize-control-maxwell_theme_options-postmeta_headline,
#customize-control-maxwell_theme_options-blog_excerpt_settings_title,
#customize-control-maxwell_theme_options-blog_magazine_widgets_title,
#customize-control-maxwell_theme_options-single_post_headline,
#customize-control-maxwell_theme_options-featured_images,
Expand Down
2 changes: 1 addition & 1 deletion assets/css/editor-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ body {
color: #303030;
font-size: 18px;
font-size: 1.125rem;
font-family: 'Titillium Web', Tahoma, Arial;
font-family: 'Roboto', Tahoma, Arial;
line-height: 1.75;
}

Expand Down
18 changes: 9 additions & 9 deletions assets/css/editor-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
--footer-text-color: #303030;
--footer-text-hover-color: rgba(0, 0, 0, 0.5);
--footer-border-color: rgba(0, 0, 0, 0.15);
--text-font: "Titillium Web", arial, helvetica, sans-serif;
--title-font: "Amaranth", arial, helvetica, sans-serif;
--navi-font: "Titillium Web", arial, helvetica, sans-serif;
--widget-title-font: "Amaranth", arial, helvetica, sans-serif;
--text-font: "Roboto", arial, helvetica, sans-serif;
--title-font: "Sofia Sans Semi Condensed", arial, helvetica, sans-serif;
--navi-font: "Roboto", arial, helvetica, sans-serif;
--widget-title-font: "Sofia Sans Semi Condensed", arial, helvetica, sans-serif;
--title-font-weight: bold;
--navi-font-weight: normal;
--widget-title-font-weight: bold;
Expand Down Expand Up @@ -105,7 +105,7 @@ body.block-editor-page .editor-post-title__block .editor-post-title__input {
color: var(--title-color);
font-size: 36px;
font-size: 2.25rem;
font-family: Amaranth, arial, helvetica, sans-serif;
font-family: "Sofia Sans Semi Condensed", arial, helvetica, sans-serif;
font-family: var(--title-font);
font-weight: 700;
font-weight: var(--title-font-weight);
Expand Down Expand Up @@ -166,7 +166,7 @@ body.maxwell-page-title-hidden.block-editor-page .edit-post-visual-editor .edit-
color: var(--text-color);
font-size: 17px;
font-size: 1.0625rem;
font-family: "Titillium Web", arial, helvetica, sans-serif;
font-family: "Roboto", arial, helvetica, sans-serif;
font-family: var(--text-font);
line-height: 1.75;
line-height: var(--text-line-height);
Expand Down Expand Up @@ -323,7 +323,7 @@ body.maxwell-page-title-hidden.block-editor-page .edit-post-visual-editor .edit-
display: block;
color: #303030;
color: var(--text-color);
font-family: "Titillium Web", arial, helvetica, sans-serif;
font-family: "Roboto", arial, helvetica, sans-serif;
font-family: var(--text-font);
font-size: 16px;
font-size: 1rem;
Expand Down Expand Up @@ -785,7 +785,7 @@ div.wp-block-columns {
color: var(--widget-title-color);
font-size: 20px;
font-size: 1.25rem;
font-family: Amaranth, arial, helvetica, sans-serif;
font-family: "Sofia Sans Semi Condensed", arial, helvetica, sans-serif;
font-family: var(--widget-title-font);
font-weight: 700;
font-weight: var(--widget-title-font-weight);
Expand Down Expand Up @@ -1079,7 +1079,7 @@ div.wp-block-columns {
color: var(--title-color);
font-size: 24px;
font-size: 1.5rem;
font-family: Amaranth, arial, helvetica, sans-serif;
font-family: "Sofia Sans Semi Condensed", arial, helvetica, sans-serif;
font-family: var(--title-font);
font-weight: 700;
font-weight: var(--title-font-weight);
Expand Down
12 changes: 11 additions & 1 deletion assets/js/customizer-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// Based on https://make.xwp.co/2016/07/24/dependently-contextual-customizer-controls/
wp.customize( 'custom_logo', function( setting ) {
setting.bind( function( value ) {
setting.bind( function( value ) {
if ( '' !== value ) {
// Set retina logo option to false when a new logo image is uploaded.
wp.customize.instance( 'maxwell_theme_options[retina_logo]' ).set( false );
Expand All @@ -33,4 +33,14 @@
wp.customize.control( 'maxwell_theme_options[retina_logo]', setupControl );
} );

// Excerpt Settings
wp.customize( 'maxwell_theme_options[excerpt_use_more_tag]', function( value ) {
const excerptUseMoreTagCallback = function( newVal ) {
const excerptLengthControls = $('#customize-control-maxwell_theme_options-excerpt_length');
true === newVal ? excerptLengthControls.hide() : excerptLengthControls.show();
}
excerptUseMoreTagCallback(value.get());
value.bind( excerptUseMoreTagCallback );
});

})( this.wp, jQuery );
6 changes: 3 additions & 3 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ function maxwell_theme_fonts() {
*/
function maxwell_get_fonts_url() {
$font_families = array(
'Titillium Web:400,400italic,700,700italic',
'Amaranth:400,400italic,700,700italic',
'Roboto:400,400italic,700,700italic',
'Sofia Sans Semi Condensed:400,400italic,700,700italic',
);

$query_args = array(
'family' => urlencode( implode( '|', $font_families ) ),
'subset' => urlencode( 'latin,latin-ext' ),
'subset' => urlencode( 'latin,cyrillic' ),
'display' => urlencode( 'swap' ),
);

Expand Down
1 change: 1 addition & 0 deletions inc/customizer/default-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function maxwell_default_options() {
'post_layout' => 'one-column',
'read_more_text' => esc_html__( 'Continue reading', 'maxwell' ),
'blog_magazine_widgets' => true,
'excerpt_use_more_tag' => false,
'excerpt_length' => 20,
'meta_date' => true,
'meta_author' => true,
Expand Down
28 changes: 27 additions & 1 deletion inc/customizer/sections/customizer-blog.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function maxwell_customize_register_blog_settings( $wp_customize ) {
$wp_customize->add_setting(
'maxwell_theme_options[post_layout]',
array(
'default' => 'three-columns',
'default' => 'one-column',
'type' => 'option',
'transport' => 'refresh',
'sanitize_callback' => 'maxwell_sanitize_select',
Expand All @@ -113,6 +113,32 @@ function maxwell_customize_register_blog_settings( $wp_customize ) {
)
);

// Add Excerpt Settings Headline.
$wp_customize->add_control( new Maxwell_Customize_Header_Control(
$wp_customize, 'maxwell_theme_options[blog_excerpt_settings_title]', array(
'label' => esc_html__( 'Excerpt Settings', 'maxwell' ),
'section' => 'maxwell_section_blog',
'settings' => array(),
'priority' => 32,
)
) );

// Add Setting and Control for support for More Block.
$wp_customize->add_setting( 'maxwell_theme_options[excerpt_use_more_tag]', array(
'default' => false,
'type' => 'option',
'transport' => 'refresh',
'sanitize_callback' => 'maxwell_sanitize_checkbox',
) );

$wp_customize->add_control( 'maxwell_theme_options[excerpt_use_more_tag]', array(
'label' => esc_html__( 'Excerpt based on More Block', 'maxwell' ),
'section' => 'maxwell_section_blog',
'settings' => 'maxwell_theme_options[excerpt_use_more_tag]',
'type' => 'checkbox',
'priority' => 35,
) );

// Add Excerpt Length setting and control.
$wp_customize->add_setting(
'maxwell_theme_options[excerpt_length]',
Expand Down
2 changes: 1 addition & 1 deletion inc/extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function maxwell_excerpt_length( $length ) {
* @return string
*/
function maxwell_excerpt_more( $more_text ) {
return '';
return ' ...';
}
add_filter( 'excerpt_more', 'maxwell_excerpt_more' );

Expand Down
4 changes: 2 additions & 2 deletions sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ $themeColors: (
);

// Theme Fonts
$baseFont: "Titillium Web", arial, helvetica, sans-serif;
$titleFont: "Amaranth", arial, helvetica, sans-serif;
$baseFont: "Roboto", arial, helvetica, sans-serif;
$titleFont: "Sofia Sans Semi Condensed", arial, helvetica, sans-serif;
$themeFonts: (
--text-font : $baseFont,
--title-font : $titleFont,
Expand Down
30 changes: 15 additions & 15 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@charset "UTF-8";

/*
Theme Name: Maxwell
Theme URI: https://themezee.com/themes/maxwell/
Theme Name: MaxwellFixes
Theme URI: https://github.com/itelmenko/maxwell/tree/master
Author: ThemeZee
Author URI: https://themezee.com
Description: Maxwell is a minimalistic and elegant WordPress theme featuring an ultra clean magazine layout. With a beautiful typography, various post layouts and a gorgeous featured posts slideshow Maxwell truly helps you to stand out.
Description: Maxwell Theme from https://themezee.com/themes/maxwell/ with fixes. Unfortunately, my PR was declined. For example, it has fix for "more" tag. In admin part you can define behaviour of "Excerpt" (Theme Options -> Blog Settings -> Excerpt Settings).
Version: 2.4.0
Requires at least: 5.2
Tested up to: 6.5
Expand Down Expand Up @@ -95,10 +95,10 @@ Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normalize.css/
--footer-text-color: #303030;
--footer-text-hover-color: rgba(0, 0, 0, 0.5);
--footer-border-color: rgba(0, 0, 0, 0.15);
--text-font: "Titillium Web", arial, helvetica, sans-serif;
--title-font: "Amaranth", arial, helvetica, sans-serif;
--navi-font: "Titillium Web", arial, helvetica, sans-serif;
--widget-title-font: "Amaranth", arial, helvetica, sans-serif;
--text-font: "Roboto", arial, helvetica, sans-serif;
--title-font: "Sofia Sans Semi Condensed", arial, helvetica, sans-serif;
--navi-font: "Roboto", arial, helvetica, sans-serif;
--widget-title-font: "Sofia Sans Semi Condensed", arial, helvetica, sans-serif;
--title-font-weight: bold;
--navi-font-weight: normal;
--widget-title-font-weight: bold;
Expand Down Expand Up @@ -333,7 +333,7 @@ textarea {
color: var(--text-color);
font-size: 17px;
font-size: 1.0625rem;
font-family: "Titillium Web", arial, helvetica, sans-serif;
font-family: "Roboto", arial, helvetica, sans-serif;
font-family: var(--text-font);
line-height: 1.75;
line-height: var(--text-line-height);
Expand Down Expand Up @@ -847,7 +847,7 @@ textarea {
text-decoration: none;
font-size: 44px;
font-size: 2.75rem;
font-family: Amaranth, arial, helvetica, sans-serif;
font-family: "Sofia Sans Semi Condensed", arial, helvetica, sans-serif;
font-family: var(--title-font);
font-weight: 700;
font-weight: var(--title-font-weight);
Expand Down Expand Up @@ -942,7 +942,7 @@ textarea {
list-style: none;
font-size: 17px;
font-size: 1.0625rem;
font-family: "Titillium Web", arial, helvetica, sans-serif;
font-family: "Roboto", arial, helvetica, sans-serif;
font-family: var(--navi-font);
font-weight: 400;
font-weight: var(--navi-font-weight);
Expand Down Expand Up @@ -1034,7 +1034,7 @@ textarea {
text-decoration: none;
font-size: 17px;
font-size: 1.0625rem;
font-family: "Titillium Web", arial, helvetica, sans-serif;
font-family: "Roboto", arial, helvetica, sans-serif;
font-family: var(--navi-font);
font-weight: 400;
font-weight: var(--navi-font-weight);
Expand Down Expand Up @@ -1160,7 +1160,7 @@ textarea {
word-wrap: break-word;
font-size: 36px;
font-size: 2.25rem;
font-family: Amaranth, arial, helvetica, sans-serif;
font-family: "Sofia Sans Semi Condensed", arial, helvetica, sans-serif;
font-family: var(--title-font);
font-weight: 700;
font-weight: var(--title-font-weight);
Expand Down Expand Up @@ -1453,7 +1453,7 @@ body.date-hidden.author-hidden .content-area .widget-magazine-posts .type-post .
word-wrap: break-word;
font-size: 20px;
font-size: 1.25rem;
font-family: Amaranth, arial, helvetica, sans-serif;
font-family: "Sofia Sans Semi Condensed", arial, helvetica, sans-serif;
font-family: var(--widget-title-font);
font-weight: 700;
font-weight: var(--widget-title-font-weight);
Expand Down Expand Up @@ -2099,7 +2099,7 @@ div.wp-block-columns {
color: var(--widget-title-color);
font-size: 20px;
font-size: 1.25rem;
font-family: Amaranth, arial, helvetica, sans-serif;
font-family: "Sofia Sans Semi Condensed", arial, helvetica, sans-serif;
font-family: var(--widget-title-font);
font-weight: 700;
font-weight: var(--widget-title-font-weight);
Expand Down Expand Up @@ -2266,7 +2266,7 @@ div.wp-block-columns {
word-wrap: break-word;
font-size: 20px;
font-size: 1.25rem;
font-family: Amaranth, arial, helvetica, sans-serif;
font-family: "Sofia Sans Semi Condensed", arial, helvetica, sans-serif;
font-family: var(--widget-title-font);
font-weight: 700;
font-weight: var(--widget-title-font-weight);
Expand Down
10 changes: 8 additions & 2 deletions template-parts/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@
</header><!-- .entry-header -->

<div class="entry-content entry-excerpt clearfix">
<?php the_excerpt(); ?>
<?php maxwell_more_link(); ?>
<?php
if ( maxwell_get_option( 'excerpt_use_more_tag' ) ) {
the_content(maxwell_get_option( 'read_more_text' ));
} else {
the_excerpt();
maxwell_more_link();
}
?>
</div><!-- .entry-content -->

</article>
Expand Down