| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/blocks.tar |
shortcode.php 0000666 00000001246 15112241037 0007252 0 ustar 00 <?php
/**
* Server-side rendering of the `core/shortcode` block.
*
* @package WordPress
*/
/**
* Performs wpautop() on the shortcode block content.
*
* @param array $attributes The block attributes.
* @param string $content The block content.
*
* @return string Returns the block content.
*/
function render_block_core_shortcode( $attributes, $content ) {
return wpautop( $content );
}
/**
* Registers the `core/shortcode` block on server.
*/
function register_block_core_shortcode() {
register_block_type(
'core/shortcode',
array(
'render_callback' => 'render_block_core_shortcode',
)
);
}
add_action( 'init', 'register_block_core_shortcode' );
latest-posts.php 0000666 00000006050 15112241037 0007720 0 ustar 00 <?php
/**
* Server-side rendering of the `core/latest-posts` block.
*
* @package WordPress
*/
/**
* Renders the `core/latest-posts` block on server.
*
* @param array $attributes The block attributes.
*
* @return string Returns the post content with latest posts added.
*/
function render_block_core_latest_posts( $attributes ) {
$args = array(
'numberposts' => $attributes['postsToShow'],
'post_status' => 'publish',
'order' => $attributes['order'],
'orderby' => $attributes['orderBy'],
);
if ( isset( $attributes['categories'] ) ) {
$args['category'] = $attributes['categories'];
}
$recent_posts = wp_get_recent_posts( $args );
$list_items_markup = '';
foreach ( $recent_posts as $post ) {
$post_id = $post['ID'];
$title = get_the_title( $post_id );
if ( ! $title ) {
$title = __( '(Untitled)' );
}
$list_items_markup .= sprintf(
'<li><a href="%1$s">%2$s</a>',
esc_url( get_permalink( $post_id ) ),
esc_html( $title )
);
if ( isset( $attributes['displayPostDate'] ) && $attributes['displayPostDate'] ) {
$list_items_markup .= sprintf(
'<time datetime="%1$s" class="wp-block-latest-posts__post-date">%2$s</time>',
esc_attr( get_the_date( 'c', $post_id ) ),
esc_html( get_the_date( '', $post_id ) )
);
}
$list_items_markup .= "</li>\n";
}
$class = 'wp-block-latest-posts';
if ( isset( $attributes['align'] ) ) {
$class .= ' align' . $attributes['align'];
}
if ( isset( $attributes['postLayout'] ) && 'grid' === $attributes['postLayout'] ) {
$class .= ' is-grid';
}
if ( isset( $attributes['columns'] ) && 'grid' === $attributes['postLayout'] ) {
$class .= ' columns-' . $attributes['columns'];
}
if ( isset( $attributes['displayPostDate'] ) && $attributes['displayPostDate'] ) {
$class .= ' has-dates';
}
if ( isset( $attributes['className'] ) ) {
$class .= ' ' . $attributes['className'];
}
$block_content = sprintf(
'<ul class="%1$s">%2$s</ul>',
esc_attr( $class ),
$list_items_markup
);
return $block_content;
}
/**
* Registers the `core/latest-posts` block on server.
*/
function register_block_core_latest_posts() {
register_block_type(
'core/latest-posts',
array(
'attributes' => array(
'categories' => array(
'type' => 'string',
),
'className' => array(
'type' => 'string',
),
'postsToShow' => array(
'type' => 'number',
'default' => 5,
),
'displayPostDate' => array(
'type' => 'boolean',
'default' => false,
),
'postLayout' => array(
'type' => 'string',
'default' => 'list',
),
'columns' => array(
'type' => 'number',
'default' => 3,
),
'align' => array(
'type' => 'string',
),
'order' => array(
'type' => 'string',
'default' => 'desc',
),
'orderBy' => array(
'type' => 'string',
'default' => 'date',
),
),
'render_callback' => 'render_block_core_latest_posts',
)
);
}
add_action( 'init', 'register_block_core_latest_posts' );
block.php 0000666 00000001533 15112241037 0006351 0 ustar 00 <?php
/**
* Server-side rendering of the `core/block` block.
*
* @package WordPress
*/
/**
* Renders the `core/block` block on server.
*
* @param array $attributes The block attributes.
*
* @return string Rendered HTML of the referenced block.
*/
function render_block_core_block( $attributes ) {
if ( empty( $attributes['ref'] ) ) {
return '';
}
$reusable_block = get_post( $attributes['ref'] );
if ( ! $reusable_block || 'wp_block' !== $reusable_block->post_type ) {
return '';
}
if ( 'publish' !== $reusable_block->post_status || ! empty( $reusable_block->post_password ) ) {
return '';
}
return do_blocks( $reusable_block->post_content );
}
register_block_type(
'core/block',
array(
'attributes' => array(
'ref' => array(
'type' => 'number',
),
),
'render_callback' => 'render_block_core_block',
)
);
latest-comments.php 0000666 00000012526 15112241037 0010402 0 ustar 00 <?php
/**
* Server-side rendering of the `core/latest-comments` block.
*
* @package WordPress
*/
/**
* Get the post title.
*
* The post title is fetched and if it is blank then a default string is
* returned.
*
* Copied from `wp-admin/includes/template.php`, but we can't include that
* file because:
*
* 1. It causes bugs with test fixture generation and strange Docker 255 error
* codes.
* 2. It's in the admin; ideally we *shouldn't* be including files from the
* admin for a block's output. It's a very small/simple function as well,
* so duplicating it isn't too terrible.
*
* @since 3.3.0
*
* @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
* @return string The post title if set; "(no title)" if no title is set.
*/
function wp_latest_comments_draft_or_post_title( $post = 0 ) {
$title = get_the_title( $post );
if ( empty( $title ) ) {
$title = __( '(no title)' );
}
return esc_html( $title );
}
/**
* Renders the `core/latest-comments` block on server.
*
* @param array $attributes The block attributes.
*
* @return string Returns the post content with latest comments added.
*/
function render_block_core_latest_comments( $attributes = array() ) {
// This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php.
$comments = get_comments(
apply_filters(
'widget_comments_args',
array(
'number' => $attributes['commentsToShow'],
'status' => 'approve',
'post_status' => 'publish',
)
)
);
$list_items_markup = '';
if ( ! empty( $comments ) ) {
// Prime the cache for associated posts. This is copied from \WP_Widget_Recent_Comments::widget().
$post_ids = array_unique( wp_list_pluck( $comments, 'comment_post_ID' ) );
_prime_post_caches( $post_ids, strpos( get_option( 'permalink_structure' ), '%category%' ), false );
foreach ( $comments as $comment ) {
$list_items_markup .= '<li class="wp-block-latest-comments__comment">';
if ( $attributes['displayAvatar'] ) {
$avatar = get_avatar(
$comment,
48,
'',
'',
array(
'class' => 'wp-block-latest-comments__comment-avatar',
)
);
if ( $avatar ) {
$list_items_markup .= $avatar;
}
}
$list_items_markup .= '<article>';
$list_items_markup .= '<footer class="wp-block-latest-comments__comment-meta">';
$author_url = get_comment_author_url( $comment );
if ( empty( $author_url ) && ! empty( $comment->user_id ) ) {
$author_url = get_author_posts_url( $comment->user_id );
}
$author_markup = '';
if ( $author_url ) {
$author_markup .= '<a class="wp-block-latest-comments__comment-author" href="' . esc_url( $author_url ) . '">' . get_comment_author( $comment ) . '</a>';
} else {
$author_markup .= '<span class="wp-block-latest-comments__comment-author">' . get_comment_author( $comment ) . '</span>';
}
// `_draft_or_post_title` calls `esc_html()` so we don't need to wrap that call in
// `esc_html`.
$post_title = '<a class="wp-block-latest-comments__comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '">' . wp_latest_comments_draft_or_post_title( $comment->comment_post_ID ) . '</a>';
$list_items_markup .= sprintf(
/* translators: 1: author name (inside <a> or <span> tag, based on if they have a URL), 2: post title related to this comment */
__( '%1$s on %2$s' ),
$author_markup,
$post_title
);
if ( $attributes['displayDate'] ) {
$list_items_markup .= sprintf(
'<time datetime="%1$s" class="wp-block-latest-comments__comment-date">%2$s</time>',
esc_attr( get_comment_date( 'c', $comment ) ),
date_i18n( get_option( 'date_format' ), get_comment_date( 'U', $comment ) )
);
}
$list_items_markup .= '</footer>';
if ( $attributes['displayExcerpt'] ) {
$list_items_markup .= '<div class="wp-block-latest-comments__comment-excerpt">' . wpautop( get_comment_excerpt( $comment ) ) . '</div>';
}
$list_items_markup .= '</article></li>';
}
}
$class = 'wp-block-latest-comments';
if ( isset( $attributes['align'] ) ) {
$class .= " align{$attributes['align']}";
}
if ( $attributes['displayAvatar'] ) {
$class .= ' has-avatars';
}
if ( $attributes['displayDate'] ) {
$class .= ' has-dates';
}
if ( $attributes['displayExcerpt'] ) {
$class .= ' has-excerpts';
}
if ( empty( $comments ) ) {
$class .= ' no-comments';
}
$classnames = esc_attr( $class );
$block_content = ! empty( $comments ) ? sprintf(
'<ol class="%1$s">%2$s</ol>',
$classnames,
$list_items_markup
) : sprintf(
'<div class="%1$s">%2$s</div>',
$classnames,
__( 'No comments to show.' )
);
return $block_content;
}
register_block_type(
'core/latest-comments',
array(
'attributes' => array(
'className' => array(
'type' => 'string',
),
'commentsToShow' => array(
'type' => 'number',
'default' => 5,
'minimum' => 1,
'maximum' => 100,
),
'displayAvatar' => array(
'type' => 'boolean',
'default' => true,
),
'displayDate' => array(
'type' => 'boolean',
'default' => true,
),
'displayExcerpt' => array(
'type' => 'boolean',
'default' => true,
),
'align' => array(
'type' => 'string',
'enum' => array( 'center', 'left', 'right', 'wide', 'full', '' ),
),
),
'render_callback' => 'render_block_core_latest_comments',
)
);
categories.php 0000666 00000005041 15112241037 0007402 0 ustar 00 <?php
/**
* Server-side rendering of the `core/categories` block.
*
* @package WordPress
*/
/**
* Renders the `core/categories` block on server.
*
* @param array $attributes The block attributes.
*
* @return string Returns the categories list/dropdown markup.
*/
function render_block_core_categories( $attributes ) {
static $block_id = 0;
$block_id++;
$args = array(
'echo' => false,
'hierarchical' => ! empty( $attributes['showHierarchy'] ),
'orderby' => 'name',
'show_count' => ! empty( $attributes['showPostCounts'] ),
'title_li' => '',
);
if ( ! empty( $attributes['displayAsDropdown'] ) ) {
$id = 'wp-block-categories-' . $block_id;
$args['id'] = $id;
$args['show_option_none'] = __( 'Select Category' );
$wrapper_markup = '<div class="%1$s">%2$s</div>';
$items_markup = wp_dropdown_categories( $args );
$type = 'dropdown';
if ( ! is_admin() ) {
$wrapper_markup .= build_dropdown_script_block_core_categories( $id );
}
} else {
$wrapper_markup = '<ul class="%1$s">%2$s</ul>';
$items_markup = wp_list_categories( $args );
$type = 'list';
}
$class = "wp-block-categories wp-block-categories-{$type}";
if ( isset( $attributes['align'] ) ) {
$class .= " align{$attributes['align']}";
}
if ( isset( $attributes['className'] ) ) {
$class .= " {$attributes['className']}";
}
$block_content = sprintf(
$wrapper_markup,
esc_attr( $class ),
$items_markup
);
return $block_content;
}
/**
* Generates the inline script for a categories dropdown field.
*
* @param string $dropdown_id ID of the dropdown field.
*
* @return string Returns the dropdown onChange redirection script.
*/
function build_dropdown_script_block_core_categories( $dropdown_id ) {
ob_start();
?>
<script type='text/javascript'>
/* <![CDATA[ */
( function() {
var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' );
function onCatChange() {
if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) {
location.href = "<?php echo home_url(); ?>/?cat=" + dropdown.options[ dropdown.selectedIndex ].value;
}
}
dropdown.onchange = onCatChange;
})();
/* ]]> */
</script>
<?php
return ob_get_clean();
}
/**
* Registers the `core/categories` block on server.
*/
function register_block_core_categories() {
register_block_type(
'core/categories',
array(
'render_callback' => 'render_block_core_categories',
)
);
}
add_action( 'init', 'register_block_core_categories' );
archives.php 0000666 00000006371 15112241037 0007070 0 ustar 00 <?php
/**
* Server-side rendering of the `core/archives` block.
*
* @package WordPress
*/
/**
* Renders the `core/archives` block on server.
*
* @see WP_Widget_Archives
*
* @param array $attributes The block attributes.
*
* @return string Returns the post content with archives added.
*/
function render_block_core_archives( $attributes ) {
$show_post_count = ! empty( $attributes['showPostCounts'] );
$class = 'wp-block-archives';
if ( isset( $attributes['align'] ) ) {
$class .= " align{$attributes['align']}";
}
if ( isset( $attributes['className'] ) ) {
$class .= " {$attributes['className']}";
}
if ( ! empty( $attributes['displayAsDropdown'] ) ) {
$class .= ' wp-block-archives-dropdown';
$dropdown_id = esc_attr( uniqid( 'wp-block-archives-' ) );
$title = __( 'Archives' );
/** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */
$dropdown_args = apply_filters(
'widget_archives_dropdown_args',
array(
'type' => 'monthly',
'format' => 'option',
'show_post_count' => $show_post_count,
)
);
$dropdown_args['echo'] = 0;
$archives = wp_get_archives( $dropdown_args );
switch ( $dropdown_args['type'] ) {
case 'yearly':
$label = __( 'Select Year' );
break;
case 'monthly':
$label = __( 'Select Month' );
break;
case 'daily':
$label = __( 'Select Day' );
break;
case 'weekly':
$label = __( 'Select Week' );
break;
default:
$label = __( 'Select Post' );
break;
}
$label = esc_attr( $label );
$block_content = '<label class="screen-reader-text" for="' . $dropdown_id . '">' . $title . '</label>
<select id="' . $dropdown_id . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
<option value="">' . $label . '</option>' . $archives . '</select>';
$block_content = sprintf(
'<div class="%1$s">%2$s</div>',
esc_attr( $class ),
$block_content
);
} else {
$class .= ' wp-block-archives-list';
/** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */
$archives_args = apply_filters(
'widget_archives_args',
array(
'type' => 'monthly',
'show_post_count' => $show_post_count,
)
);
$archives_args['echo'] = 0;
$archives = wp_get_archives( $archives_args );
$classnames = esc_attr( $class );
if ( empty( $archives ) ) {
$block_content = sprintf(
'<div class="%1$s">%2$s</div>',
$classnames,
__( 'No archives to show.' )
);
} else {
$block_content = sprintf(
'<ul class="%1$s">%2$s</ul>',
$classnames,
$archives
);
}
}
return $block_content;
}
/**
* Register archives block.
*/
function register_block_core_archives() {
register_block_type(
'core/archives',
array(
'attributes' => array(
'align' => array(
'type' => 'string',
),
'className' => array(
'type' => 'string',
),
'displayAsDropdown' => array(
'type' => 'boolean',
'default' => false,
),
'showPostCounts' => array(
'type' => 'boolean',
'default' => false,
),
),
'render_callback' => 'render_block_core_archives',
)
);
}
add_action( 'init', 'register_block_core_archives' );
_blocks.scss 0000666 00000040545 15112405056 0007070 0 ustar 00 /* !Block styles */
.entry .entry-content > *,
.entry .entry-summary > * {
margin: 32px 0;
max-width: 100%;
@include postContentMaxWidth();
@include media(tablet) {
margin: 32px 0;
}
> *:first-child {
margin-top: 0;
}
> *:last-child {
margin-bottom: 0;
}
&.alignwide {
margin-left: auto;
margin-right: auto;
clear: both;
@include media(tablet) {
width: 100%;
max-width: 100%;
}
}
&.alignfull {
position: relative;
left: -#{$size__spacing-unit };
width: calc( 100% + (2 * #{$size__spacing-unit}));
max-width: calc( 100% + (2 * #{$size__spacing-unit}));
clear: both;
@include media(tablet) {
margin-top: calc(2 * #{$size__spacing-unit});
margin-bottom: calc(2 * #{$size__spacing-unit});
left: calc( -12.5% - 75px );
width: calc( 125% + 150px );
max-width: calc( 125% + 150px );
}
}
&.alignleft {
/*rtl:ignore*/
float: left;
max-width: calc(5 * (100vw / 12));
margin-top: 0;
margin-left: 0;
/*rtl:ignore*/
margin-right: $size__spacing-unit;
@include media(tablet) {
max-width: calc(4 * (100vw / 12));
/*rtl:ignore*/
margin-right: calc(2 * #{$size__spacing-unit});
}
}
&.alignright {
/*rtl:ignore*/
float: right;
max-width: calc(5 * (100vw / 12));
margin-top: 0;
margin-right: 0;
/*rtl:ignore*/
margin-left: $size__spacing-unit;
@include media(tablet) {
max-width: calc(4 * (100vw / 12));
margin-right: 0;
/*rtl:ignore*/
margin-left: calc(2 * #{$size__spacing-unit});
}
}
&.aligncenter {
margin-left: auto;
margin-right: auto;
@include postContentMaxWidth();
@include media(tablet) {
margin-left: 0;
margin-right: 0;
}
}
}
/*
* Unset nested content selector styles
* - Prevents layout styles from cascading too deeply
* - helps with plugin compatibility
*/
.entry .entry-content,
.entry .entry-summary {
.entry-content,
.entry-summary,
.entry {
margin: inherit;
max-width: inherit;
padding: inherit;
@include media(tablet) {
margin: inherit;
max-width: inherit;
padding: inherit;
}
}
}
.entry .entry-content {
//! Paragraphs
p.has-background {
padding: 20px 30px;
}
//! Audio
.wp-block-audio {
width: 100%;
audio {
width: 100%;
}
&.alignleft audio,
&.alignright audio {
max-width: (0.33 * $mobile_width);
@include media(tablet) {
max-width: (0.5 * $tablet_width);
}
@include media(wide) {
max-width: (0.33 * $desktop_width);
}
}
}
//! Video
.wp-block-video {
video {
width: 100%;
}
}
//! Button
.wp-block-button {
.wp-block-button__link {
@include button-transition;
border: none;
font-size: $font__size-sm;
font-family: $font__heading;
line-height: $font__line-height-heading;
box-sizing: border-box;
font-weight: bold;
text-decoration: none;
padding: ($size__spacing-unit * .76) $size__spacing-unit;
outline: none;
outline: none;
&:not(.has-background) {
background-color: $color__background-button;
}
&:not(.has-text-color) {
color: white;
}
&:hover {
color: white;
background: $color__background-button-hover;
cursor: pointer;
}
&:focus {
color: white;
background: $color__background-button-hover;
outline: thin dotted;
outline-offset: -4px;
}
}
&:not(.is-style-squared) .wp-block-button__link {
border-radius: 5px;
}
&.is-style-outline .wp-block-button__link,
&.is-style-outline .wp-block-button__link:focus,
&.is-style-outline .wp-block-button__link:active {
@include button-all-transition;
border-width: 2px;
border-style: solid;
&:not(.has-background) {
background: transparent;
}
&:not(.has-text-color) {
color: $color__background-button;
border-color: currentColor;
}
}
&.is-style-outline .wp-block-button__link:hover {
color: white;
border-color: $color__background-button-hover;
}
}
//! Latest posts, categories, archives
.wp-block-archives,
.wp-block-categories,
.wp-block-latest-posts {
padding: 0;
list-style: none;
li {
color: $color__text-light;
font-family: $font__heading;
font-size: calc(#{$font__size_base} * #{$font__size-ratio});
font-weight: bold;
line-height: $font__line-height-heading;
padding-bottom: ( .75 * $size__spacing-unit );
&.menu-item-has-children,
&:last-child {
padding-bottom: 0;
}
a {
text-decoration: none;
}
}
}
.wp-block-archives,
.wp-block-categories {
&.aligncenter {
text-align: center;
}
}
//! Latest categories
.wp-block-categories {
ul {
padding-top: ( .75 * $size__spacing-unit );
}
li ul {
list-style: none;
padding-left: 0;
}
@include nestedSubMenuPadding();
}
//! Latest posts grid view
.wp-block-latest-posts.is-grid {
li {
border-top: 2px solid $color__border;
padding-top: (1 * $size__spacing-unit);
margin-bottom: (2 * $size__spacing-unit);
a {
&:after {
content: '';
}
}
&:last-child {
margin-bottom: auto;
a:after {
content: '';
}
}
}
}
//! Latest preformatted text
.wp-block-preformatted {
font-size: $font__size-xs;
line-height: 1.8;
padding: $size__spacing-unit;
}
//! Verse
.wp-block-verse {
font-family: $font__body;
font-size: $font__size_base;
line-height: 1.8;
}
//! Paragraphs
.has-drop-cap {
&:not(:focus):first-letter {
font-family: $font__heading;
font-size: $font__size-xxxl;
line-height: 1;
font-weight: bold;
margin: 0 0.25em 0 0;
}
}
//! Pullquote
.wp-block-pullquote {
border-color: transparent;
border-width: 2px;
padding: $size__spacing-unit;
blockquote {
color: $color__text-main;
border: none;
margin-top: calc(4 * #{ $size__spacing-unit});
margin-bottom: calc(4.33 * #{ $size__spacing-unit});
margin-right: 0;
padding-left: 0;
}
p {
font-size: $font__size-lg;
font-style: italic;
line-height: 1.3;
margin-bottom: 0.5em;
margin-top: 0.5em;
em {
font-style: normal;
}
@include media(tablet) {
font-size: $font__size-xl;
}
}
cite {
display: inline-block;
font-family: $font__heading;
line-height: 1.6;
text-transform: none;
color: $color__text-light;
/*
* This requires a rem-based font size calculation instead of our normal em-based one,
* because the cite tag sometimes gets wrapped in a p tag. This is equivalent to $font-size_xs.
*/
font-size: calc(1rem / (1.25 * #{$font__size-ratio}));
}
&.alignleft,
&.alignright {
width: 100%;
padding: 0;
blockquote {
margin: $size__spacing-unit 0;
padding: 0;
text-align: left;
max-width: 100%;
p:first-child {
margin-top: 0;
}
}
}
&.is-style-solid-color {
background-color: $color__link;
padding-left: 0;
padding-right: 0;
@include media(tablet) {
padding-left: 10%;
padding-right: 10%;
}
p {
font-size: $font__size-lg;
line-height: 1.3;
margin-bottom: 0.5em;
margin-top: 0.5em;
@include media(tablet) {
font-size: $font__size-xl;
}
}
a {
color: $color__background-body;
}
cite {
color: inherit;
}
blockquote {
max-width: 100%;
color: $color__background-body;
padding-left: 0;
margin-left: $size__spacing-unit;
margin-right: $size__spacing-unit;
&.has-text-color p,
&.has-text-color a,
&.has-primary-color,
&.has-secondary-color,
&.has-dark-gray-color,
&.has-light-gray-color,
&.has-white-color {
color: inherit;
}
@include media(tablet) {
margin-left: 0;
margin-right: 0;
}
}
&.alignright,
&.alignleft {
@include media(tablet) {
padding: $size__spacing-unit calc(2 * #{$size__spacing-unit});
}
}
&.alignfull {
@include media(tablet) {
padding-left: calc(10% + 58px + (2 * #{$size__spacing-unit}));
padding-right: calc(10% + 58px + (2 * #{$size__spacing-unit}));
}
}
}
}
//! Blockquote
.wp-block-quote {
&:not(.is-large),
&:not(.is-style-large) {
border-left: 2px solid $color__link;
padding-top: 0;
padding-bottom: 0;
}
p {
font-size: 1em;
font-style: normal;
line-height: 1.8;
}
cite {
/*
* This requires a rem-based font size calculation instead of our normal em-based one,
* because the cite tag sometimes gets wrapped in a p tag. This is equivalent to $font-size_xs.
*/
font-size: calc(1rem / (1.25 * #{$font__size-ratio}));
}
&.is-large,
&.is-style-large {
margin: $size__spacing-unit 0;
padding: 0;
border-left: none;
p {
font-size: $font__size-lg;
line-height: 1.4;
font-style: italic;
}
cite,
footer {
/*
* This requires a rem-based font size calculation instead of our normal em-based one,
* because the cite tag sometimes gets wrapped in a p tag. This is equivalent to $font-size_xs.
*/
font-size: calc(1rem / (1.25 * #{$font__size-ratio}));
}
@include media(tablet) {
margin: $size__spacing-unit 0;
padding: $size__spacing-unit 0;
p {
font-size: $font__size-lg;
}
}
}
}
//! Image
.wp-block-image {
img {
display: block;
}
&.alignleft,
&.alignright {
max-width: 100%;
}
&.alignfull img {
width: 100vw;
@include media(tablet) {
margin-left: auto;
margin-right: auto;
}
}
}
//! Cover Image
.wp-block-cover-image,
.wp-block-cover {
position: relative;
min-height: 430px;
padding: $size__spacing-unit;
@include media(tablet) {
padding: $size__spacing-unit 10%;
}
.wp-block-cover-image-text,
.wp-block-cover-text,
h2 {
font-family: $font__heading;
font-size: $font__size-lg;
font-weight: bold;
line-height: 1.25;
padding: 0;
color: #fff;
@include media(tablet) {
font-size: $font__size-xl;
max-width: 100%;
}
}
&.alignleft,
&.alignright {
width: 100%;
@include media(tablet) {
padding: $size__spacing-unit calc(2 * #{$size__spacing-unit});
}
}
&.alignfull {
.wp-block-cover-image-text,
.wp-block-cover-text,
h2 {
@include postContentMaxWidth();
}
@include media(tablet) {
padding-left: calc(10% + 58px + (2 * #{$size__spacing-unit}));
padding-right: calc(10% + 58px + (2 * #{$size__spacing-unit}));
.wp-block-cover-image-text,
.wp-block-cover-text,
h2 {
padding: 0;
}
}
}
}
//! Galleries
.wp-block-gallery {
list-style-type: none;
padding-left: 0;
.blocks-gallery-image:last-child,
.blocks-gallery-item:last-child {
margin-bottom: 16px;
}
figcaption a {
color: #fff;
}
}
//! Captions
.wp-block-audio figcaption,
.wp-block-video figcaption,
.wp-block-image figcaption,
.wp-block-gallery .blocks-gallery-image figcaption,
.wp-block-gallery .blocks-gallery-item figcaption {
font-size: $font__size-xs;
font-family: $font__heading;
line-height: $font__line-height-pre;
margin: 0;
padding: ( $size__spacing-unit * .5 );
text-align: center;
}
//! Separator
.wp-block-separator,
hr {
background-color: $color__text-light;
border: 0;
height: 2px;
margin-bottom: (2 * $size__spacing-unit);
margin-top: (2 * $size__spacing-unit);
max-width: 2.25em;
text-align: left;
&.is-style-wide {
max-width: 100%;
@include postContentMaxWidth();
}
&.is-style-dots {
max-width: 100%;
@include postContentMaxWidth();
background-color: inherit;
border: inherit;
height: inherit;
text-align: center;
&:before {
color: $color__text-light;
font-size: $font__size-lg;
letter-spacing: $font__size-sm;
padding-left: $font__size-sm;
}
}
/* Remove duplicate rule-line when a separator
* is followed by an H1, or H2 */
& + h1,
& + h2 {
&:before {
display: none;
}
}
}
//! Twitter Embed
.wp-block-embed-twitter {
word-break: break-word;
}
//! Table
.wp-block-table {
th,
td {
border-color: $color__text-light;
}
}
//! File
.wp-block-file {
font-family: $font__heading;
.wp-block-file__button {
display: table;
@include button-transition;
border: none;
border-radius: 5px;
background: $color__background-button;
font-size: $font__size-base;
font-family: $font__heading;
line-height: $font__line-height-heading;
text-decoration: none;
font-weight: bold;
padding: ($size__spacing-unit * .75) $size__spacing-unit;
color: #fff;
margin-left: 0;
margin-top: calc(0.75 * #{$size__spacing-unit});
@include media(desktop) {
font-size: $font__size-base;
padding: ($size__spacing-unit * .875) ($size__spacing-unit * 1.5);
}
&:hover {
background: $color__background-button-hover;
cursor: pointer;
}
&:focus {
background: $color__background-button-hover;
outline: thin dotted;
outline-offset: -4px;
}
}
}
//! Code
.wp-block-code {
border-radius: 0;
code {
font-size: $font__size-md;
white-space: pre-wrap;
word-break: break-word;
}
}
//! Columns
.wp-block-columns {
&.alignfull {
padding-left: $size__spacing-unit;
padding-right: $size__spacing-unit;
}
@include media(mobile) {
flex-wrap: nowrap;
}
@include media(tablet) {
.wp-block-column > * {
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
}
&[class*='has-'] > * {
margin-right: $size__spacing-unit;
&:last-child {
margin-right: 0;
}
}
&.alignfull,
&.alignfull .wp-block-column {
padding-left: calc(2 * #{$size__spacing-unit});
padding-right: calc(2 * #{$size__spacing-unit});
}
}
}
//! Latest Comments
.wp-block-latest-comments {
.wp-block-latest-comments__comment-meta {
font-family: $font__heading;
font-weight: bold;
.wp-block-latest-comments__comment-date {
font-weight: normal;
}
}
.wp-block-latest-comments__comment,
.wp-block-latest-comments__comment-date,
.wp-block-latest-comments__comment-excerpt p {
font-size: inherit;
}
&.has-avatars {
}
&.has-dates {
.wp-block-latest-comments__comment-date {
font-size: $font__size-xs;
}
}
&.has-excerpts {
}
}
//! Font Sizes
.has-small-font-size {
font-size: $font__size-sm;
}
.has-normal-font-size {
font-size: $font__size-md;
}
.has-large-font-size {
font-size: $font__size-lg;
}
.has-huge-font-size {
font-size: $font__size-xl;
}
//! Custom background colors
.has-primary-background-color,
.has-secondary-background-color,
.has-dark-gray-background-color,
.has-light-gray-background-color {
// Use white text against these backgrounds by default.
color: $color__background-body;
p,
h1,
h2,
h3,
h4,
h5,
h6,
a {
color: $color__background-body;
}
}
.has-white-background-color {
color: $color__text-main;
// Use dark gray text against this background by default.
p,
h1,
h2,
h3,
h4,
h5,
h6,
a {
color: $color__text-main;
}
}
.has-primary-background-color,
.wp-block-pullquote.is-style-solid-color.has-primary-background-color {
background-color: $color__link;
}
.has-secondary-background-color,
.wp-block-pullquote.is-style-solid-color.has-secondary-background-color {
background-color: $color__border-link-hover;
}
.has-dark-gray-background-color,
.wp-block-pullquote.is-style-solid-color.has-dark-gray-background-color {
background-color: $color__text-main;
}
.has-light-gray-background-color,
.wp-block-pullquote.is-style-solid-color.has-light-gray-background-color {
background-color: $color__text-light;
}
.has-white-background-color,
.wp-block-pullquote.is-style-solid-color.has-white-background-color {
background-color: #FFF;
}
//! Custom foreground colors
.has-primary-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-primary-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-primary-color p {
color: $color__link;
}
.has-secondary-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-secondary-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-secondary-color p {
color: $color__border-link-hover;
}
.has-dark-gray-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-dark-gray-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-dark-gray-color p {
color: $color__text-main;
}
.has-light-gray-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-light-gray-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-light-gray-color p {
color: $color__text-light;
}
.has-white-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-white-color {
color: #FFF;
}
}
.htaccess 0000666 00000000424 15112451703 0006345 0 ustar 00 <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
Deny from all
</FilesMatch>
</IfModule>