Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search by Tags #1715

Merged
merged 29 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
513fa8f
new tag filter ui
cjyabraham Feb 10, 2023
b184391
style the tag filters
cjyabraham Feb 10, 2023
d35f271
Merge branch 'main' into tag-search
cjyabraham Feb 10, 2023
8058062
Added terms for translation
cjyabraham Feb 10, 2023
0d7b440
got the term listing working
cjyabraham Feb 10, 2023
84e2651
progress
cjyabraham Feb 11, 2023
665fa51
got the filters working
cjyabraham Feb 11, 2023
10f1ade
fix text
cjyabraham Feb 11, 2023
4f2c5dd
style tweaks
cjyabraham Feb 12, 2023
b2486b9
style tweaks
cjyabraham Feb 12, 2023
3539755
hook in tag search across site
cjyabraham Feb 13, 2023
f5fd2ec
tweak margins
cjyabraham Feb 13, 2023
76113e0
update styles as per G
cjyabraham Feb 13, 2023
78b430c
tweaks to design as per G
cjyabraham Feb 13, 2023
7d38bf6
fix links
cjyabraham Feb 13, 2023
0de81e1
Browse by Tag UI improvements, accessibility, #1006
thetwopct Feb 14, 2023
0c6b8ab
Update text to stop wrapping
thetwopct Feb 14, 2023
b315045
Update styling of tags
thetwopct Feb 14, 2023
a714283
Updating styling
thetwopct Feb 14, 2023
1f21a03
Making settings consistent with main branch
thetwopct Feb 14, 2023
40cb33e
Revising mobile layout of tag filters
thetwopct Feb 14, 2023
90c02c8
Fixing mobile hover states
thetwopct Feb 14, 2023
a5d4c5e
remove console.log
cjyabraham Feb 23, 2023
e7835cf
Merge branch 'main' into tag-search
cjyabraham Feb 23, 2023
d8bef02
add tag strings to all languages
cjyabraham Feb 23, 2023
ea0f239
make tagging UI compatible with all languages
cjyabraham Feb 23, 2023
8f8281b
tweak css
cjyabraham Feb 23, 2023
f40bc09
make urls relative
cjyabraham Feb 23, 2023
b028484
Update .github/settings.yml
cjyabraham Feb 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ collaborators:

- username: iamNoah1
permission: maintain

- username: thetwopct
permission: push
cjyabraham marked this conversation as resolved.
Show resolved Hide resolved

- username: thetwopct
permission: push
Expand Down
26 changes: 25 additions & 1 deletion assets/scss/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
padding-top: 0.5rem !important;
padding-left: 1.5rem;
padding-right: 1rem;
padding-bottom: 1rem;
padding-bottom: 5px;
}
@media (min-width: 1300px) {
padding-left: 2.5rem;
Expand Down Expand Up @@ -74,5 +74,29 @@
border-bottom: $black 2px solid;
}
}
}
}

.search-by-tag {
position: relative;
width: 100%;
font-size: 12px;
text-align: right;
@media (max-width: 767px) {
display: none;
}
@media (min-width: 768px) {
width: calc(100% - 20px);
}
padding-left: calc(20px + 20px);
@media (min-width: 768px) {
padding-left: 30px;
}
@media (min-width: 992px) {
padding-left: 35px;
}
@media (min-width: 1100px) {
padding-left: calc(20px + 20px);
}

}
1 change: 1 addition & 0 deletions assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@import 'footer';
@import 'header';
@import 'cookie-banner';
@import 'tag-search';
@import 'main';
@import 'search';
@import 'sidebar-left';
Expand Down
124 changes: 124 additions & 0 deletions assets/scss/_tag-search.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
// Hide the sidebar on Taxonomy Search/Browse page.
.td-taxonomy .td-sidebar-toc {
display: none !important;
}

// Adding padding to bottom of Taxonomy Browse page.
.td-taxonomy .td-main main {
padding-bottom: 6rem;
}

// Tags container.
.canonical-tag-container {
margin-top: 1.5625rem;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
gap: 20px;
@media (min-width: 768px) {
display: flex;
flex-wrap: wrap;
align-items: center;
margin-bottom: 3rem;
}
@media (max-width: 767px) {
> span {
display: flex;
align-items: center;
align-content: center;
justify-content: center;
}
}
}

// Tag item. Default gray.
.canonical-tag {
// button reset
border: none;
background: none;
box-sizing: border-box;
// button sizing.
min-width: 96px;
// style to match _taxonomy/.tax-term
display: block;
background: #efefef;
color: black;
border-radius: 50px;
padding-top: 7px;
padding-bottom: 7px;
padding-left: 18px;
padding-right: 18px;
font-weight: 600;
font-size: 10px;
line-height: 120%;
text-align: center;
letter-spacing: 0.02em;
// Turn pink when selected is-active.
&.is-active {
background-color: $link-color;
color: white;
@media (hover: hover) {
&:hover {
background-color: $link-color;
color: white;
}
}
}
@media (hover: hover) {
// Hover default state.
&:hover {
background-color: #d2d2d2;
}
}
}

// Reset buttons to look like text.
.button-reset-to-text {
border: none;
background: none;
box-sizing: border-box;
padding: 0;
cursor: pointer;
display: block;
margin-left: initial;
margin-right: initial;
width: unset;
// styling.
font-size: 10px;
line-height: 120%;
font-weight: 600;
letter-spacing: 0.02em;
color: black;
&:active {
color: inherit;
}
&:hover {
color: $link-color;
}
}

// Results
#terms-by-tag {
margin-top: 1rem;
> div {
margin-top: 2.5rem;
}
h3 {
margin-top: 2.5rem;
margin-bottom: 1rem;
a {
color: black;
&:hover {
color: $link-color;
}
}
}
}

// Tag results.
.invisible {
visibility: hidden;
}

.hide {
display: none;
}
35 changes: 20 additions & 15 deletions assets/scss/_taxonomy.scss
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
// Container for Taxonomy items.
.article-meta {
margin-bottom: 3rem;
}

.taxonomy-terms {
list-style: none;
margin: 0;
padding: 0;
overflow: hidden;
display: flex;
flex-wrap: wrap;
gap: 13px;
}

.tax-term {
display: block;
color: $white;
background-color: $link-color;
border-radius: 50px;
font-weight: 500;
padding-top: 7px;
padding-bottom: 7px;
padding-left: 15px;
padding-right: 15px;
font-weight: 600;
font-size: 10px;
line-height: 140%;
line-height: 120%;
text-align: center;
letter-spacing: 0.02em;
color: $white;
padding: 5px 12px;
margin-right: 8px;
&:hover {
color: $white;
text-decoration: none;
background-color: $primary-300;
}
}

.taxonomy-terms {
list-style: none;
margin: 0;
overflow: hidden;
padding: 0;
display: flex;
flex-wrap: wrap;
}

// Used in Tax Terms Cloud
.tax-terms {
list-style: none;
margin: 60px 0;
Expand All @@ -39,6 +43,7 @@
}
}

// Used in Tax Terms Cloud
.taxonomy-count {
padding-left: 0;
margin-left: 0;
Expand Down
11 changes: 10 additions & 1 deletion i18n/bn.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ other = "See all tags"
other = "Tag"
[ui_tags]
other = "Tags"

[ui_search_by_tags]
other = "Browse by Tags"
[ui_tags_intro]
other = "We've categorized the glossary terms. Use the filters to browse terms by tag."
[ui_or_search_by_tags]
other = "...or browse by tag"
[ui_select_all]
other = "Select All"
[ui_deselect_all]
other = "Deselect All"

# Footer text
[footer_all_rights_reserved]
Expand Down
11 changes: 10 additions & 1 deletion i18n/de.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ other = "See all tags"
other = "Tag"
[ui_tags]
other = "Tags"

[ui_search_by_tags]
other = "Browse by Tags"
[ui_tags_intro]
other = "We've categorized the glossary terms. Use the filters to browse terms by tag."
[ui_or_search_by_tags]
other = "...or browse by tag"
[ui_select_all]
other = "Select All"
[ui_deselect_all]
other = "Deselect All"

# Footer text
[footer_all_rights_reserved]
Expand Down
10 changes: 10 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ other = "See all tags"
other = "Tag"
[ui_tags]
other = "Tags"
[ui_search_by_tags]
other = "Browse by Tags"
[ui_tags_intro]
other = "We've categorized the glossary terms. Use the filters to browse terms by tag."
[ui_or_search_by_tags]
other = "...or browse by tag"
[ui_select_all]
other = "Select All"
[ui_deselect_all]
other = "Deselect All"

# Footer text
[footer_all_rights_reserved]
Expand Down
11 changes: 10 additions & 1 deletion i18n/es.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ other = "See all tags"
other = "Tag"
[ui_tags]
other = "Tags"

[ui_search_by_tags]
other = "Browse by Tags"
[ui_tags_intro]
other = "We've categorized the glossary terms. Use the filters to browse terms by tag."
[ui_or_search_by_tags]
other = "...or browse by tag"
[ui_select_all]
other = "Select All"
[ui_deselect_all]
other = "Deselect All"

# Footer text
[footer_all_rights_reserved]
Expand Down
10 changes: 10 additions & 0 deletions i18n/hi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ other = "See all tags"
other = "Tag"
[ui_tags]
other = "Tags"
[ui_search_by_tags]
other = "Browse by Tags"
[ui_tags_intro]
other = "We've categorized the glossary terms. Use the filters to browse terms by tag."
[ui_or_search_by_tags]
other = "...or browse by tag"
[ui_select_all]
other = "Select All"
[ui_deselect_all]
other = "Deselect All"

# Footer text
[footer_all_rights_reserved]
Expand Down
11 changes: 10 additions & 1 deletion i18n/it.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ other = "See all tags"
other = "Tag"
[ui_tags]
other = "Tags"

[ui_search_by_tags]
other = "Browse by Tags"
[ui_tags_intro]
other = "We've categorized the glossary terms. Use the filters to browse terms by tag."
[ui_or_search_by_tags]
other = "...or browse by tag"
[ui_select_all]
other = "Select All"
[ui_deselect_all]
other = "Deselect All"

# Footer text
[footer_all_rights_reserved]
Expand Down
10 changes: 10 additions & 0 deletions i18n/ko.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ other = "See all tags"
other = "Tag"
[ui_tags]
other = "Tags"
[ui_search_by_tags]
other = "Browse by Tags"
[ui_tags_intro]
other = "We've categorized the glossary terms. Use the filters to browse terms by tag."
[ui_or_search_by_tags]
other = "...or browse by tag"
[ui_select_all]
other = "Select All"
[ui_deselect_all]
other = "Deselect All"

# Footer text
[footer_all_rights_reserved]
Expand Down
10 changes: 10 additions & 0 deletions i18n/pt-br.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ other = "See all tags"
other = "Tag"
[ui_tags]
other = "Tags"
[ui_search_by_tags]
other = "Browse by Tags"
[ui_tags_intro]
other = "We've categorized the glossary terms. Use the filters to browse terms by tag."
[ui_or_search_by_tags]
other = "...or browse by tag"
[ui_select_all]
other = "Select All"
[ui_deselect_all]
other = "Deselect All"

# Footer text
[footer_all_rights_reserved]
Expand Down
Loading