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

Try an even simpler two-column landing page theme #67

Closed
wants to merge 8 commits into from
Closed
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
674 changes: 674 additions & 0 deletions two-column-landing-page/LICENSE

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
49 changes: 49 additions & 0 deletions two-column-landing-page/block-templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!-- wp:columns {"align":"full"} -->
<div class="wp-block-columns alignfull"><!-- wp:column {"width":"66.66%"} -->
<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:cover {"url":"https://cldup.com/L2xohfbIFp.jpg","id":1862,"dimRatio":0,"focalPoint":{"x":"0.50","y":"0.60"},"minHeight":100,"minHeightUnit":"vh"} -->
<div class="wp-block-cover" style="background-image:url(https://cldup.com/L2xohfbIFp.jpg);min-height:100vh;background-position:50% 60%"><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","fontSize":"large"} -->
<p class="has-text-align-center has-large-font-size"></p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:cover --></div>
<!-- /wp:column -->

<!-- wp:column {"verticalAlignment":"center","width":"33.33%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:33.33%"><!-- wp:spacer {"height":32} -->
<div style="height:32px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:site-title {"textAlign":"center","textColor":"primary"} /-->

<!-- wp:group {"backgroundColor":"background"} -->
<div class="wp-block-group has-background-background-color has-background"><div class="wp-block-group__inner-container"><!-- wp:site-tagline {"textAlign":"center","textColor":"primary"} /--></div></div>
<!-- /wp:group -->



<!-- wp:buttons {"contentJustification":"center"} -->
<div class="wp-block-buttons is-content-justification-center"><!-- wp:button {"borderRadius":50,"backgroundColor":"secondary"} -->
<div class="wp-block-button"><a class="wp-block-button__link has-secondary-background-color has-background" style="border-radius:50px">Say Hello</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:social-links {"align":"center","className":"is-style-logos-only"} -->
<ul class="wp-block-social-links aligncenter is-style-logos-only"><!-- wp:social-link {"url":"","service":"wordpress"} /-->

<!-- wp:social-link {"service":"facebook"} /-->

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

<!-- wp:social-link {"url":"https://instagram.com","service":"instagram"} /-->

<!-- wp:social-link {"service":"linkedin"} /-->

<!-- wp:social-link {"service":"youtube"} /-->

<!-- wp:social-link {"url":"https://dribbble.com","service":"dribbble"} /--></ul>
<!-- /wp:social-links -->

<!-- wp:spacer {"height":32} -->
<div style="height:32px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
95 changes: 95 additions & 0 deletions two-column-landing-page/experimental-theme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"global": {
"settings": {
"color": {
"gradients": [ ],
"palette": [
{
"slug": "background",
"color": "#ffffff"
},
{
"slug": "foreground",
"color": "#000000"
},
{
"slug": "primary",
"color": "#10506b"
},
{
"slug": "secondary",
"color": "#ff4d4d"
}
]
},
"typography": {
"customFontSize": true,
"customLineHeight": true,
"fontSizes": [
{
"slug": "small",
"size": 13
},
{
"slug": "normal",
"size": 16
},
{
"slug": "medium",
"size": 20
},
{
"slug": "large",
"size": 36
},
{
"slug": "huge",
"size": 48
}
],
"spacing": {
"customPadding": true,
"units": [ "px", "em", "rem", "vh", "vw" ]
}
},
"custom": {
"font-family": "'Inter var', sans-serif",
"line-height": 1.8,
"spacing-horizontal": "2rem",
"spacing-vertical": "1rem",
"width-content": "700px",
"width-wide": "1280px"
}
},
"styles": {
"color": {
"text": "var(--wp--preset--color--foreground)",
"link": "var(--wp--preset--color--primary)"
},
"typography": {
"fontSize": "calc(1px * var(--wp--preset--font-size--normal))"
}
}
},
"core/heading/h1": {
"styles": {
"typography": {
"fontSize": "calc(1px * var(--wp--preset--font-size--huge))"
}
}
},
"core/heading/h2": {
"styles": {
"typography": {
"fontSize": "calc(1px * var(--wp--preset--font-size--large))"
}
}
},
"core/heading/h3": {
"styles": {
"typography": {
"fontSize": "calc(1px * var(--wp--preset--font-size--medium))"
}
}
}
}
43 changes: 43 additions & 0 deletions two-column-landing-page/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

if ( ! function_exists( 'two_column_landing_page_support' ) ) :
function two_column_landing_page_support() {

// Alignwide and alignfull classes in the block editor
add_theme_support( 'align-wide' );

// Adding support for core block visual styles.
add_theme_support( 'wp-block-styles' );

// Adding support for responsive embedded content.
add_theme_support( 'responsive-embeds' );

// Add support for custom line height controls.
add_theme_support( 'custom-line-height' );

// Add support for experimental link color control.
add_theme_support( 'experimental-link-color' );

// Add support for custom Cover Block spacing.
add_theme_support('custom-spacing');

// Add support for editor styles.
add_theme_support( 'editor-styles' );

// Enqueue editor styles.
add_editor_style(
array(
'style-shared.css',
'style-editor.css'
) );
}
add_action( 'after_setup_theme', 'two_column_landing_page_support' );
endif;

/**
* Enqueue scripts and styles.
*/
function two_column_landing_page_scripts() {
wp_enqueue_style( 'two-column-landing-page-styles', get_stylesheet_uri() );
}
add_action( 'wp_enqueue_scripts', 'two_column_landing_page_scripts' );
1 change: 1 addition & 0 deletions two-column-landing-page/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Nothing to see here. :)
Binary file added two-column-landing-page/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
95 changes: 95 additions & 0 deletions two-column-landing-page/style-shared.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/*
* Shared Styles
*/

/*--------------------------------------------------------------
# Fonts
--------------------------------------------------------------*/

@font-face {
font-family: "Inter var";
font-weight: 100 900; /* stylelint-disable-line font-weight-notation */
font-style: normal;
src: url(assets/Inter-upright-var.woff2) format("woff2");
}

@font-face {
font-family: "Inter var";
font-weight: 100 900; /* stylelint-disable-line font-weight-notation */
font-style: italic;
src: url(assets/Inter-italic-var.woff2) format("woff2");
}

/*--------------------------------------------------------------
# Defaults
--------------------------------------------------------------*/

body {
font-family: var(--wp--custom--font-family);
background-color: var(--wp--preset--color--background);
}

p {
line-height: var(--wp--custom--line-height);
}

/*--------------------------------------------------------------
# Color Palette
--------------------------------------------------------------*/

.has-background-color {
color: var(--wp--preset--color--background);
}

.has-background-background-color {
background-color: var(--wp--preset--color--background);
}

.has-foreground-color {
color: var(--wp--preset--color--foreground);
}

.has-foreground-background-color {
background-color: var(--wp--preset--color--foreground);
}

.has-primary-color {
color: var(--wp--preset--color--primary);
}

.has-primary-background-color {
background-color: var(--wp--preset--color--primary);
}

.has-secondary-color {
color: var(--wp--preset--color--secondary);
}

.has-secondary-background-color {
background-color: var(--wp--preset--color--secondary);
}

/*--------------------------------------------------------------
# Shared Block Overrides
--------------------------------------------------------------*/

/* Site Header */

.wp-block-site-title {
margin-bottom: 0;
}

.wp-block-site-title a {
text-decoration: none;
}

.wp-block-site-tagline {
margin-top: 0;
}

/* Columns */

.wp-block-columns {
margin-top: 0;
margin-bottom: 0;
}
Loading