Skip to content

Commit c24618d

Browse files
committed
Update cloud tags
1 parent e5c944f commit c24618d

1 file changed

Lines changed: 78 additions & 62 deletions

File tree

index.html

Lines changed: 78 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -154,69 +154,70 @@
154154

155155
/* Tag Cloud Styling */
156156
ul.cloud {
157-
gap: 0.8rem;
157+
gap: 0.4rem 1rem;
158+
justify-content: center;
159+
padding: 1rem 0;
158160
}
159161

160162
ul.cloud li {
161-
margin: 0.4rem 0.2rem;
163+
margin: 0.2rem 0.3rem;
162164
}
163165

164166
ul.cloud a {
165-
display: inline-flex;
166-
align-items: center;
167-
justify-content: center;
168-
gap: 0.15rem;
169-
padding: 0.2rem 0.45rem;
170-
background-color: #fff;
171-
border: 2px solid #7cae8c; /* lighter green outline */
172-
border-radius: 8px;
173-
transition: all 0.25s ease;
167+
display: inline-block;
168+
position: relative;
169+
padding: 0 0.9em 0 0;
170+
background: none;
171+
border: none;
172+
border-radius: 0;
173+
box-shadow: none;
174+
color: var(--tag-color) !important;
174175
font-weight: 400;
175-
font-size: 0.65rem;
176176
text-decoration: none;
177-
position: relative;
178-
color: #105028;
179-
}
180-
181-
ul.cloud a:hover,
182-
ul.cloud a:focus {
183-
background-color: #105028;
184-
color: #ffffff !important;
185-
border-color: #105028;
186-
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
187-
}
188-
189-
ul.cloud a:hover .badge,
190-
ul.cloud a:focus .badge {
191-
background: rgba(255, 255, 255, 0.3);
192-
border-color: rgba(255, 255, 255, 0.6);
193-
color: #fff;
177+
cursor: pointer;
178+
letter-spacing: 0.01em;
179+
transition: opacity 0.18s ease, transform 0.18s ease;
180+
white-space: nowrap;
194181
}
195182

196183
ul.cloud a::before {
197184
content: "";
198185
display: none;
199186
}
200187

188+
/* link icon right of text */
201189
ul.cloud a::after {
202-
content: "";
203-
display: none;
190+
content: "\1F517";
191+
display: inline-block;
192+
position: absolute;
193+
top: 50%;
194+
right: 0;
195+
transform: translateY(-50%);
196+
font-size: 0.5em;
197+
line-height: 1;
198+
opacity: 0.5;
199+
transition: opacity 0.18s ease;
200+
}
201+
202+
ul.cloud a:hover,
203+
ul.cloud a:focus {
204+
opacity: 0.75;
205+
transform: translateY(-1px);
206+
outline: none;
207+
text-decoration: none;
208+
}
209+
210+
ul.cloud a:hover::after,
211+
ul.cloud a:focus::after {
212+
opacity: 0.9;
213+
}
214+
215+
ul.cloud a:active {
216+
transform: translateY(0);
204217
}
205218

206219
ul.cloud a .badge {
207-
display: inline-block;
208-
background: linear-gradient(135deg, rgba(96, 120, 96, 0.85), rgba(112, 160, 112, 0.85)); /* darker green */
209-
color: #fff;
210-
padding: 0.1rem 0.3rem;
211-
border-radius: 6px;
212-
font-size: 0.6em;
213-
font-weight: 600;
214-
margin-left: 0.15rem;
215-
min-width: 1.2em;
216-
text-align: center;
217-
line-height: 1;
218-
vertical-align: middle;
219-
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
220+
display: none;
220221
}
221222

