Initial import of website content.

This commit is contained in:
Peter Williams 2020-04-10 14:56:57 -04:00
Коммит 0430f6da65
25 изменённых файлов: 986 добавлений и 0 удалений

1
.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1 @@
/public/

11
config.toml Normal file
Просмотреть файл

@ -0,0 +1,11 @@
base_url = "//docs.worldwidetelescope.org"
title = "AAS WorldWide Telescope Documentation"
description = "Collected documentation of the AAS WorldWide Telescope project."
default_language = "en"
compile_sass = true
highlight_code = false
build_search_index = false
[extra]
logo_url = "//worldwidetelescope.org/home"
github_url = "//github.org/WorldWideTelescope/worldwide-telescope-docs-hub"

60
content/_index.md Normal file
Просмотреть файл

@ -0,0 +1,60 @@
+++
+++
What would you like to learn about today? Regardless of what topic youre
interested in, reach out on [the WWT forum] to get help from the WWT
community!
[the WWT forum]: https://wwt-forum.org/
# Getting Started with WWT
<section class="flex-cards">
{% card(text="Read the user manual", url="user-manual/1", html=1) %}
The <b>AAS WorldWide Telescope User Manual</b> shows how to use
the WWT Windows application and the
<a href="//worldwidetelescope.org/webclient/">web client</a>.
{% end %}
{% card(text="Start using pywwt", url="https://pywwt.readthedocs.io/en/stable/#quick-start", html=1) %}
Are you a researcher? Use WWTs rendering engine to visualize and
analyze your data inside Jupyter with <b>pywwt</b>.
{% end %}
</section>
# Developing WWT-Based Software
<section class="flex-cards">
{% card(text="pywwt documentation", url="https://pywwt.readthedocs.io/en/stable/", html=1) %}
You can use the <b>pywwt</b> to build custom WWT-based visualizations in the
Python language.
{% end %}
{% card(text="WebGL Engine docs", url="https://worldwidetelescope.gitbook.io/webgl-engine-reference/", html=1) %}
The web client and pywwt are powered by a reusable JavaScript library that you
can use to build your own web-based interactives and embeds.
{% end %}
</section>
# Exploring WWT Infrastructure
<section class="flex-cards">
{% card(text="wwt_data_formats docs", url="https://wwt-data-formats.readthedocs.io/", html=1) %}
The <b>wwt_data_formats</b> Python package documents the details of WWTs
low-level data formats, and provides tools for reading and writing them.
{% end %}
{% card(text="wwt_api_client docs", url="https://wwt-api-client.readthedocs.io/", html=1) %}
The <b>wwt_api_client</b> Python package documents the details of WWTs
web services APIs and provides tools for issuing requests.
{% end %}
</section>

Просмотреть файл

@ -0,0 +1,3 @@
+++
redirect_to = "user-manual/1"
+++

43
sass/_chrome.scss Normal file
Просмотреть файл

@ -0,0 +1,43 @@
// Styles for the generic elements included in every page through the templates.
header {
background-color: $header-bg-color;
border-bottom: 1px solid $edge-color;
div {
display: flex;
flex-flow: row nowrap;
flex-basis: auto;
flex-grow: 1;
align-items: center;
h1 {
margin: 0 0 0 auto;
font-weight: 400;
}
}
}
.header-logo-lg {
display: block;
width: 260px;
margin: 8px 0;
@media screen and (max-width: $breakpoint) {
display: none;
}
}
.header-logo-sm {
display: none;
margin: 8px 0;
@media screen and (max-width: $breakpoint) {
display: block;
}
}
footer {
font-size: 80%;
border-top: 1px solid $edge-color;
}

137
sass/_content.scss Normal file
Просмотреть файл

