Skip to content

Commit 3956b48

Browse files
committed
minor #1811 [Site] Adapt highlighted code blocks to tempest (smnandre)
This PR was merged into the 2.x branch. Discussion ---------- [Site] Adapt highlighted code blocks to tempest Very mid.. but i'd like to clean the "CodeBLock" / "Terminal" / "CodeLine" first :) Commits ------- b1c42ac [Site] Adapt highlighted code blocks to tempest
2 parents 58c69b7 + b1c42ac commit 3956b48

File tree

5 files changed

+30
-25
lines changed

5 files changed

+30
-25
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@
1515
.AppHeader + * & {
1616
padding-top: 3rem;
1717
}
18+
19+
[data-bs-theme="dark"] & {
20+
background-blend-mode: hue !important;
21+
}
1822
}

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
.Terminal {
22
--border-radius: .75rem;
3+
--bg-color: #1b1e21;
34

4-
background-color: $n-900;
5+
background-color: var(--bg-color);
56
border-radius: .75rem;
67
position: relative;
78
font-size: 12px;
89
}
910

1011
.Terminal_header {
1112
display: flex;
12-
background-color: $n-900;
13+
background-color: #0D0D0DBA;
1314
border-top-left-radius: var(--border-radius);
1415
border-top-right-radius: var(--border-radius);
1516
align-items: center;
@@ -26,11 +27,10 @@
2627
.nav-link {
2728
border-bottom: 0;
2829
margin-bottom: 0;
29-
color: inherit;
3030
color: $n-100;
3131
}
3232
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link {
33-
background-color: $n-800;
33+
background-color: var(--bg-color);
3434
border-color: $n-800;
3535
color: $n-100;
3636
}
@@ -84,7 +84,6 @@
8484

8585

8686
.Terminal_body {
87-
background-color: $n-800;
8887
height: 100%;
8988
font-family: var(--font-family-code);
9089
font-size: 14px;
@@ -140,14 +139,19 @@
140139
margin: 0;
141140
}
142141
.Terminal_content {
143-
font-size: .9rem;
144142
overflow-x: auto;
145143
overflow-y: auto;
146-
padding: 1rem;
144+
padding: 1em;
147145
pre {
148146
overflow: visible;
149147
}
150148
scrollbar-width: thin;
149+
pre {
150+
background: none;
151+
}
152+
code {
153+
background: none;
154+
}
151155
}
152156

153157
@media screen and (min-width: 768px) {

ux.symfony.com/assets/styles/vendor/_highlight.scss

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,39 @@
1-
/** tempest/highlight theme (https://github.com/tempestphp/highlight/blob/main/src/Themes/Css/dracula.css) */
1+
.Terminal_content {
2+
pre, code {
3+
color: #cad3f5;
4+
}
5+
}
6+
27
.hl-keyword {
3-
color: #FF79C6;
8+
color: #c6a0f6;
49
}
510

611
.hl-property {
7-
color: #50FA7B;
12+
color: #8aadf4;
813
}
914

1015
.hl-attribute {
11-
font-style: italic;
16+
// font-style: italic;
1217
}
1318

1419
.hl-type {
15-
color: #8BE9FD;
20+
color: #eed49f;
1621
}
1722

1823
.hl-generic {
19-
color: #9d3af6;
24+
color: #ed8796;
2025
}
2126

2227
.hl-value {
23-
color: #F1FA8C;
28+
color: #a6da95;
2429
}
2530

2631
.hl-variable {
27-
color: #F8F8F2;
32+
color: #CFCFCF;
2833
}
2934

3035
.hl-comment {
31-
color: #6272A4;
36+
color: #6e738d;
3237
}
3338

3439
.hl-blur {

ux.symfony.com/templates/ux_packages/translator.html.twig

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@
2727

2828
{% block demo_content %}
2929

30-
{% apply highlight('js') %}
31-
import { trans, SAY_HELLO } from '../translator';
32-
33-
trans(SAY_HELLO, {
34-
name: 'Fabien',
35-
}})
36-
{% endapply %}
37-
3830
{% embed 'ux_packages/translator/_translator_demo_block.html.twig' with {
3931
message: 'HELLO',
4032
} %}

ux.symfony.com/templates/ux_packages/translator/_translator_demo_block.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
data-translator-demo-block-message-value="{{ message }}"
66
>
77
<div class="col-5">
8-
<div class="Terminal_body">
8+
<div class="Terminal Terminal_body">
99
<div class="Terminal_content">
1010
<pre data-translator-demo-block-target="code">
1111
<small><span class="hl-keyword">import</span> { trans, <span class="hl-variable constant_">{{ message }}</span> } <span class="hl-keyword">from</span> '<span class="hl-value">../translator</span>';</small>

0 commit comments

Comments
 (0)