Theme: Initial commit.

This was forked from `pub/wporg-main` and `pub/wporg-plugins`, and then customized.
This commit is contained in:
Ian Dunn 2019-09-24 14:37:41 -07:00
commit de191e098b
No known key found for this signature in database
GPG key ID: 99B971B50343CBCB
38 changed files with 4532 additions and 0 deletions

36
themes/wporg-5ftf/404.php Normal file
View file

@ -0,0 +1,36 @@
<?php
namespace WordPressdotorg\Five_for_the_Future\Theme;
get_header(); ?>
<main id="main" class="site-main" role="main">
<section class="error-404 not-found">
<header class="page-header">
<h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'wporg-5ftf' ); ?></h1>
</header><!-- .page-header -->
<div class="page-content">
<p>
<?php
/* translators: URL to home page. */
printf( wp_kses_post( __( 'Try searching from the field below, or go to the <a href="%s">home page</a>.', 'wporg-5ftf' ) ), esc_url( get_home_url() ) );
?>
</p>
<p>
<?php get_search_form(); ?>
</p>
<div class="logo-swing">
<img src="<?php echo esc_url( get_theme_file_uri( '/images/wp-logo-blue-trans-blur.png' ) ); ?>" class="wp-logo" />
<img src="<?php echo esc_url( get_theme_file_uri( '/images/wp-logo-blue.png' ) ); ?>" class="wp-logo" />
</div>
</div><!-- .page-content -->
</section><!-- .error-404 -->
</main><!-- #main -->
<?php
get_footer();

View file

