wordpress / twentysixteen Goto Github PK
View Code? Open in Web Editor NEWTwenty Sixteen is a theme now included in all WordPress installs. To report any issues please go here: https://core.trac.wordpress.org/newticket
Twenty Sixteen is a theme now included in all WordPress installs. To report any issues please go here: https://core.trac.wordpress.org/newticket
=== Twenty Sixteen === Contributors: the WordPress team Requires at least: WordPress 4.4 Tested up to: WordPress 4.5 Version: 1.3 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: one-column, two-columns, right-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready, blog == Description == Twenty Sixteen is a modernized take on an ever-popular WordPress layout โ the horizontal masthead with an optional right sidebar that works perfectly for blogs and websites. It has custom color options with beautiful default color schemes, a harmonious fluid grid using a mobile-first approach, and impeccable polish in every detail. Twenty Sixteen will make your WordPress look beautiful everywhere. * Mobile-first, Responsive Layout * Custom Colors * Custom Header * Social Links * Post Formats * The GPL v2.0 or later license. :) Use it to make something cool. For more information about Twenty Sixteen please go to https://codex.wordpress.org/Twenty_Sixteen. == Installation == 1. In your admin panel, go to Appearance -> Themes and click the 'Add New' button. 2. Type in Twenty Sixteen in the search form and press the 'Enter' key on your keyboard. 3. Click on the 'Activate' button to use your new theme right away. 4. Go to https://codex.wordpress.org/Twenty_Sixteen for a guide on how to customize this theme. 5. Navigate to Appearance > Customize in your admin panel and customize to taste. == Copyright == Twenty Sixteen WordPress Theme, Copyright 2014-2015 WordPress.org Twenty Sixteen 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. Twenty Sixteen Theme bundles the following third-party resources: HTML5 Shiv v3.7.0, Copyright 2014 Alexander Farkas Licenses: MIT/GPL2 Source: https://github.com/aFarkas/html5shiv Genericons icon font, Copyright 2013-2015 Automattic.com License: GNU GPL, Version 2 (or later) Source: http://www.genericons.com Image used in screenshot.png: A photo by Austin Schmid (https://unsplash.com/schmidy/), licensed under Creative Commons Zero(http://creativecommons.org/publicdomain/zero/1.0/) == Changelog == = 1.3 = * Released: August 16, 2016 https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.3 = 1.2 = * Released: April 12, 2016 https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.2 = 1.1 = * Released: January 6, 2016 https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.1 = 1.0 = * Released: December 8, 2015 Initial release == Notes == Only the default and dark color schemes are accessibility ready.
I would like to suggest to add a separate category template instead of having to rely on the archive template which is far too general.
Layout doesn't need to be exactly the same but let's make it at least readable and usable on IE7 and above.
One small tweak we could make to improve the accessibility of Twenty Sixteen is adding the post title to the edit_post_link
and hiding it with screen-reader-text
. We do this in a few other spots to provide more context to link text, and the case would be the same here.
Thoughts?
Pull request incoming. ๐
http://microformats.org/wiki/hcard
HCards are recognized by a variety of sites and the formatting for them appear in various parts of WordPress.
Since TwentySixteen is a showcase of what WordPress can do, should the new singular.php file be provided in the theme despite the fact that single.php and page.php are already provided?
Hey
Ideas will come up that are really good but for whatever reason are not be added to the official theme.
So what if an underground unofficial theme is created at the same time?
To showcase various things the official theme chooses not to showcase. It will show more variation of what can be done and can be used for further study for various users.
In editor-style.css there are 2 unprocessed variables used. Looks like sass variables left from some previous code.
https://github.com/WordPress/twentysixteen/blob/master/css/editor-style.css#L335
There's three calls I noticed in functions.php for requiring files from the /inc/
folder. Any objection to a PR that replaces these with get_stylesheet_directory() for child theme over-ride potential?
The overhanging treatment works well with a newly uploaded .size-large
image, but there is an issue if the image was added when a different theme was activated. This is because of the width
attribute and the value comes from $content_width
of the previous theme.
The image below was uploaded when Twenty Twelve was activated. (The $content_width
is 625
px in Twenty Twelve)
To resolve the issue, it's safer to apply the treatment only to .size-full
image because the value of the width
attribute is the same as the actual image width.
When there is no title and no featured image in the sticky post, we cannot go to that individual post as there is no date and the "featured" text isn't linked as well. Not sure how to fix but maybe we can add a link to Featured text or add the date back. maybe an edge case..
At some point there is this little design issue. When there are two or more categories, it seems the padding between the categories list and tags list in entry footer become larger than when its only 1 category. Looks like this css is the issue
.entry-footer > span:not(:last-child):after {
padding: 0 0.538461538em;
}
That padding appears on the next line which triggers that space.
Here is the screenshot that should be self explanatory.
Steps to get started:
In parallel, do the following:
When comparing the 2 posts, I find that the standard post (with its Featured Image) actually does a better job of showing off my image.
I wonder if we should handle that special case:
twentysixteen_post_thumbnail
to look for the first image in the post and display it instead of the featured image.What do you think?
Just like other default theme, lets create a language folder which will contain translatable strings.
In template-tags.php, the function twentysixteen_categorized_blog()
uses get_categories()
and passes an array of args. One of these values is 'hide_empty' => 1,
however, the default value for hide_empty
is 1, thus is unnecessary.
As brought up in #23
As WordPress core has included full inline documentation. We should do the same for the default theme.
Image captions in editor isn't italic as it is in the preview post
As now custom-header.php
contains functions for both Custom Header and Custom Background, may be we should rename it to more suitable name.
First noticed this with an actual post title:
After looking a little deeper into it and realizing word-wrap: break-word;
was being used in several places and just happened to miss the title, I took into account where it was being used and made some adjustments.
.entry-intro
in two different places, which is always in a post/page article..entry-content
and .entry-summary
, which are always in a post/page article..type-attachment .entry-title
which I'm not even sure is part of the theme (that's a separate issue) but if it was, it would only be in image.php, which is always in the aforementioned article element..entry-caption
, which is also only part of image.php..textwidget
, which is always going to be nested in .widget
where it's already applied.So in all things listed above, it was either 1) unnecessary to have or 2) always in a post/page/attachment article element, which all share the article[class^="post-"]
selector already in the stylesheet. So I put the word-wrap there.
All other places it's being used in a legit manner, I left it alone.
I would like to discus what the file and folder structure might look like if the theme included minfied versions of styles and scripts as well as non-minified versions when as the theme progresses.
It may not be the best time to include these right now but closer to completion I think that minified versions should be included for sure.
With merge of PR #61 all files in the theme are currently non-minified. For production I would suggest that using minified files would be preferential but the issue would be how to do that.
My suggestion is to have minified versions of each script inside the same folder as the non-minified versions. As for the stylesheet - it may not be the best idea to include style.min.css in the root alongside the standard style.css but I still think providing a minified version would be of benefit.
What does everyone think about where minified files should be placed and how they should be enqueued? Should they only be enqueued conditionally by choice of the user... Is that too complicated an option for a default theme?
What about an option inside the customizer for a choice of boxed or fluid layout?
Perhaps a page template.
Inside the .each()
iterator on found images, we have redundant $( this )
selectors, even though we cached it in the img
variable. While the performance costs of creating a few more instances of a jQuery object here probably won't make much difference, it is best practice to use the stored instance.
Also, in the same bigImageClass()
function, we use the img
var as a selector like $( img )
when img
is already a jQuery object.
Will add a PR shortly.
The microformats class for an excerpt is entry-summary, not entry-intro.
Doing some brainstorming here...
Page Template:
Comment states it registers one location, but actually registers two.
All 3 fonts used in the theme have only Latin (2 of them - Latin Extended) subsets. For any language with non-latin characters (for example, any cyrillic language - ukrainian, russian, bulgarian etc) it defaults to system serif / sans-serif which are completely different and things look awful, sometimes just break (because of different character widths and baselines).
[grumble_mode=on]
People, really. I don't get this. We spend a lot of time working on some mere fallbacks and edge-cases needed by fractions of percent of users, like old IE fixes, eot webfonts etc. We do spend a lot of time working on accessibility. But we (well, those US-people mostly, to be honest) still forget that we live in a world where people speak many different languages. WP still does not have a proper multilingual content support. That's a whole another topic, but let's make the themes truly multilingual at least.
[grumble_mode=off]
I'm not sure how to fix it better. One option I can think of is adding similar-looking fallback fonts with extra subsets, so our css declarations would look like font-family: Merriweather, Some_Alternative, serif;
.
Another option is to use alternatives right out of the box.
See _s Automattic/_s#743
HFeed indicates a page where multiple hentrys exist. It should not appear on any single page.
I've been meaning to do this. Uppercase text currently a little condensed and I'm going to loosen the tracking.
There is Wrong Number of location above register_nav_menus on functions.php in line number 71
I like that the sidebar is on the right-hand side by default. It is an "aside" and reading starts to the left, so it makes sense. But reading doesn't start to the left for everyone. Should there be an option to have the sidebar on the left specifically for RTL readers? Of course it has benefits for LTR readers as well if they just have a preference.
I thought the boxy border didn't go well with the menu items with submenus (on the mobile nav). It looks odd on the overall neat design.
I know "whitespace only" code refactoring changes for core files are discouraged, but this isn't in core yet so I felt it should at least be noted.
Some multi-line var declarations use spaces to indent the next line, while others correctly use tabs (according to the Javascript coding standards).
Assignments within the var statement should be listed on individual lines, while declarations can be grouped on a single line. Any additional lines should be indented with an additional tab.
Offending files include:
/js/functions.js
/js/customize-preview.js
/js/skip-link-focus-fix.js
Like other default themes, let's add print style at the bottom of the main stylesheet.
Function ending comment are missing on different file.
Nitpicky, but necessary. The name of the contributors file has a typo. Should be contributors.md, not contributErs.md
Function: twentysixteen_widgets_init
Line : 128
It would be good to add description rather than keeping empty.
It looks like post formats are a part of standard posts because of the font size differences..
I know there has been a lot of discussions about Post Formats.
I am just wondering what you think.
Should Post Formats instead be handled in future core plugins like Shortcake? (If my thinking is correct.)
rtl.css
rtl-language-support
tag to both style.css
andreadme.txt
File: custom-header.php
Function: twentysixteen_custom_header_and_background
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.