Skip to content

Commit e900f74

Browse files
feat: add new media tag
Requested in #50.
1 parent 159c25c commit e900f74

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

docs/index.css

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,13 +421,13 @@ main {
421421
background-color: #5bc7d9 !important;
422422
}
423423

424-
[data-tag="news"].tag-button::before {
425-
content: "📰";
424+
[data-tag="media"].tag-button::before {
425+
content: "📼";
426426
}
427427

428-
[data-tag="news"] {
428+
[data-tag="media"] {
429429
color: #141e1e !important;
430-
background-color: #e0fffe !important;
430+
background-color: #18fef6 !important;
431431
}
432432

433433
[data-tag="motion detection"].tag-button::before {
@@ -439,6 +439,15 @@ main {
439439
background-color: #ff419e !important;
440440
}
441441

442+
[data-tag="news"].tag-button::before {
443+
content: "📰";
444+
}
445+
446+
[data-tag="news"] {
447+
color: #141e1e !important;
448+
background-color: #e0fffe !important;
449+
}
450+
442451
[data-tag="public transport"].tag-button::before {
443452
content: "🚍";
444453
}

docs/script.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const darkMode = document.getElementById("dark-mode");
1111

1212
const tagsList = [
1313
"calendar",
14+
"media",
1415
"motion detection",
1516
"news",
1617
"public transport",

scripts/expand_module_list_with_repo_data.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ async function addInformationFromPackageJson (moduleList) {
115115
})
116116
.filter((tag) => !tagsToRemove.includes(tag));
117117

118+
if (module.tags.some((tag) => ["images", "pictures", "livestream", "photos", "video"].includes(tag))) {
119+
module.tags.push("media");
120+
}
121+
// Remove duplicates
122+
module.tags = [...new Set(module.tags)];
123+
118124
if (module.tags.length === 0) {
119125
delete module.tags;
120126
module.issues.push("There are no specific keywords in 'package.json'. We would use them as tags on the module list page. Add a few meaningful terms to the keywords in the package.json. Not just “magicmirror” or “module”.");

0 commit comments

Comments
 (0)