Skip to content

Commit bd53d73

Browse files
committed
minor #1827 [Site] Clean templates (smnandre)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Site] Clean templates | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | Fix # | License | MIT Replaces #1822 All the clean / fixes / CS (without removing the light mode for now) Commits ------- 3de425e [Site] Clean templates
2 parents bdcc281 + 3de425e commit bd53d73

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+234
-276
lines changed
-10.7 KB
Loading
-5.42 KB
Binary file not shown.

ux.symfony.com/assets/styles/_container.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.components-container {
22
background: var(--bs-body-bg);
3-
border-radius: 15px;
3+
border-radius: 1rem;
44
border: 0.66px solid var(--bs-secondary-bg-subtle);
55

66
h4 {
@@ -10,12 +10,14 @@
1010

1111
.ux-container {
1212
border: 1px solid var(--bs-secondary-bg-subtle);
13-
border-radius: 12px;
13+
border-radius: 1rem;
1414
}
1515

16+
17+
1618
.markdown-container {
1719
border: 1px solid var(--bs-secondary-bg-subtle);
18-
border-radius: 5px;
20+
border-radius: .75rem;
1921
height: 100%;
2022
width: 100%;
2123
position: relative;

ux.symfony.com/assets/styles/app/_html.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ button:active {
4646
}
4747

4848
a.link {
49-
--color: #d9438e;
49+
--color: var(--bs-code-color);
5050
color: var(--color);
5151
position: relative;
5252
&:after {

ux.symfony.com/assets/styles/components/_Banner.scss

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
.Banner {
66
background: #0A0A0A;
7+
color: #fff;
78
}
89
.Banner + .App {
910
position: relative;
@@ -13,55 +14,53 @@
1314
display: none;
1415
}
1516

16-
.Banner .container-xxl {
17-
max-width: 1320px;
18-
margin: 0 auto;
19-
}
20-
2117
.BannerInner {
2218
display: flex;
2319
flex-direction: column;
24-
padding: 2rem 1rem;
20+
padding: 1rem 0;
2521
gap: 1rem;
2622
position: relative;
23+
margin: 0 auto;
2724
}
2825

2926
.BannerMedia {
3027
align-self: center;
3128
justify-self: center;
3229
}
3330
.BannerImage {
34-
width: 92px;
31+
width: max(10vw, 40px);
3532
height: auto;
36-
filter: drop-shadow(1px 1px 8px #000) drop-shadow(2px 2px 32px #970404);
33+
filter: drop-shadow(1px 1px .5rem #000) drop-shadow(2px 2px 2rem #970404);
3734
}
3835

3936
.BannerContent {
4037
flex: 1;
4138
display: flex;
4239
flex-direction: column;
4340
place-content: center;
44-
color: #fff;
45-
font-family: var(--font-family-text);
41+
gap: 0.25rem;
42+
text-wrap: balance;
4643
}
4744

4845
.BannerTitle {
4946
text-align: center;
50-
font-size: 1.5rem;
47+
font-size: 1.2em;
5148
font-family: var(--font-family-title);
52-
}
53-
.BannerTitle a {
54-
text-shadow: 0 0 1px 4px red;
55-
font-size: 1.05em;
49+
margin: 0;
50+
color: #fff;
5651
}
5752

5853
.BannerText {
59-
margin-block-end: 0.5rem;
54+
text-align: center;
55+
margin: 0;
56+
font-size: 0.85rem;
57+
line-height: 1.2;
58+
font-weight: 300;
59+
color: #fff;
6060
}
6161
.BannerText em {
6262
text-decoration: underline;
6363
text-underline-offset: .25rem;
64-
text-underline-style: double;
6564
}
6665

6766
.BannerAction {
@@ -73,20 +72,19 @@
7372
.BannerButton {
7473
display: flex;
7574
align-items: center;
76-
padding: .75rem 1.5rem;
75+
padding: .35em .75em;
7776
align-self: center;
7877
color: #fffc;
79-
font-size: 1.5rem;
78+
font-size: 1.1em;
8079
font-family: var(--font-family-title);
81-
gap: .5rem;
80+
gap: .5em;
8281
justify-content: center;
8382
background: linear-gradient(#000e, #000d) padding-box,
8483
linear-gradient(90deg, #D65831 0%, #D2D631 36.52%, #31D673 71.83%, #3aa3ff 100%) border-box;
85-
border-radius: 2rem;
86-
border: 4px solid transparent;
84+
border-radius: 2em;
85+
border: 3px solid transparent;
8786
transition: all 250ms linear;
8887
}
89-
9088
.BannerButton:hover {
9189
color: #fff;
9290
}
@@ -102,21 +100,16 @@
102100
color: currentColor;
103101
transition: all 250ms linear;
104102
}
105-
106103
.BannerButton:hover svg {
107104
transform: scale(1.1);
108105
}
109106

110107
@media screen and (min-width: 768px) {
111108
.BannerImage {
112-
width: 128px;
109+
width: 64px;
113110
}
114111
.BannerInner {
115112
flex-direction: row;
116-
padding: 2rem;
117-
gap: 4rem;
118-
}
119-
.BannerTitle {
120-
text-align: left;
113+
padding: 1rem 2rem;
121114
}
122115
}

ux.symfony.com/assets/styles/components/_DemoCard.scss

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
transition: color 250ms ease-in-out, transform 750ms ease-in-out, box-shadow 750ms ease-in-out;
1616
transform: translateY(0);
1717
box-shadow: 0 0 0 transparent;
18+
background: var(--bs-body-bg);
1819
}
1920
.DemoCard:hover {
2021
transition: color 250ms ease-in-out, transform 250ms ease-in-out, box-shadow 250ms ease-in-out;
@@ -38,19 +39,18 @@
3839
max-height: 100%;
3940
width: 100%;
4041
display: block;
41-
border-radius: .25rem;
42-
opacity: .80;
42+
opacity: .90;
4343
}
4444
.DemoCard:hover .DemoCard__image {
45-
opacity: .90;
45+
opacity: .93;
4646
}
4747

4848
.DemoCard__content {
4949
padding: .75rem 1rem;
5050
flex: 1;
5151
border-bottom-left-radius: var(--radius);
5252
border-bottom-right-radius: var(--radius);
53-
gap: .15rem;
53+
gap: .5rem;
5454
display: flex;
5555
flex-direction: column;
5656
}
@@ -60,7 +60,6 @@
6060
font-weight: 700;
6161
margin: 0;
6262
font-family: var(--font-family-title);
63-
padding: .25rem;
6463
}
6564

6665
.DemoCard__description {
@@ -70,7 +69,6 @@
7069
transition: all 250ms ease-in-out;
7170
opacity: .65;
7271
line-height: 1.4;
73-
padding: .25rem;
7472
margin: 0;
7573
}
7674
.DemoCard:hover .DemoCard__description {
@@ -80,4 +78,7 @@
8078
.DemoCard__tags {
8179
margin-top: auto;
8280
margin-bottom: 0;
81+
display: flex;
82+
flex-wrap: wrap;
83+
gap: .5rem;
8384
}

ux.symfony.com/assets/styles/components/_DemoContainer.scss

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
border-bottom-right-radius: 12px;
1414
}
1515

16-
.demo-chat > .DemoContainer-inner {
17-
border-radius: 0;
16+
.demo-introduction {
17+
max-inline-size: 800px;
18+
margin-inline: auto;
19+
}
20+
21+
.demo-introduction a {
22+
color: var(--bs-code-color);
23+
font-weight: 500;
24+
}
25+
.demo-introduction code {
26+
font-size: 0.95em;
1827
}

ux.symfony.com/assets/styles/sections/_hero.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
-webkit-background-clip: text;
88
-webkit-text-fill-color: transparent;
99
font-style: normal;
10+
filter: brightness(102%) contrast(200%) drop-shadow(1px 1px 1px #0004);
11+
letter-spacing: 0;
1012
}
1113

1214
.hero-background {

ux.symfony.com/assets/styles/sections/_nav.scss

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
font-size: 1rem;
8383
font-weight: 500;
8484
letter-spacing: 0;
85-
opacity: .85;
85+
opacity: .9;
8686
transition: opacity 250ms;
8787
padding: 0;
8888
border: none;
@@ -109,26 +109,25 @@
109109

110110
.AppNav_badge {
111111
position: absolute;
112-
color: lightskyblue;
113112
right: -1rem;
114113
top: -.75rem;
115114
text-align: right;
116115
padding: .2rem .4rem;
117-
font-size: .75rem;
118-
border: 1px solid var(--color-text);
119-
font-stretch: condensed;
116+
font-size: .5rem;
120117
font-family: var(--font-family-text);
121-
height: 1rem;
122-
line-height: normal;
118+
text-transform: uppercase;
119+
line-height: 1;
120+
background: rgba(0,0,0,0.1);
121+
border-radius: .25rem;
122+
opacity: 0.75;
123+
display: flex;
124+
}
125+
.AppNav_badge:after {
126+
content: attr(data-content);
127+
color: inherit;
123128
}
124129
@media (max-width: 859px) {
125130
.AppNav_badge {
126131
display: none;
127132
}
128133
}
129-
130-
@media (max-width: 360px) {
131-
.ThemeSwitcher + .AppNav_item {
132-
display: none;
133-
}
134-
}

ux.symfony.com/src/Service/LiveDemoRepository.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,16 @@ public function findAll(): array
2222
{
2323
return [
2424
new LiveDemo(
25-
'auto-validating-form',
26-
name: 'Auto-Validating Form',
27-
description: 'Create a form that validates each field in-real-time as the user enters data!',
28-
route: 'app_demo_live_component_auto_validating_form',
25+
'live-memory',
26+
name: 'LiveMemory Card Game',
27+
description: 'A Memorable Game UX with Live Components!',
28+
route: 'app_demo_live_memory',
2929
longDescription: <<<EOF
30-
Enter a bad email or leave the password empty, and see how the
31-
form validates in real time!
32-
<br>
33-
This renders a normal Symfony form but with extras added on top,
34-
all generated from Symfony & Twig.
30+
A Memorable Game UX with Live Components! Discover how to use Live Components to create a game with a vibrant interface,
31+
rich interactions and real-time updates. This journey will take you through many features of Live Components, and you'll
32+
learn how to use them to create a fun and engaging game.
3533
EOF,
36-
tags: ['form', 'validation', 'inline'],
34+
tags: ['game', 'time', 'events', 'LiveAction'],
3735
),
3836
new LiveDemo(
3937
'infinite-scroll',
@@ -46,18 +44,6 @@ public function findAll(): array
4644
EOF,
4745
tags: ['pattern', 'pagination', 'navigation'],
4846
),
49-
new LiveDemo(
50-
'live-memory',
51-
name: 'LiveMemory Card Game',
52-
description: 'A Memorable Game UX with Live Components!',
53-
route: 'app_demo_live_memory',
54-
longDescription: <<<EOF
55-
A Memorable Game UX with Live Components! Discover how to use Live Components to create a game with a vibrant interface,
56-
rich interactions and real-time updates. This journey will take you through many features of Live Components, and you'll
57-
learn how to use them to create a fun and engaging game.
58-
EOF,
59-
tags: ['game', 'time', 'events', 'LiveAction'],
60-
),
6147
new LiveDemo(
6248
'form-collection-type',
6349
name: 'Embedded CollectionType Form',
@@ -71,6 +57,20 @@ public function findAll(): array
7157
EOF,
7258
tags: ['form', 'collection'],
7359
),
60+
new LiveDemo(
61+
'auto-validating-form',
62+
name: 'Auto-Validating Form',
63+
description: 'Create a form that validates each field in-real-time as the user enters data!',
64+
route: 'app_demo_live_component_auto_validating_form',
65+
longDescription: <<<EOF
66+
Enter a bad email or leave the password empty, and see how the
67+
form validates in real time!
68+
<br>
69+
This renders a normal Symfony form but with extras added on top,
70+
all generated from Symfony & Twig.
71+
EOF,
72+
tags: ['form', 'validation', 'inline'],
73+
),
7474
new LiveDemo(
7575
'dependent-form-fields',
7676
name: 'Dependent Form Fields',

0 commit comments

Comments
 (0)