From 5a79795e4f3a6a3bc1826e73e21f1de8a2b27299 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 3 Dec 2023 09:33:00 +1300 Subject: [PATCH 01/31] Indicate tags are clickable by cursor --- client/homebrew/pages/basePages/listPage/brewItem/brewItem.less | 1 + 1 file changed, 1 insertion(+) diff --git a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less index e8c7aa39a..e7a9ad548 100644 --- a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less +++ b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less @@ -59,6 +59,7 @@ white-space: nowrap; display: inline-block; font-weight: bold; + cursor : pointer; } &:hover{ .links{ From c6821819c7af88187d68f006e0c99ddfde626c0f Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 3 Dec 2023 09:36:17 +1300 Subject: [PATCH 02/31] Initial functionality pass on BrewItem --- .../pages/basePages/listPage/brewItem/brewItem.jsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx index 56c08e2af..41a7f07f8 100644 --- a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx +++ b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx @@ -20,7 +20,8 @@ const BrewItem = createClass({ authors : [], stubbed : true }, - reportError : ()=>{} + updateListFilter : ()=>{}, + reportError : ()=>{} }; }, @@ -44,6 +45,11 @@ const BrewItem = createClass({ }); }, + updateFilter : function(type, term){ + console.log(`BrewItem: TYPE: ${type}; TERM: ${term}`); + this.props.updateListFilter(type, term); + }, + renderDeleteBrewLink : function(){ if(!this.props.brew.editId) return; @@ -129,7 +135,7 @@ const BrewItem = createClass({ {brew.tags.map((tag, idx)=>{ const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/); - return {matches[2]}; + return {this.updateFilter('tag', matches[2]);}}>{matches[2]}; })} : <> From 0762b82c402aed07a71904189841a1816553d441 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 3 Dec 2023 09:46:02 +1300 Subject: [PATCH 03/31] Initial functionality of basic tag filtering --- .../pages/basePages/listPage/brewItem/brewItem.jsx | 2 +- client/homebrew/pages/basePages/listPage/listPage.jsx | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx index 41a7f07f8..c7f11d621 100644 --- a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx +++ b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx @@ -46,7 +46,7 @@ const BrewItem = createClass({ }, updateFilter : function(type, term){ - console.log(`BrewItem: TYPE: ${type}; TERM: ${term}`); + // console.log(`BrewItem: TYPE: ${type}; TERM: ${term}`); this.props.updateListFilter(type, term); }, diff --git a/client/homebrew/pages/basePages/listPage/listPage.jsx b/client/homebrew/pages/basePages/listPage/listPage.jsx index 2696d4e7a..bebd0b002 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.jsx +++ b/client/homebrew/pages/basePages/listPage/listPage.jsx @@ -82,7 +82,7 @@ const ListPage = createClass({ if(!brews || !brews.length) return
No Brews.
; return _.map(brews, (brew, idx)=>{ - return ; + return ; }); }, @@ -129,6 +129,7 @@ const ListPage = createClass({ }, handleFilterTextChange : function(e){ + // console.log(e); this.setState({ filterString : e.target.value, }); @@ -136,6 +137,12 @@ const ListPage = createClass({ return; }, + updateListFilter : function(type, term){ + // console.log(`ListPage: TYPE: ${type}; TERM: ${term}`); + const e = { target: { value: term } }; + this.handleFilterTextChange(e); + }, + updateUrl : function(filterTerm, sortType, sortDir){ const url = new URL(window.location.href); const urlParams = new URLSearchParams(url.search); From 6dcc6d36b725fbb3af8488537ace8679eca2f7b8 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 3 Dec 2023 12:23:39 +1300 Subject: [PATCH 04/31] Add separate tag filter --- .../pages/basePages/listPage/listPage.jsx | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/listPage.jsx b/client/homebrew/pages/basePages/listPage/listPage.jsx index bebd0b002..51af85cdb 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.jsx +++ b/client/homebrew/pages/basePages/listPage/listPage.jsx @@ -36,6 +36,7 @@ const ListPage = createClass({ return { filterString : this.props.query?.filter || '', + filterTags : [], sortType : this.props.query?.sort || null, sortDir : this.props.query?.dir || null, query : this.props.query, @@ -138,18 +139,31 @@ const ListPage = createClass({ }, updateListFilter : function(type, term){ - // console.log(`ListPage: TYPE: ${type}; TERM: ${term}`); - const e = { target: { value: term } }; - this.handleFilterTextChange(e); + this.updateUrl(this.state.filterString, this.state.sortType, this.state.sortDir, term); }, - updateUrl : function(filterTerm, sortType, sortDir){ + updateUrl : function(filterTerm, sortType, sortDir, filterTag=''){ const url = new URL(window.location.href); const urlParams = new URLSearchParams(url.search); urlParams.set('sort', sortType); urlParams.set('dir', sortDir); + let filterTags = urlParams.getAll('tag'); + if(filterTag != '') { + if(!filterTags.includes(filterTag)){ + filterTags.push(filterTag); + } else { + filterTags = filterTags.filter((tag)=>{ return tag != filterTag; }); + } + } + urlParams.delete('tag'); + filterTags.forEach((tag)=>{ urlParams.append('tag', tag); }); + + this.setState({ + filterTags + }); + if(!filterTerm) urlParams.delete('filter'); else @@ -201,6 +215,15 @@ const ListPage = createClass({ return brewStrings.includes(testString); }); + + if(this.state.filterTags.length > 0) { + brews = _.filter(brews, (brew)=>{ + return this.state.filterTags.some((tag)=>{ + return brew.tags?.includes(tag); + }); + }); + } + return _.orderBy(brews, (brew)=>{ return this.sortBrewOrder(brew); }, this.state.sortDir); }, From 041c7ed48f6126ca89f8780a2332952a35129df7 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 3 Dec 2023 12:48:20 +1300 Subject: [PATCH 05/31] Shift to AND operation for multiple tags --- client/homebrew/pages/basePages/listPage/listPage.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/pages/basePages/listPage/listPage.jsx b/client/homebrew/pages/basePages/listPage/listPage.jsx index 51af85cdb..e37fee8e5 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.jsx +++ b/client/homebrew/pages/basePages/listPage/listPage.jsx @@ -218,7 +218,7 @@ const ListPage = createClass({ if(this.state.filterTags.length > 0) { brews = _.filter(brews, (brew)=>{ - return this.state.filterTags.some((tag)=>{ + return this.state.filterTags.every((tag)=>{ return brew.tags?.includes(tag); }); }); From 632882d370241fc066fd42a4c752b2cd8974ad4d Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 3 Dec 2023 16:02:36 +1300 Subject: [PATCH 06/31] Use the whole tag in the tag filter --- client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx index c7f11d621..eb8909737 100644 --- a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx +++ b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx @@ -135,7 +135,7 @@ const BrewItem = createClass({ {brew.tags.map((tag, idx)=>{ const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/); - return {this.updateFilter('tag', matches[2]);}}>{matches[2]}; + return {this.updateFilter('tag', tag);}}>{matches[2]}; })} : <> From 6c4dad675f608a873bb69f4257b66cf32beac7ad Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 3 Dec 2023 16:34:12 +1300 Subject: [PATCH 07/31] Switch to case-insensitive tag comparison --- .../pages/basePages/listPage/listPage.jsx | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/listPage.jsx b/client/homebrew/pages/basePages/listPage/listPage.jsx index e37fee8e5..499bbfb5b 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.jsx +++ b/client/homebrew/pages/basePages/listPage/listPage.jsx @@ -207,22 +207,28 @@ const ListPage = createClass({ const testString = _.deburr(this.state.filterString).toLowerCase(); brews = _.filter(brews, (brew)=>{ + // Filter by user entered text const brewStrings = _.deburr([ brew.title, brew.description, brew.tags].join('\n') .toLowerCase()); - return brewStrings.includes(testString); - }); + const filterTextTest = brewStrings.includes(testString); - if(this.state.filterTags.length > 0) { - brews = _.filter(brews, (brew)=>{ - return this.state.filterTags.every((tag)=>{ - return brew.tags?.includes(tag); + // Filter by user selected tags + let filterTagTest = true; + if(this.state.filterTags.length > 0){ + filterTagTest = this.state.filterTags.every((tag)=>{ + if(typeof brew.tags == 'string') return false; + return brew.tags.findIndex((brewTag)=>{ + return brewTag.toLowerCase() == tag.toLowerCase(); + }) >= 0; }); - }); - } + } + + return filterTextTest && filterTagTest; + }); return _.orderBy(brews, (brew)=>{ return this.sortBrewOrder(brew); }, this.state.sortDir); }, From 875e1023fc9dc596482ac1c15c97f9f95a139fc1 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 3 Dec 2023 17:09:33 +1300 Subject: [PATCH 08/31] Add styling for different tag types --- .../basePages/listPage/brewItem/brewItem.less | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less index e7a9ad548..c96732799 100644 --- a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less +++ b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less @@ -60,6 +60,26 @@ display: inline-block; font-weight: bold; cursor : pointer; + &.type { + background-color: #0080003b; + color: #008000; + border-color: #008000; + } + &.group { + background-color: #5050503b; + color: #000000; + border-color: #000000; + } + &.meta { + background-color: #0000803b; + color: #000080; + border-color: #000080; + } + &.system { + background-color: #8000003b; + color: #800000; + border-color: #800000; + } } &:hover{ .links{ From 995d1c63d8742734fdc97c58c1ecd542e710dbb6 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 3 Dec 2023 17:17:03 +1300 Subject: [PATCH 09/31] Make tag removal from URL case insensitive --- client/homebrew/pages/basePages/listPage/listPage.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/listPage.jsx b/client/homebrew/pages/basePages/listPage/listPage.jsx index 499bbfb5b..4cc079e52 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.jsx +++ b/client/homebrew/pages/basePages/listPage/listPage.jsx @@ -151,10 +151,10 @@ const ListPage = createClass({ let filterTags = urlParams.getAll('tag'); if(filterTag != '') { - if(!filterTags.includes(filterTag)){ + if(filterTags.findIndex((tag)=>{return tag.toLowerCase()==filterTag.toLowerCase();}) == -1){ filterTags.push(filterTag); } else { - filterTags = filterTags.filter((tag)=>{ return tag != filterTag; }); + filterTags = filterTags.filter((tag)=>{ return tag.toLowerCase() != filterTag.toLowerCase(); }); } } urlParams.delete('tag'); From 9e12ab71f84bde4e05b59bf8c022ca7303d134b3 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 3 Dec 2023 17:46:55 +1300 Subject: [PATCH 10/31] Switch to better brew.tags array check --- client/homebrew/pages/basePages/listPage/listPage.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/listPage.jsx b/client/homebrew/pages/basePages/listPage/listPage.jsx index 4cc079e52..f5c7e6e5d 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.jsx +++ b/client/homebrew/pages/basePages/listPage/listPage.jsx @@ -219,8 +219,8 @@ const ListPage = createClass({ // Filter by user selected tags let filterTagTest = true; if(this.state.filterTags.length > 0){ - filterTagTest = this.state.filterTags.every((tag)=>{ - if(typeof brew.tags == 'string') return false; + filterTagTest = this.state.filterTags?.every((tag)=>{ + if(!Array.isArray(brew.tags)) return false; return brew.tags.findIndex((brewTag)=>{ return brewTag.toLowerCase() == tag.toLowerCase(); }) >= 0; From ab8716d071f4657a645a66ce1b94cedba551665a Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 3 Dec 2023 18:40:20 +1300 Subject: [PATCH 11/31] Add icons before special tags --- .../basePages/listPage/brewItem/brewItem.less | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less index c96732799..c634fa2d1 100644 --- a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less +++ b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less @@ -64,21 +64,45 @@ background-color: #0080003b; color: #008000; border-color: #008000; + &:before{ + content: '\f0ad'; + font-family: 'Font Awesome 5 Free'; + font-size: 12px; + margin-right: 3px; + } } &.group { background-color: #5050503b; color: #000000; border-color: #000000; + &:before{ + content: '\f500'; + font-family: 'Font Awesome 5 Free'; + font-size: 12px; + margin-right: 3px; + } } &.meta { background-color: #0000803b; color: #000080; border-color: #000080; + &:before{ + content: '\f05a'; + font-family: 'Font Awesome 5 Free'; + font-size: 12px; + margin-right: 3px; + } } &.system { background-color: #8000003b; color: #800000; border-color: #800000; + &:before{ + content: '\f518'; + font-family: 'Font Awesome 5 Free'; + font-size: 12px; + margin-right: 3px; + } } } &:hover{ From cfecc001aa01dfce4c5d6c5b59e9dd069af4b111 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 3 Dec 2023 19:14:20 +1300 Subject: [PATCH 12/31] Add brew tag sorting --- client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx index eb8909737..f81d3816b 100644 --- a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx +++ b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx @@ -115,6 +115,9 @@ const BrewItem = createClass({ const brew = this.props.brew; if(Array.isArray(brew.tags)) { // temporary fix until dud tags are cleaned brew.tags = brew.tags?.filter((tag)=>tag); //remove tags that are empty strings + brew.tags.sort((a, b)=>{ + return a.indexOf(':') - b.indexOf(':') != 0 ? a.indexOf(':') - b.indexOf(':') : a.localeCompare(b); + }); } const dateFormatString = 'YYYY-MM-DD HH:mm:ss'; From 7e98f7941650fb728a5e1ff1f0f7a7844a1cb89f Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 4 Dec 2023 07:53:49 +1300 Subject: [PATCH 13/31] Make alphabetical tag sorting case insensitive --- client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx index f81d3816b..bdbf269f9 100644 --- a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx +++ b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx @@ -116,7 +116,7 @@ const BrewItem = createClass({ if(Array.isArray(brew.tags)) { // temporary fix until dud tags are cleaned brew.tags = brew.tags?.filter((tag)=>tag); //remove tags that are empty strings brew.tags.sort((a, b)=>{ - return a.indexOf(':') - b.indexOf(':') != 0 ? a.indexOf(':') - b.indexOf(':') : a.localeCompare(b); + return a.indexOf(':') - b.indexOf(':') != 0 ? a.indexOf(':') - b.indexOf(':') : a.toLowerCase().localeCompare(b.toLowerCase()); }); } const dateFormatString = 'YYYY-MM-DD HH:mm:ss'; From 2c997458b29fe620f92fc3c4c4ee4fad54dbb74e Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 4 Dec 2023 07:54:19 +1300 Subject: [PATCH 14/31] Simplify filter tag test --- client/homebrew/pages/basePages/listPage/listPage.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/listPage.jsx b/client/homebrew/pages/basePages/listPage/listPage.jsx index f5c7e6e5d..475172d5a 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.jsx +++ b/client/homebrew/pages/basePages/listPage/listPage.jsx @@ -219,8 +219,7 @@ const ListPage = createClass({ // Filter by user selected tags let filterTagTest = true; if(this.state.filterTags.length > 0){ - filterTagTest = this.state.filterTags?.every((tag)=>{ - if(!Array.isArray(brew.tags)) return false; + filterTagTest = Array.isArray(brew.tags) && this.state.filterTags?.every((tag)=>{ return brew.tags.findIndex((brewTag)=>{ return brewTag.toLowerCase() == tag.toLowerCase(); }) >= 0; From efecfac68afed103452beb04e791f5673f62842a Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 4 Dec 2023 08:10:32 +1300 Subject: [PATCH 15/31] Simplify tag styling --- .../basePages/listPage/brewItem/brewItem.less | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less index c634fa2d1..a8bc4473c 100644 --- a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less +++ b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less @@ -60,15 +60,17 @@ display: inline-block; font-weight: bold; cursor : pointer; + &:before { + font-family: 'Font Awesome 5 Free'; + font-size: 12px; + margin-right: 3px; + } &.type { background-color: #0080003b; color: #008000; border-color: #008000; &:before{ content: '\f0ad'; - font-family: 'Font Awesome 5 Free'; - font-size: 12px; - margin-right: 3px; } } &.group { @@ -77,9 +79,6 @@ border-color: #000000; &:before{ content: '\f500'; - font-family: 'Font Awesome 5 Free'; - font-size: 12px; - margin-right: 3px; } } &.meta { @@ -88,9 +87,6 @@ border-color: #000080; &:before{ content: '\f05a'; - font-family: 'Font Awesome 5 Free'; - font-size: 12px; - margin-right: 3px; } } &.system { @@ -99,9 +95,6 @@ border-color: #800000; &:before{ content: '\f518'; - font-family: 'Font Awesome 5 Free'; - font-size: 12px; - margin-right: 3px; } } } From d262f586fcfd4b69f28a468425ae3a3c53bd45f1 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 4 Dec 2023 21:45:59 +1300 Subject: [PATCH 16/31] Add basic selected tags display to List Page --- .../pages/basePages/listPage/listPage.jsx | 20 +++++- .../pages/basePages/listPage/listPage.less | 69 ++++++++++++++++++- 2 files changed, 85 insertions(+), 4 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/listPage.jsx b/client/homebrew/pages/basePages/listPage/listPage.jsx index 475172d5a..441fb828f 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.jsx +++ b/client/homebrew/pages/basePages/listPage/listPage.jsx @@ -158,7 +158,12 @@ const ListPage = createClass({ } } urlParams.delete('tag'); + // Add tags to URL in the order they were clicked filterTags.forEach((tag)=>{ urlParams.append('tag', tag); }); + // Sort tags before updating state + filterTags.sort((a, b)=>{ + return a.indexOf(':') - b.indexOf(':') != 0 ? a.indexOf(':') - b.indexOf(':') : a.toLowerCase().localeCompare(b.toLowerCase()); + }); this.setState({ filterTags @@ -187,6 +192,17 @@ const ListPage = createClass({ ; }, + renderTagsOptions : function(){ + if(this.state.filterTags?.length == 0) return; + console.log('renderTags'); + return
+ {_.map(this.state.filterTags, (tag, idx)=>{ + const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/); + return {this.updateListFilter('tag', tag);}}>{matches[2]}; + })} +
; + }, + renderSortOptions : function(){ return
Sort by :
@@ -197,9 +213,6 @@ const ListPage = createClass({ {/* {this.renderSortOption('Latest', 'latest')} */} {this.renderFilterOption()} - - -
; }, @@ -258,6 +271,7 @@ const ListPage = createClass({ {this.props.navItems} {this.renderSortOptions()} + {this.renderTagsOptions()}
diff --git a/client/homebrew/pages/basePages/listPage/listPage.less b/client/homebrew/pages/basePages/listPage/listPage.less index bcffbf3e7..e2e079f24 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.less +++ b/client/homebrew/pages/basePages/listPage/listPage.less @@ -52,7 +52,7 @@ } } } - .sort-container{ + .sort-container { font-family : 'Open Sans', sans-serif; position : sticky; top : 0; @@ -124,4 +124,71 @@ } + .tags-container { + font-family : 'Open Sans', sans-serif; + position : sticky; + top : 0; + left : 0; + width : 100%; + height : 30px; + background-color : #555; + border-top : 1px solid #666; + border-bottom : 1px solid #666; + color : white; + text-align : center; + z-index : 1; + display : flex; + justify-content : center; + align-items : center; + column-gap : 15px; + row-gap : 5px; + flex-wrap : wrap; + span { + text-transform : uppercase; + font-family : 'Open Sans', sans-serif; + font-size : 11px; + font-weight : bold; + border : 1px solid; + border-radius : 3px; + padding : 3px; + cursor : pointer; + &:before { + font-family: 'Font Awesome 5 Free'; + font-size: 12px; + margin-right: 3px; + } + &.type { + background-color: #0080003b; + color: #008000; + border-color: #008000; + &:before{ + content: '\f0ad'; + } + } + &.group { + background-color: #5050503b; + color: #000000; + border-color: #000000; + &:before{ + content: '\f500'; + } + } + &.meta { + background-color: #0000803b; + color: #000080; + border-color: #000080; + &:before{ + content: '\f05a'; + } + } + &.system { + background-color: #8000003b; + color: #800000; + border-color: #800000; + &:before{ + content: '\f518'; + } + } + } + } } From 34be05ac51cb746a8e2791c19d67518563214b4d Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 5 Dec 2023 10:00:25 +1300 Subject: [PATCH 17/31] Add X icon to tag window --- .../pages/basePages/listPage/listPage.less | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/listPage.less b/client/homebrew/pages/basePages/listPage/listPage.less index e2e079f24..3b31e7d63 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.less +++ b/client/homebrew/pages/basePages/listPage/listPage.less @@ -157,10 +157,17 @@ font-size: 12px; margin-right: 3px; } + &:after { + content: '\f00d'; + font-family: 'Font Awesome 5 Free'; + font-size: 12px; + margin-left: 3px; + color: #dfdfdf; + } &.type { background-color: #0080003b; - color: #008000; - border-color: #008000; + color: #00d000; + border-color: #00a000; &:before{ content: '\f0ad'; } @@ -175,16 +182,16 @@ } &.meta { background-color: #0000803b; - color: #000080; - border-color: #000080; + color: #0000d0; + border-color: #0000a0; &:before{ content: '\f05a'; } } &.system { background-color: #8000003b; - color: #800000; - border-color: #800000; + color: #d00000; + border-color: #a00000; &:before{ content: '\f518'; } From 2f13b895105dd9d15baff6aca2de6bc22c915de9 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 5 Dec 2023 12:41:27 +1300 Subject: [PATCH 18/31] Styling tweak --- .../pages/basePages/listPage/listPage.less | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/listPage.less b/client/homebrew/pages/basePages/listPage/listPage.less index 3b31e7d63..2343141c4 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.less +++ b/client/homebrew/pages/basePages/listPage/listPage.less @@ -152,6 +152,7 @@ border-radius : 3px; padding : 3px; cursor : pointer; + color: #dfdfdf; &:before { font-family: 'Font Awesome 5 Free'; font-size: 12px; @@ -162,35 +163,30 @@ font-family: 'Font Awesome 5 Free'; font-size: 12px; margin-left: 3px; - color: #dfdfdf; } &.type { - background-color: #0080003b; - color: #00d000; + background-color: #008000; border-color: #00a000; &:before{ content: '\f0ad'; } } &.group { - background-color: #5050503b; - color: #000000; + background-color: #505050; border-color: #000000; &:before{ content: '\f500'; } } &.meta { - background-color: #0000803b; - color: #0000d0; + background-color: #000080; border-color: #0000a0; &:before{ content: '\f05a'; } } &.system { - background-color: #8000003b; - color: #d00000; + background-color: #800000; border-color: #a00000; &:before{ content: '\f518'; From 75809a5f425137e3f880e0522019b3b16d2a6153 Mon Sep 17 00:00:00 2001 From: Sean Robertson Date: Wed, 6 Dec 2023 08:28:51 +1300 Subject: [PATCH 19/31] Remove forced uppercase --- client/homebrew/pages/basePages/listPage/listPage.less | 1 - 1 file changed, 1 deletion(-) diff --git a/client/homebrew/pages/basePages/listPage/listPage.less b/client/homebrew/pages/basePages/listPage/listPage.less index 2343141c4..eb0f11d64 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.less +++ b/client/homebrew/pages/basePages/listPage/listPage.less @@ -144,7 +144,6 @@ row-gap : 5px; flex-wrap : wrap; span { - text-transform : uppercase; font-family : 'Open Sans', sans-serif; font-size : 11px; font-weight : bold; From 323d84974c09a72cc151f537f0046686e3d5dfd1 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Sat, 10 Feb 2024 22:29:16 -0600 Subject: [PATCH 20/31] Combine nav and navbar styles - moves all the nav.less styling to navbar.less in the `client` directory - deletes nav.less - changes the nav.jsx import of styles to navbar.less - stylelint navbar.less - added a couple comments about easy future changes. --- client/homebrew/navbar/navbar.less | 584 ++++++++++++++++------------- shared/naturalcrit/nav/nav.jsx | 2 +- shared/naturalcrit/nav/nav.less | 97 ----- 3 files changed, 332 insertions(+), 351 deletions(-) delete mode 100644 shared/naturalcrit/nav/nav.less diff --git a/client/homebrew/navbar/navbar.less b/client/homebrew/navbar/navbar.less index 036f52cf4..73671abbb 100644 --- a/client/homebrew/navbar/navbar.less +++ b/client/homebrew/navbar/navbar.less @@ -1,65 +1,339 @@ @import "naturalcrit/styles/colors.less"; + @navbarHeight : 28px; + @keyframes pinkColoring { - 0% {color : pink;} - 50% {color : pink;} - 75% {color : red;} - 100% {color : pink;} + 0% { color : pink; } + 50% { color : pink; } + 75% { color : red; } + 100% { color : pink; } } -.homebrew nav { - .homebrewLogo { - .animate(color); - font-family : CodeBold; - font-size : 12px; - color : white; - div { - margin-top : 2px; - margin-bottom : -2px; - } - &:hover { - color : @blue; - } + +@keyframes glideDropDown { + 0% { + background-color : #333333; + opacity : 0; + transform : translate(0px, -100%); } - .editTitle.navItem { - padding : 2px 12px; - input { - font-family : "Open Sans", sans-serif; - font-size : 12px; - font-weight : 800; - width : 250px; - margin : 0; - padding : 2px; - text-align : center; - color : white; - border : 1px solid @blue; - outline : none; - background-color : transparent; - } - .charCount { - display : inline-block; - margin-left : 8px; - text-align : right; - vertical-align : bottom; - color : #666; - &.max { - color : @red; + 100% { + background-color : #333333; + opacity : 1; + transform : translate(0px, 0px); + } +} + +.homebrew nav { + background-color : #333333; + .navContent { + position : relative; + z-index : 2; + display : flex; + justify-content : space-between; + .navSection { + display : flex; + align-items : center; + // "NaturalCrit" logo + .navLogo { + display : block; + margin-top : 0px; + margin-right : 8px; + margin-left : 8px; + color : white; + text-decoration : none; + &:hover { + .name { color : @orange; } + svg { fill : @orange; } + } + svg { + height : 13px; + margin-right : 0.2em; + cursor : pointer; + fill : white; + } + span.name { + font-family : 'CodeLight'; + font-size : 15px; + span.crit { font-family : 'CodeBold'; } + small { + font-family : 'Open Sans'; + font-size : 0.3em; + font-weight : 800; + text-transform : uppercase; + } + } + } + &:last-child .navItem { border-left : 1px solid #666666; } + .navItem { + #backgroundColorsHover; + .animate(background-color); + padding : 8px 12px; + font-size : 10px; + font-weight : 800; + line-height : 13px; + color : white; + text-decoration : none; + text-transform : uppercase; + cursor : pointer; + background-color : #333333; + i { + float : right; + margin-left : 5px; + font-size : 13px; + } + &.patreon { + border-right : 1px solid #666666; + border-left : 1px solid #666666; + &:hover i { color : red; } + i { + color : pink; + .animate(color); + animation-name : pinkColoring; + animation-duration : 2s; + } + } + &.editTitle { // this is not needed at all currently - you used to be able to edit the title via the navbar. + padding : 2px 12px; + input { + width : 250px; + padding : 2px; + margin : 0; + font-family : 'Open Sans', sans-serif; + font-size : 12px; + font-weight : 800; + color : white; + text-align : center; + background-color : transparent; + border : 1px solid @blue; + outline : none; + } + .charCount { + display : inline-block; + margin-left : 8px; + color : #666666; + text-align : right; + vertical-align : bottom; + &.max { color : @red; } + } + } + &.brewTitle { + flex-grow : 1; + font-size : 12px; + font-weight : 800; + color : white; + text-align : center; + text-transform : initial; + background-color : transparent; + } + // "The Homebrewery" logo + &.homebrewLogo { + .animate(color); + font-family : 'CodeBold'; + font-size : 12px; + color : white; + div { + margin-top : 2px; + margin-bottom : -2px; + } + &:hover { color : @blue; } + } + &.metadata { + position : relative; + display : flex; + flex-grow : 1; + align-items : center; + height : 100%; + padding : 0; + i { margin-right : 10px;} + .window { + position : absolute; + bottom : 0; + left : 50%; + z-index : -1; + display : flex; + flex-flow : row wrap; + align-content : baseline; + justify-content : flex-start; + width : 440px; + max-height : ~"calc(100vh - 28px)"; + padding : 0 10px 5px; + margin : 0 auto; + background-color : #333333; + border : 3px solid #444444; + border-top : unset; + border-radius : 0 0 5px 5px; + box-shadow : inset 0 7px 9px -7px #111111; + transition : transform 0.4s, opacity 0.4s; + &.active { + opacity : 1; + transform : translateX(-50%) translateY(100%); + } + &.inactive { + opacity : 0; + transform : translateX(-50%) translateY(0%); + } + .row { + display : flex; + flex-flow : row wrap; + width : 100%; + h4 { + box-sizing : border-box; + display : block; + flex-basis : 20%; + flex-grow : 1; + min-width : 76px; + padding : 5px 0; + color : #BBBBBB; + text-align : center; + } + p { + flex-basis : 80%; + flex-grow : 1; + padding : 5px 0; + font-family : 'Open Sans', sans-serif; + font-size : 10px; + font-weight : normal; + text-transform : initial; + .tag { + display : inline-block; + padding : 2px; + margin : 2px 2px; + background-color : #444444; + border : 2px solid grey; + border-radius : 5px; + } + a.userPageLink { + color : white; + text-decoration : none; + &:hover { text-decoration : underline; } + } + } + &:nth-of-type(even) { background-color : #555555; } + } + } + } + &.warning { + position : relative; + color : white; + background-color : @orange; + &:hover > .dropdown { visibility : visible; } + .dropdown { + position : absolute; + top : 28px; + left : 0; + z-index : 10000; + box-sizing : border-box; + display : block; + width : 100%; + padding : 13px 5px; + text-align : center; + visibility : hidden; + background-color : #333333; + } + } + &.account { + min-width : 100px; + &.username { text-transform : none;} + } + } + .navDropdownContainer { + position : relative; + .navDropdown { + position : absolute; + top : 28px; + left : 0px; + z-index : 10000; + width : 100%; + max-height : calc(100vh - 28px); + overflow : hidden auto; + .navItem { + position : relative; + display : block; + width : 100%; + padding : 8px 5px; + border : 1px solid #888888; + border-bottom : 0; + animation-name : glideDropDown; + animation-duration : 0.4s; + } + } + &.recent { + position : relative; + .navDropdown .navItem { + #backgroundColorsHover; + .animate(background-color); + position : relative; + box-sizing : border-box; + display : block; + max-height : ~"calc(100vh - 28px)"; // I don't think is correct syntax, but leaving it in for now... (Gazook89) + padding : 8px 5px 13px; + overflow : hidden auto; + color : white; + text-decoration : none; + background-color : #333333; + border-top : 1px solid #888888; + scrollbar-color : #666666 #333333; + scrollbar-width : thin; + .clear { + position : absolute; + top : 50%; + right : 0; + display : none; + width : 20px; + height : 100%; + background-color : #333333; + border-radius : 3px; + opacity : 70%; + transform : translateY(-50%); + &:hover { opacity : 100%; } + i { + width : 100%; + height : 100%; + margin : 0; + font-size : 10px; + text-align : center; + } + } + &:hover { + background-color : @blue; + .clear { + display : grid; + place-content : center; + } + } + .title { + display : inline-block; + width : 100%; + overflow : hidden auto; + text-overflow : ellipsis; + white-space : nowrap; + } + .time { + position : absolute; + right : 2px; + bottom : 2px; + font-size : 0.7em; + color : #888888; + } + &.header { + box-sizing : border-box; + display : block; + padding : 5px 0; + color : #BBBBBB; + text-align : center; + background-color : #333333; + border-top : 1px solid #888888; + &:nth-of-type(1) { background-color : darken(@teal, 20%); } + &:nth-of-type(2) { background-color : darken(@purple, 30%); } + } + } + } } } } - .brewTitle.navItem { - font-size : 12px; - font-weight : 800; - height : 100%; - text-align : center; - text-transform : initial; - color : white; - background-color : transparent; - flex-grow : 1; - } + + // this should likely be refactored into .navDropdownContainer .save-menu { - .dropdown { - z-index : 1000; - } + .dropdown { z-index : 1000; } .navItem i.fa-power-off { color : red; &.active { @@ -68,205 +342,9 @@ } } } - .patreon.navItem { - border-right : 1px solid #666; - border-left : 1px solid #666; - &:hover i { - color : red; - } - i { - .animate(color); - animation-name : pinkColoring; - animation-duration : 2s; - color : pink; - } - } - .recent.navDropdownContainer { - position : relative; - .navDropdown .navItem { - overflow : hidden auto; - max-height : ~"calc(100vh - 28px)"; - scrollbar-color : #666 #333; - scrollbar-width : thin; - - #backgroundColorsHover; - .animate(background-color); - position : relative; - display : block; - overflow : clip; - box-sizing : border-box; - padding : 8px 5px 13px; - text-decoration : none; - color : white; - border-top : 1px solid #888; - background-color : #333; - .clear { - position : absolute; - top : 50%; - right : 0; - display : none; - width : 20px; - height : 100%; - transform : translateY(-50%); - opacity : 70%; - border-radius : 3px; - background-color : #333; - &:hover { - opacity : 100%; - } - i { - font-size : 10px; - width : 100%; - height : 100%; - margin : 0; - text-align : center; - } - } - &:hover { - background-color : @blue; - .clear { - display : grid; - place-content : center; - } - } - .title { - display : inline-block; - overflow : hidden; - width : 100%; - white-space : nowrap; - text-overflow : ellipsis; - } - .time { - font-size : 0.7em; - position : absolute; - right : 2px; - bottom : 2px; - color : #888; - } - &.header { - display : block; - box-sizing : border-box; - padding : 5px 0; - text-align : center; - color : #BBB; - border-top : 1px solid #888; - background-color : #333; - &:nth-of-type(1) { - background-color : darken(@teal, 20%); - } - &:nth-of-type(2) { - background-color : darken(@purple, 30%); - } - } - } - } - .metadata.navItem { - position : relative; - display : flex; - align-items : center; - height : 100%; - padding : 0; - flex-grow : 1; - i { - margin-right : 10px; - } - .window { - position : absolute; - z-index : -1; - bottom : 0; - left : 50%; - display : flex; - justify-content : flex-start; - width : 440px; - max-height : ~"calc(100vh - 28px)"; - margin : 0 auto; - padding : 0 10px 5px; - transition : transform 0.4s, opacity 0.4s; - border : 3px solid #444; - border-top : unset; - border-radius : 0 0 5px 5px; - background-color : #333; - box-shadow : inset 0 7px 9px -7px #111; - flex-flow : row wrap; - align-content : baseline; - &.active { - transform : translateX(-50%) translateY(100%); - opacity : 1; - } - &.inactive { - transform : translateX(-50%) translateY(0%); - opacity : 0; - } - .row { - display : flex; - width : 100%; - flex-flow : row wrap; - h4 { - display : block; - box-sizing : border-box; - min-width : 76px; - padding : 5px 0; - text-align : center; - color : #BBB; - flex-basis : 20%; - flex-grow : 1; - } - p { - font-family : "Open Sans", sans-serif; - font-size : 10px; - font-weight : normal; - padding : 5px 0; - text-transform : initial; - flex-basis : 80%; - flex-grow : 1; - .tag { - display : inline-block; - margin : 2px 2px; - padding : 2px; - border : 2px solid grey; - border-radius : 5px; - background-color : #444; - } - a.userPageLink { - text-decoration : none; - color : white; - &:hover { - text-decoration : underline; - } - } - } - &:nth-of-type(even) { - background-color : #555; - } - } - } - } - .warning.navItem { - position : relative; - color : white; - background-color : @orange; - &:hover > .dropdown { - visibility : visible; - } - .dropdown { - position : absolute; - z-index : 10000; - top : 28px; - left : 0; - display : block; - visibility : hidden; - box-sizing : border-box; - width : 100%; - padding : 13px 5px; - text-align : center; - background-color : #333; - } - } - .account.navItem { - min-width : 100px; - } - .account.username.navItem { - text-transform : none; - } + + + + } diff --git a/shared/naturalcrit/nav/nav.jsx b/shared/naturalcrit/nav/nav.jsx index 3c7fd7c5e..04b7037dd 100644 --- a/shared/naturalcrit/nav/nav.jsx +++ b/shared/naturalcrit/nav/nav.jsx @@ -1,4 +1,4 @@ -require('./nav.less'); +require('client/homebrew/navbar/navbar.less'); const React = require('react'); const { useState, useRef, useEffect } = React; const createClass = require('create-react-class'); diff --git a/shared/naturalcrit/nav/nav.less b/shared/naturalcrit/nav/nav.less deleted file mode 100644 index e3a58a33a..000000000 --- a/shared/naturalcrit/nav/nav.less +++ /dev/null @@ -1,97 +0,0 @@ -@import '../styles/colors'; -@keyframes glideDropDown { - 0% {transform : translate(0px, -100%); - opacity : 0; - background-color: #333;} - 100% {transform : translate(0px, 0px); - opacity : 1; - background-color: #333;} -} -nav{ - background-color : #333; - .navContent{ - position : relative; - display : flex; - justify-content : space-between; - z-index : 2; - } - .navSection{ - display : flex; - align-items : center; - } - .navLogo{ - display : block; - margin-top : 0px; - margin-right : 8px; - margin-left : 8px; - color : white; - text-decoration : none; - &:hover{ - .name{ color : @orange; } - svg{ fill : @orange } - } - svg{ - height : 13px; - margin-right : 0.2em; - cursor : pointer; - fill : white; - } - span.name{ - font-family : 'CodeLight'; - font-size : 15px; - span.crit{ - font-family : 'CodeBold'; - } - small{ - font-family : 'Open Sans'; - font-size : 0.3em; - font-weight : 800; - text-transform : uppercase; - } - } - } - .navItem{ - #backgroundColorsHover; - .animate(background-color); - padding : 8px 12px; - cursor : pointer; - background-color : #333; - font-size : 10px; - font-weight : 800; - color : white; - text-decoration : none; - text-transform : uppercase; - line-height : 13px; - i{ - margin-left : 5px; - font-size : 13px; - float : right; - } - } - .navSection:last-child .navItem{ - border-left : 1px solid #666; - } - .navDropdownContainer{ - position: relative; - .navDropdown { - position : absolute; - top : 28px; - left : 0px; - z-index : 10000; - width : 100%; - overflow : hidden auto; - max-height : calc(100vh - 28px); - .navItem{ - animation-name: glideDropDown; - animation-duration: 0.4s; - position : relative; - display : block; - width : 100%; - vertical-align : middle; - padding : 8px 5px; - border : 1px solid #888; - border-bottom : 0; - } - } - } -} From 46a0a66fb6ebdf53f74a5bb039463b0835f9c2fe Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Thu, 22 Feb 2024 19:20:42 +1300 Subject: [PATCH 21/31] Use currentColor once instead of multiple border-color declarations --- .../homebrew/pages/basePages/listPage/brewItem/brewItem.less | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less index 46a347b3e..9bee4e5eb 100644 --- a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less +++ b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less @@ -63,6 +63,7 @@ white-space: nowrap; display: inline-block; font-weight: bold; + border-color: currentColor; cursor : pointer; &:before { font-family: 'Font Awesome 5 Free'; @@ -72,7 +73,6 @@ &.type { background-color: #0080003b; color: #008000; - border-color: #008000; &:before{ content: '\f0ad'; } @@ -80,7 +80,6 @@ &.group { background-color: #5050503b; color: #000000; - border-color: #000000; &:before{ content: '\f500'; } @@ -88,7 +87,6 @@ &.meta { background-color: #0000803b; color: #000080; - border-color: #000080; &:before{ content: '\f05a'; } @@ -96,7 +94,6 @@ &.system { background-color: #8000003b; color: #800000; - border-color: #800000; &:before{ content: '\f518'; } From 43209186ee52cf71bb9150e05ab8237d6334def9 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Thu, 22 Feb 2024 19:27:17 +1300 Subject: [PATCH 22/31] Remove obsolete styling from tags-container --- client/homebrew/pages/basePages/listPage/listPage.less | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/listPage.less b/client/homebrew/pages/basePages/listPage/listPage.less index bf2c89e83..0aa4a278d 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.less +++ b/client/homebrew/pages/basePages/listPage/listPage.less @@ -126,18 +126,11 @@ } .tags-container { - font-family : 'Open Sans', sans-serif; - position : sticky; - top : 0; - left : 0; - width : 100%; height : 30px; background-color : #555; border-top : 1px solid #666; - border-bottom : 1px solid #666; + border-bottom : 1px solid #666; color : white; - text-align : center; - z-index : 1; display : flex; justify-content : center; align-items : center; From 7d755fe2a349f646db9dafa4339a8155836f3fe8 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Fri, 23 Feb 2024 11:35:57 -0600 Subject: [PATCH 23/31] Fix syntax highlighting on sub and superscript I did not test this very robustly, it seems. --- client/homebrew/editor/editor.jsx | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index d79d2ce4e..3fa936ab7 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -160,21 +160,25 @@ const Editor = createClass({ } } - // Superscript - if(line.includes('\^')) { - const regex = /\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^/g; - let match; - while ((match = regex.exec(line)) != null) { - codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[1]) - 1 }, { line: lineNumber, ch: line.indexOf(match[1]) + match[1].length + 1 }, { className: 'superscript' }); - } - } - // Subscript if(line.includes('^^')) { + //const regex = /\^\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^\^/g; const regex = /\^\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^\^/g; let match; while ((match = regex.exec(line)) != null) { - codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[1]) - 2 }, { line: lineNumber, ch: line.indexOf(match[1]) + match[1].length + 2 }, { className: 'subscript' }); + if(line.indexOf(match[0]) - 1 != '^') { + codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[0]) }, { line: lineNumber, ch: line.indexOf(match[0]) + match[0].length }, { className: 'subscript' }); + } + } + } + + // Superscript + if(line.includes('^')) { + //const regex = /\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^/g; + const regex = /\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^/g; + let match; + while ((match = regex.exec(line)) != null) { + codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[0]) }, { line: lineNumber, ch: line.indexOf(match[0]) + match[0].length }, { className: 'superscript' }); } } From a2b97abb2ed0674471857ba91d810c01e4b06819 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 25 Feb 2024 11:47:34 +1300 Subject: [PATCH 24/31] Remove missed console.log debugging lines --- client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx | 1 - client/homebrew/pages/basePages/listPage/listPage.jsx | 2 -- 2 files changed, 3 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx index e21f6e8a3..869fb3044 100644 --- a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx +++ b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx @@ -46,7 +46,6 @@ const BrewItem = createClass({ }, updateFilter : function(type, term){ - // console.log(`BrewItem: TYPE: ${type}; TERM: ${term}`); this.props.updateListFilter(type, term); }, diff --git a/client/homebrew/pages/basePages/listPage/listPage.jsx b/client/homebrew/pages/basePages/listPage/listPage.jsx index 261d6ec6b..096c6bbb7 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.jsx +++ b/client/homebrew/pages/basePages/listPage/listPage.jsx @@ -130,7 +130,6 @@ const ListPage = createClass({ }, handleFilterTextChange : function(e){ - // console.log(e); this.setState({ filterString : e.target.value, }); @@ -194,7 +193,6 @@ const ListPage = createClass({ renderTagsOptions : function(){ if(this.state.filterTags?.length == 0) return; - console.log('renderTags'); return
{_.map(this.state.filterTags, (tag, idx)=>{ const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/); From 26263c0bf876397a339e60197546bf0821ffb4f3 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 26 Feb 2024 13:01:13 +1300 Subject: [PATCH 25/31] Remove unused function parameter `type` --- .../homebrew/pages/basePages/listPage/brewItem/brewItem.jsx | 2 +- client/homebrew/pages/basePages/listPage/listPage.jsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx index 869fb3044..0369305d5 100644 --- a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx +++ b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx @@ -137,7 +137,7 @@ const BrewItem = createClass({ {brew.tags.map((tag, idx)=>{ const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/); - return {this.updateFilter('tag', tag);}}>{matches[2]}; + return {this.updateFilter(tag);}}>{matches[2]}; })}
: <> diff --git a/client/homebrew/pages/basePages/listPage/listPage.jsx b/client/homebrew/pages/basePages/listPage/listPage.jsx index 096c6bbb7..2717152ec 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.jsx +++ b/client/homebrew/pages/basePages/listPage/listPage.jsx @@ -137,7 +137,7 @@ const ListPage = createClass({ return; }, - updateListFilter : function(type, term){ + updateListFilter : function(term){ this.updateUrl(this.state.filterString, this.state.sortType, this.state.sortDir, term); }, @@ -196,7 +196,7 @@ const ListPage = createClass({ return
{_.map(this.state.filterTags, (tag, idx)=>{ const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/); - return {this.updateListFilter('tag', tag);}}>{matches[2]}; + return {this.updateListFilter(tag);}}>{matches[2]}; })}
; }, From 9d38c937b4d1d925ad4d67a038c941203a74225a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 03:43:17 +0000 Subject: [PATCH 26/31] Bump eslint from 8.56.0 to 8.57.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.56.0 to 8.57.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.56.0...v8.57.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 34 +++++++++++++++++----------------- package.json | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 770ff6716..9f39b3bd5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,7 @@ "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" }, "devDependencies": { - "eslint": "^8.56.0", + "eslint": "^8.57.0", "eslint-plugin-jest": "^27.9.0", "eslint-plugin-react": "^7.33.2", "jest": "^29.7.0", @@ -1958,9 +1958,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1978,13 +1978,13 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -2005,9 +2005,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, "node_modules/@istanbuljs/load-nyc-config": { @@ -5588,16 +5588,16 @@ } }, "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", diff --git a/package.json b/package.json index 884d293ec..b44d1cc4d 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" }, "devDependencies": { - "eslint": "^8.56.0", + "eslint": "^8.57.0", "eslint-plugin-jest": "^27.9.0", "eslint-plugin-react": "^7.33.2", "jest": "^29.7.0", From f9d8344dbac3a23bcb1d6d3653add157d5120cd3 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 26 Feb 2024 21:16:37 +1300 Subject: [PATCH 27/31] Remove unnecessary function --- client/homebrew/pages/basePages/listPage/listPage.jsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/client/homebrew/pages/basePages/listPage/listPage.jsx b/client/homebrew/pages/basePages/listPage/listPage.jsx index 2717152ec..2385b4490 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.jsx +++ b/client/homebrew/pages/basePages/listPage/listPage.jsx @@ -83,7 +83,7 @@ const ListPage = createClass({ if(!brews || !brews.length) return
No Brews.
; return _.map(brews, (brew, idx)=>{ - return ; + return { this.updateUrl(this.state.filterString, this.state.sortType, this.state.sortDir, tag); }}/>; }); }, @@ -137,10 +137,6 @@ const ListPage = createClass({ return; }, - updateListFilter : function(term){ - this.updateUrl(this.state.filterString, this.state.sortType, this.state.sortDir, term); - }, - updateUrl : function(filterTerm, sortType, sortDir, filterTag=''){ const url = new URL(window.location.href); const urlParams = new URLSearchParams(url.search); @@ -196,7 +192,7 @@ const ListPage = createClass({ return
{_.map(this.state.filterTags, (tag, idx)=>{ const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/); - return {this.updateListFilter(tag);}}>{matches[2]}; + return { this.updateUrl(this.state.filterString, this.state.sortType, this.state.sortDir, tag); }}>{matches[2]}; })}
; }, From 713865fb406e4347184aec6e14dffa4d54e958c3 Mon Sep 17 00:00:00 2001 From: Rodrigo Kuerten Date: Tue, 27 Feb 2024 10:21:53 -0300 Subject: [PATCH 28/31] Remove background-attachment property --- themes/V3/5ePHB/style.less | 1 - 1 file changed, 1 deletion(-) diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 23c3992fd..c155d1c09 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -307,7 +307,6 @@ margin-left : -0.16cm; background-color : var(--HB_Color_MonsterStatBackground); background-image : @monsterBlockBackground; - background-attachment : unset; background-blend-mode : overlay; border-style : solid; border-width : 7px 6px; From 774b555a61dc15b3938fde3a35b57f4b5606b496 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 29 Feb 2024 17:17:38 -0500 Subject: [PATCH 29/31] Rework to fix 5eCleric's tests --- client/homebrew/editor/editor.jsx | 32 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 3fa936ab7..4f3ef44f5 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -160,25 +160,21 @@ const Editor = createClass({ } } - // Subscript - if(line.includes('^^')) { - //const regex = /\^\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^\^/g; - const regex = /\^\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^\^/g; - let match; - while ((match = regex.exec(line)) != null) { - if(line.indexOf(match[0]) - 1 != '^') { - codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[0]) }, { line: lineNumber, ch: line.indexOf(match[0]) + match[0].length }, { className: 'subscript' }); - } - } - } - - // Superscript + // Subscript & Superscript if(line.includes('^')) { - //const regex = /\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^/g; - const regex = /\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^/g; - let match; - while ((match = regex.exec(line)) != null) { - codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[0]) }, { line: lineNumber, ch: line.indexOf(match[0]) + match[0].length }, { className: 'superscript' }); + let startIndex = line.indexOf('^'); + const superRegex = /\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^/gy; + const subRegex = /\^\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^\^/gy; + + while (startIndex >= 0) { + superRegex.lastIndex = subRegex.lastIndex = startIndex; + let isSuper = false; + let match = subRegex.exec(line) || superRegex.exec(line); + if (match) { + isSuper = !subRegex.lastIndex; + codeMirror.markText({ line: lineNumber, ch: match.index }, { line: lineNumber, ch: match.index + match[0].length }, { className: isSuper ? 'superscript' : 'subscript' }); + } + startIndex = line.indexOf('^', Math.max(startIndex + 1, subRegex.lastIndex, superRegex.lastIndex)); } } From 50f069e68896f7e843781db203c85e0973eda3b8 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 1 Mar 2024 01:24:50 -0500 Subject: [PATCH 30/31] Fix some nesting of styles The values from nav.less were mistakenly nested inside each other which was adding too much specificity. --- client/homebrew/navbar/navbar.less | 585 ++++++++++++++--------------- 1 file changed, 290 insertions(+), 295 deletions(-) diff --git a/client/homebrew/navbar/navbar.less b/client/homebrew/navbar/navbar.less index 73671abbb..ccbdf1f7a 100644 --- a/client/homebrew/navbar/navbar.less +++ b/client/homebrew/navbar/navbar.less @@ -29,322 +29,317 @@ z-index : 2; display : flex; justify-content : space-between; - .navSection { + } + .navSection { + display : flex; + align-items : center; + &:last-child .navItem { border-left : 1px solid #666666; } + } + // "NaturalCrit" logo + .navLogo { + display : block; + margin-top : 0px; + margin-right : 8px; + margin-left : 8px; + color : white; + text-decoration : none; + &:hover { + .name { color : @orange; } + svg { fill : @orange; } + } + svg { + height : 13px; + margin-right : 0.2em; + cursor : pointer; + fill : white; + } + span.name { + font-family : 'CodeLight'; + font-size : 15px; + span.crit { font-family : 'CodeBold'; } + small { + font-family : 'Open Sans'; + font-size : 0.3em; + font-weight : 800; + text-transform : uppercase; + } + } + } + .navItem { + #backgroundColorsHover; + .animate(background-color); + padding : 8px 12px; + font-size : 10px; + font-weight : 800; + line-height : 13px; + color : white; + text-decoration : none; + text-transform : uppercase; + cursor : pointer; + background-color : #333333; + i { + float : right; + margin-left : 5px; + font-size : 13px; + } + &.patreon { + border-right : 1px solid #666666; + border-left : 1px solid #666666; + &:hover i { color : red; } + i { + color : pink; + .animate(color); + animation-name : pinkColoring; + animation-duration : 2s; + } + } + &.editTitle { // this is not needed at all currently - you used to be able to edit the title via the navbar. + padding : 2px 12px; + input { + width : 250px; + padding : 2px; + margin : 0; + font-family : 'Open Sans', sans-serif; + font-size : 12px; + font-weight : 800; + color : white; + text-align : center; + background-color : transparent; + border : 1px solid @blue; + outline : none; + } + .charCount { + display : inline-block; + margin-left : 8px; + color : #666666; + text-align : right; + vertical-align : bottom; + &.max { color : @red; } + } + } + &.brewTitle { + flex-grow : 1; + font-size : 12px; + font-weight : 800; + color : white; + text-align : center; + text-transform : initial; + background-color : transparent; + } + // "The Homebrewery" logo + &.homebrewLogo { + .animate(color); + font-family : 'CodeBold'; + font-size : 12px; + color : white; + div { + margin-top : 2px; + margin-bottom : -2px; + } + &:hover { color : @blue; } + } + &.metadata { + position : relative; display : flex; + flex-grow : 1; align-items : center; - // "NaturalCrit" logo - .navLogo { - display : block; - margin-top : 0px; - margin-right : 8px; - margin-left : 8px; - color : white; - text-decoration : none; - &:hover { - .name { color : @orange; } - svg { fill : @orange; } + height : 100%; + padding : 0; + i { margin-right : 10px;} + .window { + position : absolute; + bottom : 0; + left : 50%; + z-index : -1; + display : flex; + flex-flow : row wrap; + align-content : baseline; + justify-content : flex-start; + width : 440px; + max-height : ~"calc(100vh - 28px)"; + padding : 0 10px 5px; + margin : 0 auto; + background-color : #333333; + border : 3px solid #444444; + border-top : unset; + border-radius : 0 0 5px 5px; + box-shadow : inset 0 7px 9px -7px #111111; + transition : transform 0.4s, opacity 0.4s; + &.active { + opacity : 1; + transform : translateX(-50%) translateY(100%); } - svg { - height : 13px; - margin-right : 0.2em; - cursor : pointer; - fill : white; + &.inactive { + opacity : 0; + transform : translateX(-50%) translateY(0%); } - span.name { - font-family : 'CodeLight'; - font-size : 15px; - span.crit { font-family : 'CodeBold'; } - small { - font-family : 'Open Sans'; - font-size : 0.3em; - font-weight : 800; - text-transform : uppercase; + .row { + display : flex; + flex-flow : row wrap; + width : 100%; + h4 { + box-sizing : border-box; + display : block; + flex-basis : 20%; + flex-grow : 1; + min-width : 76px; + padding : 5px 0; + color : #BBBBBB; + text-align : center; } + p { + flex-basis : 80%; + flex-grow : 1; + padding : 5px 0; + font-family : 'Open Sans', sans-serif; + font-size : 10px; + font-weight : normal; + text-transform : initial; + .tag { + display : inline-block; + padding : 2px; + margin : 2px 2px; + background-color : #444444; + border : 2px solid grey; + border-radius : 5px; + } + a.userPageLink { + color : white; + text-decoration : none; + &:hover { text-decoration : underline; } + } + } + &:nth-of-type(even) { background-color : #555555; } } } - &:last-child .navItem { border-left : 1px solid #666666; } + } + &.warning { + position : relative; + color : white; + background-color : @orange; + &:hover > .dropdown { visibility : visible; } + .dropdown { + position : absolute; + top : 28px; + left : 0; + z-index : 10000; + box-sizing : border-box; + display : block; + width : 100%; + padding : 13px 5px; + text-align : center; + visibility : hidden; + background-color : #333333; + } + } + &.account { + min-width : 100px; + &.username { text-transform : none;} + } + } + .navDropdownContainer { + position : relative; + .navDropdown { + position : absolute; + top : 28px; + left : 0px; + z-index : 10000; + width : 100%; + max-height : calc(100vh - 28px); + overflow : hidden auto; .navItem { + position : relative; + display : block; + width : 100%; + padding : 8px 5px; + border : 1px solid #888888; + border-bottom : 0; + animation-name : glideDropDown; + animation-duration : 0.4s; + } + } + &.recent { + position : relative; + .navDropdown .navItem { #backgroundColorsHover; .animate(background-color); - padding : 8px 12px; - font-size : 10px; - font-weight : 800; - line-height : 13px; + position : relative; + box-sizing : border-box; + display : block; + max-height : ~"calc(100vh - 28px)"; // I don't think is correct syntax, but leaving it in for now... (Gazook89) + padding : 8px 5px 13px; + overflow : hidden auto; color : white; text-decoration : none; - text-transform : uppercase; - cursor : pointer; background-color : #333333; - i { - float : right; - margin-left : 5px; - font-size : 13px; - } - &.patreon { - border-right : 1px solid #666666; - border-left : 1px solid #666666; - &:hover i { color : red; } + border-top : 1px solid #888888; + scrollbar-color : #666666 #333333; + scrollbar-width : thin; + .clear { + position : absolute; + top : 50%; + right : 0; + display : none; + width : 20px; + height : 100%; + background-color : #333333; + border-radius : 3px; + opacity : 70%; + transform : translateY(-50%); + &:hover { opacity : 100%; } i { - color : pink; - .animate(color); - animation-name : pinkColoring; - animation-duration : 2s; + width : 100%; + height : 100%; + margin : 0; + font-size : 10px; + text-align : center; } } - &.editTitle { // this is not needed at all currently - you used to be able to edit the title via the navbar. - padding : 2px 12px; - input { - width : 250px; - padding : 2px; - margin : 0; - font-family : 'Open Sans', sans-serif; - font-size : 12px; - font-weight : 800; - color : white; - text-align : center; - background-color : transparent; - border : 1px solid @blue; - outline : none; - } - .charCount { - display : inline-block; - margin-left : 8px; - color : #666666; - text-align : right; - vertical-align : bottom; - &.max { color : @red; } + &:hover { + background-color : @blue; + .clear { + display : grid; + place-content : center; } } - &.brewTitle { - flex-grow : 1; - font-size : 12px; - font-weight : 800; - color : white; + .title { + display : inline-block; + width : 100%; + overflow : hidden auto; + text-overflow : ellipsis; + white-space : nowrap; + } + .time { + position : absolute; + right : 2px; + bottom : 2px; + font-size : 0.7em; + color : #888888; + } + &.header { + box-sizing : border-box; + display : block; + padding : 5px 0; + color : #BBBBBB; text-align : center; - text-transform : initial; - background-color : transparent; - } - // "The Homebrewery" logo - &.homebrewLogo { - .animate(color); - font-family : 'CodeBold'; - font-size : 12px; - color : white; - div { - margin-top : 2px; - margin-bottom : -2px; - } - &:hover { color : @blue; } - } - &.metadata { - position : relative; - display : flex; - flex-grow : 1; - align-items : center; - height : 100%; - padding : 0; - i { margin-right : 10px;} - .window { - position : absolute; - bottom : 0; - left : 50%; - z-index : -1; - display : flex; - flex-flow : row wrap; - align-content : baseline; - justify-content : flex-start; - width : 440px; - max-height : ~"calc(100vh - 28px)"; - padding : 0 10px 5px; - margin : 0 auto; - background-color : #333333; - border : 3px solid #444444; - border-top : unset; - border-radius : 0 0 5px 5px; - box-shadow : inset 0 7px 9px -7px #111111; - transition : transform 0.4s, opacity 0.4s; - &.active { - opacity : 1; - transform : translateX(-50%) translateY(100%); - } - &.inactive { - opacity : 0; - transform : translateX(-50%) translateY(0%); - } - .row { - display : flex; - flex-flow : row wrap; - width : 100%; - h4 { - box-sizing : border-box; - display : block; - flex-basis : 20%; - flex-grow : 1; - min-width : 76px; - padding : 5px 0; - color : #BBBBBB; - text-align : center; - } - p { - flex-basis : 80%; - flex-grow : 1; - padding : 5px 0; - font-family : 'Open Sans', sans-serif; - font-size : 10px; - font-weight : normal; - text-transform : initial; - .tag { - display : inline-block; - padding : 2px; - margin : 2px 2px; - background-color : #444444; - border : 2px solid grey; - border-radius : 5px; - } - a.userPageLink { - color : white; - text-decoration : none; - &:hover { text-decoration : underline; } - } - } - &:nth-of-type(even) { background-color : #555555; } - } - } - } - &.warning { - position : relative; - color : white; - background-color : @orange; - &:hover > .dropdown { visibility : visible; } - .dropdown { - position : absolute; - top : 28px; - left : 0; - z-index : 10000; - box-sizing : border-box; - display : block; - width : 100%; - padding : 13px 5px; - text-align : center; - visibility : hidden; - background-color : #333333; - } - } - &.account { - min-width : 100px; - &.username { text-transform : none;} - } - } - .navDropdownContainer { - position : relative; - .navDropdown { - position : absolute; - top : 28px; - left : 0px; - z-index : 10000; - width : 100%; - max-height : calc(100vh - 28px); - overflow : hidden auto; - .navItem { - position : relative; - display : block; - width : 100%; - padding : 8px 5px; - border : 1px solid #888888; - border-bottom : 0; - animation-name : glideDropDown; - animation-duration : 0.4s; - } - } - &.recent { - position : relative; - .navDropdown .navItem { - #backgroundColorsHover; - .animate(background-color); - position : relative; - box-sizing : border-box; - display : block; - max-height : ~"calc(100vh - 28px)"; // I don't think is correct syntax, but leaving it in for now... (Gazook89) - padding : 8px 5px 13px; - overflow : hidden auto; - color : white; - text-decoration : none; - background-color : #333333; - border-top : 1px solid #888888; - scrollbar-color : #666666 #333333; - scrollbar-width : thin; - .clear { - position : absolute; - top : 50%; - right : 0; - display : none; - width : 20px; - height : 100%; - background-color : #333333; - border-radius : 3px; - opacity : 70%; - transform : translateY(-50%); - &:hover { opacity : 100%; } - i { - width : 100%; - height : 100%; - margin : 0; - font-size : 10px; - text-align : center; - } - } - &:hover { - background-color : @blue; - .clear { - display : grid; - place-content : center; - } - } - .title { - display : inline-block; - width : 100%; - overflow : hidden auto; - text-overflow : ellipsis; - white-space : nowrap; - } - .time { - position : absolute; - right : 2px; - bottom : 2px; - font-size : 0.7em; - color : #888888; - } - &.header { - box-sizing : border-box; - display : block; - padding : 5px 0; - color : #BBBBBB; - text-align : center; - background-color : #333333; - border-top : 1px solid #888888; - &:nth-of-type(1) { background-color : darken(@teal, 20%); } - &:nth-of-type(2) { background-color : darken(@purple, 30%); } - } - } + background-color : #333333; + border-top : 1px solid #888888; + &:nth-of-type(1) { background-color : darken(@teal, 20%); } + &:nth-of-type(2) { background-color : darken(@purple, 30%); } } } } } - - // this should likely be refactored into .navDropdownContainer - .save-menu { - .dropdown { z-index : 1000; } - .navItem i.fa-power-off { - color : red; - &.active { - color : rgb(0, 182, 52); - filter : drop-shadow(0 0 2px rgba(0, 182, 52, 0.765)); - } - } - } - - - - - +} + +// this should likely be refactored into .navDropdownContainer +.save-menu { + .dropdown { z-index : 1000; } + .navItem i.fa-power-off { + color : red; + &.active { + color : rgb(0, 182, 52); + filter : drop-shadow(0 0 2px rgba(0, 182, 52, 0.765)); + } + } } From 59e87697ff1029c6c843deddea7edcc285e4efea Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 1 Mar 2024 01:27:46 -0500 Subject: [PATCH 31/31] linting --- client/homebrew/navbar/navbar.less | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/homebrew/navbar/navbar.less b/client/homebrew/navbar/navbar.less index ccbdf1f7a..4983aa696 100644 --- a/client/homebrew/navbar/navbar.less +++ b/client/homebrew/navbar/navbar.less @@ -1,4 +1,4 @@ -@import "naturalcrit/styles/colors.less"; +@import 'naturalcrit/styles/colors.less'; @navbarHeight : 28px; @@ -156,7 +156,7 @@ align-content : baseline; justify-content : flex-start; width : 440px; - max-height : ~"calc(100vh - 28px)"; + max-height : ~'calc(100vh - 28px)'; padding : 0 10px 5px; margin : 0 auto; background-color : #333333; @@ -266,7 +266,7 @@ position : relative; box-sizing : border-box; display : block; - max-height : ~"calc(100vh - 28px)"; // I don't think is correct syntax, but leaving it in for now... (Gazook89) + max-height : ~'calc(100vh - 28px)'; padding : 8px 5px 13px; overflow : hidden auto; color : white;