diff options
Diffstat (limited to '')
-rw-r--r-- | src/seastar/fmt/doc/_templates/layout.html | 149 | ||||
-rw-r--r-- | src/seastar/fmt/doc/_templates/search.html | 55 |
2 files changed, 204 insertions, 0 deletions
diff --git a/src/seastar/fmt/doc/_templates/layout.html b/src/seastar/fmt/doc/_templates/layout.html new file mode 100644 index 00000000..0ac2dec7 --- /dev/null +++ b/src/seastar/fmt/doc/_templates/layout.html @@ -0,0 +1,149 @@ +{% extends "!layout.html" %} + +{% block extrahead %} +<meta name="description" content="Small, safe and fast formatting library"> +<meta name="keywords" content="C++, formatting, printf, string, library"> +<meta name="author" content="Victor Zverovich"> +<link rel="stylesheet" href="_static/fmt.css"> +{# Google Analytics #} +<script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date(); + a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1; + a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + ga('create', 'UA-20116650-4', 'fmtlib.net'); + ga('send', 'pageview'); +</script> +{% endblock %} + +{%- macro searchform(classes, button) %} +<form class="{{classes}}" role="search" action="{{ pathto('search') }}" + method="get"> + <div class="form-group"> + <input type="text" name="q" class="form-control" + {{ 'placeholder="Search"' if not button }} > + </div> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + {% if button %} + <input type="submit" class="btn btn-default" value="search"> + {% endif %} +</form> +{%- endmacro %} + +{% block header %} +<nav class="navbar navbar-inverse"> + <div class="tb-container"> + <div class="row"> + <div class="navbar-content"> + {# Brand and toggle get grouped for better mobile display #} + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" + data-toggle="collapse" data-target=".navbar-collapse"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.html">{fmt}</a> + </div> + + {# Collect the nav links, forms, and other content for toggling #} + <div class="collapse navbar-collapse"> + <ul class="nav navbar-nav"> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" + role="button" aria-expanded="false">{{ version }} + <span class="caret"></span></a> + <ul class="dropdown-menu" role="menu"> + {% for v in versions.split(',') %} + <li><a href="http://fmtlib.net/{{v}}">{{v}}</a></li> + {% endfor %} + </ul> + </li> + {% for name in ['Contents', 'Usage', 'API', 'Syntax'] %} + {% if pagename == name.lower() %} + <li class="active"><a href="{{name.lower()}}.html">{{name}} + <span class="sr-only">(current)</span></a></li> + {%else%} + <li><a href="{{name.lower()}}.html">{{name}}</a></li> + {%endif%} + {% endfor %} + </ul> + {% if pagename != 'search' %} + {{ searchform('navbar-form navbar-right', False) }} + {%endif%} + </div> {# /.navbar-collapse #} + </div> {# /.col-md-offset-2 #} + </div> {# /.row #} + </div> {# /.tb-container #} +</nav> +{% if pagename == "index" %} +{% set download_url = 'https://github.com/fmtlib/fmt/releases/download' %} +<div class="jumbotron"> + <div class="tb-container"> + <h1>{fmt}</h1> + <p class="lead">Small, safe and fast formatting library</p> + <div class="btn-group" role="group"> + {% set name = 'fmt' if version.split('.')[0]|int >= 3 else 'cppformat' %} + <a class="btn btn-success" + href="{{download_url}}/{{version}}/{{name}}-{{version}}.zip"> + <span class="glyphicon glyphicon-download"></span> Download + </a> + <button type="button" class="btn btn-success dropdown-toggle" + data-toggle="dropdown"><span class="caret"></span></button> + <ul class="dropdown-menu"> + {% for v in versions.split(',') %} + {% set name = 'fmt' if v.split('.')[0]|int >= 3 else 'cppformat' %} + <li><a href="{{download_url}}/{{v}}/{{name}}-{{v}}.zip">Version {{v}} + </a></li> + {% endfor %} + </ul> + </div> + </div> +</div> +{% endif %} +{% endblock %} + +{# Disable relbars. #} +{% block relbar1 %} +{% endblock %} +{% block relbar2 %} +{% endblock %} + +{% block content %} +<div class="tb-container"> + <div class="row"> + {# Sidebar is currently disabled. + <div class="bs-sidebar"> + <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> + <div class="sphinxsidebarwrapper"> + {%- block sidebarlogo %} + {%- if logo %} + <p class="logo"><a href="{{ pathto(master_doc) }}"> + <img class="logo" src="{{ pathto('_static/' + logo, 1) }}" + alt="Logo"/> + </a></p> + {%- endif %} + {%- endblock %} + {%- for sidebartemplate in sidebars %} + {%- include sidebartemplate %} + {%- endfor %} + </div> + </div> + </div> + #} + + <div class="content"> + {% block body %} {% endblock %} + </div> + </div> +</div> +{% endblock %} + +{% block footer %} +{{ super() }} +{# Placed at the end of the document so the pages load faster. #} +<script src="_static/bootstrap.min.js"></script> +{% endblock %} diff --git a/src/seastar/fmt/doc/_templates/search.html b/src/seastar/fmt/doc/_templates/search.html new file mode 100644 index 00000000..488e0b5d --- /dev/null +++ b/src/seastar/fmt/doc/_templates/search.html @@ -0,0 +1,55 @@ +{# + basic/search.html + ~~~~~~~~~~~~~~~~~ + + Template for the search page. + + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +#} +{%- extends "layout.html" %} +{% set title = _('Search') %} +{% set script_files = script_files + ['_static/searchtools.js'] %} +{% block extrahead %} + <script type="text/javascript"> + jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); }); + </script> + {# this is used when loading the search index using $.ajax fails, + such as on Chrome for documents on localhost #} + <script type="text/javascript" id="searchindexloader"></script> + {{ super() }} +{% endblock %} +{% block body %} + <h1 id="search-documentation">{{ _('Search') }}</h1> + <div id="fallback" class="admonition warning"> + <script type="text/javascript">$('#fallback').hide();</script> + <p> + {% trans %}Please activate JavaScript to enable the search + functionality.{% endtrans %} + </p> + </div> + <p> + {% trans %}From here you can search these documents. Enter your search + words into the box below and click "search". Note that the search + function will automatically search for all of the words. Pages + containing fewer words won't appear in the result list.{% endtrans %} + </p> + {{ searchform('form-inline', True) }} + {% if search_performed %} + <h2>{{ _('Search Results') }}</h2> + {% if not search_results %} + <p>{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}</p> + {% endif %} + {% endif %} + <div id="search-results"> + {% if search_results %} + <ul> + {% for href, caption, context in search_results %} + <li><a href="{{ pathto(item.href) }}">{{ caption }}</a> + <div class="context">{{ context|e }}</div> + </li> + {% endfor %} + </ul> + {% endif %} + </div> +{% endblock %} |