Skip to content

Commit

Permalink
Site redesign (#1572)
Browse files Browse the repository at this point in the history
  • Loading branch information
mit-mit authored May 6, 2019
1 parent 25482fe commit 82cb19a
Show file tree
Hide file tree
Showing 267 changed files with 7,696 additions and 4,276 deletions.
22 changes: 10 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: dart
dart: [stable, dev]
# dart: [stable, dev]
dart: [stable/raw/2.3.0, dev]

cache:
timeout: 300
Expand All @@ -23,9 +24,6 @@ matrix:
# allow_failures:
# - env: TASK="./tool/analyze-and-test-examples.sh"
# dart: stable
allow_failures:
- env: TASK="./tool/check-code.sh"
dart: stable
exclude:
- env: TASK="bundle exec jekyll build"
dart: dev
Expand All @@ -50,14 +48,14 @@ after_script:
# # (By default, Travis doesn't fail builds after deployment.)
# - "./deploy/html_proof.rb || travis_terminate 1"

deploy:
- provider: script
script: ./tool/shared/deploy.sh --robots ok default
skip_cleanup: true
on:
repo: dart-lang/site-www
branch: master
condition: $TASK == *build*
# deploy:
# - provider: script
# script: ./tool/shared/deploy.sh --robots ok default
# skip_cleanup: true
# on:
# repo: dart-lang/site-www
# branch: master
# condition: $TASK == *build*

# Only run Travis jobs for named branches (to avoid double builds for each PR)
branches:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# The Dart language site (www.dartlang.org)
# The Dart language site (dart.dev)

[![Build Status SVG][]][Repo on Travis]
[![first-timers SVG][]][first-timers]

The www.dartlang.org site, built with [Jekyll][] and hosted on [Firebase][].
The https://dart.dev site, built with [Jekyll][] and hosted on [Firebase][].

[We welcome contributions](CONTRIBUTING.md), and we're [first-timer friendly][first-timers]!

Expand Down
15 changes: 6 additions & 9 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ port: 4000
www: https://www.dartlang.org
prev-url: https://v1-dartlang-org.firebaseapp.com
webdev: https://webdev.dartlang.org
angulardart: https://webdev.dartlang.org/angular
dev-webdev: https://webdev-dartlang-org-dev.firebaseapp.com
dart_vm: /server
flutter: https://flutter.io
flutter: https://flutter.dev
dart_api: https://api.dartlang.org
flutter_api: https://docs.flutter.io
pub: https://pub.dartlang.org
pub-api: https://pub.dartlang.org/documentation
pub-pkg: https://pub.dartlang.org/packages
flutter_api: https://api.flutter.dev
pub: https://pub.dev
pub-api: https://pub.dev/documentation
pub-pkg: https://pub.dev/packages
lints: https://dart-lang.github.io/linter/lints
dartpad: https://dartpad.dartlang.org
dartpadx: https://dartpad.dartlang.org/experimental/embed-new.html
Expand Down Expand Up @@ -55,10 +56,6 @@ defaults:
type: tutorials
values:
layout: tutorial
- scope:
path: tools
values:
show_breadcrumbs: true
- scope:
path: tools/sdk
values:
Expand Down
2 changes: 1 addition & 1 deletion examples/misc/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: examples
description: dartlang.org example code.

environment:
sdk: '>=2.2.0-dev.2.1 <3.0.0'
sdk: '>=2.3.0-dev.0.5 <3.0.0'

dev_dependencies:
test: ^1.0.0
Expand Down
40 changes: 40 additions & 0 deletions examples/misc/test/language_tour/built_in_types_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,46 @@ void main() {
// #enddocregion list-indexing
});

test('list-spread', () {
// #docregion list-spread
var list = [1, 2, 3];
var list2 = [0, ...list];
assert(list2.length == 4);
// #enddocregion list-spread
});

