1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-26 22:34:42 +03:00
guide/templates/item-title.widget

28 lines
724 B
Plaintext
Raw Normal View History

Description
============================================================
Item title; used when rendering an item in HTML or for the feed. (Includes the Hackage link and so on.)
Required context:
* item.link
item.name
2017-09-10 15:37:48 +03:00
item.kind.contents (optional)
HTML
============================================================
{{# item.link }}
2016-09-01 22:49:35 +03:00
<a href="{{item.link}}" class="item-name">{{item.name}}</a>
{{/ item.link }}
{{^ item.link }}
2016-09-03 01:24:37 +03:00
<span class="item-name">{{item.name}}</span>
{{/ item.link }}
{{! if the item is on Hackage, let's provide a link }}
2017-09-10 15:37:48 +03:00
{{# item.kind.contents }}
2016-09-03 21:49:55 +03:00
{{ hackageLink = [|https://hackage.haskell.org/package/{{.}}|] }}
(<a href="{{hackageLink}}">Hackage</a>)
2017-09-10 15:37:48 +03:00
{{/ item.kind.contents }}