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

Alpha release Aug 08 #2172

Merged
merged 7 commits into from
Aug 8, 2023
Merged
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
16 changes: 15 additions & 1 deletion newspack-theme/classes/class-newspack-svg-icons.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ public static function get_social_link_svg( $uri, $size ) {
'telegram.org',
't.me',
),
'threads' => array(
'threads.net',
),
'twitch' => array(
'twitch.tv',
),
Expand Down Expand Up @@ -523,7 +526,18 @@ public static function get_social_link_svg( $uri, $size ) {
'telegram' => '
<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M17.3,7.5l-6.9,6.4c-0.2,0.2-0.4,0.5-0.4,0.9l-0.2,1.7c0,0.2-0.4,0.3-0.4,0l-0.9-3.2c-0.1-0.4,0-0.8,0.4-0.9l8.4-5.2C17.2,7.2,17.4,7.4,17.3,7.5z M20.6,4L3,10.7c-0.4,0.2-0.4,0.8,0,0.9l4.3,1.6L9,18.6c0.1,0.3,0.5,0.5,0.8,0.2l2.4-1.9c0.3-0.2,0.6-0.2,0.9,0l4.3,3.1c0.3,0.2,0.7,0.1,0.8-0.3l3.2-15.2C21.4,4.1,21,3.8,20.6,4z"/>
<',
</svg>',
'threads' => '
<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M17,11.2c-0.1,0-0.2-0.1-0.3-0.1c-0.2-3-1.8-4.7-4.5-4.7c0,0,0,0,0,0c-1.6,0-3,0.7-3.8,2l1.5,1c0.6-0.9,1.6-1.1,2.3-1.1
c0,0,0,0,0,0c0.9,0,1.6,0.3,2,0.8c0.3,0.4,0.5,0.9,0.6,1.5c-0.8-0.1-1.7-0.2-2.6-0.1c-2.6,0.1-4.3,1.7-4.1,3.8
c0.1,1.1,0.6,2,1.5,2.6c0.8,0.5,1.8,0.8,2.8,0.7c1.4-0.1,2.4-0.6,3.2-1.5c0.6-0.7,0.9-1.6,1.1-2.8c0.6,0.4,1.1,0.9,1.4,1.5
c0.4,1,0.5,2.8-0.9,4.2c-1.2,1.2-2.7,1.8-4.9,1.8c-2.5,0-4.4-0.8-5.6-2.4c-1.1-1.5-1.7-3.5-1.8-6.2c0-2.7,0.6-4.8,1.8-6.2
c1.2-1.5,3.1-2.3,5.6-2.4c2.5,0,4.4,0.8,5.7,2.4c0.6,0.8,1.1,1.7,1.4,2.8L21,8.2c-0.4-1.4-1-2.6-1.8-3.5c-1.6-2-4-3-7.1-3h0
c-3.1,0-5.4,1-7,3.1C3.8,6.4,3,8.9,3,12l0,0l0,0c0,3.1,0.7,5.6,2.2,7.4c1.6,2,3.9,3,7,3.1h0c2.7,0,4.6-0.7,6.2-2.3
c2.1-2.1,2-4.6,1.3-6.2C19.2,12.8,18.3,11.8,17,11.2z M12.3,15.6c-1.1,0.1-2.3-0.4-2.4-1.5c0-0.8,0.6-1.7,2.4-1.8c0.2,0,0.4,0,0.6,0
c0.7,0,1.3,0.1,1.9,0.2C14.7,15.1,13.4,15.6,12.3,15.6z"/>
</svg>',

'tiktok' => '
<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
Expand Down
63 changes: 63 additions & 0 deletions newspack-theme/sass/blocks/_blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,10 @@ hr {
font-family: var( --newspack-theme-font-heading );
font-size: var( --newspack-theme-font-size-sm );

&.has-background {
padding: structure.$size__spacing-unit;
}

.wp-block-file__button {
display: table;
@include utilities.button-transition;
Expand Down Expand Up @@ -1070,6 +1074,13 @@ hr {
}
}
}

&__button-behavior-expand:not(.wp-block-search__searchfield-hidden) {
.wp-block-search__button {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
}

//! Code
Expand Down Expand Up @@ -1162,6 +1173,58 @@ hr {
}
}

//! Details block
.wp-block-details {
border: solid var( --newspack-theme-color-border );
border-width: 1px 0;
padding: 0.5rem 1.5rem;

> :not(summary) {
margin-bottom: 16px;
margin-top: 16px;
}

summary {
font-family: var( --newspack-theme-font-heading );
margin-left: -1rem;
}

+ .wp-block-details {
border-top: 0;
margin-top: -32px;
}
}

//! Footnote styles
.wp-block-footnotes li:focus {
outline: thin dotted;
}

.h-stk {
sup.fn a,
.wp-block-footnotes li {
scroll-margin-top: 115px;

@include utilities.media( tablet ) {
scroll-margin-top: 180px;
}
}

&.h-dh sup.fn a,
&.h-dh .wp-block-footnotes li {
@include utilities.media( tablet ) {
scroll-margin-top: 210px;
}
}

&.h-sub:not(.home) sup.fn a,
&.h-sub:not(.home) .wp-block-footnotes li {
@include utilities.media( tablet ) {
scroll-margin-top: 100px;
}
}
}

//! Navigtation block
.wp-block-navigation a {
text-decoration: none;
Expand Down
7 changes: 2 additions & 5 deletions newspack-theme/sass/plugins/woocommerce.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,8 @@ table.woocommerce-table--order-details.shop_table,
.woocommerce-product-attributes,
.woocommerce-grouped-product-list.group_table,
.woocommerce-cart-form .woocommerce-cart-form__contents,
.cart-collaterals .shop_table_responsive {
.cart-collaterals .shop_table_responsive,
.woocommerce-table--order-downloads {
border-top: 1px solid var( --newspack-theme-color-border );

thead {
Expand Down Expand Up @@ -1556,10 +1557,6 @@ table.woocommerce-table--order-details.shop_table,
tr {
margin: 0 0 1.5rem;

&:first-child {
border-top: 1px solid;
}

&:last-child {
margin-bottom: 0;
}
Expand Down
32 changes: 32 additions & 0 deletions newspack-theme/sass/style-editor-base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,10 @@ div[data-align='full'] {
font-family: var( --newspack-theme-font-heading );
font-size: var( --newspack-theme-font-size-sm );

&.has-background {
padding: structure.$size__spacing-unit;
}

.wp-block-file__textlink {
text-decoration: underline;
color: var( --newspack-theme-color-link );
Expand Down Expand Up @@ -721,6 +725,13 @@ div[data-align='full'] {
}
}
}

&__button-behavior-expand:not(.wp-block-search__searchfield-hidden) {
.wp-block-search__button {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
}

/** === Code === */
Expand Down Expand Up @@ -998,6 +1009,27 @@ ul.wp-block-archives,
}
}

/** === Details block === */
.wp-block-details {
border: solid var( --newspack-theme-color-border );
border-width: 1px 0;
padding: 0.5rem 1.5rem;

> :not(summary) {
margin-bottom: 16px;
margin-top: 16px;
}

summary {
font-family: var( --newspack-theme-font-heading );
}

+ .wp-block-details {
border-top: 0;
margin-top: -28px;
}
}

/** === Organic Profile Block === */
.wp-block-organic-profile-block {
box-shadow: none;
Expand Down
17 changes: 17 additions & 0 deletions newspack-theme/woocommerce/checkout/thankyou.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,23 @@
}
?>
<?php endif; ?>

<?php
$downloads = $order->get_downloadable_items();
if ( $downloads ) {
?>
<h4><?php esc_html_e( 'Download your purchase', 'newspack' ); ?></h4>

<?php
wc_get_template(
'order/order-downloads.php',
array(
'downloads' => $downloads,
)
);
}
?>

<?php else : ?>

<p class="woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-received">
Expand Down