@ -0,0 +1,92 @@
/* global module:false, require:function, process:object */
require( 'es6-promise' ).polyfill();
module.exports = function( grunt ) {
var isChild = 'wporg' !== grunt.file.readJSON( 'package.json' ).name;
grunt.initConfig({
postcss: {
options: {
map: 'build' !== process.argv[2],
processors: [
require( 'autoprefixer' )( {
browsers: [
'Android >= 2.1',
'Chrome >= 21',
'Edge >= 12',
'Explorer >= 7',
'Firefox >= 17',
'Opera >= 12.1',
'Safari >= 6.0'
],
cascade: false
} ),
require( 'pixrem' ),
require('cssnano')({
mergeRules: false
})
]
},
dist: {
src: 'css/style.css'
}
},
sass: {
options: {
implementation: require( 'node-sass' ),
sourceMap: true,
// Don't add source map URL in built version.
omitSourceMapUrl: 'build' === process.argv[2],
outputStyle: 'expanded'
},
dist: {
files: {
'css/style.css': 'css/style.scss'
}
}
},
sass_globbing: {
itcss: {
files: (function() {
var files = {};
['settings', 'tools', 'generic', 'base', 'objects', 'components', 'trumps'].forEach( function( component ) {
var paths = ['../wporg/css/' + component + '/**/*.scss', '!../wporg/css/' + component + '/_' + component + '.scss'];
if ( isChild ) {
paths.push( 'css/' + component + '/**/*.scss' );
paths.push( '!css/' + component + '/_' + component + '.scss' );
}
files[ 'css/' + component + '/_' + component + '.scss' ] = paths;
} );
return files;
}())
},
options: { signature: false }
},
watch: {
css: {
files: ['**/*.scss', '../wporg/css/**/*scss'],
tasks: ['css']
}
}
});
if ( 'build' === process.argv[2] ) {
grunt.config.merge( { postcss: { options : { processors: [ require( 'cssnano' ) ] } } } );
}
grunt.loadNpmTasks( 'grunt-sass' );
grunt.loadNpmTasks( 'grunt-postcss' );
grunt.loadNpmTasks( 'grunt-sass-globbing' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.registerTask( 'css', ['sass_globbing', 'sass', 'postcss' ] );
grunt.registerTask( 'build', ['css'] );
};

View file

@ -0,0 +1,52 @@
<?php
namespace WordPressdotorg\Five_for_the_Future\Theme;
// If we don't have any posts to display for the archive, then send a 404 status. See #meta4151
if ( ! have_posts() ) {
status_header( 404 );
nocache_headers();
}
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
</header><!-- .page-header -->
<?php
while ( have_posts() ) :
the_post();
/*
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content', 'page' );
endwhile;
the_posts_pagination();
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();

View file

@ -0,0 +1,7 @@
@import "../../../wporg/css/base/copy";
@import "../../../wporg/css/base/elements";
@import "../../../wporg/css/base/headings";
@import "../../../wporg/css/base/links";
@import "../../../wporg/css/base/lists";
@import "../../../wporg/css/base/tables";
@import "../../../wporg/css/base/typography";

View file

@ -0,0 +1,150 @@
body.page-about {
overflow-x: hidden;
.entry-header {
padding: ms( 4 ) ms( 1 );
text-align: center;
.entry-title {
font-size: ms( 12 );
line-height: 1;
margin: 2rem auto 1rem;
@include breakpoint( 0, 480px ) {
font-size: ms( 10 );
}
}
.entry-description {
color: rgba( 255, 255, 255, 0.8 );
font-size: ms( 2 );
font-weight: 300;
margin: -.4rem auto 2rem;
}
}
.shapes {
height: 480px;
margin: 4rem 0;
position: relative;
.parallelogram {
height: 260px;
width: 310px;
&:hover,
&:focus,
&:active {
text-decoration: none;
}
&.technology {
background-color: darken( #0073aa, 2% );
top: 0;
left: 0;
z-index: 1;
&:hover,
&:focus,
&:active {
background-color: darken( #0073aa, 12% );;
}
}
&.community {
background-color: #67598e;
right: 0;
bottom: 0;
&:hover,
&:focus,
&:active {
background-color: darken( #67598e, 10% );
}
}
h3, p {
margin: 0;
transform: skew( 15deg );
}
}
@include breakpoint( 480px ) {
height: 610px;
.parallelogram {
height: 336px;
padding: 7rem 0;
width: 400px;
}
}
@include breakpoint( 640px ) {
height: 580px;
.parallelogram {
height: 315px;
padding: 5rem 0;
width: 480px;
&:before {
font-size: ms( 14 );
height: 84px;
width: 84px;
}
}
}
@include breakpoint( 768px ) {
height: 323px;
margin: 4rem 0;
.parallelogram {
height: 282px;
padding: 4rem 0;
width: 430px;
&.technology {
left: auto;
right: 45%;
top: 40px;
}
&.community {
bottom: auto;
left: 45%;
}
}
}
@include breakpoint( 1024px ) {
height: 420px;
.parallelogram {
height: 380px;
padding: 6rem 0;
width: 580px;
&.technology {
right: 43%;
}
&.community {
left: 43%;
}
&:before {
font-size: ms( 16 );
height: 108px;
width: 108px;
}
}
}
}
.areas {
h3 {
@extend h4;
}
}
}

View file

@ -0,0 +1,35 @@
// Styles for child pages.
body.page-child {
.site-title a {
color: #fff;
text-decoration: none;
&:hover,
&:active {
color: #fff;
}
}
.entry-header {
background: none;
margin: 0 auto;
max-width: 960px;
padding: 0 ms( 4 );
.entry-title {
color: inherit;
font-size: ms( 8 );
font-weight: 400;
line-height: 1.5;
margin: 2rem auto 1rem;
@include breakpoint( 0, $ms-breakpoint ) {
padding: 0;
}
}
}
.entry-content {
padding-top: 0;
}
}

View file

@ -0,0 +1,25 @@
@import "../../../wporg/css/components/404";
@import "../../../wporg/css/components/comments";
@import "../../../wporg/css/components/entry-content";
@import "../../../wporg/css/components/entry-header";
@import "../../../wporg/css/components/entry-meta";
@import "../../../wporg/css/components/entry-summary";
@import "../../../wporg/css/components/entry";
@import "../../../wporg/css/components/gallery";
@import "../../../wporg/css/components/main-navigation";
@import "../../../wporg/css/components/page";
@import "../../../wporg/css/components/post-navigation";
@import "../../../wporg/css/components/posts-navigation";
@import "../../../wporg/css/components/search-form";
@import "../../../wporg/css/components/search";
@import "../../../wporg/css/components/site-content";
@import "../../../wporg/css/components/site-description";
@import "../../../wporg/css/components/site-header";
@import "../../../wporg/css/components/site-title";
@import "../../../wporg/css/components/widget-area";
@import "../../../wporg/css/components/wporg-footer";
@import "../../../wporg/css/components/wporg-header";
@import "about";
@import "child-pages";
@import "entry-content";
@import "wporg-header";

View file

@ -0,0 +1,3 @@
.entry-content {
hyphens: none;
}

View file

@ -0,0 +1,14 @@
#wporg-header {
@include breakpoint( $sm ) {
ul li.current-menu-item:after,
ul li.current_page_parent:after,
ul li a.current ~ .uparrow {
body.blog &,
body.search &,
body.single &,
body.archive & {
border-bottom-color: #f7f7f7;
}
}
}
}

View file

@ -0,0 +1,2 @@
@import "../../../wporg/css/generic/kube";
@import "../../../wporg/css/generic/normalize";

View file

@ -0,0 +1,3 @@
input[type="submit"] {
@extend .button;
}

View file

@ -0,0 +1,11 @@
@import "../../../wporg/css/objects/accessibility";
@import "../../../wporg/css/objects/alignments";
@import "../../../wporg/css/objects/buttons";
@import "../../../wporg/css/objects/clearings";
@import "../../../wporg/css/objects/copy";
@import "../../../wporg/css/objects/inputs";
@import "../../../wporg/css/objects/links";
@import "../../../wporg/css/objects/notices";
@import "buttons";
@import "parallelogram";
@import "site-header";

View file

@ -0,0 +1,23 @@
.parallelogram {
color: #fff;
display: block;
margin: 0 auto;
opacity: 0.9;
padding: 4.7rem 0;
position: absolute;
text-align: center;
transform: skew( -15deg) ;
&:before {
font-size: ms( 12 );
height: 64px;
position: relative;
right: 1rem;
transform: skew( 15deg );
width: 64px;
}
> * {
transform: skew( 15deg );
}
}

View file

@ -0,0 +1,29 @@
.site-header {
.home & {
background: #0073aa;
@include breakpoint( $ms-breakpoint ) {
padding: ms( 10 ) ms( 4 );
}
.site-title {
color: #fff;
display: block;
font-size: ms( 10 );
font-weight: 300;
line-height: 1;
margin: 2rem 0 1rem;
text-align: center;
@include breakpoint( $ms-breakpoint ) {
font-size: ms( 12 );
}
}
.site-description {
color: #fff;
max-width: ms( 32 );
padding: 11px 0;
}
}
}

View file

@ -0,0 +1,4 @@
@import "../../../wporg/css/settings/colors";
@import "../../../wporg/css/settings/modular-scale";
@import "../../../wporg/css/settings/structure";
@import "../../../wporg/css/settings/typography";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,29 @@
//--------------------------------------------------------------
// 01 Settings
//------------------------------------------------------------*/
@import "settings/settings";
//--------------------------------------------------------------
// 02 Tools
//------------------------------------------------------------*/
@import "tools/tools";
//--------------------------------------------------------------
// 03 Generic
//------------------------------------------------------------*/
@import "generic/generic";
//--------------------------------------------------------------
// 04 Base
//------------------------------------------------------------*/
@import "base/base";
//--------------------------------------------------------------
// 05 Objects
//------------------------------------------------------------*/
@import "objects/objects";
//--------------------------------------------------------------
// 06 Components
//------------------------------------------------------------*/
@import "components/components";

View file

@ -0,0 +1,3 @@
@import "../../../wporg/css/tools/breakpoint";
@import "../../../wporg/css/tools/kube";
@import "../../../wporg/css/tools/modular-scale";

View file

@ -0,0 +1,9 @@
<?php
namespace WordPressdotorg\Five_for_the_Future\Theme;
?>
</div><!-- #content -->
<?php require WPORGPATH . 'footer.php';

View file

@ -0,0 +1,143 @@
<?php
namespace WordPressdotorg\Five_for_the_Future\Theme;
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which
* runs before the init hook. The init hook is too late for some features, such
* as indicating support for post thumbnails.
*/
function setup() {
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
// Don't include Adjacent Posts functionality.
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
) );
add_theme_support( 'wp4-styles' );
register_nav_menus( array(
'primary' => esc_html__( 'Primary', 'wporg-5ftf' ),
) );
}
add_action( 'after_setup_theme', __NAMESPACE__ . '\setup' );
/**
* Set the content width in pixels, based on the theme's design and stylesheet.
*
* Priority 0 to make it available to lower priority callbacks.
*
* @global int $content_width
*/
function content_width() {
$GLOBALS['content_width'] = apply_filters( 'wporg_plugins_content_width', 640 );
}
add_action( 'after_setup_theme', __NAMESPACE__ . '\content_width', 0 );
/**
* Enqueue scripts and styles.
*/
function scripts() {
wp_enqueue_style( 'wporg-style', get_theme_file_uri( '/css/style.css' ), [ 'dashicons', 'open-sans' ], '20190703' );
// wp_enqueue_style( 'wporg-style2', get_stylesheet_uri(), [ 'dashicons', 'open-sans' ], '20190703' ); // todo this one or the one above?
wp_style_add_data( 'wporg-style', 'rtl', 'replace' );
wp_enqueue_script( 'wporg-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20181209', true );
wp_enqueue_script( 'wporg-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );
}
add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\scripts' );
/**
* Extend the default WordPress body classes.
*
* Adds classes to make it easier to target specific pages.
*
* @param array $classes Body classes.
* @return array
*/
function body_class( $classes ) {
if ( is_page() ) {
$page = get_queried_object();
$classes[] = 'page-' . $page->post_name;
if ( $page->post_parent ) {
$parent = get_post( $page->post_parent );
$classes[] = 'page-parent-' . $parent->post_name;
}
}
return array_unique( $classes );
}
add_filter( 'body_class', __NAMESPACE__ . '\body_class' );
/**
* Filters an enqueued script & style's fully-qualified URL.
*
* @param string $src The source URL of the enqueued script/style.
* @param string $handle The style's registered handle.
* @return string
*/
function loader_src( $src, $handle ) {
$cdn_urls = [
'dashicons',
'wp-embed',
'jquery-core',
'jquery-migrate',
'wporg-style',
'wporg-navigation',
'wporg-skip-link-focus-fix',
'wporg-plugins-popover',
'wporg-plugins-locale-banner',
'wporg-plugins-stats',
'wporg-plugins-client',
'wporg-plugins-faq',
];
if ( defined( 'WPORG_SANDBOXED' ) && WPORG_SANDBOXED ) {
return $src;
}
// Use CDN url.
if ( in_array( $handle, $cdn_urls, true ) ) {
$src = str_replace( get_home_url(), 'https://s.w.org', $src );
}
// Remove version argument.
if ( in_array( $handle, [ 'open-sans' ], true ) ) {
$src = remove_query_arg( 'ver', $src );
}
return $src;
}
add_filter( 'style_loader_src', __NAMESPACE__ . '\loader_src', 10, 2 );
add_filter( 'script_loader_src', __NAMESPACE__ . '\loader_src', 10, 2 );
/**
* Filters the list of CSS body classes for the current post or page.
*
* @param array $classes An array of body classes.
* @return array
*/
function custom_body_class( $classes ) {
$classes[] = 'no-js';
return $classes;
}
add_filter( 'body_class', __NAMESPACE__ . '\custom_body_class' );

View file

@ -0,0 +1,59 @@
<?php
namespace WordPressdotorg\Five_for_the_Future\Theme;
global $wporg_global_header_options;
$GLOBALS['pagetitle'] = wp_get_document_title();
if ( ! isset( $wporg_global_header_options[ 'in_wrapper' ] ) ) {
$wporg_global_header_options[ 'in_wrapper' ] = '';
}
$wporg_global_header_options[ 'in_wrapper' ] .= '<a class="skip-link screen-reader-text" href="#main">' . esc_html__( 'Skip to content', 'wporg-5ftf' ) . '</a>';
require WPORGPATH . 'header.php';
?>
<div id="page" class="site">
<div id="content" class="site-content">
<header id="masthead" class="site-header <?php echo is_front_page() ? 'home' : ''; ?>" role="banner">
<div class="site-branding">
<?php if ( is_front_page() ) : ?>
<h1 class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<?php echo esc_html_x( 'Five for the Future', 'Site title', 'wporg-5ftf' ); ?>
</a>
</h1>
<p class="site-description">
<?php esc_html_e( 'WordPress fuels more than a third of the web. Are you a part of it?', 'wporg-5ftf' ); ?>
</p>
<?php else : ?>
<p class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<?php echo esc_html_x( 'Five for the Future', 'Site title', 'wporg-5ftf' ); ?>
</a>
</p>
<nav id="site-navigation" class="main-navigation" role="navigation">
<button
class="menu-toggle dashicons dashicons-arrow-down-alt2"
aria-controls="primary-menu"
aria-expanded="false"
aria-label="<?php esc_attr_e( 'Primary Menu', 'wporg-5ftf' ); ?>"
>
</button>
<div id="primary-menu" class="menu">
<?php wp_nav_menu( array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu',
) ); ?>
</div>
</nav><!-- #site-navigation -->
<?php endif; ?>
</div><!-- .site-branding -->
</header><!-- #masthead -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View file

