Skip to content

Commit 63b2d14

Browse files
committed
minor #1077 [Site] New Icon component + assets optimisation (smnandre)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Site] New Icon component + assets optimisation * new Icon twig component to handle SVG icons (and remove all FontAwesome scripts + fonts) * clean & compress favicons * expand header full-width on big screens * clean footer * fix layout + add UI effects on component list * fix some minor misalignments Commits ------- a2b5d3b [Site] New Icon component + assets optimisation
2 parents aa3239e + a2b5d3b commit 63b2d14

Some content is hidden

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

68 files changed

+599
-229
lines changed
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

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

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,7 @@
3737
border-radius: 12px;
3838
}
3939

40-
.component-container-shadow {
41-
box-shadow: 0px 8px 16px -10px rgba(0, 0, 0, 0.12);
42-
}
43-
.component-container-shadow:hover {
44-
box-shadow: 2px 3px 9px 4px rgb(0 0 0 / 12%);
45-
}
40+
4641

4742
.demo-container {
4843
background-color: white;
@@ -143,55 +138,49 @@
143138
line-height: 50px;
144139
}
145140

141+
142+
.file-tree ul {
143+
display: flex;
144+
flex-direction: column;
145+
align-items: stretch;
146+
justify-content: flex-start;
147+
}
148+
.file-tree li > span {
149+
display: flex;
150+
flex-direction: row;
151+
gap: 1rem;
152+
}
153+
146154
.file-tree-main::before {
147155
background: none!important;
148156
}
149157

