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

Create the TwentyTwenty Demo Site using Block Templates #5

Merged
merged 24 commits into from
Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
83efbf0
Create header and footer parts for 2020
jffng Jan 10, 2020
b855bc2
Keep only what's needed to render the demo using block templates
jffng Jan 13, 2020
ee63a54
Merge branch 'master' into add/block-based-2020
jffng Jan 13, 2020
9e54320
Cleaned up header and footer styles
jffng Jan 14, 2020
05d26ee
Remove unneccessary assets for now
jffng Jan 15, 2020
549f86a
Include the demo site content
jffng Jan 15, 2020
3d7c28e
Remove non-core blocks
jffng Jan 17, 2020
b3c41b9
Rework starter content
jffng Jan 17, 2020
be44225
Make sure theme name is consistent
kjellr Jan 17, 2020
3a7986a
Minor indentation cleanup
kjellr Jan 17, 2020
3dac429
Avoid block stylesheet registration error.
kjellr Jan 17, 2020
b0b6481
Fix typo.
kjellr Jan 17, 2020
a463c09
Fix another typo 🙃
kjellr Jan 17, 2020
e209625
Remove starter content from block templates to make the example clearer
jffng Jan 17, 2020
e57ed3f
Futher simplify templates by moving the blocks for a blog page into s…
jffng Jan 17, 2020
c472488
Add Inter fonts and sample images.
kjellr Jan 20, 2020
c5b5f38
Remove about page template.
kjellr Jan 20, 2020
c0e10f0
Add post title to index.html
kjellr Jan 20, 2020
23e941d
Adopt starter content from the original Twenty Twenty.
kjellr Jan 20, 2020
71bcaea
Clean up page header styles.
kjellr Jan 20, 2020
7f8816f
Add white background behind page titles.
kjellr Jan 20, 2020
f46311c
Fix Latest Posts demo content.
kjellr Jan 20, 2020
776f088
Stylesheets cleanup.
kjellr Jan 20, 2020
eca2896
Update readme
kjellr Jan 20, 2020
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
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
109 changes: 109 additions & 0 deletions twentytwenty-blocks/block-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
.is-style-header-nav {
font-size: 1.8rem;
font-weight: 500;
letter-spacing: -0.0277em;
margin: -0.8rem 0 0 -1.6rem;
text-decoration: none;
}

.is-style-header-nav .wp-block-navigation-link {
padding: 0;
margin: 0 16px;
}

.is-style-header-nav .wp-block-navigation-link__content {
padding: 0;
text-decoration: none;
}

.is-style-header-nav .wp-block-navigation-link__content.has-submenu {
padding-bottom: 2rem;
}

.is-style-header-nav .wp-block-navigation-link__content:hover {
text-decoration: underline;
}

.is-style-header-nav > ul > li > a.wp-block-navigation-link__content {
padding-bottom: 2rem;
}

.is-style-header-nav .wp-block-navigation-link > ul {
background: #000;
border-color: #000;
border-radius: 0.4rem;
font-size: 1.7rem;
opacity: 0;
padding: 1rem 0;
transition: opacity 0.15s linear, transform 0.15s linear, right 0s 0.15s;
transform: translateY(0.6rem);
}

.is-style-header-nav .wp-block-navigation-link > ul:before {
border-color: transparent transparent black;
}

.is-style-header-nav .wp-block-navigation-link > ul:after {
border-color: transparent transparent black;
}

.is-style-header-nav .wp-block-navigation-link > ul a {
color: white;
}

@media (max-width: 699px) {
.is-style-header-nav.wp-block-navigation.items-justified-right>ul {
display: flex;
justify-content: space-between;
}
}

.is-style-header-site-title {
display: inline-block;
font-size: 2.4rem;
font-weight: 700;
line-height: 1;
margin-right: 2rem;
}

.is-style-header-site-title a {
color: black;
text-decoration: none;
}

.is-style-header-site-title a:hover {
text-decoration: underline;
}

.entry-content > .is-style-landing-page-columns.alignfull,
.entry-content > .is-style-landing-page-columns.alignfull h1 {
margin: 0;
}

@media ( min-width: 700px ){
.entry-content > .is-style-landing-page-columns.alignfull h1 {
margin: 12rem 0 5rem;
}
}

.is-style-featured-media-home::before {
background: #fff;
content: "";
display: block;
position: absolute;
bottom: 50%;
left: 0;
right: 0;
top: 0;
}

.is-style-header-cover.wp-block-cover.alignfull {
align-items: flex-end;
background-attachment: fixed;
margin: 0;
min-height: 100vh;
}

.is-style-header-cover.wp-block-cover.alignfull .wp-block-cover__inner-container {
padding: 6rem 0;
}
79 changes: 79 additions & 0 deletions twentytwenty-blocks/block-template-parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!-- wp:columns {"align":"wide","className":"footer-top"} -->
<div class="wp-block-columns alignwide footer-top"><!-- wp:column {"width":63} -->
<div class="wp-block-column" style="flex-basis:63%"><!-- wp:list {"className":"footer-menu reset-list-style"} -->
<ul class="footer-menu reset-list-style"><li><a href="/">Home</a></li><li><a href="/exhibitions">Exhibitions</a></li><li><a href="/about">About Us</a></li><li><a href="http://news">News</a></li></ul>
<!-- /wp:list --></div>
<!-- /wp:column -->

