mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 16:59:41 +00:00
[Glitch] Implement custom font for Wrapstodon heading
Port c42b9f6996 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -42,14 +42,12 @@ export const Standalone: Story = {
|
|||||||
args: {
|
args: {
|
||||||
context: 'standalone',
|
context: 'standalone',
|
||||||
},
|
},
|
||||||
render: (args) => <AnnualReport {...args} />,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const InModal: Story = {
|
export const InModal: Story = {
|
||||||
args: {
|
args: {
|
||||||
context: 'modal',
|
context: 'modal',
|
||||||
},
|
},
|
||||||
render: (args) => <AnnualReport {...args} />,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ArchetypeOracle: Story = {
|
export const ArchetypeOracle: Story = {
|
||||||
@@ -62,7 +60,6 @@ export const ArchetypeOracle: Story = {
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
render: (args) => <AnnualReport {...args} />,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const NoHashtag: Story = {
|
export const NoHashtag: Story = {
|
||||||
@@ -74,7 +71,6 @@ export const NoHashtag: Story = {
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
render: (args) => <AnnualReport {...args} />,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const NoNewPosts: Story = {
|
export const NoNewPosts: Story = {
|
||||||
@@ -88,7 +84,6 @@ export const NoNewPosts: Story = {
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
render: (args) => <AnnualReport {...args} />,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const NoNewPostsNoHashtag: Story = {
|
export const NoNewPostsNoHashtag: Story = {
|
||||||
@@ -101,5 +96,4 @@ export const NoNewPostsNoHashtag: Story = {
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
render: (args) => <AnnualReport {...args} />,
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,3 +1,14 @@
|
|||||||
|
$mobile-breakpoint: 540px;
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: silkscreen-wrapstodon;
|
||||||
|
src: url('@/fonts/silkscreen-wrapstodon/silkscreen-regular.woff2')
|
||||||
|
format('woff2');
|
||||||
|
font-weight: normal;
|
||||||
|
font-display: swap;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
.modalWrapper {
|
.modalWrapper {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
@@ -9,22 +20,33 @@
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
scrollbar-color: var(--color-text-secondary) var(--color-bg-secondary);
|
scrollbar-color: var(--color-text-secondary) var(--color-bg-secondary);
|
||||||
|
|
||||||
|
@media (width < $mobile-breakpoint) {
|
||||||
|
padding-inline: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.loading-indicator .circular-progress {
|
.loading-indicator .circular-progress {
|
||||||
color: var(--lime);
|
color: var(--lime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.closeButton {
|
.closeButton {
|
||||||
position: absolute;
|
|
||||||
top: 24px;
|
|
||||||
right: 24px;
|
|
||||||
padding: 8px;
|
|
||||||
border-radius: 100%;
|
|
||||||
|
|
||||||
--default-icon-color: var(--color-bg-primary);
|
--default-icon-color: var(--color-bg-primary);
|
||||||
--default-bg-color: var(--color-text-primary);
|
--default-bg-color: var(--color-text-primary);
|
||||||
--hover-icon-color: var(--color-bg-primary);
|
--hover-icon-color: var(--color-bg-primary);
|
||||||
--hover-bg-color: var(--color-text-primary);
|
--hover-bg-color: var(--color-text-primary);
|
||||||
|
--corner-distance: 18px;
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
top: var(--corner-distance);
|
||||||
|
right: var(--corner-distance);
|
||||||
|
padding: 8px;
|
||||||
|
border-radius: 100%;
|
||||||
|
|
||||||
|
@media (width < $mobile-breakpoint) {
|
||||||
|
--corner-distance: 16px;
|
||||||
|
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
@@ -45,8 +67,10 @@
|
|||||||
var(--color-bg-primary);
|
var(--color-bg-primary);
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
|
|
||||||
@media (width < 600px) {
|
@media (width < $mobile-breakpoint) {
|
||||||
padding: 12px;
|
padding-inline: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
border-radius: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
@@ -65,13 +89,16 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-family: monospace;
|
font-family: silkscreen-wrapstodon, monospace;
|
||||||
text-transform: uppercase;
|
font-size: 28px;
|
||||||
letter-spacing: 0.15em;
|
line-height: 1;
|
||||||
font-size: 30px;
|
|
||||||
font-weight: 600;
|
|
||||||
line-height: 1.5;
|
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
|
padding-inline: 40px; // Prevent overlap with close button
|
||||||
|
|
||||||
|
@media (width < $mobile-breakpoint) {
|
||||||
|
font-size: 22px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
@@ -150,6 +177,10 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
|
|
||||||
|
@media (width < $mobile-breakpoint) {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mostBoostedPost {
|
.mostBoostedPost {
|
||||||
@@ -166,7 +197,7 @@
|
|||||||
'followers hashtag'
|
'followers hashtag'
|
||||||
'new-posts hashtag';
|
'new-posts hashtag';
|
||||||
|
|
||||||
@media (width < 680px) {
|
@media (width < $mobile-breakpoint) {
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
'followers new-posts'
|
'followers new-posts'
|
||||||
@@ -191,7 +222,7 @@
|
|||||||
grid-template-columns: 1fr 2fr;
|
grid-template-columns: 1fr 2fr;
|
||||||
grid-template-areas: 'number hashtag';
|
grid-template-areas: 'number hashtag';
|
||||||
|
|
||||||
@media (width < 680px) {
|
@media (width < $mobile-breakpoint) {
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
'number number'
|
'number number'
|
||||||
'hashtag hashtag';
|
'hashtag hashtag';
|
||||||
@@ -230,6 +261,10 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
|
|
||||||
|
p {
|
||||||
|
max-width: 460px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.archetypeArtboard {
|
.archetypeArtboard {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useCallback, useEffect, useState } from 'react';
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
import type { FC } from 'react';
|
import type { FC } from 'react';
|
||||||
|
|
||||||
import { defineMessage, FormattedMessage, useIntl } from 'react-intl';
|
import { defineMessage, useIntl } from 'react-intl';
|
||||||
|
|
||||||
import { useLocation } from 'react-router';
|
import { useLocation } from 'react-router';
|
||||||
|
|
||||||
@@ -75,13 +75,7 @@ export const AnnualReport: FC<{ context?: 'modal' | 'standalone' }> = ({
|
|||||||
return (
|
return (
|
||||||
<div className={moduleClassNames(styles.wrapper, 'theme-dark')}>
|
<div className={moduleClassNames(styles.wrapper, 'theme-dark')}>
|
||||||
<div className={styles.header}>
|
<div className={styles.header}>
|
||||||
<h1>
|
<h1>Wrapstodon {report.year}</h1>
|
||||||
<FormattedMessage
|
|
||||||
id='annual_report.summary.title'
|
|
||||||
defaultMessage='Wrapstodon {year}'
|
|
||||||
values={{ year: report.year }}
|
|
||||||
/>
|
|
||||||
</h1>
|
|
||||||
{account && <p>@{account.acct}</p>}
|
{account && <p>@{account.acct}</p>}
|
||||||
{context === 'modal' && (
|
{context === 'modal' && (
|
||||||
<IconButton
|
<IconButton
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
.wrapper {
|
.wrapper {
|
||||||
max-width: max-content;
|
max-width: max-content;
|
||||||
margin: 40px auto;
|
margin-inline: auto;
|
||||||
|
padding: 40px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
|
|||||||
Reference in New Issue
Block a user