This commit is contained in:
parent
5c81568997
commit
7cce73e2ba
11 changed files with 109 additions and 16 deletions
91
layouts/partials/maec-encadre.html
Normal file
91
layouts/partials/maec-encadre.html
Normal file
|
@ -0,0 +1,91 @@
|
|||
<!-- For displaying typewriter specifications from the current page -->
|
||||
|
||||
<style>
|
||||
.typewriter-specs {
|
||||
width: 300px;
|
||||
margin: 20px 0;
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
{{ $specs := .Page.Params.typewriterSpecs }}
|
||||
|
||||
{{ if $specs }}
|
||||
<div class="typewriter-specs">
|
||||
<h3>{{$specs.make}} {{$specs.model}}</h3>
|
||||
{{ with $specs.logo }}
|
||||
<figure class="logo">
|
||||
<img src="{{ . }}" alt="Logo of {{ $specs.manufacturer }}">
|
||||
</figure>
|
||||
{{ end }}
|
||||
|
||||
{{ with $specs.image }}
|
||||
<figure>
|
||||
<img src="{{ . }}" alt="Image of {{ $specs.manufacturer }} {{ $specs.type }}">
|
||||
</figure>
|
||||
{{ end }}
|
||||
<table>
|
||||
<tbody>
|
||||
|
||||
{{ with $specs.make }}
|
||||
<tr>
|
||||
<th>Fabricant</th>
|
||||
<td>{{ . }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
|
||||
{{ with $specs.type }}
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<td>{{ . }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
|
||||
{{ with $specs.dateManufactured }}
|
||||
<tr>
|
||||
<th>Date de fabrication</th>
|
||||
<td>{{ . }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
|
||||
{{ with $specs.massKg }}
|
||||
<tr>
|
||||
<th>Masse</th>
|
||||
<td>{{ . }} kg</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
|
||||
{{ with $specs.widthCm }}
|
||||
<tr>
|
||||
<th>Largeur</th>
|
||||
<td>{{ . }} cm</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
|
||||
{{ with $specs.linkWiki }}
|
||||
<tr>
|
||||
<th>Ressource externe</th>
|
||||
<td><a href="{{ . }}" target="_blank">Link</a></td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
|
||||
{{ with $specs.linkTpdb }}
|
||||
<tr>
|
||||
<th>Typewriter Database</th>
|
||||
<td><a href="{{ . }}" target="_blank">Link</a></td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="notice warning">
|
||||
<p>Pas de spécifications trouvées :(</p>
|
||||
</div>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue