fmt/doc/_templates/layout.html

143 lines
4.8 KiB
HTML
Raw Normal View History

2014-04-16 19:24:35 +00:00
{% extends "!layout.html" %}
2024-05-27 02:23:26 +00:00
{%- block extrahead %}
<meta name="description" content="A modern 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 async src="https://www.googletagmanager.com/gtag/js?id=UA-20116650-4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-20116650-4');
</script>
{%- endblock %}
2015-05-19 15:13:13 +00:00
2015-05-21 16:03:22 +00:00
{%- macro searchform(classes, button) %}
2016-06-02 13:41:25 +00:00
<form class="{{classes}}" role="search" action="{{ pathto('search') }}"
method="get">
2015-05-21 16:03:22 +00:00
<div class="form-group">
2016-06-02 13:41:25 +00:00
<input type="text" name="q" class="form-control"
{{ 'placeholder="Search"' if not button }} >
2015-05-21 16:03:22 +00:00
</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 %}
2015-03-09 14:37:27 +00:00
{% block header %}
2024-05-27 02:59:42 +00:00
<nav class="navbar navbar-expand-md">
2024-05-27 13:32:28 +00:00
<div class="container">
2024-05-26 17:25:14 +00:00
<a class="navbar-brand" href="index.html">{fmt}</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button"
data-bs-toggle="dropdown" aria-expanded="false">
{{ version }}
</a>
<ul class="dropdown-menu">
{% for v in versions.split(',') %}
<li>
<a class="dropdown-item" href="https://fmt.dev/{{v}}">{{v}}</a>
2015-05-19 15:13:13 +00:00
</li>
{% endfor %}
</ul>
2024-05-26 17:25:14 +00:00
</li>
{% for name in ['Contents', 'Usage', 'API', 'Syntax'] %}
<li class="nav-item">
{% if pagename == name.lower() %}
<a class="nav-link active" aria-current="page"
href="{{name.lower()}}.html">{{name}}
</a>
{%else%}
<a class="nav-link" href="{{name.lower()}}.html">{{name}}</a>
{%endif%}
2024-05-26 17:25:14 +00:00
</li>
{% endfor %}
</ul>
{% if pagename != 'search' %}
{{ searchform('navbar-form navbar-right', False) }}
{%endif%}
</div>
</div>
2015-05-19 15:13:13 +00:00
</nav>
2015-03-09 14:37:27 +00:00
{% if pagename == "index" %}
2016-06-03 14:19:05 +00:00
{% set download_url = 'https://github.com/fmtlib/fmt/releases/download' %}
2024-05-27 13:32:28 +00:00
<div class="container-fluid fmt-banner p-5">
2024-05-27 02:59:42 +00:00
<h1>{fmt}</h1>
<p class="lead">A modern formatting library</p>
<div class="btn-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 dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
<span class="visually-hidden">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu">
{% for v in versions.split(',') %}
{% set name = 'fmt' if v.split('.')[0]|int >= 3 else 'cppformat' %}
<li><a class="dropdown-item" href="{{download_url}}/{{v}}/{{name}}-{{v}}.zip">Version {{v}}</a></li>
{% endfor %}
</ul>
2015-03-09 14:37:27 +00:00
</div>
2015-05-19 15:13:13 +00:00
</div>
2015-03-09 14:37:27 +00:00
{% endif %}
{% endblock %}
2015-05-23 20:34:44 +00:00
{# Disable relbars. #}
2015-05-19 15:13:13 +00:00
{% block relbar1 %}
{% endblock %}
{% block relbar2 %}
{% endblock %}
{% block content %}
2024-05-27 13:39:54 +00:00
<div class="container">
2015-05-19 15:13:13 +00:00
<div class="row">
2016-06-03 14:19:05 +00:00
{# Sidebar is currently disabled.
<div class="bs-sidebar">
2015-05-19 15:13:13 +00:00
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
{%- block sidebarlogo %}
{%- if logo %}
<p class="logo"><a href="{{ pathto(master_doc) }}">
2016-06-02 13:41:25 +00:00
<img class="logo" src="{{ pathto('_static/' + logo, 1) }}"
alt="Logo"/>
2015-05-19 15:13:13 +00:00
</a></p>
{%- endif %}
{%- endblock %}
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}
</div>
</div>
</div>
#}
2015-05-19 15:13:13 +00:00
<div class="content">
{% block body %} {% endblock %}
</div>
</div>
</div>
{% endblock %}
2014-04-16 19:24:35 +00:00
{% block footer %}
{{ super() }}
{# Placed at the end of the document so the pages load faster. #}
2024-05-27 02:23:26 +00:00
<script src="_static/popper.min.js"></script>
<script src="_static/bootstrap.min.js"></script>
{%- endblock %}