Skip to content

Commit

Permalink
Sidenav upkeep (#11302)
Browse files Browse the repository at this point in the history
Partially contributes to
#11217, at least for the
current site design.
  • Loading branch information
parlough authored Oct 23, 2024
1 parent 2f94e01 commit fdf47ff
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 51 deletions.
85 changes: 41 additions & 44 deletions src/_data/sidenav.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- header: Get started

- title: Set up Flutter
permalink: /get-started/install

Expand All @@ -17,7 +18,7 @@
permalink: /get-started/fundamentals/dart
- title: Widgets
permalink: /get-started/fundamentals/widgets
- title: Layouts
- title: Layout
permalink: /get-started/fundamentals/layout
- title: State management
permalink: /get-started/fundamentals/state-management
Expand All @@ -28,18 +29,6 @@
- title: Local data and caching
permalink: /get-started/fundamentals/local-caching

- title: Dart language
permalink: /resources/bootstrap-into-dart

- title: Codelabs & samples
children:
- title: Codelabs
permalink: /codelabs
- title: Cookbook
permalink: /cookbook
- title: Samples and demos
permalink: https://flutter.github.io/samples/

- title: From another platform?
permalink: /get-started/flutter-for
children:
Expand All @@ -60,6 +49,14 @@
- title: Flutter versus Swift concurrency
permalink: /get-started/flutter-for/dart-swift-concurrency

- divider
- title: Codelabs
permalink: /codelabs
- title: Cookbook
permalink: /cookbook
- title: Demos and samples
permalink: https://flutter.github.io/samples/

- title: Stay up to date
permalink: /release
children:
Expand Down Expand Up @@ -151,10 +148,10 @@
permalink: https://pub.dev/packages/pay
- title: Maps
children:
- title: Add maps to your app
permalink: https://developers.google.com/maps/flutter-package
- title: Add Google maps to a Flutter app
permalink: https://codelabs.developers.google.com/codelabs/google-maps-in-flutter
- title: Google Maps package
permalink: https://developers.google.com/maps/flutter-package
- title: News
children:
- title: Build a news app
Expand All @@ -165,7 +162,7 @@
- title: Introduction
permalink: /ui
- title: Widget catalog
permalink: /ui/widgets
permalink: /ui/widgets
- title: Layout
permalink: /ui/layout
children:
Expand Down Expand Up @@ -248,7 +245,7 @@
children:
- title: Use custom fragment shaders
permalink: /ui/design/graphics/fragment-shaders

- title: Interactivity
permalink: /ui/interactivity
children:
Expand Down Expand Up @@ -302,7 +299,7 @@
permalink: /cookbook/images/fading-in-images
- title: Play and pause a video
permalink: /cookbook/plugins/play-video
- title: Transforming assets at build time
- title: Transform assets at build time
permalink: /ui/assets/asset-transformation

- title: Navigation & routing
Expand All @@ -329,7 +326,7 @@
permalink: /cookbook/navigation/set-up-universal-links
- title: Configure web URL strategies
permalink: /ui/navigation/url-strategies

- title: Animations & transitions
permalink: /ui/animations
children:
Expand All @@ -356,7 +353,7 @@
permalink: /cookbook/effects/staggered-menu-animation
- title: API overview
permalink: /ui/animations/overview

- title: Accessibility & internationalization
permalink: /ui/accessibility-and-internationalization
children:
Expand Down Expand Up @@ -411,7 +408,7 @@
permalink: /cookbook/networking/background-parsing
- title: Persistence
permalink: /data-and-backend/persistence
children:
children:
- title: Store key-value data on disk
permalink: /cookbook/persistence/key-value
- title: Read and write files
Expand All @@ -424,7 +421,7 @@
- title: Overview
permalink: /data-and-backend/firebase
- title: Add Firebase to your Flutter app
permalink: https://firebase.google.com/docs/flutter/setup?platform=ios
permalink: https://firebase.google.com/docs/flutter/setup
- title: Google APIs
permalink: /data-and-backend/google-apis

Expand Down Expand Up @@ -506,7 +503,7 @@
permalink: /platform-integration/web/install-web
- title: Build a web app
permalink: /platform-integration/web/building
- title: WebAssembly
- title: Compile to WebAssembly
permalink: /platform-integration/web/wasm
- title: Customize app initialization
permalink: /platform-integration/web/initialization
Expand Down Expand Up @@ -762,7 +759,7 @@
- title: Resources
permalink: /resources
children:
- header: Learning
# - header: Learn
- title: FAQ
permalink: /resources/faq
- title: Books
Expand All @@ -775,23 +772,23 @@
permalink: /resources/bootstrap-into-dart
- title: Get support
permalink: /resources/support
- header: Contributing
- title: Create useful bug reports
permalink: /resources/bug-reports
- title: Contribute to Flutter
permalink: https://github.com/flutter/flutter/blob/main/CONTRIBUTING.md
- title: Design documents
permalink: /resources/design-docs

- title: Reference
permalink: /reference
expanded: true
children:
- title: Who is Dash?
permalink: /dash
- title: Widget index
permalink: /reference/widgets
- title: API reference
permalink: https://api.flutter.dev
- title: flutter CLI reference
permalink: /reference/flutter-cli
- divider
- title: Contribute
children:
- title: Create useful bug reports
permalink: /resources/bug-reports
- title: Contribute to Flutter
permalink: https://github.com/flutter/flutter/blob/main/CONTRIBUTING.md
- title: Discover proposed features
permalink: /resources/design-docs
- title: Reference
permalink: /reference
children:
- title: Who is Dash?
permalink: /dash
- title: Widget index
permalink: /reference/widgets
- title: flutter CLI
permalink: /reference/flutter-cli
- title: API docs
permalink: https://api.flutter.dev
6 changes: 4 additions & 2 deletions src/_sass/base/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use 'sass:color';

// Colors
$flutter-color-blue: #043875;
$flutter-color-teal: #158477;
Expand All @@ -18,7 +20,7 @@ $site-color-light-grey: #DADCE0;
$site-color-sub-grey: #8d9399;
$site-color-nav-links: #6E7274;
$site-color-body: #212121; // Poor contrast with links
$site-color-body-light: rgba(0, 0, 0, .8);
$site-color-body-light: color.scale($site-color-body, $lightness: 20%);
$site-color-footer: #303c42;
$site-color-primary: $flutter-color-blue-500;
$twitter-color: #60CAF6;
Expand All @@ -36,7 +38,7 @@ $site-header-height: 66px;
$site-footer-md-default-height: 140px;
$site-content-top-padding: 40px;
$site-content-max-width: 960px;
$site-sidebar-top-padding: 24px;
$site-sidebar-top-padding: 16px;
$site-sidebar-side-padding: 16px;
$site-nav-mobile-side-padding: 20px;
$site-spacer: 1rem;
Expand Down
8 changes: 7 additions & 1 deletion src/_sass/components/_sidebar.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use 'sass:color';

@use '../base/variables' as *;
@use '../vendor/bootstrap';

Expand Down Expand Up @@ -60,7 +62,7 @@
font-weight: bootstrap.$font-weight-bolder;
font-size: bootstrap.$font-size-base;
user-select: none;
color: lighten($site-color-body-light, 20%);
color: color.scale($site-color-body-light, $lightness: 15%);
}

