Skip to content

Commit d6503c8

Browse files
authored
Template changes (#21)
1 parent 9b7f2ac commit d6503c8

8 files changed

+139
-22
lines changed

template/.gitignore.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
dist/
33
node_modules/
44
yarn-error.log
5+
.env

template/docs/components/resize.js.tmpl

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[
2+
{
3+
"name": "Sputnik 1",
4+
"year": 1957,
5+
"y": 10
6+
},
7+
{
8+
"name": "Apollo 11",
9+
"year": 1969,
10+
"y": 20
11+
},
12+
{
13+
"name": "Viking 1 and 2",
14+
"year": 1975,
15+
"y": 30
16+
},
17+
{
18+
"name": "Space Shuttle Columbia",
19+
"year": 1981,
20+
"y": 40
21+
},
22+
{
23+
"name": "Hubble Space Telescope",
24+
"year": 1990,
25+
"y": 50
26+
},
27+
{
28+
"name": "ISS Construction",
29+
"year": 1998,
30+
"y": 60
31+
}
32+
]

template/docs/example-dashboard.md.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ theme: [light-alt, dark-alt, wide]
1010
<!-- import components and tools -->
1111

1212
```js
13+
import {resize} from "npm:@observablehq/dash";
1314
import {BigNumber} from "./components/bigNumber.js";
14-
import {resize} from "./components/resize.js";
1515
```
1616

1717
<!-- load and transform the data -->
1818

1919
```js
20-
const launchHistory = await FileAttachment("data/launchHistory.csv")
20+
const launchHistory = await FileAttachment("data/launchHistory.csv") // data loader
2121
.csv({typed: true})
2222
const countLaunchesByStateId = id => launchHistory.filter(d => d.stateId === id).length;
2323
```

template/docs/example-report.md.tmpl

Lines changed: 87 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,89 @@
1-
# Example Report
1+
---
2+
toc: true
3+
---
24

3-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
5+
# Overview of Rocket Launches
46

5-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
7+
This report is a brief overview of the history and current state of rocket launches and general space exploration.
8+
9+
## Background
10+
11+
The history of rocket launches dates back to ancient China, where gunpowder-filled tubes were used as primitive forms of propulsion.
12+
13+
Fast-foward to the 20th century during the Cold War era, the United States and the Soviet Union embarked on a space race, a competition to innovate and explore beyond Earth.
14+
15+
This led to the launch of the first artificial satellite, Sputnik 1, and the manned moon landing by Apollo 11. As technology advanced, rocket launches became synonymous with space exploration and satellite deployment.
16+
17+
## Space Shuttle Era
18+
The late 20th century witnessed a significant milestone in rocket launches.
19+
20+
```js
21+
const events = await FileAttachment("./data/spaceHistory.json").json(); // static file
22+
```
23+
24+
```js
25+
const timeline = Plot.plot({
26+
insetTop: 30,
27+
insetBottom: 10,
28+
insetRight: 10,
29+
height: 250,
30+
x: {
31+
domain: d3.extent(events, d => d["year"]),
32+
label: "Year",
33+
nice: true
34+
},
35+
y: { axis: null },
36+
marks: [
37+
Plot.axisX({
38+
tickFormat: d3.format(".0f"),
39+
}),
40+
Plot.ruleX(events, { x: "year", y: "y", stroke: "#eee", strokeWidth: 2 }),
41+
Plot.ruleY([0], {stroke: "#eee"}),
42+
Plot.dot(events, {x: "year" , y: "y", fill: "currentColor", r: 5}),
43+
Plot.text(
44+
events,
45+
{x: "year", y: "y", text: "name", dy: -20, lineWidth: 10, fontSize: 12}),
46+
]
47+
});
48+
display(timeline);
49+
```
50+
51+
### Sputnik 1 (1957):
52+
This was the first artificial satellite. Launched by the Soviet Union, it marked the beginning of the space age.
53+
54+
### Apollo 11 (1969):
55+
The historic Apollo 11 mission, led by NASA, marked the first successful human landing on the Moon. Astronauts Neil Armstrong and Buzz Aldrin became the first humans to set foot on the lunar surface.
56+
57+
### Viking 1 and 2 (1975):
58+
NASA's Viking program successfully launched two spacecraft, Viking 1 and Viking 2, to Mars. These missions were the first to successfully land and operate on the Martian surface, conducting experiments to search for signs of life.
59+
60+
### Space Shuttle Columbia (1981):
61+
The first orbital space shuttle mission, STS-1, launched the Space Shuttle Columbia on April 12, 1981. The shuttle program revolutionized space travel, providing a reusable spacecraft for a variety of missions.
62+
63+
### Hubble Space Telescope (1990):
64+
The Hubble Space Telescope has provided unparalleled images and data, revolutionizing our understanding of the universe and contributing to countless astronomical discoveries.
65+
66+
### International Space Station (ISS) Construction (1998-2011):
67+
The ISS, a collaborative effort involving multiple space agencies, began construction with the launch of its first module, Zarya, in 1998. Over the following years, various modules were added, making the ISS a symbol of international cooperation in space exploration.
68+
69+
## Commercial Spaceflight
70+
71+
After the Space Shuttle program, a new era emerged with a shift towards commercial spaceflight.
72+
73+
Private companies like SpaceX, founded by Elon Musk in 2002, and Blue Origin, founded by Jeff Bezos in 2000, entered the scene. These companies focused on developing reusable rocket technologies, significantly reducing launch costs.
74+
75+
SpaceX, in particular, achieved milestones like the first privately developed spacecraft to reach orbit (Dragon in 2010) and the first privately funded spacecraft to dock with the ISS (Dragon in 2012).
76+
77+
## Recent Launch Activity
78+
79+
The proliferation of commercial space companies has driven a surge in global launch activity within the last few years.
80+
81+
SpaceX's Falcon 9 and Falcon Heavy, along with other vehicles from companies like Rocket Lab, have become workhorses for deploying satellites, conducting scientific missions, and ferrying crew to the ISS.
82+
83+
The advent of small satellite constellations, such as Starlink by SpaceX, has further fueled this increase in launches. The push for lunar exploration has added momentum to launch activities, with initiatives like NASA's Artemis program and plans for crewed missions to the Moon and beyond.
84+
85+
## Future
86+
87+
As technology continues to advance and global interest in space exploration grows, the future promises even more exciting developments in the realm of rocket launches and space travel.
88+
89+
Exploration will not only be limited to the Moon or Mars, but extend to other parts of our solar system such as Jupiter and Saturn's moons, and beyond.

template/docs/index.md.tmpl

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
# {{projectTitle}}
22

3+
This is the home page of your project `{{projectTitle}}`, built using the Observable CLI.
4+
5+
The Observable CLI is an open-source static site generator for business intelligence dashboards, reports, and data apps.
6+
7+
# Getting started
8+
See the [Command Line Interface](https://cli.observablehq.com/) Documentation.
9+
310
To update these pages edit files in
411

512
```
613
/docs
714
```
815

9-
See the [Command Line Interface](https://cli.observablehq.com/) documentation and [example projects](https://cli-examples.observablehq.com/) for guidance and inspiration.
16+
View the [dashboard page](/example-dashboard) for an example to quickly get started. It includes:
17+
- loading data via a [data loader](https://cli.observablehq.com/loaders)
18+
- visualizing the data using [Observable Plot](https://cli.observablehq.com/lib/plot)
19+
20+
View the [report page](/example-report) for an example of a report. It is more text-heavy and includes a table of contents.
1021

22+
# Inspiration
23+
See [CLI example projects](https://cli-examples.observablehq.com/) for guidance and inspiration.

template/observablehq.config.ts.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export default {
1010
{
1111
name: "Examples",
1212
pages: [
13-
{name: "Report", path: "/example-report"},
1413
{name: "Dashboard", path: "/example-dashboard"},
14+
{name: "Report", path: "/example-report"},
1515
]
1616
}
1717
],

template/package.json.tmpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"scripts": {
66
"clean": "rm -rf docs/.observablehq/cache",
77
"build": "rm -rf dist && observable build",
8-
"dev": "observable preview"
8+
"dev": "observable preview",
9+
"deploy": "observable deploy"
910
},
1011
"dependencies": {
1112
"@observablehq/cli": "https://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@github.com/observablehq/cli#main"

0 commit comments

Comments
 (0)