Commit 0532363b authored by Kenton Varda's avatar Kenton Varda

More doc tweaks.

parent 7bb9f28d
......@@ -27,3 +27,6 @@
# Jekyll-generated site
/doc/_site
# Checkout of gh-pages made by /doc/push-site.sh
/doc/.gh-pages
......@@ -5,13 +5,14 @@
<meta charset='utf-8' />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="description" content="Capnproto : Cap'n Proto serialization/RPC system" />
<meta name="viewport" content="width=480">
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
<title>Cap'n Proto</title>
</head>
<body>
<body class="desktop">
<!-- HEADER -->
<div id="header_wrap" class="outer">
......@@ -31,7 +32,9 @@
<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="menu" class="desktop">
<div id="corner_hack"><div> </div></div>
<section id="menu">
<ul>
<li><a href="index.html">Introduction</a></li>
<li><a href="install.html">Installation</a></li>
......@@ -43,7 +46,8 @@
</ul>
</section>
<script type="text/javascript">
// Highlight the current page in the sidebar, and make the sidebar items easy to click.
// Highlight the current page in the sidebar, make the sidebar items easy to click, and
// make the sidebar float when scrolled, unless there isn't enough space.
(function () {
var pathname = document.location.pathname;
var last = pathname.lastIndexOf('/');
......@@ -55,19 +59,20 @@
var menu = document.getElementById("menu");
var setMenuLayout = function() {
if (window.innerWidth < 1150) {
menu.className = "mobile";
menu.style.position = "relative";
} else if (window.innerHeight < 900) {
menu.className = "desktop";
menu.style.position = "absolute";
if (window.innerWidth < 1170) {
document.body.className = "narrow";
menu.className = "";
} else if (window.scrollY < 219 || window.innerHeight < menu.clientHeight + 20) {
document.body.className = "wide";
menu.className = "";
} else {
menu.className = "desktop";
menu.style.position = "fixed";
document.body.className = "wide";
menu.className = "floating";
}
};
setMenuLayout();
window.onresize = setMenuLayout;
window.onscroll = setMenuLayout;
var items = menu.getElementsByTagName("li");
for (var i = 0; i < items.length; i++) {
......@@ -83,7 +88,7 @@
window.location.href = url;
event.stopPropagation();
}
})(href);
})(href + "#main_content");
parent.appendChild(p);
items[i].className = "selected";
var toc = document.createElement("ul");
......@@ -115,6 +120,7 @@
</div>
<script type="text/javascript">
// Inject a table of contents into the sidebar.
(function() {
var toc = document.getElementById("toc");
if (toc) {
......
......@@ -74,3 +74,20 @@ years of experience working on Protobufs, listening to user feedback, and thinki
things could be done better.
I no longer work for Google. Cap'n Proto is not affiliated with Google or any other company.
**_OK, how do I get started?_**
At this time, Cap'n Proto is not ready for production use. If you'd like to help it get there,
let us know on the [discussion group](https://groups.google.com/group/capnproto). If you'd just
like to know when it's ready, add yourself to the
[announcement list](https://groups.google.com/group/capnproto-announce).
<div style="float: right">
<a class="github_link" style="color: #fff"
href="https://github.com/kentonv/capnproto">Develop</a>
<a class="groups_link" style="color: #fff"
href="https://groups.google.com/group/capnproto">Discuss</a>
<a class="groups_link" style="color: #fff"
href="https://groups.google.com/group/capnproto-announce">Stay Updated</a>
</div>
<div style="clear: right;"> </div>
......@@ -6,8 +6,8 @@ layout: page
<p style="font-size: 125%; font-weight: bold;">Note: Cap'n Proto is not ready yet</p>
<a class="prominent_link" style="color: #fff"
href="https://groups.google.com/group/capnproto-announce">Sign Up for Updates</a>
<div style="float: right"><a class="groups_link" style="color: #fff"
href="https://groups.google.com/group/capnproto-announce">Sign Up for Updates</a></div>
As of this writing, Cap'n Proto is in the very early stages of development. It is still missing
many essential features:
......
#! /bin/sh
set -eu
if [ "x$(git status --porcelain)" != "x" ]; then
echo "error: git repo has uncommited changes." >&2
exit 1
fi
if [ ! -e .gh-pages ]; then
git clone -b gh-pages https://github.com/kentonv/capnproto.git .gh-pages
cd .gh-pages
else
cd .gh-pages
git pull
fi
if [ "x$(git status --porcelain)" != "x" ]; then
echo "error: .gh-pages is not clean." >&2
exit 1
fi
cd ..
exit 0
rm -rf _site .gh-pages/*
jekyll --pygments --no-lsi --safe
cp -r _site/* .gh-pages
REV="$(git rev-parse HEAD)"
cd .gh-pages
git add *
git commit -m "site generated @$REV"
if [ "x$(git status --porcelain)" != "x" ]; then
echo "error: .gh-pages is not clean after commit." >&2
exit 1
fi
echo -n "Push now? (y/N)"
read -n 1 YESNO
echo
if [ "$YESNO" == "y" ]; then
git push
cd ..
rm -rf .gh-pages
else
echo "Did not push. You may want to delete .gh-pages."
fi
......@@ -175,7 +175,9 @@ pre, code {
}
pre {
width: 100%;
width: -moz-calc(100% - 20px);
width: -webkit-calc(100% - 20px);
width: calc(100% - 20px);
padding: 10px;
box-shadow: 0 0 10px rgba(0,0,0,.1);
overflow: auto;
......@@ -208,31 +210,6 @@ ul li {
list-style: outside;
}
/*
#toc {
background-color: #fff;
padding: 10px;
border-radius: 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
box-shadow: 0 0 5px #ebebeb;
-webkit-box-shadow: 0 0 5px #ebebeb;
-moz-box-shadow: 0 0 5px #ebebeb;
-o-box-shadow: 0 0 5px #ebebeb;
-ms-box-shadow: 0 0 5px #ebebeb;
}
#toc li {
list-style: none
}
#toc ul {
padding-bottom: 0;
margin-bottom: 0;
}
*/
ol li {
list-style: decimal outside;
}
......@@ -332,11 +309,11 @@ Full-Width Styles
border-bottom-right-radius: 2px;
}
.prominent_link {
display: block;
float: right;
.groups_link {
display: inline-block;
z-index: 10;
padding: 10px 50px 10px 10px;
margin: 5px;
color: #fff;
background: url('../images/groups-logo.png') #0090ff no-repeat 95% 50%;
background-color: #0090ff;
......@@ -348,6 +325,22 @@ Full-Width Styles
border-bottom-right-radius: 2px;
}
.github_link {
display: inline-block;
z-index: 10;
padding: 10px 50px 10px 10px;
margin: 5px;
color: #fff;
background: url('../images/blacktocat.png') #0090ff no-repeat 95% 50%;
background-color: #0090ff;
font-weight: 700;
box-shadow: 0 0 10px rgba(0,0,0,.5);
border-top-left-radius: 2px;
border-top-right-radius: 2px;
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
}
#header_wrap {
background: #212121;
background: -moz-linear-gradient(top, #373737, #212121);
......@@ -479,36 +472,55 @@ Small Device Styles
}
code, pre {
min-width: 320px;
max-width: 480px;
font-size: 11px;
}
#forkme_banner {
right: 215px;
}
}
/*******************************************************************************
Sidbar style based on cldoc by jessevdk, because I thought it looked good.
I modified it heavily, though.
*******************************************************************************/
.wide #corner_hack {
position: absolute;
left: 0px;
top: 209px;
right: 0px;
height: 10px;
background: #212121;
}
.wide #corner_hack>div {
margin-left: 249px;
height: 10px;
border-radius: 10px 0px 0px 0px;
background: #f2f2f2;
border-top: 1px solid #111;
border-left: 1px solid #111;
}
#menu.desktop {
position: fixed;
.wide #menu {
position: absolute;
left: 0px;
top: 230px;
top: 219px;
width: 250px;
z-index: 10;
}
#menu.mobile {
.wide #menu.floating {
position: fixed;
top: 0px;
}
.narrow #menu {
position: relative;
max-width: 640px;
padding: 100px 10px 20px 10px;
padding: 50px 10px 0px 10px;
margin: 0 auto;
}
@media screen and (max-width: 480px) {
#menu.mobile {
.narrow #menu {
min-width: 320px;
max-width: 480px;
}
......@@ -525,20 +537,20 @@ I modified it heavily, though.
list-style-type: none;
background-color: #212121;
}
#menu.desktop>ul>li:first-child {
border-radius: 0px 10px 0px 0px;
#menu>ul>li {
border-right: 1px solid #111;
}
#menu.desktop>ul>li:last-child {
.wide #menu>ul>li:last-child {
border-radius: 0px 0px 10px 0px;
border-bottom: 1px solid #111;
}
#menu.mobile>ul>li:first-child {
.narrow #menu>ul>li:first-child {
border-radius: 10px 10px 0px 0px;
}
#menu.mobile>ul>li:last-child {
.narrow #menu>ul>li:last-child {
border-radius: 0px 0px 10px 10px;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment