diff --git a/public/icons/instagram-white.svg b/public/icons/instagram-white.svg
new file mode 100644
index 00000000..baf59f63
--- /dev/null
+++ b/public/icons/instagram-white.svg
@@ -0,0 +1,4 @@
+
diff --git a/src/components/Author/Card.scss b/src/components/Author/Card.module.scss
similarity index 59%
rename from src/components/Author/Card.scss
rename to src/components/Author/Card.module.scss
index ef1dfa4c..8400502f 100644
--- a/src/components/Author/Card.scss
+++ b/src/components/Author/Card.module.scss
@@ -8,30 +8,30 @@
}
}
-.author__details {
+.authorDetails {
display: flex;
flex: 1;
padding-right: 1.2rem;
width: max-content;
}
-.author__details-wrapper {
+.authorDetailsWrapper {
flex: 1;
}
-.author__name {
+.authorName {
border: none !important;
font-size: 1.7rem;
font-weight: 500;
margin-bottom: 0.8rem;
}
-.author__about {
+.authorAbout {
font-size: 1.5rem;
color: rgb(0 0 0 / 60%);
}
-.author__subscribe {
+.authorSubscribe {
@include media-breakpoint-down(lg) {
padding: 0 0 0 42px;
}
@@ -43,6 +43,7 @@
height: 32px;
margin-right: 0.4rem;
position: relative;
+ transition: background-color 0.2s;
vertical-align: middle;
width: 32px;
@@ -57,8 +58,17 @@
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
+ transition: filter 0.2s;
width: 18px;
}
+
+ &:hover {
+ background: #000;
+
+ &::before {
+ filter: invert(0);
+ }
+ }
}
a[href*='facebook.com/'] {
@@ -90,9 +100,15 @@
background-image: url(/icons/tumblr-white.svg);
}
}
+
+ a[href*='instagram.com/'] {
+ &::before {
+ background-image: url(/icons/instagram-white.svg);
+ }
+ }
}
-.button--subscribe {
+.buttonSubscribe {
align-items: center;
aspect-ratio: 1/1;
background: #f6f6f6;
@@ -105,14 +121,15 @@
}
}
-.button__label {
+.buttonLabel {
display: none;
}
-.button--write {
+.buttonWrite {
background: #f7f7f7;
color: #000;
display: inline-flex;
+
@include font-size(1.5rem);
.icon {
@@ -123,3 +140,62 @@
height: 15px;
}
}
+
+.authorPage {
+ .authorName {
+ @include font-size(3.4rem);
+
+ font-weight: 500;
+ margin-bottom: 0.2em;
+ }
+
+ .authorAbout {
+ color: #696969;
+ @include font-size(1.7rem);
+ }
+
+ .authorSubscribe {
+ display: flex;
+ margin-top: 2rem;
+ }
+
+ .authorDetails {
+ display: block;
+ }
+
+ .buttonLabel {
+ display: block;
+ }
+
+ .buttonSubscribe {
+ aspect-ratio: auto;
+ background-color: #000;
+ border-radius: 2px;
+ float: none;
+ padding-bottom: 0.6rem;
+ padding-top: 0.6rem;
+
+ .icon {
+ margin-right: 0.5em;
+
+ img {
+ filter: invert(1);
+ }
+ }
+
+ &:hover {
+ .icon img {
+ filter: invert(0.7);
+ }
+ }
+ }
+
+ .buttonSubscribe img {
+ vertical-align: text-top;
+ }
+
+ .button {
+ margin-right: 1.6rem;
+ vertical-align: middle;
+ }
+}
diff --git a/src/components/Author/Card.tsx b/src/components/Author/Card.tsx
index 60f2275e..4931f4b3 100644
--- a/src/components/Author/Card.tsx
+++ b/src/components/Author/Card.tsx
@@ -2,13 +2,14 @@ import { For, Show } from 'solid-js/web'
import type { Author } from '../../graphql/types.gen'
import Userpic from './Userpic'
import { Icon } from '../Nav/Icon'
-import './Card.scss'
+import style from './Card.module.scss'
import { createMemo } from 'solid-js'
import { translit } from '../../utils/ru2en'
import { t } from '../../utils/intl'
import { useAuthStore } from '../../stores/auth'
import { locale } from '../../stores/ui'
import { follow, unfollow } from '../../stores/zine/common'
+import { clsx } from 'clsx'
interface AuthorCardProps {
compact?: boolean
@@ -17,6 +18,7 @@ interface AuthorCardProps {
hasLink?: boolean
subscribed?: boolean
author: Author
+ isAuthorPage?: boolean
}
export const AuthorCard = (props: AuthorCardProps) => {
@@ -34,45 +36,51 @@ export const AuthorCard = (props: AuthorCardProps) => {
}
// TODO: reimplement AuthorCard
return (
-
-
+
+
-
-
+
+
-
+
{name()}
- {name()}
+ {name()}
- {bio()}
+ {bio()}
-
+
follow} class="button button--subscribe">
-
- + {t('Follow')}
+
}
>
-
-
-
+
+
{t('Write')}
diff --git a/src/components/Author/Full.scss b/src/components/Author/Full.scss
index fcd0954e..4b505f0d 100644
--- a/src/components/Author/Full.scss
+++ b/src/components/Author/Full.scss
@@ -1,67 +1,6 @@
.user-details {
margin-bottom: 4.4rem;
padding: 0;
-
- .author__name {
- @include font-size(3.4rem);
-
- font-weight: 500;
- margin-bottom: 0.2em;
- }
-
- .author__about {
- color: #696969;
- @include font-size(1.7rem);
- }
-
- .circlewrap {
- margin-right: 4.8rem;
- max-width: 168px;
- min-width: 168px;
- height: 168px;
- width: 168px;
- }
-
- .circlewrap .userpic {
- font-size: 2em;
- line-height: 168px;
- width: 100%;
- }
-
- .author__subscribe {
- margin-top: 2rem;
- }
-
- .author__details {
- display: block;
- }
-
- .button--subscribe {
- aspect-ratio: auto;
- background-color: #000;
- border-radius: 2px;
- float: none;
- padding-bottom: 0.6rem;
- padding-top: 0.6rem;
- }
-
- .button__label {
- display: block;
- }
-
- .button--subscribe .icon {
- filter: invert(1);
- margin-right: 0.5em;
- }
-
- .button--subscribe img {
- vertical-align: text-top;
- }
-
- .button {
- margin-right: 1.6rem;
- vertical-align: middle;
- }
}
.author-page {
diff --git a/src/components/Author/Full.tsx b/src/components/Author/Full.tsx
index cb1d2822..9f869f7e 100644
--- a/src/components/Author/Full.tsx
+++ b/src/components/Author/Full.tsx
@@ -7,7 +7,7 @@ export default (props: { author: Author }) => {
diff --git a/src/components/Author/Userpic.scss b/src/components/Author/Userpic.module.scss
similarity index 72%
rename from src/components/Author/Userpic.scss
rename to src/components/Author/Userpic.module.scss
index d5f1f951..7006922a 100644
--- a/src/components/Author/Userpic.scss
+++ b/src/components/Author/Userpic.module.scss
@@ -33,3 +33,17 @@
}
}
}
+
+.big.circlewrap {
+ margin-right: 4.8rem;
+ max-width: 168px;
+ min-width: 168px;
+ height: 168px;
+ width: 168px;
+
+ .userpic {
+ font-size: 2em;
+ line-height: 168px;
+ width: 100%;
+ }
+}
diff --git a/src/components/Author/Userpic.tsx b/src/components/Author/Userpic.tsx
index b1a68670..0a075738 100644
--- a/src/components/Author/Userpic.tsx
+++ b/src/components/Author/Userpic.tsx
@@ -1,10 +1,11 @@
import { Show } from 'solid-js/web'
import type { Author } from '../../graphql/types.gen'
-import './Userpic.scss'
+import style from './Userpic.module.scss'
interface UserpicProps {
user: Author
hasLink?: boolean
+ isBig?: boolean
}
export default (props: UserpicProps) => {
@@ -15,7 +16,7 @@ export default (props: UserpicProps) => {
}
return (
-
+
diff --git a/src/components/Feed/Beside.scss b/src/components/Feed/Beside.module.scss
similarity index 81%
rename from src/components/Feed/Beside.scss
rename to src/components/Feed/Beside.module.scss
index f248bcfa..18cd2468 100644
--- a/src/components/Feed/Beside.scss
+++ b/src/components/Feed/Beside.module.scss
@@ -1,4 +1,4 @@
-.beside-column {
+.besideColumn {
counter-reset: item;
list-style-type: none;
padding-left: 0;
@@ -29,17 +29,6 @@
text-align: center;
width: 2em;
}
-
- .shout-card--short {
- font-size: 1.4rem;
- margin-bottom: 0;
-
- .shout-card__title,
- .shout-card__subtitle {
- display: inline;
- @include font-size(1.4rem);
- }
- }
}
}
@@ -51,7 +40,7 @@
}
}
-.beside-column-title {
+.besideColumnTitle {
align-items: baseline;
justify-content: space-between;
display: flex;
@@ -87,14 +76,14 @@
}
}
-.beside-column__topic {
+.besideColumnTopic {
font-size: 1.2rem;
letter-spacing: 0.08em;
margin-bottom: 0.4rem;
text-transform: uppercase;
}
-.beside-column__shout {
+.besideColumnShout {
font-size: 1.4rem;
h4 {
diff --git a/src/components/Feed/Beside.tsx b/src/components/Feed/Beside.tsx
index e4f894f8..21b28f19 100644
--- a/src/components/Feed/Beside.tsx
+++ b/src/components/Feed/Beside.tsx
@@ -4,7 +4,7 @@ import { For, Show } from 'solid-js/web'
import { ArticleCard } from './Card'
import { AuthorCard } from '../Author/Card'
import { TopicCard } from '../Topic/Card'
-import './Beside.scss'
+import style from './Beside.module.scss'
import type { Author, Shout, Topic, User } from '../../graphql/types.gen'
import { Icon } from '../Nav/Icon'
import { t } from '../../utils/intl'
@@ -15,8 +15,10 @@ interface BesideProps {
beside: Shout
wrapper: 'topic' | 'author' | 'article' | 'top-article'
isTopicCompact?: boolean
+ isTopicInRow?: boolean
topicShortDescription?: boolean
topicsBySlug?: { [slug: string]: Topic }
+ iconButton?: boolean
}
export default (props: BesideProps) => {
@@ -27,7 +29,7 @@ export default (props: BesideProps) => {
-
+
{props.title}
@@ -38,15 +40,17 @@ export default (props: BesideProps) => {
-
+
{(value: Partial) => (
- -
+
-
@@ -58,7 +62,7 @@ export default (props: BesideProps) => {
@@ -68,7 +72,7 @@ export default (props: BesideProps) => {
diff --git a/src/components/Feed/Card.scss b/src/components/Feed/Card.module.scss
similarity index 66%
rename from src/components/Feed/Card.scss
rename to src/components/Feed/Card.module.scss
index b14f38c8..863ec09d 100644
--- a/src/components/Feed/Card.scss
+++ b/src/components/Feed/Card.module.scss
@@ -1,22 +1,12 @@
-.shout-card {
+.shoutCard {
display: flex;
flex-direction: column;
line-height: 1.2;
margin-bottom: 2.4rem;
position: relative;
- .floor--1 &:nth-child(2) {
- border-top: 1px solid #141414;
- margin-top: 2.4rem !important;
- padding-top: 2.4rem;
-
- .shout-card__cover {
- display: none;
- }
- }
-
&:hover {
- .shout-card__cover img {
+ .shoutCardCover img {
transform: scale(1.05);
}
}
@@ -26,7 +16,13 @@
}
}
-.shout-card__titles-container {
+.shoutCardWithBorder {
+ border-top: 1px solid #141414;
+ margin-top: 2.4rem !important;
+ padding-top: 2.4rem;
+}
+
+.shoutCardTitlesContainer {
a {
&::before {
content: '';
@@ -39,7 +35,7 @@
}
&:hover {
- .shout-card__title .shout-card__link-container {
+ .shoutCardTitle .shoutCardLinkContainer {
background-color: #000;
color: #fff;
}
@@ -47,11 +43,11 @@
}
}
-.shout-card__cover-container {
+.shoutCardCoverContainer {
position: relative;
}
-.shout-card__cover {
+.shoutCardCover {
height: 0;
margin-bottom: 1.6rem;
overflow: hidden;
@@ -73,25 +69,19 @@
}
}
-.shout__topic,
-.shout__author {
- a {
- position: relative;
- z-index: 2;
- }
-}
-
-.shout__author,
-.shout__date {
+.shoutAuthor,
+.shoutDate {
@include font-size(1.2rem);
}
-.shout__author {
+.shoutAuthor {
margin-right: 1.6rem;
a {
border: none;
color: rgb(0 0 0 / 70%);
+ position: relative;
+ z-index: 2;
&:hover {
color: #fff;
@@ -99,15 +89,15 @@
}
}
-.shout__date {
+.shoutDate {
color: rgb(0 0 0 / 50%);
}
-.shout__details {
+.shoutDetails {
display: flex;
}
-.shout-card__title {
+.shoutCardTitle {
@include font-size(2.2rem);
font-weight: 700;
@@ -115,29 +105,33 @@
margin-bottom: 0.8rem;
}
-.shout-card__title,
-.shout-card__subtitle {
+.shoutCardTitle,
+.shoutCardSubtitle {
&,
- .shout-card__link-container {
+ .shoutCardLinkContainer {
box-decoration-break: clone;
+
+ /* stylelint-disable-next-line */
+ -webkit-box-decoration-break: clone;
}
}
-.shout-card__subtitle {
+.shoutCardSubtitle {
color: #696969;
@include font-size(1.7rem);
font-weight: 400;
line-height: 1.3;
margin-bottom: 0.8rem;
+ transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
-.shout-card__link-container {
+.shoutCardLinkContainer {
position: relative;
transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
-.shout-card__edit-control {
+.shoutCardEditControl {
border-radius: 2em;
min-height: 2.6em;
padding: 0 1.4em;
@@ -149,17 +143,17 @@
}
}
-.shout-card.withcover {
+.shoutCard.withcover {
padding: 2.4rem;
&,
a,
- .shout-card__title,
- .shout-card__subtitle {
+ .shoutCardTitle,
+ .shoutCardSubtitle {
color: #fff;
}
- .shout-card__cover {
+ .shoutCardCover {
height: 100%;
left: 0;
padding: 0;
@@ -178,7 +172,7 @@
}
}
-.shout-card__type {
+.shoutCardType {
background: #fff;
border-radius: 100%;
height: 3.2rem;
@@ -213,7 +207,7 @@
}
}
-.shout-card__content {
+.shoutCardContent {
margin-bottom: 1em;
@include media-breakpoint-up(md) {
@@ -229,7 +223,7 @@
}
.col-md-6 .col-md-6 {
- .shout-card {
+ .shoutCard {
border-bottom: 1px solid rgb(255 255 255 / 20%);
margin: 3.6rem 0 0;
padding-bottom: 2rem;
@@ -244,71 +238,56 @@
}
}
- .shout-card__cover-container {
+ .shoutCardCoverContainer {
display: none;
}
- .shout-card__title,
- .shout-card__subtitle {
+ .shoutCardTitle,
+ .shoutCardSubtitle {
display: inline;
@include font-size(2.6rem);
line-height: 1.2;
}
- .shout-card__subtitle {
+ .shoutCardSubtitle {
color: #fff;
}
- .shout__author {
+ .shoutAuthor {
margin-top: 0.6em;
}
}
}
-.floor--important {
- padding-bottom: $container-padding-x;
- padding-top: $container-padding-x;
+.shoutCardFloorImportant {
+ margin-bottom: $grid-gutter-width;
- @include media-breakpoint-up(md) {
- padding-bottom: $grid-gutter-width;
- padding-top: $grid-gutter-width;
- }
-
- h2 {
- @include font-size(4.4rem);
-
- text-align: center;
- }
-
- .shout-card {
- margin-bottom: $grid-gutter-width;
- }
-
- .shout__author {
+ .shoutAuthor {
margin-top: 0.8rem;
- }
- .col-md-6 {
- .shout-card__title,
- .shout-card__subtitle {
- display: inline;
- @include font-size(2.6rem);
-
- line-height: 1.2;
- }
-
- .shout-card__title {
- margin-right: 0.3em;
+ a {
+ color: rgb(255 255 255 / 50%);
}
}
- .shout-card__titles-container {
+ .shoutCardTitle {
+ a {
+ color: #fff;
+ }
+ }
+
+ a:hover {
+ background: #fff;
+ color: #000 !important;
+ }
+
+ .shoutCardTitlesContainer {
a {
color: #fff;
&:hover {
- .shout-card__title .shout-card__link-container {
+ .shoutCardTitle .shoutCardLinkContainer {
background-color: #fff;
color: #000;
}
@@ -317,7 +296,7 @@
}
}
-.shout-card--with-cover {
+.shoutCardWithCover {
padding: 56.2% 2.4rem 0;
@include media-breakpoint-down(sm) {
@@ -325,7 +304,7 @@
}
&.swiper-slide {
- .shout-card__content {
+ .shoutCardContent {
@include media-breakpoint-down(md) {
padding-left: 10%;
}
@@ -334,25 +313,25 @@
&,
a,
- .shout-card__title,
- .shout-card__subtitle {
+ .shoutCardTitle,
+ .shoutCardSubtitle {
color: #fff !important;
}
- .shout__author,
- .shout-card__titles-container {
+ .shoutAuthor,
+ .shoutCardTitlesContainer {
a:hover {
&,
- .shout-card__title .shout-card__link-container {
+ .shoutCardTitle .shoutCardLinkContainer {
background-color: #fff;
color: #000 !important;
}
}
}
- .shout-card__cover-container,
- .shout-card__cover,
- .shout-card__content {
+ .shoutCardCoverContainer,
+ .shoutCardCover,
+ .shoutCardContent {
height: 100%;
left: 0;
margin: 0;
@@ -362,7 +341,7 @@
z-index: -1;
}
- .shout-card__content {
+ .shoutCardContent {
display: flex;
flex-direction: column;
justify-content: end;
@@ -370,7 +349,7 @@
z-index: 1;
}
- .shout-card__cover {
+ .shoutCardCover {
padding: 0;
&::after {
@@ -383,43 +362,37 @@
}
}
- .shout-card__title {
+ .shoutCardTitle {
@include font-size(3.2rem);
}
}
-.shout-card--content-top {
- .shout-card__content {
+.shoutCardContentTop {
+ .shoutCardContent {
justify-content: start;
}
}
-.shout-card--short {
- .shout-card__title {
- @include font-size(1.7rem);
- }
-}
-
-.shout-card--photo-bottom {
- .shout-card__content {
+.shoutCardPhotoBottom {
+ .shoutCardContent {
margin-bottom: 1.6rem;
}
- .shout-card__cover-container {
+ .shoutCardCoverContainer {
order: 2;
}
}
-.shout-card--feed {
+.shoutCardFeed {
border-bottom: 1px solid #e8e8e8;
margin-bottom: 2em;
- .shout-card__content {
+ .shoutCardContent {
margin-bottom: 0;
}
}
-.shout-card__details {
+.shoutCardDetails {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
@@ -431,11 +404,11 @@
z-index: 2;
}
-.shout-card__details-content {
+.shoutCardDetailsContent {
display: flex;
}
-.shout-card__details-item {
+.shoutCardDetailsTtem {
align-items: center;
display: flex;
margin-right: 1.7em;
@@ -454,7 +427,7 @@
}
}
-.shout-card__comments {
+.shoutCardComments {
align-items: center;
display: flex;
@@ -476,12 +449,12 @@
display: flex;
}
-.rating__value {
+.ratingValue {
font-weight: bold;
margin: 0 0.5em;
}
-.rating__control {
+.ratingControl {
align-items: center;
border: 2px solid;
border-radius: 100%;
@@ -501,32 +474,18 @@
}
}
-.floor--7 {
- @include media-breakpoint-down(md) {
- margin-bottom: 1em;
+.shoutCardVertical {
+ aspect-ratio: auto;
+ height: 100%;
+ margin: 1.6rem 0;
+ padding: 0 0 20%;
+
+ @include media-breakpoint-up(md) {
+ aspect-ratio: 1 / 1.6;
+ padding: 0;
}
- .col-md-6 {
- margin-bottom: 1.6em;
-
- @include media-breakpoint-down(md) {
- margin-right: 0;
- }
- }
-
- .shout-card {
- aspect-ratio: auto;
- height: 100%;
- margin: 1.6rem 0;
- padding: 0 0 20%;
-
- @include media-breakpoint-up(md) {
- aspect-ratio: 1 / 1.6;
- padding: 0;
- }
- }
-
- .shout-card__title {
+ .shoutCardTitle {
font-size: 2.6rem !important;
@include media-breakpoint-between(lg, xl) {
@@ -534,11 +493,11 @@
}
}
- .shout-card__content {
+ .shoutCardContent {
justify-content: start;
position: relative;
- .shout-card__subtitle {
+ .shoutCardSubtitle {
@include media-breakpoint-up(lg) {
@include font-size(2rem);
}
@@ -552,44 +511,93 @@
.floor--9 {
/* TODO: refactor these styles */
- .shout-card__title,
- .shout-card__subtitle {
+ .shoutCardTitle,
+ .shoutCardSubtitle {
// display: inline;
font-size: 2.2rem;
}
- .shout-card__title {
+ .shoutCardTitle {
padding-right: 0.25em;
}
- .shout__author,
- .shout__date {
+ .shoutAuthor,
+ .shoutDate {
margin-top: 0.8rem;
}
- .beside-column .shout-card__titles-container {
+ .beside-column .shoutCardTitlesContainer {
position: relative;
a:hover {
- .shout-card__link-container {
+ .shoutCardLinkContainer {
color: #fff;
}
}
}
}
-.col-md-6,
-.col-lg-6,
-.col-md-8 {
- .shout-card__title {
+.shoutCardBigTitle {
+ .shoutCardTitle {
display: block;
@include font-size(3.2rem);
padding-right: 0;
}
- .shout-card__subtitle {
+ .shoutCardSubtitle {
color: #696969;
@include font-size(2.4rem);
}
}
+
+.shoutCardCompact {
+ .shoutCardTitle,
+ .shoutCardSubtitle {
+ display: inline;
+ @include font-size(2.6rem);
+
+ line-height: 1.2;
+ }
+
+ .shoutCardSubtitle {
+ padding-left: 0.3em;
+ box-decoration-break: slice;
+
+ /* stylelint-disable-next-line */
+ -webkit-box-decoration-break: slice;
+ }
+
+ a {
+ color: #fff;
+
+ &:hover {
+ .shoutCardSubtitle {
+ background-color: #fff;
+ color: #000;
+ }
+ }
+ }
+}
+
+.shoutCardShort {
+ font-size: 1.4rem;
+ margin-bottom: 0;
+
+ .shoutCardTitle,
+ .shoutCardSubtitle {
+ display: inline;
+
+ @include font-size(1.4rem);
+ }
+
+ .shoutCardTitle {
+ padding-right: 0.25em;
+ }
+
+ a:hover {
+ .shoutCardLinkContainer {
+ color: #fff;
+ }
+ }
+}
diff --git a/src/components/Feed/Card.tsx b/src/components/Feed/Card.tsx
index da9e33a6..49726b00 100644
--- a/src/components/Feed/Card.tsx
+++ b/src/components/Feed/Card.tsx
@@ -5,10 +5,12 @@ import type { Shout } from '../../graphql/types.gen'
import { capitalize } from '../../utils'
import { translit } from '../../utils/ru2en'
import { Icon } from '../Nav/Icon'
-import './Card.scss'
+import style from './Card.module.scss'
import { locale } from '../../stores/ui'
import { handleClientRouteLinkClick } from '../../stores/router'
import { getLogger } from '../../utils/logger'
+import { clsx } from 'clsx'
+import CardTopic from './CardTopic'
const log = getLogger('card component')
@@ -23,6 +25,13 @@ interface ArticleCardProps {
photoBottom?: boolean
additionalClass?: string
isFeedMode?: boolean
+ isFloorImportant?: boolean
+ isWithCover?: boolean
+ isBigTitle?: boolean
+ isVertical?: boolean
+ isShort?: boolean
+ withBorder?: boolean
+ isCompact?: boolean
}
article: Shout
}
@@ -65,56 +74,64 @@ export const ArticleCard = (props: ArticleCardProps) => {
return (
{title()}
-{title()}
+