From a7e547dcb5abf79a4fae222cda23fc5014d3a3cc Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Thu, 23 Oct 2025 18:55:21 +0200 Subject: [PATCH 1/2] Move blog link to site switcher --- site/lib/_sass/components/_dropdown.scss | 2 +- site/lib/_sass/components/_site-switcher.scss | 4 ++-- site/lib/src/components/header.dart | 12 ------------ site/lib/src/components/header/site_switcher.dart | 10 ++++++++++ site/lib/src/style_hash.dart | 2 +- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/site/lib/_sass/components/_dropdown.scss b/site/lib/_sass/components/_dropdown.scss index 6f08349364..a95097198f 100644 --- a/site/lib/_sass/components/_dropdown.scss +++ b/site/lib/_sass/components/_dropdown.scss @@ -13,7 +13,7 @@ z-index: var(--site-z-dropdown); .dropdown-divider { - background-color: var(--site-outline-variant); + background-color: var(--site-outline); border-radius: 0.5rem; height: 0.125rem; margin: 0.25rem; diff --git a/site/lib/_sass/components/_site-switcher.scss b/site/lib/_sass/components/_site-switcher.scss index 7aed8b9b0b..faa83b98e4 100644 --- a/site/lib/_sass/components/_site-switcher.scss +++ b/site/lib/_sass/components/_site-switcher.scss @@ -44,8 +44,8 @@ } &.subtype { - padding: 0 0.3rem; - font-size: 1.25rem; + padding: 0.05rem 0.3rem; + font-size: 1.2rem; font-weight: 500; line-height: 1.3; border-radius: 0.25rem; diff --git a/site/lib/src/components/header.dart b/site/lib/src/components/header.dart index c20f71e4f4..b91135d7ca 100644 --- a/site/lib/src/components/header.dart +++ b/site/lib/src/components/header.dart @@ -69,16 +69,6 @@ class DashHeader extends StatelessComponent { ], ), ]), - li([ - a( - href: 'https://blog.dart.dev', - classes: [ - 'nav-link', - if (activeEntry == _ActiveNavEntry.blog) 'active', - ].toClasses, - [text('Blog')], - ), - ]), li([ a( href: '/community', @@ -163,7 +153,6 @@ _ActiveNavEntry? _activeNavEntry(String pageUrlPath) { return switch (firstFragment) { 'overview' => _ActiveNavEntry.overview, - 'blog' => _ActiveNavEntry.blog, 'community' => _ActiveNavEntry.community, 'get-started' => _ActiveNavEntry.learn, 'get-dart' => _ActiveNavEntry.getDart, @@ -187,7 +176,6 @@ _ActiveNavEntry? _activeNavEntry(String pageUrlPath) { enum _ActiveNavEntry { overview, - blog, community, getDart, docs, diff --git a/site/lib/src/components/header/site_switcher.dart b/site/lib/src/components/header/site_switcher.dart index a8913098b6..dc87e7976a 100644 --- a/site/lib/src/components/header/site_switcher.dart +++ b/site/lib/src/components/header/site_switcher.dart @@ -36,6 +36,16 @@ final class SiteSwitcher extends StatelessComponent { subtype: 'API', href: 'https://api.dart.dev', ), + _SiteWordMarkListEntry( + name: 'Dart', + subtype: 'Blog', + href: 'https://blog.dart.dev', + ), + Component.element( + tag: 'li', + classes: 'dropdown-divider', + attributes: {'aria-hidden': 'true', 'role': 'separator'}, + ), _SiteWordMarkListEntry( name: 'DartPad', href: 'https://dartpad.dev', diff --git a/site/lib/src/style_hash.dart b/site/lib/src/style_hash.dart index 11ee8c63bc..4ae4946133 100644 --- a/site/lib/src/style_hash.dart +++ b/site/lib/src/style_hash.dart @@ -2,4 +2,4 @@ // dart format off /// The generated hash of the `main.css` file. -const generatedStylesHash = 'wjK0Mdh356gO'; +const generatedStylesHash = 'k/yPQHg3NM2X'; From 9c8a073b7c4060d4b4f7e242db2f6d3ca5b9ac60 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Mon, 27 Oct 2025 20:14:55 +0100 Subject: [PATCH 2/2] Add back to header --- site/lib/src/components/layout/header.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/site/lib/src/components/layout/header.dart b/site/lib/src/components/layout/header.dart index 92a01b4aa1..cc4790feed 100644 --- a/site/lib/src/components/layout/header.dart +++ b/site/lib/src/components/layout/header.dart @@ -69,6 +69,15 @@ class DashHeader extends StatelessComponent { ], ), ]), + li([ + a( + href: 'https://blog.dart.dev', + classes: [ + 'nav-link', + ].toClasses, + [text('Blog')], + ), + ]), li([ a( href: '/community',