|
| 1 | +{% from "./tag_nav_item_sub.html" import tagNavItemSub %} |
| 2 | +{% from "./tag_nav_item_pub.html" import tagNavItemPub %} |
| 3 | + |
1 | 4 | {% if asyncapi.hasTags() %}
|
2 | 5 | {% for categorytags in asyncapi.tags() %}
|
3 | 6 | <div class="mt-4 {% if open %}is-open{% endif %}">
|
|
13 | 16 |
|
14 | 17 | <div class="children">
|
15 | 18 | {% for channelName, channel in asyncapi.channels() %}
|
16 |
| - {% if channel.publish() and channel.publish().hasTags() and channel.publish() | containTags(categorytags) %} |
17 |
| - <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 }}"> |
18 |
| - <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"> |
19 |
| - Pub |
20 |
| - </span> |
21 |
| - {% if channel.publish().summary() %} |
22 |
| - <span style="padding-top: 2px;"> |
23 |
| - {{ channel.publish().summary() }} |
24 |
| - </span> |
25 |
| - {% else %} |
26 |
| - <div style="display:inline-block;"> |
27 |
| - {{ slicedString(channelName, 'padding-top: 2px;') }} |
28 |
| - </div> |
29 |
| - {% endif %} |
30 |
| - </a> |
| 19 | + {% if channel.publish() and channel.publish().hasTags() and channel.publish() | containTags(categorytags) %} |
| 20 | + {{ tagNavItemPub(channel, channelName) }} |
31 | 21 | {% endif %}
|
32 | 22 |
|
33 | 23 | {% if channel.subscribe() and channel.subscribe().hasTags() and channel.subscribe() | containTags(categorytags) %}
|
34 |
| - <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 }}"> |
35 |
| - {% if channel.deprecated %} |
36 |
| - <span title="Deprecated"></span> |
37 |
| - {% endif %} |
38 |
| - <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"> |
39 |
| - Sub |
40 |
| - </span> |
41 |
| - {% if channel.subscribe().summary() %} |
42 |
| - <span style="padding-top: 2px;"> |
43 |
| - {{ channel.subscribe().summary() }} |
44 |
| - </span> |
45 |
| - {% else %} |
46 |
| - <div style="display:inline-block;"> |
47 |
| - {{ slicedString(channelName, 'padding-top: 2px;') }} |
48 |
| - </div> |
49 |
| - {% endif %} |
50 |
| - </a> |
| 24 | + {{ tagNavItemSub(channel, channelName) }} |
51 | 25 | {% endif %}
|
52 | 26 | {% endfor %}
|
53 | 27 | </div>
|
|
72 | 46 | <div class="children">
|
73 | 47 | {% for channelName, channel in asyncapi.channels() %}
|
74 | 48 | {% if channel.hasPublish() and (not channel.publish().hasTags() or not channel.publish() | containTags(asyncapi.tags())) %}
|
75 |
| - <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 }}"> |
76 |
| - <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"> |
77 |
| - Pub |
78 |
| - </span> |
79 |
| - {% if channel.publish().summary() %} |
80 |
| - <span style="padding-top: 2px;"> |
81 |
| - {{ channel.publish().summary() }} |
82 |
| - </span> |
83 |
| - {% else %} |
84 |
| - <div style="display:inline-block;"> |
85 |
| - {{ slicedString(channelName, 'padding-top: 2px;') }} |
86 |
| - </div> |
87 |
| - {% endif %} |
88 |
| - </a> |
| 49 | + {{ tagNavItemPub(channel, channelName) }} |
89 | 50 | {% endif %}
|
90 | 51 |
|
91 | 52 | {% if channel.hasSubscribe() and (not channel.subscribe().hasTags() or not channel.subscribe() | containTags(asyncapi.tags())) %}
|
92 |
| - <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 }}"> |
93 |
| - <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"> |
94 |
| - Sub |
95 |
| - </span> |
96 |
| - {% if channel.subscribe().summary() %} |
97 |
| - <span style="padding-top: 2px;"> |
98 |
| - {{ channel.subscribe().summary() }} |
99 |
| - </span> |
100 |
| - {% else %} |
101 |
| - <div style="display:inline-block;"> |
102 |
| - {{ slicedString(channelName, 'padding-top: 2px;') }} |
103 |
| - </div> |
104 |
| - {% endif %} |
105 |
| - </a> |
| 53 | + {{ tagNavItemSub(channel, channelName) }} |
106 | 54 | {% endif %}
|
107 | 55 | {% endfor %}
|
108 | 56 | </div>
|
|
0 commit comments