<!-- wp:column {"width":37} -->
<div class="wp-block-column" style="flex-basis:37%"><!-- wp:social-links {"align":"right","className":"social-icons footer-social"} -->
<ul class="wp-block-social-links alignright social-icons footer-social"><!-- wp:social-link-wordpress {"url":""} /-->

<!-- wp:social-link-facebook {"url":"facebook.com/wordpress"} /-->

<!-- wp:social-link-twitter {"url":"twitter.com/wordpress"} /-->

<!-- wp:social-link-instagram {"url":"https://www.instagram.com/explore/tags/wordcamp/"} /-->

<!-- wp:social-link-mail {"url":"mailto:[email protected]"} /-->

<!-- wp:social-link-mail /--></ul>
<!-- /wp:social-links --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

<!-- wp:separator {"className":"is-style-wide"} -->
<hr class="wp-block-separator is-style-wide"/>
<!-- /wp:separator -->

<!-- wp:columns {"align":"wide"} -->
<div class="wp-block-columns alignwide"><!-- wp:column {"className":"widget_text"} -->
<div class="wp-block-column widget_text"><!-- wp:heading {"level":3} -->
<h3>About the UMOMA</h3>
<!-- /wp:heading -->

<!-- wp:paragraph {"className":"widget-content widget-text"} -->
<p class="widget-content widget-text">In seven floors of striking architecture UMoMA shows exhibitions of international contemporary art, sometimes along with art historical retrospectives. Existential, political and philosophical issues are intrinsic to our programme. As visitor you are invited to guided tours, artist talks, lectures, film screenings and other events with free admission.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button {"textColor":"accent","customBackgroundColor":"#ffffff","className":"is-style-outline"} -->
<div class="wp-block-button is-style-outline"><a class="wp-block-button__link has-text-color has-accent-color has-background" style="background-color:#ffffff">Read More</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:column -->

<!-- wp:column {"className":"widget_text"} -->
<div class="wp-block-column widget_text"><!-- wp:heading {"level":3} -->
<h3>Find Us</h3>
<!-- /wp:heading -->

<!-- wp:paragraph {"className":"widget-content"} -->
<p class="widget-content"><strong>Address</strong><br>123 Main Street<br>New York, NY 10001</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"className":"widget-content"} -->
<p class="widget-content"><strong>Hours</strong><br>Monday—Friday: 9:00AM–5:00PM<br>Saturday &amp; Sunday: 11:00AM–3:00PM</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

<!-- wp:separator {"className":"is-style-wide"} -->
<hr class="wp-block-separator is-style-wide"/>
<!-- /wp:separator -->

<!-- wp:columns {"align":"wide"} -->
<div class="wp-block-columns alignwide"><!-- wp:column {"width":66.66,"className":"footer-credits"} -->
<div class="wp-block-column footer-credits" style="flex-basis:66.66%"><!-- wp:paragraph -->
<p><strong>© 2020</strong> <a href="https://combative-cheetah.jurassic.ninja/">TwentyTwenty</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"className":"powered-by-wordpress"} -->
<p class="powered-by-wordpress"><a href="https://wordpress.org">Powered by WordPress</a></p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->

<!-- wp:column {"width":33.33} -->
<div class="wp-block-column" style="flex-basis:33.33%"></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
23 changes: 23 additions & 0 deletions twentytwenty-blocks/block-template-parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- wp:columns {"align":"full"} -->
<div class="wp-block-columns alignfull"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:heading {"level":1,"className":"is-style-header-site-title"} -->
<h1 class="is-style-header-site-title"><a href="/">Twenty Twenty</a></h1>
<!-- /wp:heading -->

<!-- wp:paragraph {"className":"site-description"} -->
<p class="site-description">Just another WordPress site</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->

<!-- wp:column -->
<div class="wp-block-column"><!-- wp:navigation {"className":"is-style-header-nav","itemsJustification":"right"} -->
<!-- wp:navigation-link {"label":"Home","title":"Home","type":"page","url":"/"} /-->

<!-- wp:navigation-link {"label":"About","title":"About","url":"/about"} /-->

<!-- wp:navigation-link {"label":"Blog","title":"Blog","url":"/blog"} /-->

<!-- wp:navigation-link {"label":"Contact","title":"Contact","url":"/contact"} /-->
<!-- /wp:navigation --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
12 changes: 12 additions & 0 deletions twentytwenty-blocks/block-templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<header class="site-header">
<!-- wp:template-part {"slug":"header","theme":"twentytwenty-blocks"} /-->
</header>

<main class="site-content">
<!-- wp:post-title /-->
<!-- wp:post-content /-->
</main>

<footer id="site-footer" class="site-footer">
<!-- wp:template-part {"slug":"footer","theme":"twentytwenty-blocks"} /-->
</footer>
Loading