Skip to content

Commit

Permalink
Merge branch 'Sylius:2.0' into 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bunnyshellcloud authored Jan 8, 2025
2 parents fdfad57 + f746c98 commit 97417a1
Show file tree
Hide file tree
Showing 21 changed files with 102 additions and 33 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,10 @@
--tblr-bg-surface: #1E2433;
}

@font-face {
font-family: 'Inter';
src: url('../fonts/Inter-VariableFont_slnt,wght.ttf') format('truetype-variations');
font-weight: 1 999;
}

body {
--bs-body-bg: #{$body-bg};
--bs-tertiary-bg: #{$body-bg};
--bs-body-color: #{$body-color};
font-feature-settings: "cv03", "cv04", "cv11";
}

a {
Expand Down
35 changes: 35 additions & 0 deletions src/Sylius/Bundle/AdminBundle/Resources/assets/styles/_fonts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* This file is part of the Sylius package.
*
* (c) Sylius Sp. z o.o.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

:root {
font-feature-settings: "cv03", "cv04", "cv11";
}

@supports (font-variation-settings: normal) {
:root {
font-family: "InterVariable", "Arial", sans-serif;
font-optical-sizing: auto;
}
}

@font-face {
font-family: InterVariable;
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url("../fonts/InterVariable.woff2") format("woff2");
}

@font-face {
font-family: InterVariable;
font-style: italic;
font-weight: 100 900;
font-display: optional;
src: url("../fonts/InterVariable-Italic.woff2") format("woff2");
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ $btn-border-color: $input-border-color;
$pagination-active-color: inherit;
$pagination-active-bg: $gray-200;

$font-family-sans-serif: 'Inter', serif;
$font-family-sans-serif: 'Inter', 'Arial', sans-serif;

$h1-font-size: 1.6rem;
$h1-line-height: 2.1rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
@import "filters";
@import "flags";
@import "flashes";
@import "fonts";
@import "form";
@import "infinite-tree";
@import "layout";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
sylius_twig_hooks:
hooks:
'sylius_admin.base#metatags':
metatags:
template: '@SyliusAdmin/shared/layout/base/metatags.html.twig'
priority: 0

'sylius_admin.base#stylesheets':
styles:
template: '@SyliusAdmin/shared/layout/base/stylesheets.html.twig'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
<!DOCTYPE html>
<html lang="{{ app.request.locale }}">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
{% block metatags %}
{% hook generic_hook ~ '#metatags' %}
{% endblock %}

<title>{% block title %}Sylius{% endblock %}</title>

{% block metatags %}{% endblock %}
{% block stylesheets %}
{% hook generic_hook ~ '#stylesheets' %}
{% endblock %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="preload" href="{{ asset('build/admin/fonts/InterVariable.woff2', 'admin') }}" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="{{ asset('build/admin/fonts/InterVariable-Italic.woff2', 'admin') }}" as="font" type="font/woff2" crossorigin="anonymous">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function it_is_initializable(): void

function it_does_nothing_if_cart_is_not_managed(
EntityManagerInterface $manager,
OrderInterface $cart
OrderInterface $cart,
): void {
$manager->contains($cart)->willReturn(false);

Expand All @@ -53,7 +53,7 @@ function it_resets_changes_for_cart_items_and_units(
OrderItemInterface $item,
OrderItemUnitInterface $unitNew,
OrderItemUnitInterface $unitExisting,
Collection $itemsCollection
Collection $itemsCollection,
): void {
$manager->contains($cart)->willReturn(true);
$manager->getUnitOfWork()->willReturn($unitOfWork);
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 0 additions & 10 deletions src/Sylius/Bundle/ShopBundle/Resources/assets/styles/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@
* file that was distributed with this source code.
*/

@font-face {
font-family: 'Inter';
src: url('../fonts/inter-variable-font-slnt-wght.ttf') format('truetype-variations');
font-weight: 1 999;
}

html {
font-feature-settings: "cv03", "cv04", "cv11";
}

a {
text-underline-offset: 0.25em;

Expand Down
35 changes: 35 additions & 0 deletions src/Sylius/Bundle/ShopBundle/Resources/assets/styles/_fonts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* This file is part of the Sylius package.
*
* (c) Sylius Sp. z o.o.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

:root {
font-feature-settings: "cv03", "cv04", "cv11";
}

@supports (font-variation-settings: normal) {
:root {
font-family: "InterVariable", "Arial", sans-serif;
font-optical-sizing: auto;
}
}

@font-face {
font-family: InterVariable;
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url("../fonts/InterVariable.woff2") format("woff2");
}

@font-face {
font-family: InterVariable;
font-style: italic;
font-weight: 100 900;
font-display: optional;
src: url("../fonts/InterVariable-Italic.woff2") format("woff2");
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $body-color: $gray-900;

// Typography

$font-family-sans-serif: 'Inter', serif;
$font-family-sans-serif: 'Inter', 'Arial', sans-serif;
$small-font-size: .875em;

// Spacing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
@import "card";
@import "checkout";
@import "flags";
@import "fonts";
@import "form";
@import "icons";
@import "lists";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ sylius_twig_hooks:
'sylius_shop.base#body_classes':
defaults:
template: '@SyliusShop/shared/layout/base/body_classes/defaults.html.twig'
priority: 0
priority: 0

'sylius_shop.base#metatags':
metatags:
template: '@SyliusShop/shared/layout/base/metatags.html.twig'
priority: 0

'sylius_shop.base#stylesheets':
styles:
template: '@SyliusShop/shared/layout/base/styles.html.twig'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@

<html lang="{{ app.request.locale|slice(0, 2) }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<title>{% block title %}{{ sylius.channel.name }}{% endblock %}</title>

<meta content="width=device-width, initial-scale=1, maximum-scale=5, user-scalable=yes" name="viewport">

{% block metatags %}
{% hook '#metatags' with { _prefixes: prefixes } %}
{% endblock %}

<title>{% block title %}{{ sylius.channel.name }}{% endblock %}</title>

{% block stylesheets %}
{% hook '#stylesheets' with { _prefixes: prefixes } %}
{% endblock %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="preload" href="{{ asset('build/shop/fonts/InterVariable.woff2', 'shop') }}" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="{{ asset('build/shop/fonts/InterVariable-Italic.woff2', 'shop') }}" as="font" type="font/woff2" crossorigin="anonymous">
<meta content="width=device-width, initial-scale=1, maximum-scale=5, user-scalable=yes" name="viewport">

0 comments on commit 97417a1

Please sign in to comment.