refactor: split single header and meta components into partials
This commit is contained in:
parent
d0577aec91
commit
e6889cabba
22 changed files with 742 additions and 406 deletions
30
layouts/partials/single/post-meta/skills.html
Normal file
30
layouts/partials/single/post-meta/skills.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{{- /*
|
||||
Displays the skills for an item.
|
||||
|
||||
@params pc The page context.
|
||||
@params skills The item's skills
|
||||
@params skills_ciisec_levels The matched CIISec levels for the skills. Optional.
|
||||
*/
|
||||
-}}
|
||||
|
||||
|
||||
<section
|
||||
class="article-footer__links"
|
||||
itemprop="articleSection"
|
||||
>
|
||||
<h3 id="item-skills-title">Skills</h3>
|
||||
<ul>
|
||||
{{- .pc.Scratch.Set "i" 0 -}}
|
||||
{{- range .skills.ByTitle -}}
|
||||
{{- if hasPrefix .LinkTitle "CIISec/" -}}
|
||||
<li class="p-category">
|
||||
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
||||
<span class="level">(level {{ index $.skills_ciisec_levels ( $.pc.Scratch.Get "i" ) }})</span>
|
||||
</li>
|
||||
{{- $.pc.Scratch.Add "i" 1 -}}
|
||||
{{- else -}}
|
||||
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</section>
|
Loading…
Add table
Add a link
Reference in a new issue