@ -0,0 +1,32 @@
<?php
namespace WordPressdotorg\Five_for_the_Future\Theme;
get_header(); ?>
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) :
if ( is_home() && ! is_front_page() ) : ?>
<header>
<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
</header>
<?php endif;
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/plugin', 'index' );
endwhile;
the_posts_pagination();
else :
get_template_part( 'template-parts/content', 'none' );
endif; ?>
</main><!-- #main -->
<?php get_footer();

View file

@ -0,0 +1,78 @@
/**
* File navigation.js.
*
* Handles toggling the navigation menu for small screens and enables TAB key
* navigation support for dropdown menus.
*/
( function() {
var container, button, menu, links, subMenus, i, len;
container = document.getElementById( 'site-navigation' );
if ( ! container ) {
return;
}
button = container.getElementsByTagName( 'button' )[0];
if ( 'undefined' === typeof button ) {
return;
}
menu = container.getElementsByTagName( 'ul' )[0];
// Hide menu toggle button if menu is empty and return early.
if ( 'undefined' === typeof menu ) {
button.style.display = 'none';
return;
}
if ( -1 === menu.className.indexOf( 'nav-menu' ) ) {
menu.className += ' nav-menu';
}
button.onclick = function() {
if ( -1 !== container.className.indexOf( 'toggled' ) ) {
container.className = container.className.replace( ' toggled', '' );
button.setAttribute( 'aria-expanded', 'false' );
} else {
container.className += ' toggled';
button.setAttribute( 'aria-expanded', 'true' );
}
};
// Get all the link elements within the menu.
links = menu.getElementsByTagName( 'a' );
subMenus = menu.getElementsByTagName( 'ul' );
// Set menu items with submenus to aria-haspopup="true".
for ( i = 0, len = subMenus.length; i < len; i++ ) {
subMenus[i].parentNode.setAttribute( 'aria-haspopup', 'true' );
}
// Each time a menu link is focused or blurred, toggle focus.
for ( i = 0, len = links.length; i < len; i++ ) {
links[i].addEventListener( 'focus', toggleFocus, true );
links[i].addEventListener( 'blur', toggleFocus, true );
}
/**
* Sets or removes .focus class on an element.
*/
function toggleFocus() {
var self = this;
// Move up through the ancestors of the current link until we hit .nav-menu.
while ( -1 === self.className.indexOf( 'nav-menu' ) ) {
// On li elements toggle the class .focus.
if ( 'li' === self.tagName.toLowerCase() ) {
if ( -1 !== self.className.indexOf( 'focus' ) ) {
self.className = self.className.replace( ' focus', '' );
} else {
self.className += ' focus';
}
}
self = self.parentElement;
}
}
} )();

View file

@ -0,0 +1,33 @@
/**
* File skip-link-focus-fix.js.
*
* Helps with accessibility for keyboard only users.
*
* Learn more: https://git.io/vWdr2
*/
( function() {
var isWebkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
isOpera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,
isIe = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1;
if ( ( isWebkit || isOpera || isIe ) && document.getElementById && window.addEventListener ) {
window.addEventListener( 'hashchange', function() {
var id = location.hash.substring( 1 ),
element;
if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
return;
}
element = document.getElementById( id );
if ( element ) {
if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
element.tabIndex = -1;
}
element.focus();
}
}, false );
}
})();

3443
themes/wporg-5ftf/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,23 @@
{
"name": "wporg-5ftf",
"version": "1.0.0",
"description": "Theme for WordPress.org/five-for-the-future/",
"author": "wordpressdotorg",
"license": "GPL-2.0+",
"repository": {
"type": "git",
"url": "https://github.com/WordPress/five-for-the-future"
},
"devDependencies": {
"autoprefixer": "^6.3.6",
"cssnano": "^3.7.4",
"es6-promise": "~4.0.5",
"grunt": "^1.0.3",
"grunt-contrib-watch": "^1.1.0",
"grunt-postcss": "^0.8.0",
"grunt-sass": "~3.0.1",
"grunt-sass-globbing": "^1.5.1",
"node-sass": "^4.9.3",
"pixrem": "^3.0.2"
}
}

