Commit c0f20deb126b68213d010fe1f2a0e64eafc9a1da

Authored by William Daniau
1 parent 33afad1d3e
Exists in master

Nouveau template with index avec menu glissant sur le côté gauche.

Showing 3 changed files with 108 additions and 10 deletions Inline Diff

templates/html/Default_with_index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 1 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> 2 2 <html>
<head> 3 3 <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>[% title %]</title> 5 5 <title>[% title %]</title>
<meta name='Generator' content='[% generator.name %]'> 6 6 <meta name='Generator' content='[% generator.name %]'>
<link rel="stylesheet" 7 7 <link rel="stylesheet"
href="[% resource('common/zim-style.css') %]" > 8 8 href="[% resource('common/zim-style.css') %]" >
<link rel="stylesheet" 9 9 <link rel="stylesheet"
href="[% resource('common/zim-table-style.css') %]" > 10 10 href="[% resource('common/zim-table-style.css') %]" >
<link rel="stylesheet" 11 11 <link rel="stylesheet"
href="[% resource('common/zim-special.css') %]" > 12 12 href="[% resource('common/zim-special.css') %]" >
<link rel="stylesheet" 13 13 <link rel="stylesheet"
href="[% resource('common/zim-hljs.css') %]" > 14 14 href="[% resource('common/zim-hljs.css') %]" >
15 15
<style type='text/css'> 16 16 <style type='text/css'>
* { font-family: sans-serif } 17 17 * { font-family: sans-serif }
18 18
a:hover { text-decoration: underline; } 19 19 a:hover { text-decoration: underline; }
20 20
/* Centre les images mais elles sont coupées aux sauts de page à l'impression */ 21 21 /* Centre les images mais elles sont coupées aux sauts de page à l'impression */
img { 22 22 img {
display: block; 23 23 display: block;
margin-left: auto; 24 24 margin-left: auto;
margin-right: auto; 25 25 margin-right: auto;
} 26 26 }
27 27
/* Specifique au with index */ 28 28 /* Specifique au with index */
span.insen { color: grey } 29 29 span.insen { color: grey }
30 30
.pages { 31 31 .pages {
max-width: 1000px; 32 32 /*max-width: 1000px;*/
padding-left: 320px; 33 33 /*padding-left: 320px;*/
34 width: inherit;
35 transition: margin-left .3s;
} 34 36 }
37
.menu{ 35 38 .menu{
float:left; width: 300px; 36 39 /*float:left; */
40 width: 0;
41 color:#4e9a06;
42 overflow-x: hidden;
43 position: absolute;
44 transition:.3s;
45 background: #fafafa;
46 border-style: solid;
47 border-width: 1px;
} 37 48 }
49
50 .menu a,.menu a:link,.menu a:hover,.menu a:active,.menu a:visited {
51 color: #4e9a06;
52 }
53
54 .menuOpen {
55 /*display: block;*/
56 }
57
58 .menuClosed {
59 border-style: unset;
60 }
61
62 .header{
63 max-width: 63em;
64 position: fixed;
65 width: 100%;
66 top:0;
67 background:white;
68 z-index: 1;
69 }
70
hr{clear:both;} 38 71 hr{clear:both;}
72
73 body {
74 max-width:63em;
75 display:block;
76 margin-left:auto;
77 margin-right:auto;
78 }
39 79
</style> 40 80 </style>
41 81
<!-- Themes clair : 42 82 <!-- Themes clair :
atom-one-light.css, vs.css googlecode.css github.css 43 83 atom-one-light.css, vs.css googlecode.css github.css
qtcreator_light.css 44 84 qtcreator_light.css
Themes sombres : 45 85 Themes sombres :
agate.css vs2015.css atom-one-dark.css hybrid.css 46 86 agate.css vs2015.css atom-one-dark.css hybrid.css
ir-black.css sunburst.css tomorrow-night-bright.css 47 87 ir-black.css sunburst.css tomorrow-night-bright.css
qtcreator_dark.css 48 88 qtcreator_dark.css
Demo live : https://highlightjs.org/static/demo/ --> 49 89 Demo live : https://highlightjs.org/static/demo/ -->
<link rel="stylesheet" 50 90 <link rel="stylesheet"
href="[% resource('common/hljs/styles/sunburst.css') %]" > 51 91 href="[% resource('common/hljs/styles/sunburst.css') %]" >
52 92
<!-- hljs --> 53 93 <!-- hljs -->
<script src="[% resource('common/hljs/highlight.pack.js') %]"></script> 54 94 <script src="[% resource('common/hljs/highlight.pack.js') %]"></script>
95
96 <script>
97 function openNav() {
98 if (document.getElementById("mySidenav").getAttribute("class").split(' ')[1] == "menuClosed") {
99 document.getElementById("mySidenav").style.width = "300px";
100 /*document.getElementById("main").style.marginLeft = "300px";*/
101 document.getElementById("mySidenav").setAttribute("class","menu menuOpen");
102 /* Scroll to top when opening menu */
103 document.body.scrollTop = 0
104 document.documentElement.scrollTop = 0;
105 } else {
106 document.getElementById("mySidenav").style.width = "0";
107 /*document.getElementById("main").style.marginLeft = "0";*/
108 document.getElementById("mySidenav").setAttribute("class","menu menuClosed");
109
110 }
111 }
112 </script>
55 113
114
</head> 56 115 </head>
<body> 57 116 <body>
58 117
<!-- Header --> 59 118 <!-- Header -->
<div class='header'> 60 119 <div class='header'>
<table class='navigation'> 61 120 <table class='navigation' style="float:left">
<tr class='navigation'> 62 121 <tr class='navigation'>
<td class='navigation'> 63 122 <td class='navigation'>
123 <span style="font-size:30px;cursor:pointer;color: #4e9a06;" onclick="openNav()">&#9776;</span>
124 </td>
125 <td class='navigation'>
[% IF navigation.prev %] 64 126 [% IF navigation.prev %]
<a href='[% uri(navigation.prev) %]'> 65 127 <a href='[% uri(navigation.prev) %]'>
<img src="[% resource('common/arrow-left.png') %]" alt="[% gettext('Prev') %]" title="[% gettext('Prev') %]"> 66 128 <img src="[% resource('common/arrow-left.png') %]" alt="[% gettext('Prev') %]" title="[% gettext('Prev') %]">
</a> 67 129 </a>
[% ELSE %] 68 130 [% ELSE %]
<img src="[% resource('common/arrow-left-inact.png') %]" alt="[% gettext('Prev') %]" title="[% gettext('Prev') %]"> 69 131 <img src="[% resource('common/arrow-left-inact.png') %]" alt="[% gettext('Prev') %]" title="[% gettext('Prev') %]">
[% END %] 70 132 [% END %]
</td> 71 133 </td>
<td class='navigation'> 72 134 <td class='navigation'>
[% IF links.get("index") %] 73 135 [% IF links.get("index") %]
<a href='[% uri(links.get("index")) %]'> 74 136 <a href='[% uri(links.get("index")) %]'>
<img src="[% resource('common/arrow-up.png') %]" alt="[% gettext('Index') %]" title="[% gettext('Index') %]"> 75 137 <img src="[% resource('common/arrow-up.png') %]" alt="[% gettext('Index') %]" title="[% gettext('Index') %]">
</a> 76 138 </a>
[% ELSE %] 77 139 [% ELSE %]
<img src="[% resource('common/arrow-up-inact.png') %]" alt="[% gettext('Index') %]" title="[% gettext('Index') %]"> 78 140 <img src="[% resource('common/arrow-up-inact.png') %]" alt="[% gettext('Index') %]" title="[% gettext('Index') %]">
[% END %] 79 141 [% END %]
</td> 80 142 </td>
<td class='navigation'> 81 143 <td class='navigation'>
[% IF navigation.next %] 82 144 [% IF navigation.next %]
<a href='[% uri(navigation.next) %]'> 83 145 <a href='[% uri(navigation.next) %]'>
<img src="[% resource('common/arrow-right.png') %]" alt="[% gettext('Next') %]" title="[% gettext('Next') %]"> 84 146 <img src="[% resource('common/arrow-right.png') %]" alt="[% gettext('Next') %]" title="[% gettext('Next') %]">
</a> 85 147 </a>
[% ELSE %] 86 148 [% ELSE %]
<img src="[% resource('common/arrow-right-inact.png') %]" alt="[% gettext('Next') %]" title="[% gettext('Next') %]"> 87 149 <img src="[% resource('common/arrow-right-inact.png') %]" alt="[% gettext('Next') %]" title="[% gettext('Next') %]">
[% END %] 88 150 [% END %]
</td> 89 151 </td>
</tr> 90 152 </tr>
</table> 91 153 </table>
154
155 <span>
156 [% FOR page IN pages %]
157 <a name='[% anchor(page) %]'></a>
158 <h1 style="display:inline-block;margin-left:20px;margin-top:5px;">
159 [% page.title %]</h1>
160 [% END %]
161 </span>
162
163 <table class='navigation' style="float:right;margin-right:10px;">
164 <tr class='navigation'>
165 <td class='navigation'>
166 [% FOR page IN pages %]
167 [% FOR link IN page.backlinks %]
168 [% IF loop.first %]<a href="#backlinks">
169 <img src='[% resource("common/backlink.png") %]' alt='[% gettext("Backlinks:") %]' title='[% gettext("Backlinks:") %]'>
170 </a>[% END %]
171 [% END %]
172 [% END %]
173 </td>
174 <td class='navigation'>
175 [% FOR page IN pages %]
176 [% FOR file IN page.attachments %]
177 [% IF loop.first %]<a href="#attach">
178 <img src='[% resource("common/attachment.png") %]' alt='[% gettext("Attachments:") %]' title='[% gettext("Attachments:") %]'>
179 </a>[% END %]
180 [% END %]
181 [% END %]
182 </td>
183 </tr>
184 </table>
</div> 92 185 </div>
93 186
<hr /> 94 187 <hr style="margin-top:50px" />
95 188
<div class="menu"> 96 189 <div id="mySidenav" class="menu menuClosed">
[% index() %] 97 190 [% index() %]
</div> 98 191 </div>
99 192
[% options.empty_lines = "default" %] 100 193 [% options.empty_lines = "default" %]
101 194
<!-- Wiki content --> 102 195 <!-- Wiki content -->
103 196
<div class='pages'> 104 197 <div id="main" class='pages'>
<!--[% FOR page IN pages %]--> 105 198 <!--[% FOR page IN pages %]-->
199 <!--
<div class='heading'> 106 200 <div class='heading'>
<h1>[% page.title %] <a name='[% anchor(page) %]'></a></h1> 107 201 <h1>[% page.title %] <a name='[% anchor(page) %]'></a></h1>
</div> 108 202 </div>
109 203 -->
<div class='content'> 110 204 <div class='content'>
[% page.body %] 111 205 [% page.body %]
</div> 112 206 </div>
113 207
<br /> 114 208 <br />
115 209
<div class='page-footer'> 116 210 <div class='page-footer'>
<!--[% FOR link IN page.backlinks %]--> 117 211 <!--[% FOR link IN page.backlinks %]-->
[% IF loop.first %]<b>[% gettext("Backlinks:") %]</b>[% END %] 118 212 [% IF loop.first %]
213 <a name="backlinks"></a>
214 <b>[% gettext("Backlinks:") %]</b>
215 [% END %]
119 216
<a href='[% uri(link) %]'>[% link.name %]</a> 120 217 <a href='[% uri(link) %]'>[% link.name %]</a>
121 218
[% IF loop.last %]<br /><br />[% END %] 122 219 [% IF loop.last %]<br /><br />[% END %]
<!--[% END %]--> 123 220 <!--[% END %]-->
124 221
<!--[% FOR file IN page.attachments %]--> 125 222 <!--[% FOR file IN page.attachments %]-->
[% IF loop.first %] 126 223 [% IF loop.first %]
224 <a name="attach"></a>
<b>[% gettext("Attachments:") %]</b> 127 225 <b>[% gettext("Attachments:") %]</b>
<table> 128 226 <table>
[% END %] 129 227 [% END %]
130 228
templates/html/common/attachment.png

1.74 KB

templates/html/common/backlink.png

4.94 KB