test('list-null-spread', () {
// #docregion list-null-spread
var list;
var list2 = [0, ...?list];
assert(list2.length == 1);
// #enddocregion list-null-spread
});

test('list-if', () {
var promoActive = false;
// #docregion list-if
var nav = [
'Home',
'Furniture',
'Plants',
if (promoActive) 'Outlet'
];
// #enddocregion list-if
assert(nav.length == 3);
});

test('list-for', () {
// #docregion list-for
var listOfInts = [1, 2, 3];
var listOfStrings = [
'#0',
for (var i in listOfInts) '#$i'
];
assert(listOfStrings[1] == '#1');
// #enddocregion list-for
});

test('set-length', () {
var halogens = {
'fluorine',
Expand Down
79 changes: 27 additions & 52 deletions firebase.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion site-shared
40 changes: 26 additions & 14 deletions src/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,30 @@
permalink: /404
sitemap: false
---
<p>
The page you requested doesn't exist.
Things to try:
</p>
<p>
Check the URL's spelling.<br>
Use the SEARCH field to look for the page.<br>
Click your browser's Back button or
return to the <a href="/">homepage</a>.<br>
</p>
<div class="text-center">
<h1>404</h1>
<h2>Page not found</h2>

<p>
If you think the URL should work, please
<a href="https://github.com/dart-lang/site-www/issues/new?title=Bad%20URL&body=URL%3A%20%0AExpected%20page%3A%20" target="_blank">create an issue</a>.
</p>
<div class="text-center content">
<form action="/search.html" id="in-content-search">
<input type="hidden" name="cx" value="011220921317074318178:i4mscbaxtru">
<input type="hidden" name="ie" value="UTF-8">
<input type="hidden" name="hl" value="en">
<input type="search" name="q" id="q" autocomplete="off" placeholder="Enter keywords">
</form>
</div>

<p>
The page you requested doesn't exist.
Things to try:
</p>

<p>
Check the URL's spelling.<br>
Use the SEARCH field to look for the page.<br />
Click your browser's Back button or
return to the <a href="/">homepage</a>. <br />
If you think the URL should work, please
<a href="https://github.com/dart-lang/site-www/issues/new?title=Bad%20URL&body=URL%3A%20%0AExpected%20page%3A%20" target="_blank">create an issue</a>.
</p>
</div>
10 changes: 3 additions & 7 deletions src/_articles/index.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
---
layout: default
title: Articles
description: "Read about the Dart language and tools with this collection of articles, style guides, and more."
permalink: /articles
description: Read early articles about the Dart language and libraries.
---

Read these articles for insight into the Dart language and its libraries.
To find newer articles, see the
[Dart publication on medium.com.](https://medium.com/dartlang)

Also see:

* [Effective Dart](/guides/language/effective-dart)
* [Tutorials](/tutorials)
* [Articles about server-side Dart](/articles/server)
* [Articles about Dart web development]({{site.webdev}}/articles)

{% include article_index_warning.md %}

<div class="break-80">
<h2>Language details</h2>
Expand Down
7 changes: 4 additions & 3 deletions src/_articles/language/await-async.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Dart Language Asynchrony Support: Phase 1"
title: "Dart language asynchrony support: phase 1"
description: Async and await, two language features that support asynchronous programming, are now available in Dart.
date: 2014-10-24
category: language
Expand Down Expand Up @@ -110,8 +110,9 @@ the completion of the Future.
<aside class="alert alert-info" markdown="1">
**Note:**
After suspension, execution resumes in a later cycle of the event loop.
For a description of the Dart event loop, see
[The Event Loop and Dart.]({{site.webdev}}/articles/performance/event-loop)
{% comment %}
PENDING: link to event loop discussion.
{% endcomment %}
</aside>

If the Future completed with an error rather than with a value,
Expand Down
2 changes: 1 addition & 1 deletion src/_articles/language/beyond-async.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Dart Language Asynchrony Support: Phase 2"
title: "Dart language asynchrony support: phase 2"
description: "Async*, sync*, yield, and yield* are now available as part of Dart's asynchrony support."
date: 2015-03-24
category: language
Expand Down
2 changes: 1 addition & 1 deletion src/_articles/language/emulating-functions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Emulating Functions in Dart
title: Emulating functions in Dart
description: Learn how to define Dart classes that behave like functions.
original-date: 2012-01-01
date: 2018-09-20
Expand Down
8 changes: 1 addition & 7 deletions src/_articles/language/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: default
title: "Articles: Language Details"
title: "Articles: language details"
description: Articles that clarify aspects of the Dart language.
toc: false
---
Expand All @@ -15,9 +15,3 @@ Read these articles for insight into the Dart language.
{% endfor %}
</ul>
</div>

Also see:

* [Libraries articles](/articles/libraries)
* [Server-side Dart articles](/articles/server)
* [Articles about Dart web development]({{site.webdev}}/articles)
3 changes: 1 addition & 2 deletions src/_articles/language/mixins.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: A Brief History of Mixins in Dart
title: A brief history of mixins in dart
description: Mixins let you implement functionality once and use it in multiple classes.
original-date: 2012-12-18
date: 2018-06-01
category: language
obsolete: true
---

_Written by Gilad Bracha <br>
Expand Down
2 changes: 1 addition & 1 deletion src/_articles/libraries/broadcast-streams.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Single-Subscription vs. Broadcast Streams
title: Single-subscription vs. broadcast streams
description: "Choose the kind of stream that's best for your application: single-subscription or broadcast."
date: 2014-01-08
category: libraries
Expand Down
2 changes: 1 addition & 1 deletion src/_articles/libraries/converters-and-codecs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Converters and Codecs
title: Converters and codecs
description: Learn how to write efficient conversions.
original-date: 2014-02-06
date: 2015-03-17
Expand Down
4 changes: 2 additions & 2 deletions src/_articles/libraries/dart-io.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "An Introduction to the dart:io Library"
description: "An introduction to the Dart I/O library, which is aimed at code that runs in Flutter and the standalone Dart VM."
title: "An introduction to the dart:io library"
description: An introduction to the Dart I/O library, which is aimed at code that runs in Flutter and the standalone Dart VM.
original-date: 2012-03-01
date: 2018-09-04
category: libraries
Expand Down
10 changes: 2 additions & 8 deletions src/_articles/libraries/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
layout: default
title: "Articles: Libraries"
title: "Articles: libraries"
description: "Read these articles about Dart's core libraries and its APIs."
toc: false
---

{% comment %} PENDING: Delete obsolete articles. {% endcomment %}
Read these articles for insight into the Dart libraries and APIs.

<div class="break-80">
Expand All @@ -15,9 +15,3 @@ Read these articles for insight into the Dart libraries and APIs.
{% endfor %}
</ul>
</div>

Also see:

* [Language articles](/articles/language)
* [Server-side Dart articles](/articles/server)
* [webdev articles]({{site.webdev}}/articles)
6 changes: 1 addition & 5 deletions src/_articles/libraries/zones.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Zones
description: "Manage your asynchronous code: handle uncaught errors, override behavior (such as printing and scheduling tasks), and more."
date: 2014-03-03
category: libraries
css: [/articles/styles.css]
obsolete: true
---

Expand Down Expand Up @@ -740,10 +739,7 @@ that you can use for functionality such as profiling.

### More resources

[The Event Loop and Dart]({{site.webdev}}/articles/performance/event-loop)
: Learn more about scheduling tasks
using Future, Timer, and `scheduleMicrotask()`.

{% comment %} PENDING: add link to event loop discussion {% endcomment %}
Zone-related API documentation
: Read the docs for
[runZoned()]({{site.dart_api}}/{{site.data.pkg-vers.SDK.channel}}/dart-async/runZoned.html),
Expand Down
Loading

0 comments on commit 82cb19a

Please sign in to comment.