Skip to content

Commit 50585e5

Browse files
committed
Add tooltips to tier badges
Use the existing ff-tooltip CSS system (data-tooltip attribute) to show pricing tier availability on hover, e.g. "Available on FlowFuse Cloud — Enterprise". Applies to badges rendered via both the Eleventy transform and the Nunjucks template.
1 parent 080ece8 commit 50585e5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.eleventy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,13 +738,13 @@ module.exports = function(eleventyConfig) {
738738
if (!showCloud && !showSelfHosted) return '';
739739
let html = `<div class="ff-tier-badges">`;
740740
if (showCloud) {
741-
html += `<div class="ff-tier-badge ff-tier--available">`;
741+
html += `<div class="ff-tier-badge ff-tier--available ff-tooltip" data-tooltip="Available on FlowFuse Cloud — ${cloudLabel}">`;
742742
html += `<span class="ff-tier-badge__label">Cloud</span>`;
743743
html += `<span class="ff-tier-badge__value">${cloudLabel}</span>`;
744744
html += `</div>`;
745745
}
746746
if (showSelfHosted) {
747-
html += `<div class="ff-tier-badge ff-tier--available">`;
747+
html += `<div class="ff-tier-badge ff-tier--available ff-tooltip" data-tooltip="Available on FlowFuse Self-Hosted — ${selfHostedLabel}">`;
748748
html += `<span class="ff-tier-badge__label">Self-Hosted</span>`;
749749
html += `<span class="ff-tier-badge__value">${selfHostedLabel}</span>`;
750750
html += `</div>`;

src/_includes/components/tier-badges.njk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
{% if showTierCloud or showTierSelfHosted %}
44
<div class="ff-tier-badges">
55
{% if showTierCloud %}
6-
<div class="ff-tier-badge ff-tier--available">
6+
<div class="ff-tier-badge ff-tier--available ff-tooltip" data-tooltip="Available on FlowFuse Cloud — {{ tierCloud }}">
77
<span class="ff-tier-badge__label">Cloud</span>
88
<span class="ff-tier-badge__value">{{ tierCloud }}</span>
99
</div>
1010
{% endif %}
1111
{% if showTierSelfHosted %}
12-
<div class="ff-tier-badge ff-tier--available">
12+
<div class="ff-tier-badge ff-tier--available ff-tooltip" data-tooltip="Available on FlowFuse Self-Hosted — {{ tierSelfHosted }}">
1313
<span class="ff-tier-badge__label">Self-Hosted</span>
1414
<span class="ff-tier-badge__value">{{ tierSelfHosted }}</span>
1515
</div>

0 commit comments

Comments
 (0)