+
+
{
onClick={(event) => event.stopPropagation()}
>
{props.children}
-
-
-
+
+
+
+
+
diff --git a/src/components/Nav/Topics/Topics.module.scss b/src/components/Nav/Topics/Topics.module.scss
index 128dc46f..c7bec984 100644
--- a/src/components/Nav/Topics/Topics.module.scss
+++ b/src/components/Nav/Topics/Topics.module.scss
@@ -6,8 +6,10 @@
overflow: hidden;
position: relative;
transform: translateY(-2px);
+ width: 100%;
@include media-breakpoint-down(sm) {
+ overflow: auto;
padding: 0 divide($container-padding-x, 2);
}
diff --git a/src/components/Topic/TopicBadge/TopicBadge.module.scss b/src/components/Topic/TopicBadge/TopicBadge.module.scss
index e8a87c9f..65ddfdcf 100644
--- a/src/components/Topic/TopicBadge/TopicBadge.module.scss
+++ b/src/components/Topic/TopicBadge/TopicBadge.module.scss
@@ -3,14 +3,15 @@
flex-direction: row;
align-items: flex-start;
margin-bottom: 2rem;
+ gap: 1rem;
- @include media-breakpoint-down(sm) {
- flex-wrap: wrap;
- margin-bottom: 3rem;
- }
-
- @include media-breakpoint-down(md) {
- text-align: left;
+ .basicInfo {
+ display: flex;
+ flex-direction: row;
+ align-items: flex-start;
+ flex-wrap: nowrap;
+ flex: 1;
+ gap: 1rem;
}
.picture {
@@ -24,7 +25,12 @@
background-position: 50% 50%;
background-repeat: no-repeat;
border: none;
- margin-right: 1.2rem;
+
+ &.smallSize {
+ width: 32px;
+ height: 32px;
+ min-width: 32px;
+ }
&:hover {
background-color: var(--black-50);
@@ -40,21 +46,18 @@
border: none;
display: flex;
- flex: 0 calc(100% - 5.2rem);
flex-direction: column;
- margin-bottom: 1rem;
-
- @include media-breakpoint-up(sm) {
- flex: 1 100%;
- }
&:hover {
background: unset;
}
.title {
+ @include font-size(1.4rem);
+
+ font-weight: 500;
+ line-height: 1em;
color: var(--blue-500);
- font-weight: 700;
text-transform: uppercase;
}
@@ -64,19 +67,9 @@
}
.actions {
- flex: 0 20%;
- margin-left: 5.2rem;
-
- @include media-breakpoint-up(sm) {
- margin-left: 2rem;
- }
-
- @include media-breakpoint-up(md) {
- flex: 1;
- margin-left: auto;
- padding-left: 1rem;
- text-align: right;
- }
+ display: flex;
+ flex-direction: row;
+ gap: 1rem;
}
.subscribeButton {
diff --git a/src/components/Topic/TopicBadge/TopicBadge.tsx b/src/components/Topic/TopicBadge/TopicBadge.tsx
index 9ad6da66..605ac6a0 100644
--- a/src/components/Topic/TopicBadge/TopicBadge.tsx
+++ b/src/components/Topic/TopicBadge/TopicBadge.tsx
@@ -1,7 +1,8 @@
import { clsx } from 'clsx'
-import { createMemo, createSignal, Show } from 'solid-js'
+import { createEffect, createMemo, createSignal, Show } from 'solid-js'
import { useLocalize } from '../../../context/localize'
+import { useMediaQuery } from '../../../context/mediaQuery'
import { useSession } from '../../../context/session'
import { FollowingEntity, Topic } from '../../../graphql/types.gen'
import { follow, unfollow } from '../../../stores/zine/common'
@@ -17,10 +18,14 @@ type Props = {
}
export const TopicBadge = (props: Props) => {
- const [isSubscribing, setIsSubscribing] = createSignal(false)
const { t } = useLocalize()
+ const { mediaMatches } = useMediaQuery()
+ const [isMobileView, setIsMobileView] = createSignal(false)
+ const [isSubscribing, setIsSubscribing] = createSignal(false)
+ createEffect(() => {
+ setIsMobileView(!mediaMatches.sm)
+ })
const {
- isAuthenticated,
subscriptions,
actions: { loadSubscriptions },
} = useSession()
@@ -42,63 +47,63 @@ export const TopicBadge = (props: Props) => {
return (
+ }
+ >
+
{props.topic.body}
+
+
+