# HG changeset patch # User Steve Losh # Date 1258689094 18000 # Node ID 2a8eea4463c35f07f0028be9879b9ffa4d5498ae # Parent f9616d40630b65e551d1a87317c64b05ba7aace5 Add some styles for the docs. diff -r f9616d40630b -r 2a8eea4463c3 .hgignore --- a/.hgignore Thu Nov 19 21:53:55 2009 -0500 +++ b/.hgignore Thu Nov 19 22:51:34 2009 -0500 @@ -1,4 +1,6 @@ syntax: glob + +.DS_Store *.pyc docs/.html docs/.tmp diff -r f9616d40630b -r 2a8eea4463c3 docs/.templates/404.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/.templates/404.html Thu Nov 19 22:51:34 2009 -0500 @@ -0,0 +1,1 @@ +{% extends 'markdoc-default/404.html' %} diff -r f9616d40630b -r 2a8eea4463c3 docs/.templates/base.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/.templates/base.html Thu Nov 19 22:51:34 2009 -0500 @@ -0,0 +1,1 @@ +{% extends 'markdoc-default/base.html' %} diff -r f9616d40630b -r 2a8eea4463c3 docs/.templates/document.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/.templates/document.html Thu Nov 19 22:51:34 2009 -0500 @@ -0,0 +1,1 @@ +{% extends 'markdoc-default/document.html' %} diff -r f9616d40630b -r 2a8eea4463c3 docs/.templates/listing.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/.templates/listing.html Thu Nov 19 22:51:34 2009 -0500 @@ -0,0 +1,1 @@ +{% extends 'markdoc-default/listing.html' %} diff -r f9616d40630b -r 2a8eea4463c3 docs/.templates/macros/html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/.templates/macros/html Thu Nov 19 22:51:34 2009 -0500 @@ -0,0 +1,19 @@ +{% macro cssimport(css_href, document_root="", media="screen, projection") -%} + +{%- endmacro %} + +{% macro css() -%} + +{%- endmacro %} + +{% macro jsimport(js_href, document_root="") -%} + +{%- endmacro %} + +{% macro js() -%} + +{%- endmacro %} diff -r f9616d40630b -r 2a8eea4463c3 docs/.templates/markdoc-default/404.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/.templates/markdoc-default/404.html Thu Nov 19 22:51:34 2009 -0500 @@ -0,0 +1,9 @@ +{% extends 'base.html' %} + +{% block body %} +

Not Found: {{ request.path_info|e }}

+

+ We couldn’t find what you were looking for. + {% if not is_index %}You could try going home.{% endif %} +

+{% endblock %} diff -r f9616d40630b -r 2a8eea4463c3 docs/.templates/markdoc-default/base.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/.templates/markdoc-default/base.html Thu Nov 19 22:51:34 2009 -0500 @@ -0,0 +1,52 @@ + + + + + + + + {% if 'wiki-name' in config %}{{ config['wiki-name']|e }} ยป {% endif -%} + {% block title %}{{ title }}{% endblock %} + + + {% import "macros/html" as html -%} + + {{ html.cssimport("/media/css/reset.css", document_root) }} + {{ html.cssimport("/media/css/layout.css", document_root) }} + {{ html.cssimport("/media/css/typography.css", document_root) }} + {{ html.cssimport("/media/css/pygments.css", document_root) }} + + + + {% if crumbs %} + + {% endif %} + +
+ + {% block body %} + {% endblock %} + +
+ + + + diff -r f9616d40630b -r 2a8eea4463c3 docs/.templates/markdoc-default/document.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/.templates/markdoc-default/document.html Thu Nov 19 22:51:34 2009 -0500 @@ -0,0 +1,5 @@ +{% extends 'base.html' %} + +{% block body %} + {{ content }} +{% endblock %} diff -r f9616d40630b -r 2a8eea4463c3 docs/.templates/markdoc-default/listing.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/.templates/markdoc-default/listing.html Thu Nov 19 22:51:34 2009 -0500 @@ -0,0 +1,57 @@ +{% extends 'base.html' %} + +{% block title %}ls /{{ directory|e }}{% endblock %} + +{% block body %} +

ls /{{ directory|e }}

+ + {% if sub_directories %} +

Directories

+ + + {% for subdir in sub_directories %} + + + + {% endfor %} +
+ + {{ subdir.basename|e }}/ + +
+ {% endif %} + + {% if pages %} +

Pages

+ + + {% for page in pages %} + + + + + {% endfor %} +
{{ page.humansize }} + + {{ page.title|e }} + +
+ {% endif %} + + {% if files %} +

Files

+ + + {% for file in files %} + + + + + {% endfor %} +
{{ file.humansize }} + + {{ file.basename|e }} + +
+ {% endif %} +{% endblock %} diff -r f9616d40630b -r 2a8eea4463c3 docs/markdoc.yaml --- a/docs/markdoc.yaml Thu Nov 19 21:53:55 2009 -0500 +++ b/docs/markdoc.yaml Thu Nov 19 22:51:34 2009 -0500 @@ -1,10 +1,16 @@ wiki-name: "hg-prompt" + + +template-dir: ".templates" +static-dir: "static" + hide-prefix: "." document-extensions: [.md, .mdown, .markdown] generate-listing: always listing-filename: "list.html" -use-default-static: true -use-default-templates: true + +use-default-static: false +use-default-templates: false markdown: safe_mode: false diff -r f9616d40630b -r 2a8eea4463c3 docs/static/media/css/layout.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/static/media/css/layout.css Thu Nov 19 22:51:34 2009 -0500 @@ -0,0 +1,187 @@ +body, html { + background-color: #226F89; + margin: 0; + padding: 0; +} + +div#breadcrumbs { + border-bottom: 4px dashed #265565; + border-left: 1px solid #265565; + border-right: 1px solid #265565; + margin: 0 auto; + padding: 0.5em 1.5em; + background-color: #fff; + width: 55em; +} +div#breadcrumbs p { + margin-bottom: 0.2em; +} +div#content { + background-color: #fff; + height: 100%; + margin: 0 auto; + overflow: hidden; + padding: 1em 1.5em 1.5em 1.5em; + width: 55em; + border-left: 1px solid #265565; + border-right: 1px solid #265565; +} + +h1 { + margin: 0.3em 0; + padding: 0.1em 0; +} +h2, h3, h4, h5, h6 { + margin-top: 1em; + margin-bottom: 0.4em; +} +p, ul, blockquote { + line-height: 1.8em; + margin-top: 0; + margin-bottom: 1em; +} +a { + color: #133C4C; +} +a:hover { + color: #F14800; +} + +div#footer { + background-color: #fff; + border: 1px solid #265565; + border-top: 4px dashed #265565; + width: 55em; + padding: 1em 1.5em; + margin: 0 auto; + margin-bottom: 3em; + text-align: center; + color: #666; +} +div#footer p { + margin: 0; + padding: 0; +} + +ul { + padding-left: 1.5em; +} +ul li { + list-style-type: disc; + margin-left: 1.5em; + margin-top: 0.4em; +} + +div.toc ul { + padding: 0; +} +div.toc ul li { + list-style-type: none; + margin: 0; +} +div.toc > ul > li { + list-style-type: none; + margin: 0; +} +div.toc > ul ul { + margin: 0 3em; +} + +code { + background-color: #f6f6f6; + border: 1px solid #999; + padding: 2px; + white-space: nowrap; +} +pre code { + border: none; + padding: 0; + background: none; + white-space: pre-wrap; +} +a code { + background: none; + border: none; + margin: 0; + padding: 0; + text-decoration: inherit; +} +a.code { + background-color: #3f3f3f; +} + +dt { + font-weight: bold; + margin-top: 1em; +} +dd { + line-height: 1.8em; + margin-left: 1.5em; +} +blockquote p { + margin: 0; +} + +img { + background-color: #f6f6f6; + border: 1px solid #999; + padding: 1em; + display: block; + margin: 0 auto; +} + +table { + margin: 1em; +} +table thead { + background-color: #f6f6f6; +} +table thead th { + border: 1px solid #999; + padding: 0.5em 1em; +} +table tbody tr td { + border: 1px solid #999; + padding: 0.5em 1em; +} + +pre, blockquote, table.codehilitetable { + background-color: #f6f6f6; + border: 1px solid #999; + display: block; + line-height: 1.5em; + margin-left: 1.5em; + margin-right: 1.5em; + padding: 0.5em; + padding-left: 1em; +} +pre, table.codehilitetable { + margin-bottom: 1em; +} +table.codehilitetable div.linenodiv { + border-right: 1px solid #ccc; + margin-right: 1em; + padding-right: 1em; +} +table.codehilitetable pre { + background: none; + border: none; + margin: 0; + padding: 0; +} + +table#pages tr, table#subdirs tr, table#files tr { + border-top: 1px solid #999; + border-bottom: 1px solid #999; +} +table tr td.name a { + display: block; + padding: 0.5em 1em; +} +table tr td.name a:hover { + background-color: #f6f6f6; +} +table tr td.size { + padding: 0.5em 1em; + width: 40px; +} diff -r f9616d40630b -r 2a8eea4463c3 docs/static/media/css/pygments.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/static/media/css/pygments.css Thu Nov 19 22:51:34 2009 -0500 @@ -0,0 +1,61 @@ +.hll { background-color: #ffffcc } +.c { color: #808080 } /* Comment */ +.err { color: #F00000; background-color: #F0A0A0 } /* Error */ +.k { color: #008000; font-weight: bold } /* Keyword */ +.o { color: #303030 } /* Operator */ +.cm { color: #808080 } /* Comment.Multiline */ +.cp { color: #507090 } /* Comment.Preproc */ +.c1 { color: #808080 } /* Comment.Single */ +.cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.gd { color: #A00000 } /* Generic.Deleted */ +.ge { font-style: italic } /* Generic.Emph */ +.gr { color: #FF0000 } /* Generic.Error */ +.gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.gi { color: #00A000 } /* Generic.Inserted */ +.go { color: #808080 } /* Generic.Output */ +.gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.gs { font-weight: bold } /* Generic.Strong */ +.gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.gt { color: #0040D0 } /* Generic.Traceback */ +.kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.kp { color: #003080; font-weight: bold } /* Keyword.Pseudo */ +.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.kt { color: #303090; font-weight: bold } /* Keyword.Type */ +.m { color: #6000E0; font-weight: bold } /* Literal.Number */ +.s { background-color: #fff0f0 } /* Literal.String */ +.na { color: #0000C0 } /* Name.Attribute */ +.nb { color: #007020 } /* Name.Builtin */ +.nc { color: #B00060; font-weight: bold } /* Name.Class */ +.no { color: #003060; font-weight: bold } /* Name.Constant */ +.nd { color: #505050; font-weight: bold } /* Name.Decorator */ +.ni { color: #800000; font-weight: bold } /* Name.Entity */ +.ne { color: #F00000; font-weight: bold } /* Name.Exception */ +.nf { color: #0060B0; font-weight: bold } /* Name.Function */ +.nl { color: #907000; font-weight: bold } /* Name.Label */ +.nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.nt { color: #007000 } /* Name.Tag */ +.nv { color: #906030 } /* Name.Variable */ +.ow { color: #000000; font-weight: bold } /* Operator.Word */ +.w { color: #bbbbbb } /* Text.Whitespace */ +.mf { color: #6000E0; font-weight: bold } /* Literal.Number.Float */ +.mh { color: #005080; font-weight: bold } /* Literal.Number.Hex */ +.mi { color: #0000D0; font-weight: bold } /* Literal.Number.Integer */ +.mo { color: #4000E0; font-weight: bold } /* Literal.Number.Oct */ +.sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.sc { color: #0040D0 } /* Literal.String.Char */ +.sd { color: #D04020 } /* Literal.String.Doc */ +.s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.se { color: #606060; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.si { background-color: #e0e0e0 } /* Literal.String.Interpol */ +.sx { color: #D02000; background-color: #fff0f0 } /* Literal.String.Other */ +.sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.ss { color: #A06000 } /* Literal.String.Symbol */ +.bp { color: #007020 } /* Name.Builtin.Pseudo */ +.vc { color: #306090 } /* Name.Variable.Class */ +.vg { color: #d07000; font-weight: bold } /* Name.Variable.Global */ +.vi { color: #3030B0 } /* Name.Variable.Instance */ +.il { color: #0000D0; font-weight: bold } /* Literal.Number.Integer.Long */ diff -r f9616d40630b -r 2a8eea4463c3 docs/static/media/css/reset.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/static/media/css/reset.css Thu Nov 19 22:51:34 2009 -0500 @@ -0,0 +1,7 @@ +/* +Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.7.0 +*/ +html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;} \ No newline at end of file diff -r f9616d40630b -r 2a8eea4463c3 docs/static/media/css/typography.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/static/media/css/typography.css Thu Nov 19 22:51:34 2009 -0500 @@ -0,0 +1,89 @@ +html { + font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif; + font-size: 10pt; +} + +h1, h2, h3, h4, h5, h6 { + font-weight: bold; +} + +h1 { + font-size: 2em; +} + +h2 { + font-size: 1.6em; +} + +h3 { + font-size: 1.3em; +} + +h4 { + font-size: 1.1em; + font-weight: bold; +} + +em { + font-style: italic; +} + +strong { + font-weight: bold; +} + +a { + text-decoration: none; +} + +table#files a:hover, table#subdirs a:hover, table#pages a:hover { + color: #a00000; +} + +a[href^="http:"] { + text-decoration: underline; +} + +p#footer a { + text-decoration: none; +} + +p code, ul code, ol code, dl code, blockquote code, tbody code, thead code { + font-size: 8pt; +} + +pre, code, tt, table#subdirs tr td.name, table#files tr td.name, table tr td.size { + font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", Menlo, Inconsolata, Consolas, Monaco, "Courier New", Courier; +} + +table#subdirs code, table#files code { + font-size: 10pt; +} + +table.codehilitetable div.linenodiv { + color: #777; +} + +blockquote { + color: #222; + font-style: italic; +} + +pre { + overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */ + white-space: pre-wrap; /* css-3 */ + white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + /* width: 99%; */ + word-wrap: break-word; /* Internet Explorer 5.5+ */ +} + +table thead th { + font-weight: bold; +} + +.list-crumb { + color: #777; + font-variant: italic; +} \ No newline at end of file