From: David Schoonover Date: Fri, 29 Jun 2012 13:29:33 +0000 (-0700) Subject: Adds conf to build /docs into nice HTML docs. X-Git-Url: http://git.lttlst.com:3516/?a=commitdiff_plain;h=2efc70fcd789548709a1327bb1f0fd3f0a712c20;p=kraken-ui.git Adds conf to build /docs into nice HTML docs. --- diff --git a/.gitignore b/.gitignore index ac951e7..2488c18 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,5 @@ lib/version.js www/presets/*.json .cache +.tmp + diff --git a/.markdoc.yaml b/.markdoc.yaml new file mode 120000 index 0000000..4737e1f --- /dev/null +++ b/.markdoc.yaml @@ -0,0 +1 @@ +msc/markdoc/markdoc.yaml \ No newline at end of file diff --git a/docs/README.md b/docs/README.md new file mode 120000 index 0000000..32d46ee --- /dev/null +++ b/docs/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/docs/internals/chart-types/timeseries-options.md b/docs/internals/chart-types/timeseries-options.md new file mode 100644 index 0000000..e8aaf32 --- /dev/null +++ b/docs/internals/chart-types/timeseries-options.md @@ -0,0 +1,68 @@ +# Timeseries Chart Options + +Right now, all options are global (apply to all metrics of a chart) because that's how Dygraph worked. This doesn't make sense when you have per-metric options, which we see bleeding in now with color etc, or when you want to mix and match chart-types. + +That said, most "local" (per-metric) options also make sense as global defaults for new metrics. Cases where that doesn't hold are noted. + + +## Local Per-Metric Options + +- id +- enabled +- visible +- type + +- label +- format +- timespan: [start, stop] -- inferred +- stroke[] + - width: 4.0 + - color: default from palette + - opacity: 1.0 + - style: solid | dashed | dotted -- presets for advanced options which are otherwise hidden + - solid := (all defaults) + - dashed := dashes:[2,2] + - dotted := dashes:[1,1], caps:round, joins:round + - (advanced options) + - dashes: null | dash pattern array (int array) -- null == solid + - caps: butt | round | square + - joins: miter | round | bevel +- fill: null | color | gradient? +- opacity: 1.0 +- points + - enabled: false + - size: 0 + - color: inherit from first stroke +- horizon: false +- smoothing: false +- axis + - scale: linear | log | sqrt | pow | (discrete | quantize | quantile)? + - scaleQuanta: Number -- for linear, log(?), pow, discrete, quant* + - range: [min, max] -- auto-inferred from dataset extents + - ticks: Number + - format: inherit from format +- data + - errorBars: false | choose error data column + +## Chart-Global Options + +- palette +- stacked: false +- axis +- grid[x,y] + - enabled: false + - stroke +- timespan: [start, stop] -- inferred +- legend + - enabled: true + - fixed: false -- when true, graph is smaller to accommodate legend; otherwise, legend moves itself + - draggable: false -- legend won't dodge the mouse so you can grab it +- zoom + - enabled: true -- enables Y-zoom independent of pan + - starting: 1.0 + - range: [min, max] +- pan + - enabled: true + - starting: [0, 1.0] -- Floats as % of timespan, or Dates +- minimap: false +- transitions: ? \ No newline at end of file diff --git a/msc/markdoc/404.html b/msc/markdoc/404.html new file mode 100644 index 0000000..ac434a7 --- /dev/null +++ b/msc/markdoc/404.html @@ -0,0 +1,11 @@ +{% extends 'base.html' %} + +{% block title %}Not Found: {{ request.path_info|e }}{% endblock %} + +{% block content %} +

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 --git a/msc/markdoc/base.html b/msc/markdoc/base.html new file mode 100644 index 0000000..f997b20 --- /dev/null +++ b/msc/markdoc/base.html @@ -0,0 +1,94 @@ + + +{% import "macros/html" as html -%} + + + {% block head %} + + {% block meta %} + + {% endblock %} + + + {% block title -%} + {{ title }} + {%- endblock %} + {% block title_suffix -%} + {% if 'wiki-name' in config %} | {{ config['wiki-name']|e }}{% endif %} + {%- endblock %} + + + {% block css %} + {{ html.cssimport("/vendor/bootstrap/css/bootstrap.min.css") }} + {{ html.cssimport("/css/solarized.css") }} + {{ html.cssimport("/css/docs.css") }} + {% endblock %} + + {% endblock head %} + + +
{% block body %} + +{% block header %} +
+ {% block crumbs %} + {% if crumbs %} + + {% endif %} + {% endblock crumbs %} +
+{% endblock header %} + +
+ {% block content %} + {% endblock content %} +
+ +{% block footer %} + +{% endblock footer %} + +{% block end %}{% endblock %} + +{% block scripts %} +
+ {% block vendor %} + {{ html.jsimport("/vendor/jquery.min.js") }} + {{ html.jsimport("/vendor/bootstrap.min.js") }} + {% endblock %} + {% block analytics %} + {% if 'google-analytics' in config %} + + + {% endif %} + {% endblock analytics %} + {% block js %}{% endblock %} +
+{% endblock scripts %} + +{% endblock body %}
+ diff --git a/msc/markdoc/document.html b/msc/markdoc/document.html new file mode 100644 index 0000000..03a1f34 --- /dev/null +++ b/msc/markdoc/document.html @@ -0,0 +1,5 @@ +{% extends 'base.html' %} + +{% block content %} +{{ content | replace('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 --git a/msc/markdoc/macros/html b/msc/markdoc/macros/html new file mode 100644 index 0000000..833f169 --- /dev/null +++ b/msc/markdoc/macros/html @@ -0,0 +1,19 @@ +{% macro cssimport(css_href, media="screen, projection") -%} + +{%- endmacro %} + +{% macro css() -%} + +{%- endmacro %} + +{% macro jsimport(js_href) -%} + +{%- endmacro %} + +{% macro js() -%} + +{%- endmacro %} diff --git a/msc/markdoc/markdoc.yaml b/msc/markdoc/markdoc.yaml new file mode 100644 index 0000000..acd521e --- /dev/null +++ b/msc/markdoc/markdoc.yaml @@ -0,0 +1,37 @@ +wiki-name : Limn Docs + +wiki-dir : "docs" +template-dir : "msc/markdoc" +static-dir : "msc/markdoc/static" +html-dir : "var/docs" +temp-dir : ".tmp" + +use-default-static : false +use-default-templates : false +generate-listing : always +hide-prefix : "." +cvs-exclude : true +listing-filename : "_list.html" + +markdown: + output-format: html5 + extensions: + - abbr + - codehilite + - def_list + - extra + - fenced_code + - footnotes + - headerid + - meta + - tables + - toc + # - rss + # - html_tidy + # - imagelinks + # - wikilinks + extension-configs: + codehilite: + force_linenos: false + + diff --git a/docs/assets/github-readme.css b/static/css/github-readme.css similarity index 100% rename from docs/assets/github-readme.css rename to static/css/github-readme.css diff --git a/docs/assets/solarized.css b/static/css/solarized.css similarity index 100% rename from docs/assets/solarized.css rename to static/css/solarized.css diff --git a/www/css/docs.styl b/www/css/docs.styl new file mode 100644 index 0000000..571d298 --- /dev/null +++ b/www/css/docs.styl @@ -0,0 +1,36 @@ +h1, h2, h3, h4, h5 + font-weight normal + margin 0 + margin-top 1em + padding 0.5em 0 + +h1.page-header + // font-size 30px + padding-bottom 0 + +h2 + font-size 18px + +h3, h4 + font-size 13px + text-transform uppercase + letter-spacing 0.2em + word-spacing 0.1em + + +#content + height 100% + +header, #doc + margin 0 auto + width 60% + max-width 800px + min-width 600px + +footer + margin-top 3em + padding 1em 3em 3em + background-color #fbfbfb + border-top 1px solid #ddd + font-size 11px +