@ -0,0 +1,137 @@
// Styling for generic Markdown. I want Markdown-derived HTML to look
// reasonable without any extra futzing or applying CSS classes, so these
// rules try to set up a nice, coherent appearance that will work well in a
// variety of contexts.
.content {
p {
// Note use of "em", not "rem", units here.
margin: 0.3em 0 1em 0;
}
img {
max-width: 100%;
}
li {
margin: 0.3rem 0;
}
pre {
font-size: 70%;
padding: 0.2rem;
}
blockquote {
font-size: 85%;
font-family: "Noto Sans";
}
hr {
margin: 1rem 2rem;
}
a {
color: #115;
&:hover {
color: #11D;
}
}
h1 {
font-size: 150%;
margin: 1.7rem 0 0 0;
}
h2 {
// Looks like we need to manually specify these font sizes to cascade down
// relative to h1.
font-size: 110%;
margin: 1.2rem 0 1rem 0;
}
h3, h4, h5, h6 {
// Todo: use techniques other than font-sizing to distinguish h4 and below
// from h3.
font-size: 100%;
}
h1, h2, h3, h4, h5, h6 {
line-height: 1;
}
// We configure Zola to insert anchor links for headers in the Markdown.
// These show up as `a.zola-anchor` tags inside the <hN> tag to the left
// of the header text.
a.zola-anchor {
visibility: hidden;
text-decoration: none;
font-size: 80%;
margin-left: 0.2em; // note: intentionally `em` here
}
h1:hover a.zola-anchor,
h2:hover a.zola-anchor,
h3:hover a.zola-anchor,
h4:hover a.zola-anchor,
h5:hover a.zola-anchor,
h6:hover a.zola-anchor {
visibility: visible;
}
// Flexboxes for cards linking to docs
.flex-cards {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
.flex-card {
flex: 1 1;
min-width: 15rem;
margin: 0.8rem;
display: flex;
flex-flow: column;
font-size: 90%;
line-height: 1.3;
border-left: 2px solid #000;
padding-left: 0.5rem;
p {
margin: 0 0 1rem 0;
flex-grow: 1;
text-align: justify;
}
}
.button {
width: 100%;
margin-top: auto;
background-color: $button-color;
@include border-radius(6px);
a {
display: block;
width: 100%;
padding: 0.3rem;
text-align: center;
text-decoration: none;
color: $button-link-color;
border: 2px solid transparent;
@include border-radius(6px);
&:hover {
color: $button-link-hover-color;
border: 2px solid #000;
}
}
}
}
}

33
sass/_layout.scss Normal file
Просмотреть файл

@ -0,0 +1,33 @@
// Big-picture page layout.
html {
height: 100%;
// The viewport width changes slightly if there's a scrollbar or now,
// causing the layout to shift when navigating between long and short
// pages. There are a few ways to try to deal with this, but here I
// just force there to always be a scrollbar.
overflow-y: scroll;
}
body {
margin: 0;
height: 100%;
}
.maxwidth {
max-width: $max-content-width;
padding: 0 8px;
margin: 0 auto;
}
.content {
width: 100%;
margin-top: 1rem;
}
footer {
width: 100%;
margin-top: 4rem;
padding-top: 0.3rem;
}

566
sass/_normalize.scss Normal file
Просмотреть файл

