-
Notifications
You must be signed in to change notification settings - Fork 35
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
Poetry: add alternative header part #179
Closed
adrianaleites
wants to merge
2
commits into
WordPress:trunk
from
adrianaleites:add/poetry-header-small
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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,59 @@ | ||
<?php | ||
/** | ||
* Poetry functions and definitions | ||
* | ||
* @link https://developer.wordpress.org/themes/basics/theme-functions/ | ||
* | ||
* @package WordPress | ||
* @subpackage Poetry | ||
* @since Poetry 1.0 | ||
*/ | ||
|
||
|
||
if ( ! function_exists( 'poetry_support' ) ) : | ||
|
||
/** | ||
* Sets up theme defaults and registers support for various WordPress features. | ||
* | ||
* @since Poetry 1.0 | ||
* | ||
* @return void | ||
*/ | ||
function poetry_support() { | ||
|
||
// Enqueue editor styles. | ||
add_editor_style( 'style.css' ); | ||
} | ||
|
||
endif; | ||
|
||
add_action( 'after_setup_theme', 'poetry_support' ); | ||
|
||
if ( ! function_exists( 'poetry_styles' ) ) : | ||
|
||
/** | ||
* Enqueue styles. | ||
* | ||
* @since Poetry 1.0 | ||
* | ||
* @return void | ||
*/ | ||
function poetry_styles() { | ||
// Register theme stylesheet. | ||
$theme_version = wp_get_theme()->get( 'Version' ); | ||
|
||
$version_string = is_string( $theme_version ) ? $theme_version : false; | ||
wp_register_style( | ||
'poetry-style', | ||
get_template_directory_uri() . '/style.css', | ||
array(), | ||
$version_string | ||
); | ||
|
||
// Enqueue theme stylesheet. | ||
wp_enqueue_style( 'poetry-style' ); | ||
} | ||
|
||
endif; | ||
|
||
add_action( 'wp_enqueue_scripts', 'poetry_styles' ); |
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,25 @@ | ||
<!-- wp:group {"style":{"spacing":{"padding":{"top":"32px","bottom":"64px"}}},"className":"header-small","layout":{"type":"constrained"}} --> | ||
<div class="wp-block-group header-small" style="padding-top:32px;padding-bottom:64px"><!-- wp:group {"style":{"spacing":{"blockGap":"3rem"}},"className":"header-small__container","layout":{"type":"flex","flexWrap":"wrap","verticalAlignment":"top","justifyContent":"space-between"}} --> | ||
<div class="wp-block-group header-small__container"><!-- wp:site-title {"level":0,"isLink":false,"style":{"typography":{"fontStyle":"normal","fontWeight":"600"}},"fontSize":"medium"} /--> | ||
|
||
<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap"}} --> | ||
<div class="wp-block-group"><!-- wp:group {"style":{"spacing":{"blockGap":"0.25rem"}},"layout":{"type":"flex","orientation":"vertical"}} --> | ||
<div class="wp-block-group"><!-- wp:paragraph {"style":{"typography":{"lineHeight":"0.8","fontSize":"2rem"}},"fontFamily":"rozha-one"} --> | ||
<p class="has-rozha-one-font-family" style="font-size:2rem;line-height:0.8">Food for thoughts</p> | ||
<!-- /wp:paragraph --> | ||
|
||
<!-- wp:paragraph {"style":{"typography":{"lineHeight":"1.5"}},"fontSize":"small"} --> | ||
<p class="has-small-font-size" style="line-height:1.5">A collection of valuable thoughts by a very egocentric person.</p> | ||
<!-- /wp:paragraph --></div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:image {"width":"auto","height":"64px","sizeSlug":"large","linkDestination":"none"} --> | ||
<figure class="wp-block-image size-large is-resized"><img src="http://wp-community-day.local/wp-content/themes/poetry/assets/images/feather.png" alt="" style="width:auto;height:64px"/></figure> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this url won't work on other people's sites, let's do something like this |
||
<!-- /wp:image --></div> | ||
<!-- /wp:group --></div> | ||
<!-- /wp:group --></div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:spacer {"height":"50px"} --> | ||
<div style="height:50px" 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
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
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
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
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.
Instead of pixel values, can we use any of the presets (small, medium, large...)? If none work, let's use rem values instead
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.
I just checked and the old header has the same problem, we should do the change on both to keep it consistent