Commit 9806bdf3 authored by Cyrille Chopelet's avatar Cyrille Chopelet

Merge branch 'feature/licensing' into develop

parents d7c760ec efe9168f
......@@ -6,6 +6,13 @@
> If you have a Trello account, you can vote on issues to show you are interested in seeing them published as soon as possible.
## Licensing
The source code is licensed under [the MIT license](https://mit-license.org/).
Unless otherwise noted, all contents are licensed under a [Creative Commons Attribution 4.0 International license](https://creativecommons.org/licenses/by/4.0/).
## Contributing
### For all languages
......
......@@ -13,6 +13,7 @@ categories:
tags:
- blog
type: post
license: CC BY-SA 4.0
draft: true
aliases:
- /smoke-tests/
......
# Identity
fullname: Cyrille Chopelet
firstname: Cyrille
lastname: Chopelet
# Social
url: https://linkedin.com/in/cyrillechopelet
twitter: cyChop
linkedin: cyrillechopelet
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M314.9 194.4v101.4h-28.3v120.5h-77.1V295.9h-28.3V194.4c0-4.4 1.6-8.2 4.6-11.3 3.1-3.1 6.9-4.7 11.3-4.7H299c4.1 0 7.8 1.6 11.1 4.7 3.1 3.2 4.8 6.9 4.8 11.3zm-101.5-63.7c0-23.3 11.5-35 34.5-35s34.5 11.7 34.5 35c0 23-11.5 34.5-34.5 34.5s-34.5-11.5-34.5-34.5zM247.6 8C389.4 8 496 118.1 496 256c0 147.1-118.5 248-248.4 248C113.6 504 0 394.5 0 256 0 123.1 104.7 8 247.6 8zm.8 44.7C130.2 52.7 44.7 150.6 44.7 256c0 109.8 91.2 202.8 203.7 202.8 103.2 0 202.8-81.1 202.8-202.8.1-113.8-90.2-203.3-202.8-203.3z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M247.6 8C387.4 8 496 115.9 496 256c0 147.2-118.5 248-248.4 248C113.1 504 0 393.2 0 256 0 123.1 104.7 8 247.6 8zM55.8 189.1c-7.4 20.4-11.1 42.7-11.1 66.9 0 110.9 92.1 202.4 203.7 202.4 122.4 0 177.2-101.8 178.5-104.1l-93.4-41.6c-7.7 37.1-41.2 53-68.2 55.4v38.1h-28.8V368c-27.5-.3-52.6-10.2-75.3-29.7l34.1-34.5c31.7 29.4 86.4 31.8 86.4-2.2 0-6.2-2.2-11.2-6.6-15.1-14.2-6-1.8-.1-219.3-97.4zM248.4 52.3c-38.4 0-112.4 8.7-170.5 93l94.8 42.5c10-31.3 40.4-42.9 63.8-44.3v-38.1h28.8v38.1c22.7 1.2 43.4 8.9 62 23L295 199.7c-42.7-29.9-83.5-8-70 11.1 53.4 24.1 43.8 19.8 93 41.6l127.1 56.7c4.1-17.4 6.2-35.1 6.2-53.1 0-57-19.8-105-59.3-143.9-39.3-39.9-87.2-59.8-143.6-59.8z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M247.6 8C389.4 8 496 118.1 496 256c0 147.1-118.5 248-248.4 248C113.6 504 0 394.5 0 256 0 123.1 104.7 8 247.6 8zm.8 44.7C130.2 52.7 44.7 150.6 44.7 256c0 109.8 91.2 202.8 203.7 202.8 103.2 0 202.8-81.1 202.8-202.8.1-113.8-90.2-203.3-202.8-203.3zm94 144.3v42.5H162.1V197h180.3zm0 79.8v42.5H162.1v-42.5h180.3z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M247.6 8C389.4 8 496 118.1 496 256c0 147.1-118.5 248-248.4 248C113.6 504 0 394.5 0 256 0 123.1 104.7 8 247.6 8zm.8 44.7C130.2 52.7 44.7 150.6 44.7 256c0 109.8 91.2 202.8 203.7 202.8 103.2 0 202.8-81.1 202.8-202.8.1-113.8-90.2-203.3-202.8-203.3zM137.7 221c13-83.9 80.5-95.7 108.9-95.7 99.8 0 127.5 82.5 127.5 134.2 0 63.6-41 132.9-128.9 132.9-38.9 0-99.1-20-109.4-97h62.5c1.5 30.1 19.6 45.2 54.5 45.2 23.3 0 58-18.2 58-82.8 0-82.5-49.1-80.6-56.7-80.6-33.1 0-51.7 14.6-55.8 43.8h18.2l-49.2 49.2-49-49.2h19.4z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M245.83 214.87l-33.22 17.28c-9.43-19.58-25.24-19.93-27.46-19.93-22.13 0-33.22 14.61-33.22 43.84 0 23.57 9.21 43.84 33.22 43.84 14.47 0 24.65-7.09 30.57-21.26l30.55 15.5c-6.17 11.51-25.69 38.98-65.1 38.98-22.6 0-73.96-10.32-73.96-77.05 0-58.69 43-77.06 72.63-77.06 30.72-.01 52.7 11.95 65.99 35.86zm143.05 0l-32.78 17.28c-9.5-19.77-25.72-19.93-27.9-19.93-22.14 0-33.22 14.61-33.22 43.84 0 23.55 9.23 43.84 33.22 43.84 14.45 0 24.65-7.09 30.54-21.26l31 15.5c-2.1 3.75-21.39 38.98-65.09 38.98-22.69 0-73.96-9.87-73.96-77.05 0-58.67 42.97-77.06 72.63-77.06 30.71-.01 52.58 11.95 65.56 35.86zM247.56 8.05C104.74 8.05 0 123.11 0 256.05c0 138.49 113.6 248 247.56 248 129.93 0 248.44-100.87 248.44-248 0-137.87-106.62-248-248.44-248zm.87 450.81c-112.54 0-203.7-93.04-203.7-202.81 0-105.42 85.43-203.27 203.72-203.27 112.53 0 202.82 89.46 202.82 203.26-.01 121.69-99.68 202.82-202.84 202.82z"/></svg>
\ No newline at end of file
......@@ -70,6 +70,14 @@
- id: replyToThread
translation: Reply to thread
# Licensing
- id: byWithLink
translation: By <a href="{{ .Url }}" target="_blank">{{ .Author }}</a>.
- id: byNoLink
translation: By {{ .Count }}.
- id: defaultLicense
translation: Except where otherwise noted, content on this site is licensed under a <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank">Creative Commons Attribution 4.0 International license</a>.
# 404 page
- id: pageNotFound
translation: This page does not exist.
......
......@@ -66,6 +66,14 @@
- id: replyToThread
translation: Répondre au fil de discussion
# Licensing
- id: byWithLink
translation: Par <a href="{{ .Url }}" target="_blank">{{ .Author }}</a>.
- id: byNoLink
translation: Par {{ .Count }}.
- id: defaultLicense
translation: Sauf mention contraire, le contenu de ce site est soumis à <a href="https://creativecommons.org/licenses/by/4.0/deed.fr" target="_blank">la licence Creative Commons Attribution 4.0 International</a>.
# 404 page
- id: pageNotFound
translation: Cette page n'existe pas.
......
......@@ -9,6 +9,7 @@
{{- block "main" . }}{{ end -}}
</section>
{{- partial "menu/nav.html" . -}}
{{- partial "footer.html" . -}}
{{- block "final-script" . }}
{{- $script := .Site.Data.webpack.main }}
{{- with $script.js }}
......
<footer id="foot" class="menu">
<div class="toe lic">
{{ partial "licenses/icons.html" ( dict "license" "CC BY 4.0" "Lang" .Lang ) }}
<div class="lic-text">{{ i18n "defaultLicense" | safeHTML }}</div>
</div>
</footer>
{{ $license := split ( lower .license ) " " -}}
{{ if eq "cc" ( index $license 0 ) -}}
{{ $terms := index $license 1 }}
{{ $valid := slice "by" "by-sa" "by-nd" "by-nc" "by-nc-sa" "by-nc-nd" }}
{{ if in $valid $terms -}}
{{ $version := index $license 2 }}
{{ $licenseUrl := printf "https://creativecommons.org/licenses/%s/%s/deed.%s" $terms $version .Lang }}
<a href="{{ $licenseUrl }}" class="lic-icons" target="_blank">
{{- $labels := slice -}}
{{ partial "fontawesome.html" "cc" -}}
{{ range ( split $terms "-" ) -}}
{{ $term := printf "cc-%s" . -}}
{{ $labels = $labels | append ( i18n $term ) -}}
{{ partial "fontawesome.html" $term -}}
{{ end -}}
{{ .license }}
</a>
{{ else -}}
{{ errorf "Invalid CC license <%q>" .license }}
{{ end -}}
{{ else -}}
{{ errorf "Not a CC license: <%q>" .license }}
{{ end -}}
{{ $license := split ( lower .license ) " " -}}
{{ if eq "cc" ( index $license 0 ) -}}
{{ $terms := index $license 1 }}
{{ $valid := slice "by" "by-sa" "by-nd" "by-nc" "by-nc-sa" "by-nc-nd" }}
{{ if in $valid $terms -}}
<a href="{{ printf "https://creativecommons.org/licenses/%s/%s/deed.%s" $terms ( index $license 2 ) .Lang }}" class="lic-icons" target="_blank">
{{ partial "fontawesome.html" "cc" -}}
{{ range ( split $terms "-" ) -}}
{{ partial "fontawesome.html" ( printf "cc-%s" . ) -}}
{{ end -}}
</a>
{{ else -}}
{{ errorf "Invalid CC license <%q>" .license }}
{{ end -}}
{{ else -}}
{{ errorf "Not a CC license: <%q>" .license }}
{{ end -}}
......@@ -6,12 +6,16 @@
<div class="meta-line">
{{- partial "fontawesome.html" "calendar-day" -}}
&nbsp;<time datetime="{{ .Date.UTC.Format .Site.Params.dateIsoFormat }}">
{{- .Date.UTC.Format .Site.Params.DateFormat -}}
{{- .Date.UTC.Format .Site.Params.DateFormat -}}
</time>
</div>
{{ with .Params.author -}}
<div class="meta-line">
{{- partial "fontawesome.html" "user-circle" -}}&nbsp;
{{ if $.Params.license -}}
{{- partial "licenses/icons.html" ( dict "license" $.Params.license "Lang" $.Lang ) -}}
{{ else -}}
{{- partial "fontawesome.html" "user-circle" -}}
{{ end -}}&nbsp;
{{- . -}}
</div>
{{ end -}}
......
......@@ -14,6 +14,11 @@
{{- partial "fontawesome.html" "user-circle" -}}&nbsp;
{{- . -}}
</div>
{{ if $.Params.license }}
<div class="meta-line">
{{- partial "licenses/compact.html" ( dict "license" $.Params.license "Lang" $.Lang ) -}}
</div>
{{ end -}}
{{ end -}}
{{ $slug := substr (replace .RelPermalink "/" "-") 1 -1 -}}
<div class="meta-line">
......
......@@ -6,7 +6,7 @@
&:link,
&:visited {
color: $link-color;
text-decoration: underline dotted;
text-decoration: $link-decoration;
}
&:hover,
&:active {
......
......@@ -17,7 +17,10 @@ $neutral-color: lighten($default-text-color, 20%);
$muted-text-color: $neutral-color;
$contrast-text-color: darken($contrast-color, 10%);
$link-color: lighten($accent-color, 15%);
$link-decoration: dotted underline;
$background-color-content: #eee;
$background-color-default: #ddd;
$input-background-color: #fff;
......
......@@ -7,15 +7,19 @@
#menu {
position: absolute;
background: none;
top: 12px;
top: 7px;
right: 20px;
ul {
padding: 0;
}
li {
display: inline-block;
padding: 0 10px;
}
}
// Make the license a div on the right
#foot {
.lic {
margin-left: 75%;
width: 20%;
}
}
$menu-padding-h: 20px;
.menu {
background-color: $menu-back-color;
color: $menu-text-color;
a {
// text-transform: uppercase;
color: $menu-text-color;
&:link {
text-decoration: $link-decoration;
}
}
}
......@@ -23,12 +28,31 @@
}
#menu {
padding: 7px $menu-padding-h;
ul {
list-style: none;
margin: 0;
padding: 7px 20px;
padding: 0;
}
li {
line-height: 1.25;
a {
text-decoration: none;
}
}
}
#foot {
padding: ($menu-padding-h /2) $menu-padding-h ($menu-padding-h * 1.5);
.toe {
padding: 20px 0;
}
.lic-icons {
font-size: 1.75em;
text-decoration: none;
}
.lic-text {
font-size: smaller;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment