diff --git a/tags.html b/tags.html index b09000a4a9a..dd4cee7deab 100644 --- a/tags.html +++ b/tags.html @@ -21,11 +21,19 @@

Google Fonts Tagger

+
+
+ + + +
+
+
@@ -49,6 +57,7 @@

Google Fonts Tagger

+
@@ -56,6 +65,9 @@

Google Fonts Tagger

+
+

No families found for this tag. Please add some

+
{{ family.Family }} @@ -84,6 +96,7 @@

Google Fonts Tagger

ready: false, isEdited: false, commit: "refs/heads/main", + newTag: "", newFamily: '', newWeight: '', CurrentCategory: "/Expressive/Calm", @@ -116,7 +129,7 @@

Google Fonts Tagger

}, CurrentCategory(newCategory) { this.updateURL(); - } + }, }, created() { this.loadCSV(); @@ -144,14 +157,14 @@

Google Fonts Tagger

uniqueFamilies() { return Array.from(new Set(this.Families.map((family) => family.Family))); }, - sortedCategories() { - return Array.from(this.Categories).sort(); - } }, methods: { + sortedCategories() { + return Array.from(this.Categories).sort(); + }, updateURL() { const url = new URL(window.location); - if (this.commit) { + if (this.commit && this.commit !== "refs/heads/main") { url.searchParams.set('commit', this.commit); } else { url.searchParams.delete('commit'); @@ -230,6 +243,12 @@

Google Fonts Tagger

familyStyle(Family) { return `font-family: "${Family.Family}", "Adobe NotDef"; font-size: 32pt;` }, + AddTag() { + this.isEdited = true; + this.Categories.add(this.newTag); + this.history.push(`+ Tag added "${this.newTag}"`); + this.CurrentCategory = this.newTag; + }, AddFamily() { this.isEdited = true; let newFamily = { Weight: this.newWeight, Family: this.newFamily, "Group/Tag": this.CurrentCategory }