Skip to content

Commit b539dd2

Browse files
committed
minor #1673 [Site] Add "Icons" menu item (smnandre)
This PR was merged into the 2.x branch. Discussion ---------- [Site] Add "Icons" menu item * Add Icon menu item in nav * Remove dead code * Add test * Fix footer links Commits ------- 51a8d5d Add Icon menu item in nav
2 parents 0f8b952 + 51a8d5d commit b539dd2

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,19 +107,28 @@
107107
}
108108
}
109109

110-
111110
.AppNav_badge {
112111
position: absolute;
113112
color: lightskyblue;
114-
right: -.5rem;
113+
right: -1rem;
115114
top: -.75rem;
116115
text-align: right;
117116
padding: .2rem .4rem;
118-
font-size: .5rem;
117+
font-size: .75rem;
119118
border: 1px solid var(--color-text);
120119
font-stretch: condensed;
121120
font-family: var(--font-family-text);
122121
height: 1rem;
123122
line-height: normal;
124123
}
124+
@media (max-width: 859px) {
125+
.AppNav_badge {
126+
display: none;
127+
}
128+
}
125129

130+
@media (max-width: 360px) {
131+
.ThemeSwitcher + .AppNav_item {
132+
display: none;
133+
}
134+
}

ux.symfony.com/templates/_header.html.twig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
<div class="AppNav_menu">
3030
<a href="{{ path('app_turbo') }}" class="AppNav_item">Turbo</a>
3131
<a href="{{ path('app_live_component') }}" class="AppNav_item">Live <span>Components</span></a>
32+
<a href="{{ path('app_icons') }}" class="AppNav_item">
33+
<span class="AppNav_badge">New</span>
34+
Icons
35+
</a>
3236
<a href="{{ path('app_packages') }}" class="AppNav_item">Packages</a>
3337
<a href="{{ path('app_demos') }}" class="AppNav_item">Demos</a>
3438
</div>

ux.symfony.com/templates/_nav.html.twig

Whitespace-only changes.

ux.symfony.com/tests/Functional/IconsTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ final class IconsTest extends KernelTestCase
2121
{
2222
use HasBrowser;
2323

24+
public function testCanViewIconFromHomepage(): void
25+
{
26+
$this->browser()
27+
->visit('/')
28+
->assertSuccessful()
29+
->assertSeeIn('.AppNav_menu', 'Icons')
30+
->click('Icons')
31+
->assertSuccessful()
32+
->assertSeeIn('title', 'Icons')
33+
->assertSeeIn('h1', 'Icons')
34+
;
35+
}
36+
2437
public function testCanViewIconIndex(): void
2538
{
2639
$this->browser()

0 commit comments

Comments
 (0)