-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Introduce new macros to keep reusable tag navigation items (#81)
- Loading branch information
1 parent
45bc473
commit acad4bf
Showing
4 changed files
with
61 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% from "../sliced-string.html" import slicedString %} | ||
|
||
|
||
{% macro tagNavItemPub(channel, channelName) %} | ||
|
||
<a class="js-menu-item flex break-words no-underline text-grey-darkest mt-8 sm:mt-8 md:mt-3" | ||
href="#operation-publish-{{ channelName }}"> | ||
<span class="bg-blue-dark font-bold h-6 no-underline text-white uppercase p-1 mr-2 rounded" | ||
style="height: 21px;font-size: 11px;" title="Publish"> | ||
Pub | ||
</span> | ||
{% if channel.publish().summary() %} | ||
<span style="padding-top: 2px;"> | ||
{{ channel.publish().summary() }} | ||
</span> | ||
{% else %} | ||
<div style="display:inline-block;"> | ||
{{ slicedString(channelName, 'padding-top: 2px;') }} | ||
</div> | ||
{% endif %} | ||
</a> | ||
|
||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% from "../sliced-string.html" import slicedString %} | ||
|
||
|
||
{% macro tagNavItemSub(channel, channelName) %} | ||
|
||
<a class="js-menu-item flex break-words no-underline text-grey-darkest mt-8 sm:mt-8 md:mt-3" | ||
href="#operation-subscribe-{{ channelName }}"> | ||
<span class="bg-green-dark font-bold no-underline text-white uppercase p-1 mr-2 rounded" | ||
style="height: 21px;font-size: 11px;" title="Subscribe"> | ||
Sub | ||
</span> | ||
{% if channel.subscribe().summary() %} | ||
<span style="padding-top: 2px;"> | ||
{{ channel.subscribe().summary() }} | ||
</span> | ||
{% else %} | ||
<div style="display:inline-block;"> | ||
{{ slicedString(channelName, 'padding-top: 2px;') }} | ||
</div> | ||
{% endif %} | ||
</a> | ||
|
||
{% endmacro %} |