View file

@ -0,0 +1,16 @@
<?php
namespace WordPressdotorg\Five_for_the_Future\Theme;
get_header(); ?>
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'page' );
endwhile; ?>
</main><!-- #main -->
<?php get_footer();

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

View file

@ -0,0 +1,34 @@
<?php get_header(); ?>
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title">
<?php
printf(
/* translators: Search query. */
esc_html__( 'Showing results for: %s', 'wporg-5ftf' ),
'<strong>' . get_search_query() . '</strong>'
);
?>
</h1>
</header><!-- .page-header -->
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'page' );
endwhile;
the_posts_pagination();
else :
get_template_part( 'template-parts/content', 'none' );
endif; ?>
</main><!-- #main -->
<?php get_footer();

View file

@ -0,0 +1,27 @@
<?php
namespace WordPressdotorg\Five_for_the_Future\Theme;
?>
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<label for="s" class="screen-reader-text">
<?php echo esc_html_x( 'Search for:', 'label', 'wporg-5ftf' ); ?>
</label>
<input
type="search"
id="s"
class="search-field"
placeholder="<?php echo esc_attr_x( 'Search', 'placeholder', 'wporg-5ftf' ); ?>"
value="<?php the_search_query(); ?>"
name="s"
/>
<button class="button button-primary button-search">
<i class="dashicons dashicons-search"></i>
<span class="screen-reader-text">
<?php esc_html_e( 'Search plugins', 'wporg-5ftf' ); ?>
</span>
</button>
</form>