@ -0,0 +1,566 @@
/* Document
* ========================================================================== */
/**
* Add border box sizing in all browsers (opinionated).
*/
*,
::before,
::after {
box-sizing: border-box;
}
/**
* 1. Add text decoration inheritance in all browsers (opinionated).
* 2. Add vertical alignment inheritance in all browsers (opinionated).
*/
::before,
::after {
text-decoration: inherit; /* 1 */
vertical-align: inherit; /* 2 */
}
/**
* 1. Use the default cursor in all browsers (opinionated).
* 2. Change the line height in all browsers (opinionated).
* 3. Use a 4-space tab width in all browsers (opinionated).
* 4. Remove the grey highlight on links in iOS (opinionated).
* 5. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
* 6. Breaks words to prevent overflow in all browsers (opinionated).
*/
html {
cursor: default; /* 1 */
line-height: 1.5; /* 2 */
-moz-tab-size: 4; /* 3 */
tab-size: 4; /* 3 */
-webkit-tap-highlight-color: transparent /* 4 */;
-ms-text-size-adjust: 100%; /* 5 */
-webkit-text-size-adjust: 100%; /* 5 */
word-break: break-word; /* 6 */
}
/* Sections
* ========================================================================== */
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Edge, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
* ========================================================================== */
/**
* Remove the margin on nested lists in Chrome, Edge, IE, and Safari.
*/
dl dl,
dl ol,
dl ul,
ol dl,
ul dl {
margin: 0;
}
/**
* Remove the margin on nested lists in Edge 18- and IE.
*/
ol ol,
ol ul,
ul ol,
ul ul {
margin: 0;
}
/**
* 1. Add the correct sizing in Firefox.
* 2. Show the overflow in Edge 18- and IE.
*/
hr {
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* Add the correct display in IE.
*/
main {
display: block;
}
/**
* Remove the list style on navigation lists in all browsers (opinionated).
*/
nav ol,
nav ul {
list-style: none;
padding: 0;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
* ========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* Add the correct text decoration in Edge 18-, IE, and Safari.
*/
abbr[title] {
text-decoration: underline;
text-decoration: underline dotted;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/* Embedded content
* ========================================================================== */
/*
* Change the alignment on media elements in all browsers (opinionated).
*/
audio,
canvas,
iframe,
img,
svg,
video {
vertical-align: middle;
}
/**
* Add the correct display in IE 9-.
*/
audio,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Remove the border on iframes in all browsers (opinionated).
*/
iframe {
border-style: none;
}
/**
* Remove the border on images within links in IE 10-.
*/
img {
border-style: none;
}
/**
* Change the fill color to match the text color in all browsers (opinionated).
*/
svg:not([fill]) {
fill: currentColor;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Tabular data
* ========================================================================== */
/**
* Collapse border spacing in all browsers (opinionated).
*/
table {
border-collapse: collapse;
}
/* Forms
* ========================================================================== */
/**
* Remove the margin on controls in Safari.
*/
button,
input,
select {
margin: 0;
}
/**
* 1. Show the overflow in IE.
* 2. Remove the inheritance of text transform in Edge 18-, Firefox, and IE.
*/
button {
overflow: visible; /* 1 */
text-transform: none; /* 2 */
}
/**
* Correct the inability to style buttons in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* 1. Change the inconsistent appearance in all browsers (opinionated).
* 2. Correct the padding in Firefox.
*/
fieldset {
border: 1px solid #a0a0a0; /* 1 */
padding: 0.35em 0.75em 0.625em; /* 2 */
}
/**
* Show the overflow in Edge 18- and IE.
*/
input {
overflow: visible;
}
/**
* 1. Correct the text wrapping in Edge 18- and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
*/
legend {
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
white-space: normal; /* 1 */
}
/**
* 1. Add the correct display in Edge 18- and IE.
* 2. Add the correct vertical alignment in Chrome, Edge, and Firefox.
*/
progress {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Remove the inheritance of text transform in Firefox.
*/
select {
text-transform: none;
}
/**
* 1. Remove the margin in Firefox and Safari.
* 2. Remove the default vertical scrollbar in IE.
* 3. Change the resize direction in all browsers (opinionated).
*/
textarea {
margin: 0; /* 1 */
overflow: auto; /* 2 */
resize: vertical; /* 3 */
}
/**
* Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
padding: 0;
}
/**
* 1. Correct the odd appearance in Chrome, Edge, and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Safari.
*/
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}
/**
* Correct the text style of placeholders in Chrome, Edge, and Safari.
*/
::-webkit-input-placeholder {
color: inherit;
opacity: 0.54;
}
/**
* Remove the inner padding in Chrome, Edge, and Safari on macOS.
*/
::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style upload buttons in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/**
* Remove the inner border and padding of focus outlines in Firefox.
*/
::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus outline styles unset by the previous rule in Firefox.
*/
:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Remove the additional :invalid styles in Firefox.
*/
:-moz-ui-invalid {
box-shadow: none;
}
/* Interactive
* ========================================================================== */
/*
* Add the correct display in Edge 18- and IE.
*/
details {
display: block;
}
/*
* Add the correct styles in Edge 18-, IE, and Safari.
*/
dialog {
background-color: white;
border: solid;
color: black;
display: block;
height: -moz-fit-content;
height: -webkit-fit-content;
height: fit-content;
left: 0;
margin: auto;
padding: 1em;
position: absolute;
right: 0;
width: -moz-fit-content;
width: -webkit-fit-content;
width: fit-content;
}
dialog:not([open]) {
display: none;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Scripting
* ========================================================================== */
/**
* Add the correct display in IE 9-.
*/
canvas {
display: inline-block;
}
/**
* Add the correct display in IE.
*/
template {
display: none;
}
/* User interaction
* ========================================================================== */
/*
* 1. Remove the tapping delay in IE 10.
* 2. Remove the tapping delay on clickable elements
in all browsers (opinionated).
*/
a,
area,
button,
input,
label,
select,
summary,
textarea,
[tabindex] {
-ms-touch-action: manipulation; /* 1 */
touch-action: manipulation; /* 2 */
}
/**
* Add the correct display in IE 10-.
*/
[hidden] {
display: none;
}
/* Accessibility
* ========================================================================== */
/**
* Change the cursor on busy elements in all browsers (opinionated).
*/
[aria-busy="true"] {
cursor: progress;
}
/*
* Change the cursor on control elements in all browsers (opinionated).
*/
[aria-controls] {
cursor: pointer;
}
/*
* Change the cursor on disabled, not-editable, or otherwise
* inoperable elements in all browsers (opinionated).
*/
[aria-disabled="true"],
[disabled] {
cursor: not-allowed;
}
/*
* Change the display on visually hidden accessible elements
* in all browsers (opinionated).
*/
[aria-hidden="false"][hidden] {
display: initial;
}
[aria-hidden="false"][hidden]:not(:focus) {
clip: rect(0, 0, 0, 0);
position: absolute;
}

30
sass/_typography.scss Normal file
Просмотреть файл

@ -0,0 +1,30 @@
@font-face {
font-family: "UniversLTPro";
src: url("assets/39762C_0_0.eot?#iefix") format("embedded-opentype"),
url("assets/39762C_0_0.woff2") format("woff2"),
url("assets/39762C_0_0.woff") format("woff"),
url("assets/39762C_0_0.ttf") format("truetype");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: "UniversLTPro";
src: url("assets/39762C_2_0.eot?#iefix") format("embedded-opentype"),
url("assets/39762C_2_0.woff2") format("woff2"),
url("assets/39762C_2_0.woff") format("woff"),
url("assets/39762C_2_0.ttf") format("truetype");
font-weight: 700;
font-style: normal;
}
html {
// Default font sizes are too small, I think. At a standard 1em = 16px,
// 1.375em becomes 22px.
font-size: 1.375em;
font-family: "UniversLTPro";
}
body {
line-height: 1.5;
}

24
sass/style.scss Normal file
Просмотреть файл

@ -0,0 +1,24 @@
@charset "utf-8";
@import "normalize";
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
border-radius: $radius;
}
// Parameters of the layout. In `typography` we set 1 rem = 22 px.
$max-content-width: 792px; // =36rem
$breakpoint: 750px;
$header-bg-color: #f0f0f0;
$edge-color: #e0e0e0;
$button-color: #77089c;
$button-link-color: #f0f0f0;
$button-link-hover-color: #ffffff;
@import "typography";
@import "content";
@import "layout";
@import "chrome";

Двоичные данные
static/assets/39762C_0_0.eot Normal file

Двоичный файл не отображается.

Двоичные данные
static/assets/39762C_0_0.ttf Normal file

Двоичный файл не отображается.

Двоичные данные
static/assets/39762C_0_0.woff Normal file

Двоичный файл не отображается.

Двоичные данные
static/assets/39762C_0_0.woff2 Normal file

Двоичный файл не отображается.

Двоичные данные
static/assets/39762C_2_0.eot Normal file

Двоичный файл не отображается.

Двоичные данные
static/assets/39762C_2_0.ttf Normal file

Двоичный файл не отображается.

Двоичные данные
static/assets/39762C_2_0.woff Normal file

Двоичный файл не отображается.

Двоичные данные
static/assets/39762C_2_0.woff2 Normal file

Двоичный файл не отображается.

Двоичные данные
static/assets/stacked-logo-black-on-transparent-260x103.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 30 KiB

Двоичные данные
static/assets/wwt-globe.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 16 KiB

49
templates/base.html Normal file
Просмотреть файл

@ -0,0 +1,49 @@
{# Jumping through hoops to get a relative path to the site root #}
{%- if current_path == "/" -%}
{%- set_global rel_top = "./" -%}
{%- else -%}
{%- set_global rel_top_work = [] -%}
{%- for _ignored in current_path | split(pat="/") | slice(start=1) -%}
{%- set_global rel_top_work = rel_top_work | concat(with="..") -%}
{%- endfor -%}
{%- set_global rel_top = rel_top_work | join(sep="/") -%}
{%- set_global rel_top = rel_top ~ "/" -%}
{%- endif -%}
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
<link rel="stylesheet" href="{{ rel_top ~ 'style.css' | safe }}">
<!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
{% block extra_head %}
{% endblock extra_head %}
</head>
<body>
<header>
<div class="maxwidth">
<a href="{{ config.extra.logo_url | safe }}">
<img class="header-logo-lg" src="{{ rel_top ~ 'assets/stacked-logo-black-on-transparent-260x103.png' | safe }}">
<img class="header-logo-sm" src="{{ rel_top ~ 'assets/wwt-globe.png' | safe }}">
</a>
<h1>WWT Documentation</h1>
</div>
</header>
<main class="maxwidth content">
{% block content %}
{% endblock content %}
</main>
<footer class="maxwidth">
<p>Copyright {{ now() | date(format="%Y") }} <a href="http://aas.org/">AAS</a>.
HTML generated with <a href="https://www.getzola.org/">Zola</a>.
<a href="{{ config.extra.github_url | safe }}">Source code</a>.
</p>
</footer>
</body>
</html>

1
templates/index.html Normal file
Просмотреть файл

@ -0,0 +1 @@
{% extends "section.html" %}

10
templates/page.html Normal file
Просмотреть файл

@ -0,0 +1,10 @@
{% extends "base.html" %}
{%- block title -%}
{{ config.title }}: {{ page.title }}
{%- endblock title -%}
{% block content %}
<p class="page-title"><a class="noul" href="{{ page.permalink | safe }}">{{ page.title }}</a></p>
{{ page.content | safe }}
{% endblock content %}

5
templates/section.html Normal file
Просмотреть файл

@ -0,0 +1,5 @@
{% extends "base.html" %}
{% block content %}
{{ section.content | safe }}
{% endblock content %}

Просмотреть файл

@ -0,0 +1,13 @@
<div class="flex-card">
<p>
{% if html %}
{{body | safe}}
{% else %}
{{body}}
{% endif %}
</p>
<div class="button">
<a href="{{url}}">{{text}}</a>
</div>
</div>