diff --git a/components.js b/components.js
index 0e6e519..bf72b19 100644
--- a/components.js
+++ b/components.js
@@ -2228,9 +2228,8 @@ smSelect.innerHTML = `
-ms-grid-columns: 1fr auto;
grid-template-columns: 1fr auto;
grid-template-areas: 'heading heading' '. .';
- padding: 0.4rem 0.8rem;
+ padding: var(--padding,0.6rem 0.8rem);
background: rgba(var(--text-color), 0.06);
- border: solid 1px rgba(var(--text-color), 0.2);
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
@@ -2359,7 +2358,18 @@ customElements.define('sm-select', class extends HTMLElement {
return this.getAttribute('value')
}
set value(val) {
- this.setAttribute('value', val)
+ const selectedOption = this.availableOptions.find(option => option.getAttribute('value') === val)
+ if (selectedOption) {
+ this.setAttribute('value', val)
+ this.selectedOptionText.textContent = `${this.label}${selectedOption.textContent}`;
+ if (this.previousOption) {
+ this.previousOption.classList.remove('check-selected')
+ }
+ selectedOption.classList.add('check-selected')
+ this.previousOption = selectedOption
+ } else {
+ console.warn(`There is no option with ${val} as value`)
+ }
}
reset(fire = true) {
@@ -2435,13 +2445,7 @@ customElements.define('sm-select', class extends HTMLElement {
handleOptionSelection(e) {
if (this.previousOption !== document.activeElement) {
this.value = document.activeElement.getAttribute('value')
- this.selectedOptionText.textContent = `${this.label}${document.activeElement.textContent}`;
this.fireEvent()
- if (this.previousOption) {
- this.previousOption.classList.remove('check-selected')
- }
- document.activeElement.classList.add('check-selected')
- this.previousOption = document.activeElement
}
}
handleClick(e) {
@@ -3627,6 +3631,7 @@ customElements.define('tags-input', class extends HTMLElement {
this.reset = this.reset.bind(this)
this.handleInput = this.handleInput.bind(this)
+ this.addTag = this.addTag.bind(this)
this.handleKeydown = this.handleKeydown.bind(this)
this.handleClick = this.handleClick.bind(this)
this.removeTag = this.removeTag.bind(this)
@@ -3637,6 +3642,10 @@ customElements.define('tags-input', class extends HTMLElement {
get value() {
return [...this.tags].join()
}
+ set value(arr) {
+ this.reset();
+ [...new Set(arr)].forEach(tag => this.addTag(tag))
+ }
get isValid() {
return this.tags.size
}
@@ -3650,6 +3659,17 @@ customElements.define('tags-input', class extends HTMLElement {
this.input.previousElementSibling.remove()
}
}
+ addTag(tagValue) {
+ const tag = document.createElement('span')
+ tag.dataset.value = tagValue
+ tag.className = 'tag'
+ tag.innerHTML = `
+ ${tagValue}
+
+ `
+ this.input.before(tag)
+ this.tags.add(tagValue)
+ }
handleInput(e) {
const inputValueLength = e.target.value.trim().length
e.target.setAttribute('size', inputValueLength ? inputValueLength : '3')
@@ -3682,17 +3702,8 @@ customElements.define('tags-input', class extends HTMLElement {
duration: 300,
easing: 'ease'
})
- }
- else {
- const tag = document.createElement('span')
- tag.dataset.value = tagValue
- tag.className = 'tag'
- tag.innerHTML = `
- ${tagValue}
-
- `
- this.input.before(tag)
- this.tags.add(tagValue)
+ } else {
+ this.addTag(tagValue)
}
e.target.value = ''
e.target.setAttribute('size', '3')
diff --git a/css/main.css b/css/main.css
index fe60d97..b7a352d 100644
--- a/css/main.css
+++ b/css/main.css
@@ -44,6 +44,9 @@ body[data-theme=dark] * {
body[data-theme=dark] sm-popup::part(popup) {
background-color: var(--foreground-color);
}
+body[data-theme=dark] ::-webkit-calendar-picker-indicator {
+ filter: invert(1);
+}
p,
strong {
@@ -68,6 +71,20 @@ a:not([class]):focus-visible {
box-shadow: 0 0 0 0.1rem rgba(var(--text-color), 1) inset;
}
+input[type=datetime-local] {
+ padding: 0.6rem 0.8rem;
+ background-color: rgba(var(--text-color), 0.06);
+ border: none;
+ border-radius: 0.3rem;
+ font-size: 0.9rem;
+ color: inherit;
+ font-family: inherit;
+}
+input[type=datetime-local]:focus {
+ outline: none;
+ box-shadow: 0 0 0 0.1rem var(--accent-color);
+}
+
button,
.button {
-webkit-user-select: none;
@@ -129,7 +146,7 @@ tags-input {
}
sm-button {
- --padding: 0.5rem 0.8rem;
+ --padding: 0.6rem 0.8rem;
}
sm-button[variant=primary] .icon {
fill: rgba(var(--background-color), 1);
@@ -310,7 +327,7 @@ ul {
.empty-state {
display: grid;
width: 100%;
- padding: 1.5rem 1rem;
+ padding: 1.5rem 0;
}
.observe-empty-state:empty {
@@ -789,7 +806,8 @@ footer {
grid-template-rows: auto 1fr;
}
-#publishing_requests {
+#publishing_requests,
+#article_analytics {
margin-top: 2rem;
align-content: flex-start;
}
@@ -817,6 +835,15 @@ footer {
font-weight: 700;
}
+.article-row {
+ align-items: center;
+ gap: 1rem;
+ grid-template-columns: 1fr auto auto;
+}
+.article-row__published {
+ font-size: 0.8rem;
+}
+
#preview_popup h1,
#article h1 {
font-size: 1.4rem;
diff --git a/css/main.min.css b/css/main.min.css
index 0d41ffb..ec991c8 100644
--- a/css/main.min.css
+++ b/css/main.min.css
@@ -1 +1 @@
-*{padding:0;margin:0;box-sizing:border-box;font-family:"Inter",sans-serif}:root{font-size:clamp(1rem,1.2vmax,1.2rem)}html,body{height:100%;scroll-behavior:smooth}body{color:rgba(var(--text-color), 1);background:rgba(var(--background-color), 1)}body,body *{--accent-color: #256eff;--text-color: 36, 36, 36;--background-color: 248, 248, 248;--foreground-color: rgb(255, 255, 255);--danger-color: rgb(255, 75, 75);--green: #1cad59;--like-color: #e91e63;scrollbar-width:thin}body[data-theme=dark],body[data-theme=dark] *{--accent-color: #86afff;--text-color: 230, 230, 230;--text-color-light: 170, 170, 170;--background-color: 10, 10, 10;--foreground-color: rgb(24, 24, 24);--danger-color: rgb(255, 106, 106);--green: #00e676}body[data-theme=dark] sm-popup::part(popup){background-color:var(--foreground-color)}p,strong{font-size:.9rem;max-width:70ch;line-height:1.7;color:rgba(var(--text-color), 0.8)}p:not(:last-of-type),strong:not(:last-of-type){margin-bottom:1.5rem}a{text-decoration:none}a:not([class]){color:var(--accent-color)}a:not([class]):focus-visible{box-shadow:0 0 0 .1rem rgba(var(--text-color), 1) inset}button,.button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:inline-flex;border:none;background-color:transparent;overflow:hidden;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;align-items:center;font-size:.9rem;font-weight:500}.button{white-space:nowrap;padding:.5rem .8rem;border-radius:.3rem;background-color:rgba(var(--text-color), 0.06);color:rgba(var(--text-color), 0.8);justify-content:center}.button--primary{background-color:var(--accent-color);color:rgba(var(--background-color), 1)}.icon-only{padding:.5rem;border-radius:.3rem}button:disabled{opacity:.5}a:-webkit-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:-moz-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}sm-input,sm-textarea,tags-input{font-size:.9rem;--border-radius: 0.3rem}sm-button{--padding: 0.5rem 0.8rem}sm-button[variant=primary] .icon{fill:rgba(var(--background-color), 1)}sm-button[disabled] .icon{fill:rgba(var(--text-color), 0.6)}sm-button.uppercase{letter-spacing:.05em}sm-button.danger{--background: var(--danger-color);color:rgba(var(--background-color), 1)}ul{list-style:none}.hide-completely{display:none !important}.overflow-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.breakable{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.full-bleed{grid-column:1/-1}.h1{font-size:1.5rem}.h2{font-size:1.2rem}.h3{font-size:1rem}.h4{font-size:.9rem}.h5{font-size:.8rem}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.flex{display:flex}.grid{display:grid}.flow-column{grid-auto-flow:column}.gap-0-5{gap:.5rem}.gap-1{gap:1rem}.gap-1-5{gap:1.5rem}.gap-2{gap:2rem}.gap-3{gap:3rem}.text-align-right{text-align:right}.align-start{align-items:flex-start}.align-center{align-items:center}.text-center{text-align:center}.justify-start{justify-content:start}.justify-center{justify-content:center}.justify-right{margin-left:auto}.align-self-center{align-self:center}.justify-self-center{justify-self:center}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.direction-column{flex-direction:column}.space-between{justify-content:space-between}.w-100{width:100%}.ripple{height:8rem;width:8rem;position:absolute;border-radius:50%;transform:scale(0);background:radial-gradient(circle, rgba(var(--text-color), 0.3) 0%, rgba(0, 0, 0, 0) 50%);pointer-events:none}.interact{position:relative;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:transparent}.empty-state{display:grid;width:100%;padding:1.5rem 1rem}.observe-empty-state:empty{display:none}.observe-empty-state:not(:empty)+.empty-state{display:none}.icon{width:1.2rem;height:1.2rem;fill:rgba(var(--text-color), 0.8);flex-shrink:0}.button__icon{height:1.2rem;width:1.2rem}.button__icon--left{margin-right:.5rem}.button__icon--right{margin-left:.5rem}.icon-button{padding:.6rem;border-radius:.8rem;background-color:rgba(var(--text-color), 0.1);height:-webkit-max-content;height:-moz-max-content;height:max-content}.icon-button .icon{fill:var(--accent-color)}#confirmation_popup,#prompt_popup{flex-direction:column}#confirmation_popup h4,#prompt_popup h4{font-weight:500;margin-bottom:.5rem}#confirmation_popup sm-button,#prompt_popup sm-button{margin:0}#confirmation_popup .flex,#prompt_popup .flex{padding:0;margin-top:1rem}#confirmation_popup .flex sm-button:first-of-type,#prompt_popup .flex sm-button:first-of-type{margin-right:.6rem;margin-left:auto}#prompt_message{margin-bottom:1.5rem}.popup__header{display:grid;gap:.5rem;width:100%;padding:0 1.5rem 0 .8rem;align-items:center;grid-template-columns:auto 1fr auto}.popup__header__close{padding:.5rem;cursor:pointer}.logo{position:absolute;color:inherit;display:grid;align-items:center;grid-template-columns:auto 1fr;gap:0 .2rem;justify-self:center}.logo h4{text-transform:capitalize;font-size:.9rem;letter-spacing:.03em}.logo .main-logo{height:1.4rem;width:1.4rem;fill:rgba(var(--text-color), 1);stroke:none}details summary{display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}details[open]>summary .down-arrow{transform:rotate(180deg)}sm-select,sm-option,strip-option{font-size:.9rem}strip-select{--gap: 0}strip-option{font-weight:500;--border-radius: 0.3rem;--active-option-color: var(--accent-color)}sm-menu{--background: var(--foreground-color)}menu-option{font-size:.9rem}sm-copy{font-size:.9rem;--button-border-radius: 0.2rem}.warning{background-color:khaki;color:rgba(0,0,0,.7);padding:1rem;border-radius:.5rem;line-height:1.5}.page{height:100%}.page-layout,#preview_page{display:grid;grid-template-columns:1rem minmax(0, 1fr) 1rem}.page-layout>*,#preview_page>*{grid-column:2/3}#landing{grid-template-rows:auto 1fr}#landing header{padding:1.5rem 0}#landing>section{align-items:center;text-align:center}#landing h1{margin-top:-2ch;font-size:clamp(2rem,5vw,5rem)}#landing p{max-width:100%}#sign_in,#sign_up{grid-template-rows:auto 1fr;align-items:center}#sign_in section,#sign_up section{margin-top:-6rem;justify-self:center;width:min(24rem,100%)}#sign_in sm-form,#sign_up sm-form{margin:2rem 0}#sign_in header,#sign_up header{padding:1.5rem 0}#sign_up .h2{margin-bottom:.5rem}#sign_up .card{margin:1.5rem 0}#sign_up h5{font-weight:500;color:rgba(var(--text-color), 0.8)}#sign_up .warning{margin-top:2rem}#loading{place-content:center;text-align:center}#loader_container{height:3rem;overflow:hidden;margin-bottom:1.5rem}#loader_container::after{content:"";position:absolute;height:100%;width:100%;left:0;background:linear-gradient(rgba(var(--foreground-color), 1), transparent 20%, transparent 80%, rgba(var(--foreground-color), 1))}#loader{height:6rem;width:6rem;-webkit-animation:scroll infinite 1s cubic-bezier(0.075, 0.82, 0.165, 1);animation:scroll infinite 1s cubic-bezier(0.075, 0.82, 0.165, 1);fill:rgba(var(--text-color), 0.2)}@-webkit-keyframes scroll{to{transform:translateY(-3rem)}}@keyframes scroll{to{transform:translateY(-3rem)}}.label{font-size:.8rem;color:rgba(var(--text-color), 0.8);margin-bottom:.2rem}.icon--success{fill:var(--green)}.icon--failure,.icon--error{fill:var(--danger-color)}main{display:grid;height:100%;grid-template-rows:auto 1fr;grid-template-columns:minmax(0, 1fr)}#main_header{position:-webkit-sticky;position:sticky;top:0;display:grid;gap:.5rem;padding:1rem;align-items:center;grid-column:1/-1;grid-template-columns:auto 1fr auto auto;background-color:rgba(var(--background-color), 1);z-index:2;border-bottom:thin solid rgba(var(--text-color), 0.2)}#expanding_search{position:absolute;display:grid;gap:.5rem;align-items:center;width:calc(100% - 2rem);margin:0 1rem;z-index:1;background-color:rgba(var(--background-color), 1)}#expanding_search .icon-only{margin-right:.5rem}#search_suggestions{position:absolute;top:calc(100% + .5rem);background-color:var(--foreground-color);padding:.3rem;width:100%;border-radius:.3rem;box-shadow:0 .5rem 1.5rem rgba(0,0,0,.1)}.search-suggestion{font-size:.9rem;color:inherit;padding:1rem;border-radius:.3rem}#search_articles{--border-radius: 0.5em;width:100%}theme-toggle{margin-left:auto;padding:0 .5rem}#main_page{display:grid;padding:1rem;padding-top:0;gap:1.5rem}.category{padding:.5rem;color:inherit;font-size:.9rem}#latest_articles_list,#query_results_list{margin:1rem 0;gap:1.6rem}.article-card{gap:.3rem}.article-card a{color:inherit}.article-card .article-link{gap:.5rem}.article-card__title{line-height:1.4}.article-card__category{background-color:rgba(var(--text-color), 0.1);border-radius:.3rem;font-size:.8rem;padding:.3rem .6rem;font-weight:700;color:rgba(var(--text-color), 0.6) !important;justify-self:flex-start;text-transform:capitalize}.article-card .flex{font-size:.8rem;gap:.3rem}#explore{padding-top:1.5rem}#article{gap:2rem 0;padding-bottom:3rem}.hero-section{display:grid;gap:.5rem;grid-template-columns:minmax(0, 1fr);padding-top:1.5rem}#article_contributors{flex-wrap:wrap;gap:.3rem;margin:.5rem 0 1rem 0}.contributor{font-size:.8rem;background-color:rgba(var(--text-color), 0.06);border-radius:.3rem;padding:.3rem .5rem}.up-vote{display:grid;grid-template-columns:auto 1fr;position:relative;padding:.8rem;border-radius:2rem;background-color:var(--foreground-color);box-shadow:0 .5rem 1rem rgba(0,0,0,.1);border:solid rgba(var(--text-color), 0.2) thin}.up-vote>*{pointer-events:none}.up-vote:active{transform:none}.up-vote:active .icon{transform:scale(0.7)}.up-vote.liked{background-color:var(--like-color);color:#fff}.up-vote.liked .icon{fill:#fff}.up-vote .expanding-heart,.up-vote .ring{grid-area:1/1}.up-vote .icon{grid-area:1/1;fill:var(--like-color);height:1.5rem;width:1.5rem;transition:transform .2s}.ring{border:.1rem solid var(--like-color);border-radius:50%;height:.5rem;width:.5rem;justify-self:center}.temp-count,#like_count{grid-area:1/2}.temp-count:not(:empty),#like_count:not(:empty){margin-left:.4rem}footer{padding:3rem 1.5rem;justify-items:center}#dashboard{height:-webkit-max-content;height:-moz-max-content;height:max-content;padding:1.5rem 0;grid-template-rows:auto 1fr}#publishing_requests{margin-top:2rem;align-content:flex-start}.request-card{display:grid;gap:.5rem;border-radius:.5rem;align-items:flex-start;grid-template-columns:1fr auto}.request-card__title{grid-area:2/1}.request-card__time{font-size:.8rem}.request-card .flex{grid-row:span 2}.request-card .publish-button{text-transform:uppercase;letter-spacing:.05em;font-size:.8rem;font-weight:700}#preview_popup h1,#article h1{font-size:1.4rem;margin-bottom:1rem}#preview_popup h3:not(:first-of-type),#article h3:not(:first-of-type){margin-top:2rem}#preview_popup h3,#article h3{margin-bottom:1rem}#preview_popup h3:not(:first-of-type),#article h3:not(:first-of-type){margin-top:1.5rem}#preview_popup p,#article p{font-family:"noto serif",serif;font-size:1rem;line-height:1.8}#preview_popup p>*,#article p>*{font-family:inherit}#preview_popup time,#preview_popup #reading_time,#article time,#article #reading_time{font-size:.8rem}@media screen and (max-width: 40rem){.hide-on-mobile{display:none}}@supports(-webkit-text-stroke: 1px black){#landing h1{-webkit-text-stroke:1px rgba(var(--text-color), 1);-webkit-text-fill-color:rgba(var(--background-color), 1)}}@media screen and (min-width: 40rem){sm-popup{--width: 24rem}h1,.h1{font-size:2rem}.h2{font-size:1.8rem}.h3{font-size:1.3rem}.h4{font-size:1rem}.popup__header{grid-column:1/-1;padding:1rem 1.5rem 0 .8rem}#confirmation_popup{--width: 24rem}.page-layout{grid-template-columns:1fr 90vw 1fr}.hide-on-desktop{display:none}#landing h1{-webkit-text-stroke-width:.1rem}#main_header{padding:1rem 1.5rem}#main_page{padding:1rem 6vw;grid-template-rows:auto 1fr;grid-template-columns:1fr 22rem}#main_page__header{grid-area:1/1/2/-1}#expanding_search{margin:1rem 1.5rem;left:0;width:20rem}#preview_popup h1,#article h1{font-size:2rem}#article{grid-template-columns:1fr 60ch 1fr}#preview_popup{--width: 60ch}}@media(any-hover: hover){::-webkit-scrollbar{width:.5rem;height:.5rem}::-webkit-scrollbar-thumb{background:rgba(var(--text-color), 0.3);border-radius:1rem}::-webkit-scrollbar-thumb:hover{background:rgba(var(--text-color), 0.5)}.interact,button:not(.button--primary){transition:background-color .3s}.interact:hover,button:not(.button--primary):hover{background-color:rgba(var(--text-color), 0.06)}.button--primary{transition:filter .3s}.button--primary:hover{filter:brightness(120%)}}
\ No newline at end of file
+*{padding:0;margin:0;box-sizing:border-box;font-family:"Inter",sans-serif}:root{font-size:clamp(1rem,1.2vmax,1.2rem)}html,body{height:100%;scroll-behavior:smooth}body{color:rgba(var(--text-color), 1);background:rgba(var(--background-color), 1)}body,body *{--accent-color: #256eff;--text-color: 36, 36, 36;--background-color: 248, 248, 248;--foreground-color: rgb(255, 255, 255);--danger-color: rgb(255, 75, 75);--green: #1cad59;--like-color: #e91e63;scrollbar-width:thin}body[data-theme=dark],body[data-theme=dark] *{--accent-color: #86afff;--text-color: 230, 230, 230;--text-color-light: 170, 170, 170;--background-color: 10, 10, 10;--foreground-color: rgb(24, 24, 24);--danger-color: rgb(255, 106, 106);--green: #00e676}body[data-theme=dark] sm-popup::part(popup){background-color:var(--foreground-color)}body[data-theme=dark] ::-webkit-calendar-picker-indicator{filter:invert(1)}p,strong{font-size:.9rem;max-width:70ch;line-height:1.7;color:rgba(var(--text-color), 0.8)}p:not(:last-of-type),strong:not(:last-of-type){margin-bottom:1.5rem}a{text-decoration:none}a:not([class]){color:var(--accent-color)}a:not([class]):focus-visible{box-shadow:0 0 0 .1rem rgba(var(--text-color), 1) inset}input[type=datetime-local]{padding:.6rem .8rem;background-color:rgba(var(--text-color), 0.06);border:none;border-radius:.3rem;font-size:.9rem;color:inherit;font-family:inherit}input[type=datetime-local]:focus{outline:none;box-shadow:0 0 0 .1rem var(--accent-color)}button,.button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:inline-flex;border:none;background-color:transparent;overflow:hidden;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;align-items:center;font-size:.9rem;font-weight:500}.button{white-space:nowrap;padding:.5rem .8rem;border-radius:.3rem;background-color:rgba(var(--text-color), 0.06);color:rgba(var(--text-color), 0.8);justify-content:center}.button--primary{background-color:var(--accent-color);color:rgba(var(--background-color), 1)}.icon-only{padding:.5rem;border-radius:.3rem}button:disabled{opacity:.5}a:-webkit-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:-moz-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}sm-input,sm-textarea,tags-input{font-size:.9rem;--border-radius: 0.3rem}sm-button{--padding: 0.6rem 0.8rem}sm-button[variant=primary] .icon{fill:rgba(var(--background-color), 1)}sm-button[disabled] .icon{fill:rgba(var(--text-color), 0.6)}sm-button.uppercase{letter-spacing:.05em}sm-button.danger{--background: var(--danger-color);color:rgba(var(--background-color), 1)}ul{list-style:none}.hide-completely{display:none !important}.overflow-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.breakable{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.full-bleed{grid-column:1/-1}.h1{font-size:1.5rem}.h2{font-size:1.2rem}.h3{font-size:1rem}.h4{font-size:.9rem}.h5{font-size:.8rem}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.flex{display:flex}.grid{display:grid}.flow-column{grid-auto-flow:column}.gap-0-5{gap:.5rem}.gap-1{gap:1rem}.gap-1-5{gap:1.5rem}.gap-2{gap:2rem}.gap-3{gap:3rem}.text-align-right{text-align:right}.align-start{align-items:flex-start}.align-center{align-items:center}.text-center{text-align:center}.justify-start{justify-content:start}.justify-center{justify-content:center}.justify-right{margin-left:auto}.align-self-center{align-self:center}.justify-self-center{justify-self:center}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.direction-column{flex-direction:column}.space-between{justify-content:space-between}.w-100{width:100%}.ripple{height:8rem;width:8rem;position:absolute;border-radius:50%;transform:scale(0);background:radial-gradient(circle, rgba(var(--text-color), 0.3) 0%, rgba(0, 0, 0, 0) 50%);pointer-events:none}.interact{position:relative;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:transparent}.empty-state{display:grid;width:100%;padding:1.5rem 0}.observe-empty-state:empty{display:none}.observe-empty-state:not(:empty)+.empty-state{display:none}.icon{width:1.2rem;height:1.2rem;fill:rgba(var(--text-color), 0.8);flex-shrink:0}.button__icon{height:1.2rem;width:1.2rem}.button__icon--left{margin-right:.5rem}.button__icon--right{margin-left:.5rem}.icon-button{padding:.6rem;border-radius:.8rem;background-color:rgba(var(--text-color), 0.1);height:-webkit-max-content;height:-moz-max-content;height:max-content}.icon-button .icon{fill:var(--accent-color)}#confirmation_popup,#prompt_popup{flex-direction:column}#confirmation_popup h4,#prompt_popup h4{font-weight:500;margin-bottom:.5rem}#confirmation_popup sm-button,#prompt_popup sm-button{margin:0}#confirmation_popup .flex,#prompt_popup .flex{padding:0;margin-top:1rem}#confirmation_popup .flex sm-button:first-of-type,#prompt_popup .flex sm-button:first-of-type{margin-right:.6rem;margin-left:auto}#prompt_message{margin-bottom:1.5rem}.popup__header{display:grid;gap:.5rem;width:100%;padding:0 1.5rem 0 .8rem;align-items:center;grid-template-columns:auto 1fr auto}.popup__header__close{padding:.5rem;cursor:pointer}.logo{position:absolute;color:inherit;display:grid;align-items:center;grid-template-columns:auto 1fr;gap:0 .2rem;justify-self:center}.logo h4{text-transform:capitalize;font-size:.9rem;letter-spacing:.03em}.logo .main-logo{height:1.4rem;width:1.4rem;fill:rgba(var(--text-color), 1);stroke:none}details summary{display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}details[open]>summary .down-arrow{transform:rotate(180deg)}sm-select,sm-option,strip-option{font-size:.9rem}strip-select{--gap: 0}strip-option{font-weight:500;--border-radius: 0.3rem;--active-option-color: var(--accent-color)}sm-menu{--background: var(--foreground-color)}menu-option{font-size:.9rem}sm-copy{font-size:.9rem;--button-border-radius: 0.2rem}.warning{background-color:khaki;color:rgba(0,0,0,.7);padding:1rem;border-radius:.5rem;line-height:1.5}.page{height:100%}.page-layout,#preview_page{display:grid;grid-template-columns:1rem minmax(0, 1fr) 1rem}.page-layout>*,#preview_page>*{grid-column:2/3}#landing{grid-template-rows:auto 1fr}#landing header{padding:1.5rem 0}#landing>section{align-items:center;text-align:center}#landing h1{margin-top:-2ch;font-size:clamp(2rem,5vw,5rem)}#landing p{max-width:100%}#sign_in,#sign_up{grid-template-rows:auto 1fr;align-items:center}#sign_in section,#sign_up section{margin-top:-6rem;justify-self:center;width:min(24rem,100%)}#sign_in sm-form,#sign_up sm-form{margin:2rem 0}#sign_in header,#sign_up header{padding:1.5rem 0}#sign_up .h2{margin-bottom:.5rem}#sign_up .card{margin:1.5rem 0}#sign_up h5{font-weight:500;color:rgba(var(--text-color), 0.8)}#sign_up .warning{margin-top:2rem}#loading{place-content:center;text-align:center}#loader_container{height:3rem;overflow:hidden;margin-bottom:1.5rem}#loader_container::after{content:"";position:absolute;height:100%;width:100%;left:0;background:linear-gradient(rgba(var(--foreground-color), 1), transparent 20%, transparent 80%, rgba(var(--foreground-color), 1))}#loader{height:6rem;width:6rem;-webkit-animation:scroll infinite 1s cubic-bezier(0.075, 0.82, 0.165, 1);animation:scroll infinite 1s cubic-bezier(0.075, 0.82, 0.165, 1);fill:rgba(var(--text-color), 0.2)}@-webkit-keyframes scroll{to{transform:translateY(-3rem)}}@keyframes scroll{to{transform:translateY(-3rem)}}.label{font-size:.8rem;color:rgba(var(--text-color), 0.8);margin-bottom:.2rem}.icon--success{fill:var(--green)}.icon--failure,.icon--error{fill:var(--danger-color)}main{display:grid;height:100%;grid-template-rows:auto 1fr;grid-template-columns:minmax(0, 1fr)}#main_header{position:-webkit-sticky;position:sticky;top:0;display:grid;gap:.5rem;padding:1rem;align-items:center;grid-column:1/-1;grid-template-columns:auto 1fr auto auto;background-color:rgba(var(--background-color), 1);z-index:2;border-bottom:thin solid rgba(var(--text-color), 0.2)}#expanding_search{position:absolute;display:grid;gap:.5rem;align-items:center;width:calc(100% - 2rem);margin:0 1rem;z-index:1;background-color:rgba(var(--background-color), 1)}#expanding_search .icon-only{margin-right:.5rem}#search_suggestions{position:absolute;top:calc(100% + .5rem);background-color:var(--foreground-color);padding:.3rem;width:100%;border-radius:.3rem;box-shadow:0 .5rem 1.5rem rgba(0,0,0,.1)}.search-suggestion{font-size:.9rem;color:inherit;padding:1rem;border-radius:.3rem}#search_articles{--border-radius: 0.5em;width:100%}theme-toggle{margin-left:auto;padding:0 .5rem}#main_page{display:grid;padding:1rem;padding-top:0;gap:1.5rem}.category{padding:.5rem;color:inherit;font-size:.9rem}#latest_articles_list,#query_results_list{margin:1rem 0;gap:1.6rem}.article-card{gap:.3rem}.article-card a{color:inherit}.article-card .article-link{gap:.5rem}.article-card__title{line-height:1.4}.article-card__category{background-color:rgba(var(--text-color), 0.1);border-radius:.3rem;font-size:.8rem;padding:.3rem .6rem;font-weight:700;color:rgba(var(--text-color), 0.6) !important;justify-self:flex-start;text-transform:capitalize}.article-card .flex{font-size:.8rem;gap:.3rem}#explore{padding-top:1.5rem}#article{gap:2rem 0;padding-bottom:3rem}.hero-section{display:grid;gap:.5rem;grid-template-columns:minmax(0, 1fr);padding-top:1.5rem}#article_contributors{flex-wrap:wrap;gap:.3rem;margin:.5rem 0 1rem 0}.contributor{font-size:.8rem;background-color:rgba(var(--text-color), 0.06);border-radius:.3rem;padding:.3rem .5rem}.up-vote{display:grid;grid-template-columns:auto 1fr;position:relative;padding:.8rem;border-radius:2rem;background-color:var(--foreground-color);box-shadow:0 .5rem 1rem rgba(0,0,0,.1);border:solid rgba(var(--text-color), 0.2) thin}.up-vote>*{pointer-events:none}.up-vote:active{transform:none}.up-vote:active .icon{transform:scale(0.7)}.up-vote.liked{background-color:var(--like-color);color:#fff}.up-vote.liked .icon{fill:#fff}.up-vote .expanding-heart,.up-vote .ring{grid-area:1/1}.up-vote .icon{grid-area:1/1;fill:var(--like-color);height:1.5rem;width:1.5rem;transition:transform .2s}.ring{border:.1rem solid var(--like-color);border-radius:50%;height:.5rem;width:.5rem;justify-self:center}.temp-count,#like_count{grid-area:1/2}.temp-count:not(:empty),#like_count:not(:empty){margin-left:.4rem}footer{padding:3rem 1.5rem;justify-items:center}#dashboard{height:-webkit-max-content;height:-moz-max-content;height:max-content;padding:1.5rem 0;grid-template-rows:auto 1fr}#publishing_requests,#article_analytics{margin-top:2rem;align-content:flex-start}.request-card{display:grid;gap:.5rem;border-radius:.5rem;align-items:flex-start;grid-template-columns:1fr auto}.request-card__title{grid-area:2/1}.request-card__time{font-size:.8rem}.request-card .flex{grid-row:span 2}.request-card .publish-button{text-transform:uppercase;letter-spacing:.05em;font-size:.8rem;font-weight:700}.article-row{align-items:center;gap:1rem;grid-template-columns:1fr auto auto}.article-row__published{font-size:.8rem}#preview_popup h1,#article h1{font-size:1.4rem;margin-bottom:1rem}#preview_popup h3:not(:first-of-type),#article h3:not(:first-of-type){margin-top:2rem}#preview_popup h3,#article h3{margin-bottom:1rem}#preview_popup h3:not(:first-of-type),#article h3:not(:first-of-type){margin-top:1.5rem}#preview_popup p,#article p{font-family:"noto serif",serif;font-size:1rem;line-height:1.8}#preview_popup p>*,#article p>*{font-family:inherit}#preview_popup time,#preview_popup #reading_time,#article time,#article #reading_time{font-size:.8rem}@media screen and (max-width: 40rem){.hide-on-mobile{display:none}}@supports(-webkit-text-stroke: 1px black){#landing h1{-webkit-text-stroke:1px rgba(var(--text-color), 1);-webkit-text-fill-color:rgba(var(--background-color), 1)}}@media screen and (min-width: 40rem){sm-popup{--width: 24rem}h1,.h1{font-size:2rem}.h2{font-size:1.8rem}.h3{font-size:1.3rem}.h4{font-size:1rem}.popup__header{grid-column:1/-1;padding:1rem 1.5rem 0 .8rem}#confirmation_popup{--width: 24rem}.page-layout{grid-template-columns:1fr 90vw 1fr}.hide-on-desktop{display:none}#landing h1{-webkit-text-stroke-width:.1rem}#main_header{padding:1rem 1.5rem}#main_page{padding:1rem 6vw;grid-template-rows:auto 1fr;grid-template-columns:1fr 22rem}#main_page__header{grid-area:1/1/2/-1}#expanding_search{margin:1rem 1.5rem;left:0;width:20rem}#preview_popup h1,#article h1{font-size:2rem}#article{grid-template-columns:1fr 60ch 1fr}#preview_popup{--width: 60ch}}@media(any-hover: hover){::-webkit-scrollbar{width:.5rem;height:.5rem}::-webkit-scrollbar-thumb{background:rgba(var(--text-color), 0.3);border-radius:1rem}::-webkit-scrollbar-thumb:hover{background:rgba(var(--text-color), 0.5)}.interact,button:not(.button--primary){transition:background-color .3s}.interact:hover,button:not(.button--primary):hover{background-color:rgba(var(--text-color), 0.06)}.button--primary{transition:filter .3s}.button--primary:hover{filter:brightness(120%)}}
\ No newline at end of file
diff --git a/css/main.scss b/css/main.scss
index e3c76c3..83f846c 100644
--- a/css/main.scss
+++ b/css/main.scss
@@ -47,6 +47,9 @@ body[data-theme="dark"] {
sm-popup::part(popup) {
background-color: var(--foreground-color);
}
+ ::-webkit-calendar-picker-indicator {
+ filter: invert(1);
+ }
}
p,
@@ -71,6 +74,20 @@ a:not([class]) {
}
}
+input[type="datetime-local"] {
+ padding: 0.6rem 0.8rem;
+ background-color: rgba(var(--text-color), 0.06);
+ border: none;
+ border-radius: 0.3rem;
+ font-size: 0.9rem;
+ color: inherit;
+ font-family: inherit;
+ &:focus {
+ outline: none;
+ box-shadow: 0 0 0 0.1rem var(--accent-color);
+ }
+}
+
button,
.button {
user-select: none;
@@ -118,7 +135,7 @@ tags-input {
--border-radius: 0.3rem;
}
sm-button {
- --padding: 0.5rem 0.8rem;
+ --padding: 0.6rem 0.8rem;
&[variant="primary"] {
.icon {
fill: rgba(var(--background-color), 1);
@@ -305,7 +322,7 @@ ul {
.empty-state {
display: grid;
width: 100%;
- padding: 1.5rem 1rem;
+ padding: 1.5rem 0;
}
.observe-empty-state:empty {
@@ -760,7 +777,8 @@ footer {
padding: 1.5rem 0;
grid-template-rows: auto 1fr;
}
-#publishing_requests {
+#publishing_requests,
+#article_analytics {
margin-top: 2rem;
align-content: flex-start;
}
@@ -788,6 +806,15 @@ footer {
}
}
+.article-row {
+ align-items: center;
+ gap: 1rem;
+ grid-template-columns: 1fr auto auto;
+ &__published {
+ font-size: 0.8rem;
+ }
+}
+
#preview_popup,
#article {
h1 {
diff --git a/index.html b/index.html
index 97c2764..4aa6c27 100644
--- a/index.html
+++ b/index.html
@@ -228,8 +228,8 @@
- Featured
- A Wake Up Call for India - Analyzing the falling GDP
+ Trending
+
@@ -273,15 +273,20 @@
-
-
Dashboard
-
- Requests
- Analytics
+
+
+ Analytics
+ Requests
-
- No requests
+
+
+