Mercurial > minori
comparison dep/fmt/doc/_templates/layout.html @ 343:1faa72660932
*: transfer back to cmake from autotools
autotools just made lots of things more complicated than
they should have and many things broke (i.e. translations)
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Thu, 20 Jun 2024 05:56:06 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
342:adb79bdde329 | 343:1faa72660932 |
---|---|
1 {% extends "!layout.html" %} | |
2 | |
3 {% block extrahead %} | |
4 <meta name="description" content="Small, safe and fast formatting library"> | |
5 <meta name="keywords" content="C++, formatting, printf, string, library"> | |
6 <meta name="author" content="Victor Zverovich"> | |
7 <link rel="stylesheet" href="_static/fmt.css"> | |
8 {# Google Analytics #} | |
9 <script async src="https://www.googletagmanager.com/gtag/js?id=UA-20116650-4"></script> | |
10 <script> | |
11 window.dataLayer = window.dataLayer || []; | |
12 function gtag(){dataLayer.push(arguments);} | |
13 gtag('js', new Date()); | |
14 | |
15 gtag('config', 'UA-20116650-4'); | |
16 </script> | |
17 {% endblock %} | |
18 | |
19 {%- macro searchform(classes, button) %} | |
20 <form class="{{classes}}" role="search" action="{{ pathto('search') }}" | |
21 method="get"> | |
22 <div class="form-group"> | |
23 <input type="text" name="q" class="form-control" | |
24 {{ 'placeholder="Search"' if not button }} > | |
25 </div> | |
26 <input type="hidden" name="check_keywords" value="yes" /> | |
27 <input type="hidden" name="area" value="default" /> | |
28 {% if button %} | |
29 <input type="submit" class="btn btn-default" value="search"> | |
30 {% endif %} | |
31 </form> | |
32 {%- endmacro %} | |
33 | |
34 {% block header %} | |
35 <nav class="navbar navbar-inverse"> | |
36 <div class="tb-container"> | |
37 <div class="row"> | |
38 <div class="navbar-content"> | |
39 {# Brand and toggle get grouped for better mobile display #} | |
40 <div class="navbar-header"> | |
41 <button type="button" class="navbar-toggle collapsed" | |
42 data-toggle="collapse" data-target=".navbar-collapse"> | |
43 <span class="sr-only">Toggle navigation</span> | |
44 <span class="icon-bar"></span> | |
45 <span class="icon-bar"></span> | |
46 <span class="icon-bar"></span> | |
47 </button> | |
48 <a class="navbar-brand" href="index.html">{fmt}</a> | |
49 </div> | |
50 | |
51 {# Collect the nav links, forms, and other content for toggling #} | |
52 <div class="collapse navbar-collapse"> | |
53 <ul class="nav navbar-nav"> | |
54 <li class="dropdown"> | |
55 <a href="#" class="dropdown-toggle" data-toggle="dropdown" | |
56 role="button" aria-expanded="false">{{ version }} | |
57 <span class="caret"></span></a> | |
58 <ul class="dropdown-menu" role="menu"> | |
59 {% for v in versions.split(',') %} | |
60 <li><a href="https://fmt.dev/{{v}}">{{v}}</a></li> | |
61 {% endfor %} | |
62 </ul> | |
63 </li> | |
64 {% for name in ['Contents', 'Usage', 'API', 'Syntax'] %} | |
65 {% if pagename == name.lower() %} | |
66 <li class="active"><a href="{{name.lower()}}.html">{{name}} | |
67 <span class="sr-only">(current)</span></a></li> | |
68 {%else%} | |
69 <li><a href="{{name.lower()}}.html">{{name}}</a></li> | |
70 {%endif%} | |
71 {% endfor %} | |
72 </ul> | |
73 {% if pagename != 'search' %} | |
74 {{ searchform('navbar-form navbar-right', False) }} | |
75 {%endif%} | |
76 </div> {# /.navbar-collapse #} | |
77 </div> {# /.col-md-offset-2 #} | |
78 </div> {# /.row #} | |
79 </div> {# /.tb-container #} | |
80 </nav> | |
81 {% if pagename == "index" %} | |
82 {% set download_url = 'https://github.com/fmtlib/fmt/releases/download' %} | |
83 <div class="jumbotron"> | |
84 <div class="tb-container"> | |
85 <h1>{fmt}</h1> | |
86 <p class="lead">A modern formatting library</p> | |
87 <div class="btn-group" role="group"> | |
88 {% set name = 'fmt' if version.split('.')[0]|int >= 3 else 'cppformat' %} | |
89 <a class="btn btn-success" | |
90 href="{{download_url}}/{{version}}/{{name}}-{{version}}.zip"> | |
91 <span class="glyphicon glyphicon-download"></span> Download | |
92 </a> | |
93 <button type="button" class="btn btn-success dropdown-toggle" | |
94 data-toggle="dropdown"><span class="caret"></span></button> | |
95 <ul class="dropdown-menu"> | |
96 {% for v in versions.split(',') %} | |
97 {% set name = 'fmt' if v.split('.')[0]|int >= 3 else 'cppformat' %} | |
98 <li><a href="{{download_url}}/{{v}}/{{name}}-{{v}}.zip">Version {{v}} | |
99 </a></li> | |
100 {% endfor %} | |
101 </ul> | |
102 </div> | |
103 </div> | |
104 </div> | |
105 {% endif %} | |
106 {% endblock %} | |
107 | |
108 {# Disable relbars. #} | |
109 {% block relbar1 %} | |
110 {% endblock %} | |
111 {% block relbar2 %} | |
112 {% endblock %} | |
113 | |
114 {% block content %} | |
115 <div class="tb-container"> | |
116 <div class="row"> | |
117 {# Sidebar is currently disabled. | |
118 <div class="bs-sidebar"> | |
119 <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> | |
120 <div class="sphinxsidebarwrapper"> | |
121 {%- block sidebarlogo %} | |
122 {%- if logo %} | |
123 <p class="logo"><a href="{{ pathto(master_doc) }}"> | |
124 <img class="logo" src="{{ pathto('_static/' + logo, 1) }}" | |
125 alt="Logo"/> | |
126 </a></p> | |
127 {%- endif %} | |
128 {%- endblock %} | |
129 {%- for sidebartemplate in sidebars %} | |
130 {%- include sidebartemplate %} | |
131 {%- endfor %} | |
132 </div> | |
133 </div> | |
134 </div> | |
135 #} | |
136 | |
137 <div class="content"> | |
138 {% block body %} {% endblock %} | |
139 </div> | |
140 </div> | |
141 </div> | |
142 {% endblock %} | |
143 | |
144 {% block footer %} | |
145 {{ super() }} | |
146 {# Placed at the end of the document so the pages load faster. #} | |
147 <script src="_static/bootstrap.min.js"></script> | |
148 {% endblock %} |