150-
.file-tree ul>:not(ul),
151158
.file-tree ul {
152159
position: relative;
160+
padding-inline-start: 1rem;
153161
}
154-
.file-tree ul :not(span) {
155-
margin-left: 20px;
156-
}
157-
.file-tree ul span {
158-
display: inline;
159-
}
162+
160163
.file-tree .tooltip-inner {
161164
max-width: 350px;
162165
}
163166
.file-tree.nodots ul :not(span) {
164167
margin-left: 12px;
165168
}
166-
.file-tree ul::before,
167-
.file-tree ul>:not(ul)::before {
169+
.file-tree ul::before {
168170
content: '';
169-
width: 10px;
171+
width: 1rem;
172+
background: url(../images/dot.svg) left top / 2px 2px;
170173
display: block;
171174
position: absolute;
172175
}
173-
.file-tree ul::before,
174-
.file-tree ul>:not(ul)::before {
175-
background: url(../images/dot.svg) left top / 2px 2px;
176-
}
177-
178-
.file-tree.nodots ul::before,
179-
.file-tree.nodots ul>:not(span)::before {
180-
background-image: none;
181-
}
182176
.file-tree ul::before {
183177
top: 0;
184178
height: 100%;
185179
background-repeat: repeat-y;
186-
left: 5px;
180+
background-position: center;
181+
left: 0;
187182
z-index: -1;
188183
}
189-
.file-tree ul>:not(ul)::before {
190-
top: 8px;
191-
height: calc(100% - 8px);
192-
background-repeat: repeat-x;
193-
left: -15px;
194-
}
195184

196185

197186

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,17 @@
2626

2727
.terminal-wrapper .terminal-controls {
2828
position: absolute;
29-
top: 6px;
29+
top: 8px;
3030
left: 12px;
31+
display: flex;
32+
align-items: center;
33+
gap: .5rem;
3134
}
3235
.terminal-wrapper .terminal-controls span {
3336
display: inline-block;
34-
width: 12px;
35-
height: 12px;
37+
width: .75rem;
38+
height: .75rem;
3639
border-radius: 50%;
37-
margin-right: 10px;
3840
}
3941

4042
.red {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ h4.ubuntu {
114114
.eyebrows {
115115
text-transform: uppercase;
116116
font-family: Inter;
117-
font-size: 11px;
117+
font-size: 0.7rem;
118118
font-weight: 600;
119-
line-height: 17px;
120-
letter-spacing: 2px;
119+
line-height: 1.6;
120+
letter-spacing: 0.125rem;
121121
}
122122

123123
.info-tooltips {

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

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,24 @@ $n-800: #262626;
1111
$n-900: #0D0D0D;
1212
$red: #FB4040;
1313
$yellow: #FBC640;
14-
$green: #84DE2C;
14+
$green: #84DE2C;
15+
16+
17+
18+
19+
@at-root :root {
20+
21+
// Borders
22+
--border-radius-small: .5rem;
23+
--border-radius: 1rem;
24+
--border-radius-large: 1.5rem;
25+
--border-color: #{$n-100};
26+
27+
// Spaces
28+
--space-smaller: .5rem;
29+
--space-small: .75rem;
30+
--space-regular: 1rem;
31+
--space-large: 1.5rem;
32+
--space-larger: 2rem;
33+
34+
}

ux.symfony.com/assets/styles/app.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
@import './highlight';
1010
@import './live_demos';
1111

12+
@import './components/Icon';
13+
@import './components/ComponentBox';
14+
1215
body {
1316
font-family: Inter;
1417
font-size: 16px;
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
.ComponentBox {
2+
--space-large: 1.5rem;
3+
4+
border: 1px solid var(--border-color);
5+
border-radius: var(--border-radius);
6+
display: flex;
7+
gap: var(--space-large);
8+
padding: var(--space-large);
9+
position: relative;
10+
place-self: stretch;
11+
background: rgba(255, 255, 255, .98);
12+
transition:
13+
border-color 750ms ease-in-out,
14+
transform 750ms ease-in-out;
15+
16+
&:hover {
17+
transition:
18+
border-color 200ms ease-in-out,
19+
transform 200ms ease-in-out;
20+
border-color: rgba(230, 222, 222, 0.8);
21+
transform: translateY(-.25rem);
22+
}
23+
}
24+
25+
.ComponentBox::before {
26+
content: "";
27+
position: absolute;
28+
inset: .25rem 0 -.25rem 0;
29+
border-radius: var(--border-radius);
30+
opacity: 0;
31+
filter: blur(.75rem);
32+
transform: translateZ(-1em);
33+
background: var(--gradient);
34+
transition: opacity 600ms ease-in-out;
35+
z-index: -1;
36+
}
37+
.ComponentBox:hover::before {
38+
transition: opacity 250ms ease-in-out;
39+
opacity: .25;
40+
z-index: -1;
41+
}
42+
43+
.ComponentBox::after {
44+
content: "";
45+
position: absolute;
46+
inset: 0 0;
47+
background: #fff;
48+
border-radius: var(--border-radius);
49+
z-index: -1;
50+
transition: opacity 600ms ease-in-out;
51+
opacity: .95;
52+
}
53+
.ComponentBox:hover::after {
54+
transition: opacity 250ms ease-in-out;
55+
opacity: .99;
56+
z-index: -1;
57+
}
58+
59+
60+
.ComponentBox_logo {
61+
--logo-size: 6rem;
62+
63+
background: var(--gradient);
64+
width: var(--logo-size);
65+
height: var(--logo-size);
66+
border-radius: var(--border-radius-large);
67+
display: flex;
68+
align-items: center;
69+
justify-content: center;
70+
flex-shrink: 0;
71+
72+
img {
73+
width: calc(0.4 * var(--logo-size));
74+
height: auto;
75+
filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, 0));
76+
transition:
77+
filter 600ms ease-in-out,
78+
transform 600ms ease-in-out;
79+
80+
.ComponentBox:hover & {
81+
filter: drop-shadow(0 .25rem 1rem rgba(0, 0, 0, .3));
82+
transform: scale(1.05);
83+
transition:
84+
filter 250ms ease-in-out,
85+
transform 250ms ease-in-out;
86+
}
87+
88+
}
89+
}
90+
91+
.ComponentBox_content {
92+
display: flex;
93+
flex-direction: column;
94+
justify-content: center;
95+
flex: 1 1 auto;
96+
}
97+
98+
.ComponentBox_title {
99+
display: flex;
100+
flex-direction: row;
101+
align-items: center;
102+
gap: .75rem;
103+
}
104+
105+
.ComponentBox_link {
106+
&:after {
107+
content: '';
108+
position: absolute;
109+
inset: 0 0;
110+
z-index: 40;
111+
}
112+
}
113+
114+
.ComponentBox_arrow {
115+
color: gray;
116+
font-size: 1.5rem;
117+
opacity: .5;
118+
transition: opacity 600ms ease-in-out;
119+
.ComponentBox:hover & {
120+
transition: opacity 250ms ease-in-out;
121+
opacity: 1;
122+
}
123+
}
124+
125+
.ComponentBox_description {
126+
p {
127+
line-height: 1.4;
128+
}
129+
130+
:last-child {
131+
margin-bottom: 0;
132+
}
133+
}

0 commit comments

Comments
 (0)