mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-02 06:20:09 +00:00
143 lines
4.8 KiB
HTML
143 lines
4.8 KiB
HTML
{% extends "!layout.html" %}
|
|
|
|
{%- 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 %}
|
|
|
|
{%- 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-expand-md">
|
|
<div class="container">
|
|
<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>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</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%}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% if pagename != 'search' %}
|
|
{{ searchform('navbar-form navbar-right', False) }}
|
|
{%endif%}
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
{% if pagename == "index" %}
|
|
{% set download_url = 'https://github.com/fmtlib/fmt/releases/download' %}
|
|
<div class="container-fluid fmt-banner p-5">
|
|
<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>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{# Disable relbars. #}
|
|
{% block relbar1 %}
|
|
{% endblock %}
|
|
{% block relbar2 %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="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/popper.min.js"></script>
|
|
<script src="_static/bootstrap.min.js"></script>
|
|
{%- endblock %}
|