@@ -7,17 +7,31 @@ https://github.com/pseudomuto/protoc-gen-doc/blob/master/resources/html.tmpl
77*/ }}
88<html >
99 <head>
10- <title>Protocol Documentation</title>
11- <meta charset= " UTF-8" >
12- <link rel= " stylesheet" type= " text/css" href= " https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic" />
10+ <title>$ {title}</title>
11+ <meta http-equiv= " Content-Type" content= " text/html; charset=UTF-8" />
12+ <meta charset= " UTF-8" />
13+ <meta name= " twitter:card" content= " summary_large_image" />
14+ <meta name= " twitter:site" content= " @CycloneDX_Spec" />
15+ <meta name= " twitter:title" content= " ${quotedTitle}" />
16+ <meta name= " twitter:image" content= " https://cyclonedx.org/images/CycloneDX-Social-Card.png" />
17+ <meta name= " twitter:description" content= " ${quotedTitle}" />
18+ <meta name= " description" content= " ${quotedTitle}" />
19+ <meta property= " og:description" content= " ${quotedTitle}" />
20+ <meta property= " og:title" content= " ${quotedTitle}" />
21+ <meta property= " og:locale" content= " en_US" />
22+ <meta property= " og:type" content= " website" />
23+ <meta property= " og:image" content= " https://cyclonedx.org/images/CycloneDX-Social-Card.png" />
24+ <link href= " /favicon.ico" rel= " shortcut icon" type= " image/ico" />
25+ <link rel= " stylesheet" href= " https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.2/css/bootstrap.min.css" integrity= " sha512-rt/SrQ4UNIaGfDyEXZtNcyWvQeOq0QLygHluFQcSjaGB04IxWhal71tKuzP6K8eYXYB6vJV4pHkXcmFGGQ1/0w==" crossorigin= " anonymous" referrerpolicy= " no-referrer" />
26+ <link rel= " stylesheet" href= " https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity= " sha512-SfTiTlX6kk+qitfevl/7LibUOeJWlt9rbyDn92a1DqWOw9vWG2MFoays0sgObmWazO5BQPiFucnnEAjpAB+/Sw==" crossorigin= " anonymous" referrerpolicy= " no-referrer" />
27+ <link rel= " stylesheet" type= " text/css" href= " schema_doc.css" >
28+ <script src= " https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.slim.js" integrity= " sha512-docBEeq28CCaXCXN7cINkyQs0pRszdQsVBFWUd+pLNlEk3LDlSDDtN7i1H+nTB8tshJPQHS0yu0GW9YGFd/CRg==" crossorigin= " anonymous" referrerpolicy= " no-referrer" ></script>
29+ <script src= " https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.2/js/bootstrap.min.js" integrity= " sha512-7rusk8kGPFynZWu26OKbTeI+QPoYchtxsmPeBqkHIEXJxeun4yJ4ISYe7C6sz9wdxeE1Gk3VxsIWgCZTc+vX3g==" crossorigin= " anonymous" referrerpolicy= " no-referrer" ></script>
30+ <script src= " https://cdnjs.cloudflare.com/ajax/libs/markdown-it/13.0.2/markdown-it.min.js" integrity= " sha512-ohlWmsCxOu0bph1om5eDL0jm/83eH09fvqLDhiEdiqfDeJbEvz4FSbeY0gLJSVJwQAp0laRhTXbUQG+ZUuifUQ==" crossorigin= " anonymous" referrerpolicy= " no-referrer" ></script>
31+ <script src= " schema_doc.min.js" ></script>
1332 <style>
14- body {
15- width: 60em;
16- margin: 1em auto;
17- color: #222;
18- font-family: " Ubuntu" , sans-serif;
19- padding-bottom: 4em;
20- }
33+ /* template-originals */
34+ body { /* removed */ }
2135
2236 h1 {
2337 font-weight: normal;
@@ -164,23 +178,135 @@ https://github.com/pseudomuto/protoc-gen-doc/blob/master/resources/html.tmpl
164178 border-radius: 1ex;
165179 }
166180 </style>
167-
168- <!-- User custom CSS -->
169- <link rel= " stylesheet" type= " text/css" href= " stylesheet.css" />
181+ <style>
182+ /* customs */
183+ body {
184+ font: 16px/1.5em " Helvetica Neue" ,Helvetica,Arial,sans-serif;
185+ color: #222;
186+ margin: 0;
187+ padding: 0;
188+ }
189+ .navbar {
190+ height: 90px;
191+ padding: 0;
192+ }
193+ .navbar -inverse .navbar -nav>.open >a,
194+ .navbar -inverse .navbar -nav>.open >a:focus,
195+ .navbar -inverse .navbar -nav>.open >a:hover,
196+ .navbar -inverse {
197+ background-image: linear-gradient(269.12deg , rgba(232, 52, 82, 1) 0%, rgba(136, 38, 125, 1) 51.26 %, rgba(52, 57, 175, 1) 100%);
198+ }
199+ .navbar -brand, .navbar -fixed-top {
200+ padding: 0 30px 0 30px;
201+ }
202+ .navbar -inverse .navbar -nav>li>a {
203+ color: #ffffff;
204+ }
205+ .site -header__logo img {
206+ height: 90px;
207+ }
208+ .version -selector {
209+ font-size: 1.2rem
210+ }
211+ .table .thead -dark th {
212+ background-color: #323550;
213+ }
214+ .container {
215+ margin-right: auto;
216+ margin-left: auto;
217+ padding-left: 15px;
218+ padding-right: 15px;
219+ }
220+ .container -fluid {
221+ padding: 30px 30px;
222+ }
223+ .nav -sub-item > a {
224+ padding-left: 30px !important;
225+ }
226+ ul .dropdown -menu li {
227+ padding-top: 0;
228+ padding-bottom: 0;
229+ }
230+ .dropdown -toggle:after {
231+ border-left: 8px solid transparent;
232+ border-right: 8px solid transparent;
233+ border-top: 8px solid #ffffff;
234+ margin-left: 10px;
235+ vertical-align: middle;
236+ }
237+ h1, h2, h3, h4, h5, h6 {
238+ color: rgb(52 57 175);
239+
240+ }
241+ h1 {
242+ font-size: 36px;
243+ }
244+ h3 {
245+ padding-top: 2ex;
246+ }
247+ pre {
248+ padding: 5px;
249+ }
250+ a {
251+ color: #2157c4;
252+ }
253+ .badge {
254+ color:#4273d6;
255+ background-color: #c8ddf0;
256+ }
257+ </style>
170258 </head>
171259
172260 <body>
173261
174- <h1 id= " title" >Protocol Documentation</h1>
262+ <nav class= " navbar fixed-top navbar-expand-sm navbar-inverse" >
263+ <a href= " /" class= " navbar-brand site-header__logo" ><img src= " https://cyclonedx.org/images/logo-all-white.svg" height= " 48" width= " 276" ></img></a>
264+ <button class= " navbar-toggler" type= " button" data-toggle= " collapse" data-target= " #navbarScroll" aria-controls= " navbarScroll" aria-expanded= " false" aria-label= " Toggle navigation" >
265+ <span class= " navbar-toggler-icon" ></span>
266+ </button>
267+ <div class= " collapse navbar-collapse" id= " navbarScroll" >
268+ <ul class= " navbar-nav mr-auto my-2 my-lg-0 navbar-nav-scroll" style= " max-height: 100px;" >
269+ <li class= " nav-item dropdown" >
270+ <a class= " nav-link dropdown-toggle" href= " #" id= " navbarScrollingDropdown" role= " button" data-toggle= " dropdown" aria-expanded= " false" >
271+ v$ {version} (Protobuf)
272+ </a>
273+ <ul class= " dropdown-menu" aria-labelledby= " navbarScrollingDropdown" >
274+ <li><a class= " dropdown-item" href= " /docs/1.6/json/" >v1.6 (JSON)</a></li>
275+ <li><a class= " dropdown-item" href= " /docs/1.5/json/" >v1.5 (JSON)</a></li>
276+ <li><a class= " dropdown-item" href= " /docs/1.4/json/" >v1.4 (JSON)</a></li>
277+ <li><a class= " dropdown-item" href= " /docs/1.3/json/" >v1.3 (JSON)</a></li>
278+ <li><a class= " dropdown-item" href= " /docs/1.2/json/" >v1.2 (JSON)</a></li>
279+ <li><hr class= " dropdown-divider" /></li>
280+ <li><a class= " dropdown-item" href= " /docs/1.6/xml/" >v1.6 (XML)</a></li>
281+ <li><a class= " dropdown-item" href= " /docs/1.5/xml/" >v1.5 (XML)</a></li>
282+ <li><a class= " dropdown-item" href= " /docs/1.4/xml/" >v1.4 (XML)</a></li>
283+ <li><a class= " dropdown-item" href= " /docs/1.3/xml/" >v1.3 (XML)</a></li>
284+ <li><a class= " dropdown-item" href= " /docs/1.2/xml/" >v1.2 (XML)</a></li>
285+ <li><a class= " dropdown-item" href= " /docs/1.1/xml/" >v1.1 (XML)</a></li>
286+ <li><a class= " dropdown-item" href= " /docs/1.0/xml/" >v1.0 (XML)</a></li>
287+ <li><hr class= " dropdown-divider" /></li>
288+ <li><a class= " dropdown-item" href= " /docs/1.6/proto/" >v1.6 (Protobuf)</a></li>
289+ <li><a class= " dropdown-item" href= " /docs/1.5/proto/" >v1.5 (Protobuf)</a></li>
290+ <li><a class= " dropdown-item" href= " /docs/1.4/proto/" >v1.4 (Protobuf)</a></li>
291+ <li><a class= " dropdown-item" href= " /docs/1.3/proto/" >v1.3 (Protobuf)</a></li>
292+ </ul>
293+ </li>
294+ </ul>
295+ </div>
296+ </nav>
297+ <div class= " container-fluid" style= " margin-top:110px; margin-bottom:3rem" >
298+
299+ <h1 id= " title" >$ {title}</h1>
175300
176301 <h2>Table of Contents</h2>
177302
178303 <div id= " toc-container" >
179304 <ul id= " toc" >
180305 {{range .Files }}
181306 {{$file_name := .Name }}
307+ {{$file_package := .Package }}
182308 <li>
183- <a href= " #{{.Name }}" >{{.Name }}</a>
309+ <a href= " #{{.Package }}" >Package: {{.Package }}</a>
184310 <ul>
185311 {{range .Messages }}
186312 <li>
@@ -211,8 +337,9 @@ https://github.com/pseudomuto/protoc-gen-doc/blob/master/resources/html.tmpl
211337
212338 {{range .Files }}
213339 {{$file_name := .Name }}
340+ {{$file_package := .Package }}
214341 <div class= " file-heading" >
215- <h2 id= " {{.Name }}" >{{.Name }}</h2><a href= " #title" >Top</a>
342+ <h2 id= " {{.Package }}" >Package: {{.Package }}</h2><a href= " #title" >Top</a>
216343 </div>
217344 {{p .Description }}
218345
@@ -437,5 +564,7 @@ https://github.com/pseudomuto/protoc-gen-doc/blob/master/resources/html.tmpl
437564 {{end }}
438565 </tbody>
439566 </table>
567+
568+ </div>
440569 </body>
441570</html >
0 commit comments