Skip to content

Commit

Permalink
DOCS-1361: Add labels to changelog (#2271)
Browse files Browse the repository at this point in the history
  • Loading branch information
JessamyT authored Dec 6, 2023
1 parent 0b339e4 commit 56c4c9f
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 73 deletions.
18 changes: 10 additions & 8 deletions assets/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ if (toc) {
// Cache element references and measurements
tocItems = tocItems.map( function( item ) {
var anchor = item.querySelector( 'a' );
var target = document.getElementById( anchor.getAttribute( 'href' ).slice( 1 ) );

return {
listItem: item,
anchor: anchor,
target: target
};
if(anchor) {
var target = document.getElementById( anchor.getAttribute( 'href' ).slice( 1 ) );

return {
listItem: item,
anchor: anchor,
target: target
};
}
} );

setActiveElements();
Expand All @@ -96,7 +98,7 @@ if (toc) {

for (var i = 0; i < tocItems.length; i++) {
let item = tocItems[i];
if (item.target) {
if (item && item.target) {

var targetBounds = item.target.getBoundingClientRect();

Expand Down
36 changes: 36 additions & 0 deletions assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1539,3 +1539,39 @@ input[type=search]::-webkit-search-cancel-button {
text-decoration: underline;
text-decoration-style: dotted;
}

// Changelog labels

.changelog-outer {
display: flex;
}

.changelog div {
padding-right: 4px;
}

.changelog div span {
text-transform: uppercase;
padding: 0.1rem 0.25rem;
border: 1px solid black;
font-size: 1rem;
font-weight: 500;
line-height: 1.3;
vertical-align: top;
}

.changelog-added {
background-color: #00ef83;
}

.changelog-improved {
background-color: #00e8e8;
}

.changelog-changed {
background-color: #ffd400;
}

.changelog-removed {
background-color: #ff0047;
}
2 changes: 1 addition & 1 deletion assets/scss/_variables_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ BEGIN CSS CHANGES FOR MARKETING
}

$google_font_name: "Public Sans" !default;
$google_font_family: "Public+Sans:300,300i,400,400i,700,700i" !default;
$google_font_family: "Public+Sans:300,300i,400,400i,500,600,700,700i" !default;
$web-font-path: "https://fonts.googleapis.com/css?family=#{$google_font_family}&display=swap";

$font-awesome-font-name: "Font Awesome 6 Free" !default;
Expand Down
Loading

0 comments on commit 56c4c9f

Please sign in to comment.