.nav-link {
Expand Down Expand Up @@ -104,6 +106,10 @@
padding: 0 $site-sidebar-side-padding;
}

> .nav-header:first-child {
padding-top: 0;
}

> .nav-item {
> .nav-link {
@include nav-link-active-style;
Expand Down
5 changes: 3 additions & 2 deletions src/content/get-started/fundamentals/layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ prev:
title: Widgets
path: /get-started/fundamentals/widgets
next:
title: State management
path: /get-started/fundamentals/state-management
title: State management
path: /get-started/fundamentals/state-management
---

Given that Flutter is a UI toolkit,
Expand All @@ -22,6 +22,7 @@ Flutter's most common layout errors,
the dreaded "unbounded constraints" error.

## Understanding layout in Flutter

The core of Flutter's layout mechanism is widgets.
In Flutter, almost everything is a widget — even
layout models are widgets.
Expand Down
2 changes: 1 addition & 1 deletion src/content/get-started/fundamentals/state-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: State management
description: Learn how to manage state in Flutter.
prev:
title: Layouts
title: Layout
path: /get-started/fundamentals/layout
next:
title: Handling user input
Expand Down
2 changes: 1 addition & 1 deletion src/content/get-started/fundamentals/widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ prev:
title: Intro to Dart
path: /get-started/fundamentals/dart
next:
title: Layouts
title: Layout
path: /get-started/fundamentals/layout
---

Expand Down
6 changes: 6 additions & 0 deletions src/content/reference/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
layout: toc
title: Flutter reference docs
short-title: Reference
description: Miscellaneous reference docs relating to Flutter.
---

0 comments on commit fdf47ff

Please sign in to comment.