View file

@ -0,0 +1,17 @@
<?php
namespace WordPressdotorg\Five_for_the_Future\Theme;
get_header(); ?>
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/plugin', 'single' );
endwhile; ?>
</main><!-- #main -->
<?php get_footer();

View file

@ -0,0 +1,27 @@
/*
* Theme Name: WordPress.org Five for the Future
* Theme URI: https://wordpress.org/five-for-the-future/
* Author: wordpressdotorg
* Author URI: https://wordpress.org
* Description: Theme for WordPress.org/five-for-the-future/.
* Version: 1
* License: GNU General Public License v2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: wporg
* Template: wporg
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normalize.css/
PLEASE DO NOT EDIT THIS FILE.
During development, run `grunt watch`, and then make style changes to `/css`.
Before committing, please run `grunt build` to keep the file size down.
Thanks!

View file

@ -0,0 +1,29 @@
<section class="no-results not-found">
<header class="page-header">
<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'wporg-5ftf' ); ?></h1>
</header><!-- .page-header -->
<div class="page-content">
<?php if ( is_search() ) : ?>
<p>
<?php esc_html_e( 'Sorry, but nothing matched your search terms.', 'wporg-5ftf' ); ?>
</p>
<p>
<?php esc_html_e( 'Please try again with some different keywords.', 'wporg-5ftf' ); ?>
</p>
<?php get_search_form(); ?>
<?php else : ?>
<p>
<?php esc_html_e( 'It seems we can&#8217;t find what you&#8217;re looking for. Perhaps searching can help.', 'wporg-5ftf' ); ?>
</p>
<?php get_search_form(); ?>
<?php endif; ?>
</div><!-- .page-content -->
</section><!-- .no-results -->

View file

@ -0,0 +1,42 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( ! is_front_page() ) : ?>
<header class="entry-header">
<?php if ( is_singular() ) : ?>
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<?php else : ?>
<a href="<?php the_permalink(); ?>">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</a>
<?php endif; ?>
</header><!-- .entry-header -->
<?php endif; ?>
<div class="entry-content">
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'wporg-5ftf' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'wporg-5ftf' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
'</span>'
);
?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->