-
Notifications
You must be signed in to change notification settings - Fork 360
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
Try adding "Stewart", a light blogging theme with a sidebar #4369
Merged
Merged
Changes from 48 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
bcc8407
Try "Stewart" theme
kjellr cb819c6
Add screenshot, update color scheme.
kjellr 0e27b1d
Add custom font.
kjellr b8fa980
Round out the templates used.
kjellr 1769c2b
Merge branch 'trunk' into try/add-stewart-theme
kjellr 7d42577
Rearrange stuff.
kjellr 2b9fb32
Change google fonts loading.
kjellr 1260017
Move font family declaration
kjellr 41eb7a1
Correct google fonts loading.
kjellr dc554be
Revise the tagName for the sidebar.
kjellr 8332494
Tidy up some spacing.
kjellr 4172e91
Ensure each template has a main HTML element in it.
kjellr e455537
Merge branch 'trunk' into try/add-stewart-theme
kjellr 7c535f5
Merge branch 'trunk' into try/add-stewart-theme
kjellr cba6b78
Remove blockbase dependency.
kjellr c72e12a
Get stylesheet working.
kjellr 3f7a4f7
Fix menu.
kjellr b1d5dd0
Add missing styles.
kjellr 93a6171
Remove custom variables
kjellr b94cf59
Add archive template, fix footer spacing.
kjellr 110fd86
Add spacing.
kjellr 1d93ca3
Rename folders.
kjellr 7365e90
Remove extra CSS, fix up nav block.
kjellr 9e1ffc1
Add fonts implementation.
kjellr d50beee
Standardize spacing across templates.
kjellr e5eec4a
Fix navigation hover styles.
kjellr 91cde59
Adjust spacing.
kjellr 5753435
Fix tagline spacing.
kjellr 74e8506
Fix color variable for social links.
kjellr d92e28e
Fix up hovers, color presets.
kjellr 55f34d6
Tidy up comment form and buttons
kjellr fcb0bd2
Fix comments
kjellr 5552665
Readjust tagline spacing
kjellr 0dc9865
Increase logo size, readjust tagline.
kjellr 28cf2e3
Tidy up templates, add button hover style.
kjellr 75f49de
Tidy up theme.json
kjellr c54c2a7
Tidy up sidebar spacing
kjellr 4808a04
Cleanup readme
kjellr 78cd676
Fix padding around site tagline.
kjellr 35df5c3
Revise colors.
kjellr 03824d3
Make underlines match screenshot.
kjellr 382e228
Fix 50/50 columns enforcement on small screens.
kjellr 960902f
Update mobile spacer size.
kjellr 9ef0b0d
Remove unnecessary flex-grow property.
kjellr 3fa0b28
Revert the columns CSS for now.
kjellr 880f67d
Remove unnecessary classnames.
kjellr cc93088
Remove unnecessary styles, change hover to opacity instead of a color.
kjellr e464329
Reinstate the hover colors.
kjellr d6e645c
Update description.
kjellr cae0f5f
Update description.
kjellr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?php | ||
|
||
/** | ||
* Sets up theme defaults and registers support for various WordPress features. | ||
*/ | ||
function stewart_support() { | ||
|
||
// Add support for block styles. | ||
add_theme_support( 'wp-block-styles' ); | ||
|
||
// Enqueue editor styles. | ||
add_editor_style( | ||
array( | ||
stewart_fonts_url(), | ||
'style.css', | ||
) | ||
); | ||
} | ||
add_action( 'after_setup_theme', 'stewart_support' ); | ||
|
||
|
||
/** | ||
* Enqueue styles. | ||
*/ | ||
function stewart_styles() { | ||
|
||
// Register theme stylesheet. | ||
wp_register_style( | ||
'stewart-style', | ||
get_stylesheet_directory_uri() . '/style.css', | ||
array(), | ||
wp_get_theme()->get( 'Version' ) | ||
); | ||
|
||
// Enqueue theme stylesheet. | ||
wp_enqueue_style( 'stewart-style' ); | ||
|
||
// Enqueue Google fonts | ||
wp_enqueue_style( 'seedlet-fonts', stewart_fonts_url(), array(), null ); | ||
} | ||
add_action( 'wp_enqueue_scripts', 'stewart_styles' ); | ||
|
||
|
||
/** | ||
* Add Google webfonts, if necessary | ||
* | ||
* - See: http://themeshaper.com/2014/08/13/how-to-add-google-fonts-to-wordpress-themes/ | ||
*/ | ||
function stewart_fonts_url() { | ||
|
||
$fonts_url = ''; | ||
|
||
/* Translators: If there are characters in your language that are not | ||
* supported by Work Sans, translate this to 'off'. Do not translate | ||
* into your own language. | ||
*/ | ||
$work_sans = esc_html_x( 'on', 'Work Sans: on or off', 'stewart' ); | ||
|
||
if ( 'off' !== $work_sans ) { | ||
$font_families = 'Work+Sans:ital,wght@0,400;0,700;1,400;1,700'; | ||
|
||
$query_args = array( | ||
'family' => $font_families, | ||
'subset' => 'latin,latin-ext', | ||
); | ||
|
||
$fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); | ||
} | ||
|
||
return esc_url_raw( $fonts_url ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
// There is nothing output here because block themes do not use php templates. | ||
// There is a core ticket discussing removing this requirement for block themes: | ||
// https://core.trac.wordpress.org/ticket/54272. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- wp:spacer {"height":60} --> | ||
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> | ||
|
||
<!-- wp:group --> | ||
<div class="wp-block-group"> | ||
<!-- wp:paragraph {"align":"center","fontSize":"tiny"} --> | ||
<p class="has-text-align-center has-tiny-font-size">Proudly Powered by <a href="https://wordpress.org" rel="nofollow">WordPress</a></p> | ||
<!-- /wp:paragraph --> | ||
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:spacer {"height":60} --> | ||
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<!-- wp:spacer {"height":70} --> | ||
<div style="height:70px" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!-- wp:group {"align":"full","layout":{"type":"flex","justifyContent":"space-between"},"style":{"spacing":{"padding":{"top":"var(--wp--custom--margin--horizontal, 30px)","bottom":"40px"}}}} --> | ||
<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--margin--horizontal, 30px);padding-bottom:40px"> | ||
<!-- wp:site-title /--> | ||
<!-- wp:navigation {"isResponsive":true,"__unstableLocation":"primary"} /--> | ||
</div> | ||
<!-- /wp:group --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!-- wp:group --> | ||
<div class="wp-block-group"><!-- wp:site-logo {"width":90,"className":"is-style-rounded"} /--> | ||
|
||
<!-- wp:site-title {"fontSize":"gigantic","style":{"typography":{"lineHeight":"1.2"}}} /--> | ||
|
||
<!-- wp:site-tagline {"fontSize":"small"} /--> | ||
|
||
<!-- wp:separator {"className":"is-style-wide"} --> | ||
<hr class="wp-block-separator is-style-wide"/> | ||
<!-- /wp:separator --> | ||
|
||
<!-- wp:spacer {"height":1} --> | ||
<div style="height:1px" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> | ||
|
||
<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left","orientation":"vertical"},"style":{"spacing":{"blockGap":"0px"}}} --> | ||
<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /--> | ||
<!-- /wp:navigation --> | ||
|
||
<!-- wp:separator {"className":"is-style-wide"} --> | ||
<hr class="wp-block-separator is-style-wide"/> | ||
<!-- /wp:separator --> | ||
|
||
<!-- wp:social-links {"iconColor":"foreground","iconColorValue":"var(--wp--preset--color--foreground)","className":"items-justified-left is-style-logos-only"} --> | ||
<ul class="wp-block-social-links has-icon-color items-justified-left is-style-logos-only"><!-- wp:social-link {"url":"#","service":"twitter"} /--> | ||
|
||
<!-- wp:social-link {"url":"#","service":"facebook"} /--> | ||
|
||
<!-- wp:social-link {"url":"#","service":"instagram"} /--></ul> | ||
<!-- /wp:social-links --></div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:spacer {"height":80} --> | ||
<div style="height:80px" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
=== Stewart === | ||
Contributors: automattic | ||
Requires at least: 5.8 | ||
Tested up to: 5.9 | ||
Requires PHP: 5.6 | ||
Stable tag: 1.0 | ||
License: GPLv2 or later | ||
License URI: http://www.gnu.org/licenses/gpl-2.0.html | ||
|
||
== Description == | ||
|
||
A simple theme for blogging. | ||
|
||
== Changelog == | ||
|
||
= 1.0 = | ||
* Released: December | ||
|
||
== Copyright == | ||
|
||
Stewart WordPress Theme, (C) 2021 Automattic, Inc. | ||
Stewart is distributed under the terms of the GNU GPL. | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 2 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
This theme uses the following third-party resource in its theme screenshot: | ||
|
||
"Swedish Windows / Fönster no. 1" by Fons Heijnsbroek | ||
https://www.flickr.com/photos/abstract-art-fons/28822761186/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
/* | ||
Theme Name: Stewart | ||
Theme URI: https://github.com/Automattic/themes/tree/trunk/stewart | ||
Author: Automattic | ||
Author URI: https://automattic.com/ | ||
Description: A simple theme for blogging. | ||
Requires at least: 5.7 | ||
Tested up to: 5.9 | ||
Requires PHP: 5.7 | ||
Version: 1.0 | ||
License: GNU General Public License v2 or later | ||
License URI: http://www.gnu.org/licenses/gpl-2.0.html | ||
Text Domain: stewart | ||
Tags: block-styles, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, rtl-language-support, theme-options, threaded-comments, translation-ready, wide-blocks | ||
|
||
Stewart WordPress Theme, (C) 2021 Automattic, Inc. | ||
Stewart is distributed under the terms of the GNU GPL. | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 2 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
This theme uses the following third-party resource in its theme screenshot: | ||
|
||
"Swedish Windows / Fönster no. 1" by Fons Heijnsbroek | ||
https://www.flickr.com/photos/abstract-art-fons/28822761186/ | ||
|
||
*/ | ||
|
||
/* | ||
* Font smoothing. | ||
* This is a niche setting that will not be available via Global Styles. | ||
* https://github.com/WordPress/gutenberg/issues/35934 | ||
*/ | ||
|
||
body { | ||
-moz-osx-font-smoothing: grayscale; | ||
-webkit-font-smoothing: antialiased; | ||
} | ||
|
||
/* | ||
* Link Details | ||
*/ | ||
|
||
a { | ||
text-decoration-thickness: 0.075ex; | ||
text-underline-offset: 0.125em; | ||
} | ||
|
||
.wp-block-site-title a { | ||
text-decoration: none; | ||
} | ||
|
||
a:hover, | ||
.wp-block-site-title a:hover, | ||
.wp-block-post-title a:hover, | ||
.wp-block-post-date a:hover { | ||
color: var(--wp--preset--color--primary); | ||
} | ||
|
||
.wp-block-navigation .wp-block-navigation-link a, | ||
.wp-block-navigation .wp-block-page-list a, | ||
.wp-block-navigation .wp-block-pages-list__item a, | ||
.wp-block-navigation .wp-block-post-title a { | ||
text-decoration: underline; | ||
} | ||
|
||
.wp-block-navigation .wp-block-navigation-link a:hover, | ||
.wp-block-navigation .wp-block-page-list a:hover, | ||
.wp-block-navigation .wp-block-pages-list__item a:hover, | ||
.wp-block-navigation .wp-block-post-title a:hover { | ||
color: var(--wp--preset--color--primary); | ||
text-decoration: none; | ||
} | ||
|
||
/* | ||
* Button hover styles. | ||
* Necessary until the following issue is resolved in Gutenberg: | ||
* https://github.com/WordPress/gutenberg/issues/27075 | ||
*/ | ||
|
||
.wp-block-search__button:hover, | ||
.wp-block-file .wp-block-file__button:hover, | ||
.wp-block-button__link:hover { | ||
opacity: 0.90; | ||
} | ||
|
||
/* | ||
* Search and File Block button styles. | ||
* Necessary until the following issues are resolved in Gutenberg: | ||
* https://github.com/WordPress/gutenberg/issues/36444 | ||
* https://github.com/WordPress/gutenberg/issues/27760 | ||
*/ | ||
|
||
.wp-block-search__button, | ||
.wp-block-file .wp-block-file__button { | ||
background-color: var(--wp--preset--color--primary); | ||
border-radius: 0; | ||
border: none; | ||
color: var(--wp--preset--color--background); | ||
font-size: var(--wp--preset--typography--font-size--normal); | ||
padding: calc(.667em + 2px) calc(1.333em + 2px); | ||
} | ||
|
||
/* | ||
* Comment Form Fields | ||
*/ | ||
|
||
.wp-block-post-comments input:not([type=submit]), | ||
.wp-block-post-comments textarea { | ||
background-color: var(--wp--preset--color--background); | ||
border-color: var(--wp--preset--color--foreground); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!-- wp:template-part {"slug":"header-spacer","tagName":"header"} /--> | ||
|
||
<!-- wp:group {"align":"wide","layout":{"inherit":true}} --> | ||
<div class="wp-block-group alignwide"><!-- wp:columns {"align":"wide"} --> | ||
<div class="wp-block-columns alignwide"><!-- wp:column {"width":"30%"} --> | ||
<div class="wp-block-column" style="flex-basis:30%"><!-- wp:template-part {"slug":"sidebar","tagName":"aside"} /--></div> | ||
<!-- /wp:column --> | ||
|
||
<!-- wp:column {"width":"70%","style":{"spacing":{"padding":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}}} --> | ||
<div class="wp-block-column" style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;flex-basis:70%"><!-- wp:group {"tagName":"main"} --> | ||
<main class="wp-block-group"><!-- wp:query-title {"type":"archive","fontSize":"huge"} /--> | ||
|
||
<!-- wp:spacer {"height":30} --> | ||
<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> | ||
|
||
<!-- wp:query {"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false},"displayLayout":{"type":"list","columns":2}} --> | ||
<div class="wp-block-query"><!-- wp:post-template --> | ||
<!-- wp:post-title {"isLink":true,"fontSize":"huge","style":{"typography":{"lineHeight":"1.2"}}} /--> | ||
|
||
<!-- wp:post-featured-image {"isLink":true} /--> | ||
|
||
<!-- wp:post-excerpt {"fontSize":"normal"} /--> | ||
|
||
<!-- wp:post-date {"isLink":true,"fontSize":"extra-small"} /--> | ||
|
||
<!-- wp:spacer {"height":60} --> | ||
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-pagination --> | ||
<div class="wp-block-query-pagination"><!-- wp:query-pagination-previous /--> | ||
|
||
<!-- wp:query-pagination-numbers /--> | ||
|
||
<!-- wp:query-pagination-next /--></div> | ||
<!-- /wp:query-pagination --></div> | ||
<!-- /wp:query --></main> | ||
<!-- /wp:group --></div> | ||
<!-- /wp:column --></div> | ||
<!-- /wp:columns --></div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:template-part {"slug":"footer","tagName":"footer","layout":{"inherit":true}} /--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!-- wp:post-content {"layout":{"inherit":true}} /--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!-- wp:template-part {"slug":"header","tagName":"header"} /--> | ||
|
||
<!-- wp:group {"tagName":"main"} --> | ||
<main class="wp-block-group"> | ||
|
||
<!-- wp:post-content {"layout":{"inherit":true}} /--> | ||
</main> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:template-part {"slug":"footer","tagName":"footer","layout":{"inherit":true}} /--> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually this
$font_families
variable gets wrapped inurlencode()
, but for some reason that wasn't working for me? Could use a second look.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't appear to urlencode the value in blockbase. This seems right to me.