222223
@media (prefers-reduced-motion) {
@@ -4255,41 +4256,56 @@ <h3><a href="https://github.com/frappe/erpnext" target="_blank">ERPNext</a></h3>
42554256

42564257
tagCloudContainer.innerHTML = '';
42574258

4258-
const minFontSize = 0.6;
4259-
const maxFontSize = 0.9;
4259+
const minFontSize = 0.82;
4260+
const maxFontSize = 1.15;
42604261
const maxCount = Math.max(...Object.values(categoryCounts));
42614262
const minCount = Math.min(...Object.values(categoryCounts));
42624263

4263-
const getColor = (count) => {
4264-
if (count >= maxCount * 0.8) return '#105028'; // Dark green for highest counts
4265-
if (count >= maxCount * 0.6) return '#156741'; // Medium green for high counts
4266-
if (count >= maxCount * 0.4) return '#1d7d3a'; // Medium-light green for medium counts
4267-
if (count >= maxCount * 0.2) return '#2b8a4d'; // Light green for low counts
4268-
return '#3d9156'; // Lighter green for lowest counts
4269-
};
4264+
// Vibrant multi-color palette: [bg, color, border, hover, glow, badgeBg]
4265+
const palette = [
4266+
['#dbeafe', '#1d4ed8', '#93c5fd', '#1d4ed8', 'rgba(29,78,216,0.30)', 'rgba(29,78,216,0.12)'], // blue
4267+
['#dcfce7', '#15803d', '#86efac', '#15803d', 'rgba(21,128,61,0.30)', 'rgba(21,128,61,0.12)'], // green
4268+
['#ffedd5', '#c2410c', '#fdba74', '#c2410c', 'rgba(194,65,12,0.30)', 'rgba(194,65,12,0.12)'], // orange
4269+
['#ede9fe', '#6d28d9', '#c4b5fd', '#6d28d9', 'rgba(109,40,217,0.30)', 'rgba(109,40,217,0.12)'], // purple
4270+
['#ccfbf1', '#0f766e', '#5eead4', '#0f766e', 'rgba(15,118,110,0.30)', 'rgba(15,118,110,0.12)'], // teal
4271+
['#fce7f3', '#be185d', '#f9a8d4', '#be185d', 'rgba(190,24,93,0.30)', 'rgba(190,24,93,0.12)'], // pink
4272+
['#fef9c3', '#854d0e', '#fde047', '#a16207', 'rgba(161,98,7,0.30)', 'rgba(161,98,7,0.12)'], // amber
4273+
['#e0e7ff', '#3730a3', '#a5b4fc', '#3730a3', 'rgba(55,48,163,0.30)', 'rgba(55,48,163,0.12)'], // indigo
4274+
['#fee2e2', '#b91c1c', '#fca5a5', '#b91c1c', 'rgba(185,28,28,0.30)', 'rgba(185,28,28,0.12)'], // red
4275+
['#f0fdf4', '#166534', '#bbf7d0', '#166534', 'rgba(22,101,52,0.30)', 'rgba(22,101,52,0.12)'], // emerald
4276+
['#fff7ed', '#9a3412', '#fed7aa', '#9a3412', 'rgba(154,52,18,0.30)', 'rgba(154,52,18,0.12)'], // burnt
4277+
['#f0f9ff', '#0369a1', '#7dd3fc', '#0369a1', 'rgba(3,105,161,0.30)', 'rgba(3,105,161,0.12)'], // sky
4278+
];
4279+
4280+
const hashStr = (s) => [...s].reduce((h, c) => (Math.imul(31, h) + c.charCodeAt(0)) | 0, 0);
42704281

42714282
Object.entries(categoryCounts).forEach(([category, count]) => {
42724283
const weight = ((count - minCount) / (maxCount - minCount)) * (maxFontSize - minFontSize) + minFontSize;
4284+
const [bg, color, border, hover, glow, badgeBg] = palette[Math.abs(hashStr(category)) % palette.length];
42734285

4274-
// Create the list item with a link
42754286
const listItem = document.createElement('li');
42764287
const link = document.createElement('a');
42774288
link.href = `#${category}`;
4278-
4279-
// Create category name with count badge
4289+
4290+
link.style.setProperty('--tag-bg', bg);
4291+
link.style.setProperty('--tag-color', color);
4292+
link.style.setProperty('--tag-border', border);
4293+
link.style.setProperty('--tag-hover', hover);
4294+
link.style.setProperty('--tag-glow', glow);
4295+
link.style.setProperty('--tag-shadow', glow);
4296+
link.style.setProperty('--tag-badge-bg', badgeBg);
4297+
link.style.fontSize = `${weight}rem`;
4298+
link.setAttribute('data-weight', count);
4299+
link.setAttribute('title', `${count} framework(s) in ${category}`);
4300+
42804301
const categoryText = document.createElement('span');
42814302
categoryText.textContent = category;
42824303
link.appendChild(categoryText);
4283-
4304+
42844305
const badge = document.createElement('span');
42854306
badge.className = 'badge';
42864307
badge.textContent = count;
42874308
link.appendChild(badge);
4288-
4289-
link.style.fontSize = `${weight}rem`;
4290-
link.style.color = getColor(count);
4291-
link.setAttribute('data-weight', count);
4292-
link.setAttribute('title', `${count} framework(s) in ${category}`);
42934309

42944310
listItem.appendChild(link);
42954311
tagCloudContainer.appendChild(listItem);

0 commit comments

Comments
 (0)