Skip to content

Commit 23f55f7

Browse files
committed
functional filter buttons!!!!!!
1 parent cc98dc4 commit 23f55f7

File tree

3 files changed

+69
-17
lines changed

3 files changed

+69
-17
lines changed

src/_data/release-notes.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
notes:
44
- title: Segment Extensions General Availability
5-
slug: segment-extensions-ga
65
description: "Segment Extensions, including dbt and Git Sync, is generally available. <br><br> Extensions provides third-party integrations that add an automated experience with your existing tools, like dbt labs for syncing models or Git repositories for managing versioning for Segment Workspace changes. dbt Extension is available to all tiers, while Git Sync is available for Team and Business plans. <br><br> For more information, see Segment's [Extensions documentation](/docs/segment-app/extensions/)."
7-
date: 08-16-2024
6+
date: August 16, 2024
87
product-area:
98
- segment app
109
release-stage: ga
@@ -14,13 +13,25 @@ notes:
1413
- business
1514
read-more: "/docs/segment-app/extensions/"
1615
- title: Linked Audiences and Data Graph General Availability
17-
slug: segment-linked-and-data-graph-ga
1816
description: "Segment's Linked Audiences and Data Graph are now Generally Available for Snowflake & Databricks. Linked Audiences empowers marketers to effortlessly create targeted audiences by combining behavioral data from the Segment Profile and warehouse entity data within a self-serve, no-code interface. This tool accelerates audience creation, enabling precise targeting, enhanced customer personalization, and optimized marketing spend without the need for constant data team support. The Data Graph acts as a semantic layer that allows businesses to define relationships between entity datasets in the warehouse — such as accounts, subscriptions, households, and products — with the Segment Profile. The Data Graph makes these relational datasets easily accessible to business teams for targeted and personalized customer engagements."
19-
date: 08-23-2024
17+
date: August 23, 2024
2018
product-area:
2119
- twilio engage
2220
release-stage: ga
2321
plan:
2422
- unify
2523
- team
26-
- business
24+
- business
25+
read-more: "/docs/engage/audiences/linked-audiences/"
26+
- title: Delivery Overview for Storage Destinations is in Public Beta
27+
description: "End-to-end observability is coming to Warehouse Destinations. For the first time, Delivery Overview gives you a comprehensive breakdown of how streaming source events convert to warehouse rows. For more information, see the Delivery Overview documentation."
28+
date: August 12, 2024
29+
product-area:
30+
- segment app
31+
- storage
32+
release-stage: beta
33+
plan:
34+
- free
35+
- team
36+
- business
37+
read-more: "/docs/connections/delivery-overview/#storage-destinations"

src/_sass/components/_release-note-card.scss

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
$this: &;
66

77
position: relative;
8-
padding: 20px;
8+
padding: 10px;
99
background-color: color(white);
1010
border: 1px solid color(gray-400);
1111
margin-top: 20px;
@@ -33,7 +33,7 @@
3333
}
3434

3535
&--badges {
36-
padding-top: 10px;
36+
padding: 2px;
3737
}
3838

3939
&--content {
@@ -51,6 +51,20 @@
5151
display: inline-block;
5252
font-size: 12px;
5353
font-weight: 500;
54-
color: color(gray-900);
54+
color: color(gray-700);
55+
}
56+
57+
&--read-more {
58+
position: absolute;
59+
bottom: 20;
60+
right: 20;
61+
padding: 5px;
62+
}
63+
&--hidden {
64+
visibility: hidden;
65+
left: -999px;
66+
width: 1px;
67+
height: 1px;
68+
overflow: hidden;
5569
}
5670
}

src/release-notes/test.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,55 @@ title: Release Notes Test
33
hide_toc: true
44
---
55

6+
<button class="button button-fill filter-button" onclick="javascript:hideCards(ga)">GA</button>
7+
<button class="button button-fill filter-button" onclick="javascript:hideCards(beta)">Beta</button>
8+
<button class="button button-fill filter-button" onclick="javascript:showCards()">Reset filter</button>
9+
610
{% assign notes = site.data.release-notes.notes %}
7-
{% for note in notes reversed %}
8-
<article class="release-note-card">
11+
{% for note in notes %}
12+
<section class="release-note-card {{ note.release-stage | slugify }}">
913
<div class="release-note-card--box">
10-
<span class="release-note-card--note-header">{{ note.title }}</span><br>
14+
<span class="release-note-card--note-header" id="{{ note.title | slugify }}">{{ note.title }}</span><br>
1115
<div class="release-note-card--badges">
12-
<span class="badge badge--purple">{{ note.release-stage }}</span>
16+
<span class="badge badge--purple {{ note.release-stage | slugify }}">{{ note.release-stage }}</span>
1317
{% assign plans = note.plan %}
1418
{% for plan in plans %}
15-
<span class="badge badge">{{ plan }}</span>
19+
<span class="badge badge {{ plan | slugify }}">{{ plan }}</span>
1620
{% endfor %}
1721
{% assign product-area = note.product-area %}
1822
{% for item in product-area %}
19-
<span class="badge badge--success">{{ item }}</span>
23+
<span class="badge badge--success {{ item | slugify }}">{{ item }}</span>
2024
{% endfor %}
2125
</div>
2226
<div class="release-note-card--content">
2327
<main>
2428
<p>{{ note.description | markdownify }}</p>
25-
<p class="release-note-card--date">Released {{ note.date }}</p>
29+
<p class="release-note-card--date">Released {{ note.date }}</p> <a class="button button-fill release-note-card--read-more" href="{{ note.read-more }}">Read more</a>
2630
</main>
2731
</div>
2832
</div>
29-
</article>
30-
{% endfor %}
33+
</section>
34+
{% endfor %}
35+
36+
<script type="text/javascript">
37+
var ga = "ga"
38+
var beta = "beta"
39+
var pilot = "pilot"
40+
function hideCards(className) {
41+
const sections = document.querySelectorAll("section");
42+
sections.forEach((section) => {
43+
if (!section.classList.contains(className)) {
44+
section.classList.add("release-note-card--hidden");
45+
}
46+
});
47+
}
48+
49+
function showCards() {
50+
var sections = document.querySelectorAll("section");
51+
sections.forEach((section) => {
52+
if (section.classList.contains('release-note-card--hidden')) {
53+
section.classList.remove('release-note-card--hidden');
54+
}
55+
});
56+
}
57+
</script>

0 commit comments

Comments
 (0)