website: more css tweaks
- make it so prev-next bar is bottom-aligned, even if the
content doesn't fill the window height
- move component positioning rules to index.less so that
it's clear how the main components are positioned relative
to each other
- tweak a few of the markdown pages that had headings inside
info/warning boxes so that those headings wouldn't be so
large.
Unrelatedly, this CL makes a few adjustments to the text
content.
Change-Id: I3d8db348df44c265c7bbf26b14a42e7ebf331535
diff --git a/browser/index.js b/browser/index.js
index d4fe796..7a8f21b 100644
--- a/browser/index.js
+++ b/browser/index.js
@@ -87,7 +87,8 @@
}
function parseTocProps() {
- var hs = dom.all(dom.find('.content'), 'h1, h2, h3, h4');
+ // Note, we ignore nested headers such as those inside info boxes.
+ var hs = dom.all('main > h1, main > h2, main > h3, main > h4');
var titleEl = _.find(hs, function(el) {
return el.classList.contains('title');
});
@@ -96,9 +97,6 @@
if (el === titleEl || !el.id) {
return;
}
- if (!el.parentNode.classList.contains('content')) {
- return;
- }
headings.push({
id: el.id,
text: el.innerText,
diff --git a/content/index.md b/content/index.md
index ad90a28..fb261cc 100644
--- a/content/index.md
+++ b/content/index.md
@@ -2,9 +2,8 @@
title: Vanadium
= yaml =
-Vanadium is an open-source framework created by engineers at Google that makes
-it much easier to develop secure, distributed applications that can run
-anywhere. It provides:
+Vanadium is an open-source framework designed to make it much easier to develop
+secure, distributed applications that can run anywhere. It provides:
+ a complete security model, based on public-key cryptography, that supports
fine-grained permissions and delegation. The combination of traditional ACLs
and "blessings with caveats" supports a broad set of practical requirements.
diff --git a/content/tos.md b/content/tos.md
index 307a4b4..a29346a 100644
--- a/content/tos.md
+++ b/content/tos.md
@@ -2,12 +2,13 @@
title: Terms of Service
= yaml =
-The Vanadium website (the "Website") and [Vanadium Cloud
-Services](tools/services.html) (the "Services") are hosted by Google. By using
-and/or visiting the Website and/or Services, you consent to be bound by Google's
-general [Terms of Service], the [Google APIs Terms of Service], and Google's
-general [Privacy Policy].
+The Vanadium website, [v.io], (the "Website") and [Vanadium Cloud Services] (the
+"Services") are hosted by Google. By using and/or visiting the Website and/or
+Services, you consent to be bound by Google's general [Terms of Service], the
+[Google APIs Terms of Service], and Google's general [Privacy Policy].
+[v.io]: https://v.io
+[Vanadium Cloud Services]: tools/services.html
[Terms of Service]: https://www.google.com/intl/en/policies/terms/
[Google APIs Terms of Service]: https://developers.google.com/terms/
[Privacy Policy]: https://www.google.com/intl/en/policies/privacy/
diff --git a/content/tutorials/basics.md b/content/tutorials/basics.md
index 90b95c7..2243fb8 100644
--- a/content/tutorials/basics.md
+++ b/content/tutorials/basics.md
@@ -469,11 +469,10 @@
{{# helpers.warning }}
- # Warning - the next command demonstrates failure!
+## Warning: The next command demonstrates failure!
- The correct pieces are in place to attempt a request - but the next
- command shows that you've not yet established the conditions for
- authorization.
+The correct pieces are in place to attempt a request - but the next command
+shows that you've not yet established the conditions for authorization.
{{/ helpers.warning }}
diff --git a/content/tutorials/naming/mount-table.md b/content/tutorials/naming/mount-table.md
index 87f673d..f8da18c 100644
--- a/content/tutorials/naming/mount-table.md
+++ b/content/tutorials/naming/mount-table.md
@@ -331,18 +331,16 @@
```
{{# helpers.warning }}
- # Optionally observe failure
+## Optionally observe failure
- Optionally, confirm that client use of the unmounted name
- `fortuneAlpha` fails. Feel free to interrupt before the retry
- attempts exhaust themselves.
+Optionally, confirm that client use of the unmounted name `fortuneAlpha` fails.
+Feel free to interrupt before the retry attempts exhaust themselves.
- ```
- $V_TUT/bin/client --server fortuneAlpha
- ```
+```
+$V_TUT/bin/client --server fortuneAlpha
+```
{{/ helpers.warning }}
-
{{# helpers.hidden }}
Must resolve https://github.com/veyron/release-issues/issues/1871
diff --git a/content/tutorials/security/principals-and-blessings.md b/content/tutorials/security/principals-and-blessings.md
index 9f5dcb0..f21e356 100644
--- a/content/tutorials/security/principals-and-blessings.md
+++ b/content/tutorials/security/principals-and-blessings.md
@@ -114,17 +114,14 @@
stores it for later use by Bob when talking to Alice's server.
{{# helpers.info }}
- # Alice and Bob would typically be on different devices.
+## Alice and Bob would typically be on different devices.
- A blessing does not contain any private keys and is useful only to
- the one blessed, so it could be transferred via email without
- compromising its purpose.
+A blessing does not contain any private keys and is useful only to the one
+blessed, so it could be transferred via email without compromising its purpose.
- Blessings are transferred via pipes in this tutorial for educational
- brevity. Later tutorials will show (with more coding details) how a
- blessing can directly accompany the request that the blessing
- authorizes.
-
+Blessings are transferred via pipes in this tutorial for educational brevity.
+Later tutorials will show (with more coding details) how a blessing can directly
+accompany the request that the blessing authorizes.
{{/ helpers.info }}
![Alice blesses Bob as a friend](/images/tut/security02-alice-blesses-bob.svg)
diff --git a/stylesheets/header.less b/stylesheets/header.less
index ea31cc5..55abdf1 100644
--- a/stylesheets/header.less
+++ b/stylesheets/header.less
@@ -5,9 +5,6 @@
@import "constants";
& {
- position: fixed;
- top: 0;
- width: 100%;
background-color: @color-cyan-800;
}
diff --git a/stylesheets/index.less b/stylesheets/index.less
index 7bd01cf..203f597 100644
--- a/stylesheets/index.less
+++ b/stylesheets/index.less
@@ -16,10 +16,16 @@
overflow-y: scroll;
}
+html,
+body {
+ min-height: 100%;
+}
+
body {
position: relative;
+ display: flex;
+ flex-direction: column;
margin: 0;
- min-height: 0;
font-family: "Roboto", sans-serif;
font-size: 14px;
line-height: 1.4;
@@ -28,6 +34,7 @@
h1, h2, h3, h4, h5, h6 {
margin: 1.2em 0 0.4em;
+ line-height: 1.4;
}
h4, h5, h6 {
font-weight: 500;
@@ -112,19 +119,15 @@
header {
@import "header";
+ position: fixed;
+ top: 0;
+ width: 100%;
z-index: 3;
}
-/* The logo element appears in the header and in the sidebar. */
-.logo {
- font-size: 20px;
-}
-
-main {
- position: relative;
- display: flex;
- flex-direction: column;
- margin-top: @header-height;
+/* Adjust for sidebar. */
+main,
+.previous-next {
margin-left: @sidebar-width;
@media @small-screen {
@@ -132,13 +135,19 @@
}
}
-h1.title {
- color: @color-cyan-700;
- font-size: 40px;
-}
-
-/* Prevent headings from being obscured by the <header> for #heading urls. */
main {
+ position: relative;
+ flex: 1;
+ margin-top: @header-height;
+ padding: 0 calc(@gutter + @gutter-half) @gutter;
+ max-width: @main-max-width;
+
+ h1.title {
+ color: @color-cyan-700;
+ font-size: 40px;
+ }
+
+ /* Prevent headings from being obscured by the <header> for #heading urls. */
h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
/**
* Prevent the :before block from obscuring the element above. Note: The
@@ -161,22 +170,10 @@
}
}
-.content {
- flex: 1;
- padding: 0 calc(@gutter + @gutter-half) @gutter;
- max-width: @main-max-width;
-}
-
-.note {
- @import "note";
-}
-
.previous-next {
@import "previous-next";
-}
-.sidebar-data {
- display: none;
+ margin-top: @gutter;
}
.sidebar {
@@ -212,3 +209,16 @@
width: @sidebar-width;
}
}
+
+.sidebar-data {
+ display: none;
+}
+
+/* The logo element appears in the header and in the sidebar. */
+.logo {
+ font-size: 20px;
+}
+
+.note {
+ @import "note";
+}
diff --git a/stylesheets/previous-next.less b/stylesheets/previous-next.less
index fedee3c..068af21 100644
--- a/stylesheets/previous-next.less
+++ b/stylesheets/previous-next.less
@@ -7,7 +7,6 @@
& {
display: flex;
flex-wrap: wrap-reverse;
- margin: @gutter 0 0;
}
a {
diff --git a/templates/layouts/default.mustache b/templates/layouts/default.mustache
index 4d8cdd3..51fce2a 100644
--- a/templates/layouts/default.mustache
+++ b/templates/layouts/default.mustache
@@ -5,17 +5,15 @@
{{> partials/header }}
{{> partials/sidebar }}
<main>
- <div class="content">
- <h1 class="title">
- {{ page.title }}
- </h1>
+ <h1 class="title">
+ {{ page.title }}
+ </h1>
- {{# page.toc }}
- <div class="toc"></div>
- {{/ page.toc }}
+ {{# page.toc }}
+ <div class="toc"></div>
+ {{/ page.toc }}
- {{{ yield }}}
- </div>
+ {{{ yield }}}
</main>
</body>
</html>
diff --git a/templates/layouts/java_tutorial.mustache b/templates/layouts/java_tutorial.mustache
index 0859ed8..54b2206 100644
--- a/templates/layouts/java_tutorial.mustache
+++ b/templates/layouts/java_tutorial.mustache
@@ -5,25 +5,23 @@
{{> partials/header }}
{{> partials/sidebar }}
<main>
- <div class="content">
- <h1 class="title">
- {{# page.fullTitle }}{{ page.fullTitle }}{{/ page.fullTitle }}
- {{^ page.fullTitle }}{{ page.title }}{{/ page.fullTitle }}
- </h1>
+ <h1 class="title">
+ {{# page.fullTitle }}{{ page.fullTitle }}{{/ page.fullTitle }}
+ {{^ page.fullTitle }}{{ page.title }}{{/ page.fullTitle }}
+ </h1>
- {{# page.wherein }}
- <p class="wherein"><strong>Wherein</strong> {{ page.wherein }}</p>
- {{/ page.wherein }}
+ {{# page.wherein }}
+ <p class="wherein"><strong>Wherein</strong> {{ page.wherein }}</p>
+ {{/ page.wherein }}
- {{# page.toc }}
- <div class="toc"></div>
- {{/ page.toc }}
+ {{# page.toc }}
+ <div class="toc"></div>
+ {{/ page.toc }}
- {{> partials/java_tut_prereqs }}
+ {{> partials/java_tut_prereqs }}
- {{{ yield }}}
- </div>
- {{> partials/previous_next }}
+ {{{ yield }}}
</main>
+ {{> partials/previous_next }}
</body>
</html>
diff --git a/templates/layouts/tutorial.mustache b/templates/layouts/tutorial.mustache
index a2deb6c..cd44101 100644
--- a/templates/layouts/tutorial.mustache
+++ b/templates/layouts/tutorial.mustache
@@ -5,25 +5,23 @@
{{> partials/header }}
{{> partials/sidebar }}
<main>
- <div class="content">
- <h1 class="title">
- {{# page.fullTitle }}{{ page.fullTitle }}{{/ page.fullTitle }}
- {{^ page.fullTitle }}{{ page.title }}{{/ page.fullTitle }}
- </h1>
+ <h1 class="title">
+ {{# page.fullTitle }}{{ page.fullTitle }}{{/ page.fullTitle }}
+ {{^ page.fullTitle }}{{ page.title }}{{/ page.fullTitle }}
+ </h1>
- {{# page.wherein }}
- <p class="wherein"><strong>Wherein</strong> {{ page.wherein }}</p>
- {{/ page.wherein }}
+ {{# page.wherein }}
+ <p class="wherein"><strong>Wherein</strong> {{ page.wherein }}</p>
+ {{/ page.wherein }}
- {{# page.toc }}
- <div class="toc"></div>
- {{/ page.toc }}
+ {{# page.toc }}
+ <div class="toc"></div>
+ {{/ page.toc }}
- {{> partials/tut_prereqs }}
+ {{> partials/tut_prereqs }}
- {{{ yield }}}
- </div>
- {{> partials/previous_next }}
+ {{{ yield }}}
</main>
+ {{> partials/previous_next }}
</body>
</html>