chg: [layout] added TOC + fix layout issue of index

pull/56/head
Christophe Vandeplas 2022-01-09 16:03:00 +01:00
parent 60ba762473
commit 0dd23dc85e
5 changed files with 90 additions and 1 deletions

View File

@ -1,6 +1,7 @@
--- ---
type: page type: page
title: Information sharing and cooperation enabled by GDPR title: Information sharing and cooperation enabled by GDPR
toc: true
--- ---
# Information sharing and cooperation enabled by GDPR # Information sharing and cooperation enabled by GDPR

View File

@ -1,6 +1,7 @@
--- ---
title: MISP as supporting platform for sharing information, following ISO/IEC 27010:2015 title: MISP as supporting platform for sharing information, following ISO/IEC 27010:2015
type: page type: page
toc: true
--- ---

View File

@ -1,6 +1,7 @@
--- ---
title: How MISP enables stakeholders identified by the NISD to perform key activities title: How MISP enables stakeholders identified by the NISD to perform key activities
type: page type: page
toc: true
--- ---
# How MISP enables stakeholders identified by the NISD to perform key activities # How MISP enables stakeholders identified by the NISD to perform key activities

View File

@ -24,14 +24,30 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
{{ if isset .Params "toc" }}
<div class="col-md-9">
{{ else }}
<div class="col-md-12"> <div class="col-md-12">
{{ end }}
<div> <div>
{{ .Content }} {{ .Content }}
</div> </div>
</div> </div>
{{ if isset .Params "toc" }}
<div class="col-md-3">
<div class="panel sidebar-menu">
<div class="panel-heading">
<h3 class="panel-title">Table of Content</h3>
</div>
<div class="panel-body">
{{ .TableOfContents }}
</div>
</div>
</div>
{{ end }}
</div> </div>
<!-- /.row --> <!-- /.row -->

70
layouts/page/single.html Normal file
View File

@ -0,0 +1,70 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
{{ partial "headers.html" . }}
{{ partial "custom_headers.html" . }}
</head>
<body>
<div id="all">
{{ partial "nav.html" . }}
{{ partial "breadcrumbs.html" . }}
<div id="content">
{{ if isset .Params "id" }}
{{ partial .Params.id . }}
{{ else }}
<div class="container">
<div class="row">
{{ if isset .Params "toc" }}
<div class="col-md-9">
{{ else }}
<div class="col-md-12">
{{ end }}
<div>
{{ .Content }}
</div>
</div>
{{ if isset .Params "toc" }}
<div class="col-md-3">
<div class="panel sidebar-menu">
<div class="panel-heading">
<h3 class="panel-title">Table of Content</h3>
</div>
<div class="panel-body">
{{ .TableOfContents }}
</div>
</div>
</div>
{{ end }}
</div>
<!-- /.row -->
</div>
<!-- /.container -->
{{ end }}
</div>
<!-- /#content -->
{{ partial "footer.html" . }}
</div>
<!-- /#all -->
{{ partial "scripts.html" . }}
</body>
</html>