utilisation de block et baseof template

nettoyage
bump bootstrap version
This commit is contained in:
Laurent Le Houerou 2020-12-21 10:21:16 +04:00
parent 7fc62ad904
commit 1545502027
8 changed files with 136 additions and 13 deletions

View File

@ -38,7 +38,7 @@ theme = "hugo-sustain"
# weight = 200
# url = "/projects/"
# [[menu.main]]
# name = "resume"
# identifier = "resume"
# name = "CV"
# identifier = "CV"
# weight = 300
# url = "/resume/"
# url = "/cv/"

6
content/cv/index.md Normal file
View File

@ -0,0 +1,6 @@
---
title: cv
date: 21/12/2020
---
ceci est un test

View File

@ -0,0 +1,10 @@
{{ partial "head" . }}
<body>
<div id="wrap">
{{ partial "header" . }}
{{ block "main" . }}
{{end}}
</div>
{{ partial "footer" . }}
</body>
</html>

View File

@ -0,0 +1,23 @@
{{ define "main" }}
<div class="container">
<h3>Archive</h3>
<div class="panel panel-default">
<div class="panel-body">
{{ range .Data.Pages.ByPublishDate.Reverse }}
<div class="row">
<div class="col-sm-4 col-md-4 col-lg-4">
<h5 style="text-align: right">
{{ .Date.Format "January 2, 2006" }}
</h5>
</div>
<div class="col-sm-8 col-md-8 col-lg-8">
<h5 style="text-align: left">
<strong><a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a></strong>
</h5>
</div>
</div>
{{ end }}
</div>
</div>
</div>
{{end}}

View File

@ -0,0 +1,47 @@
{{ define "main" }}
{{ if isset .Params "showpagemeta" }}
{{ .Render "projects" }}
{{ else }}
<div class="container">
<div class="blog-post">
<h3>
<strong><a href="{{ .Permalink }}">{{ .Title }}</a></strong>
</h3>
</div>
<div class="blog-title">
<h4>
{{ .Date.Format "January 2, 2006" }}
&nbsp;&nbsp;
{{ range .Params.tags }}
<span class="label label-success">{{ . }}</span>
{{ end }}
</h4>
</div>
<div class="panel panel-default">
<div class="panel-body">
<div class="blogpost">
{{ .Content }}
<hr>
<div class="related-posts">
<h5>Related Posts</h5>
{{ range first 3 ( where ( where .Site.Pages.ByDate.Reverse ".Params.tags" "intersect" .Params.tags ) "Permalink" "!=" .Permalink ) }}
<div class="row">
<div class="col-sm-4 col-md-4 col-lg-4">
<h6 style="text-align: right">
{{ .Date.Format "January 2, 2006" }}
</h6>
</div>
<div class="col-sm-8 col-md-8 col-lg-8">
<h6 style="text-align: left">
<strong><a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a></strong>
</h6>
</div>
</div>
{{ end }}
</div>
</div>
</div>
</div>
</div>
{{ end }}
{{end}}

View File

@ -1,18 +1,12 @@
{{ partial "head" . }}
<body>
<div id="wrap">
{{ partial "header" . }}
{{ define "main" }}
<section id="about">
<div class="container">
<div class="avatar">
<img class="img-circle" src="{{ .Site.BaseURL }}img/{{ .Site.Params.avatar }}" alt="Responsive image">
</div>
<h3>I'm <strong>{{ .Site.Params.author }}</strong>, a Software Engineer.</h3>
<h3>Contact me at <a href="http://twitter.com/{{ .Site.Params.Social.Twitter }}">@{{ .Site.Params.Social.Twitter }}</a> or by <a href="mailto:{{ .Site.Params.Social.Email }}">email</a>.</h3>
<h3>Je suis <strong>{{ .Site.Params.author }}</strong>, un ingénieur logiciel.</h3>
<h3>Contactez moi à <a href="http://twitter.com/{{ .Site.Params.Social.Twitter }}">@{{ .Site.Params.Social.Twitter }}</a> ou par <a href="mailto:{{ .Site.Params.Social.Email }}">email</a>.</h3>
{{ partial "social.html" . }}
</div>
</section>
</div>
{{ partial "footer" . }}
</body>
</html>
{{end}}

View File

@ -0,0 +1,10 @@
<footer>
<div id="footer">
<div class="container">
<p class="text-muted">&copy; Tous droits réservés.</p>
</div>
</div>
</footer>
<div class="footer"></div>

View File

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="{{ .Site.Params.Author }}" />
{{ if .Site.Params.description }}<meta name="description" content="{{ .Site.Params.description }}">{{ end }}
<link rel="shortcut icon" type="image/x-icon" href="{{ .Site.BaseURL }}img/favicon.ico">
<title>
{{- $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" -}}
{{- if eq $url "/" -}}
{{- .Site.Title -}}
{{- else -}}
{{- if .Params.heading -}} {{- .Params.heading -}} {{- else -}} {{- .Title -}} {{- end -}}
{{- end -}}
</title>
{{ hugo.Generator }}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}css/main.css" />
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
{{ `<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->` | safeHTML }}
<script async defer data-domain="laurentlehouerou.com" src="https://plausible.lehouerou.net/js/plausible.js"></script>
<script defer src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
<script defer src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
<script defer src="{{ .Site.BaseURL }}js/docs.min.js"></script>
<script defer src="{{ .Site.BaseURL }}js/main.js"></script>
<script defer src="{{ .Site.BaseURL }}js/ie10-viewport-bug-workaround.js"></script>
</head>