mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-12 23:38:20 +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: {
|
||||
context: 'standalone',
|
||||
},
|
||||
render: (args) => <AnnualReport {...args} />,
|
||||
};
|
||||
|
||||
export const InModal: Story = {
|
||||
args: {
|
||||
context: 'modal',
|
||||
},
|
||||
render: (args) => <AnnualReport {...args} />,
|
||||
};
|
||||
|
||||
export const ArchetypeOracle: Story = {
|
||||
@@ -62,7 +60,6 @@ export const ArchetypeOracle: Story = {
|
||||
}),
|
||||
},
|
||||
},
|
||||
render: (args) => <AnnualReport {...args} />,
|
||||
};
|
||||
|
||||
export const NoHashtag: Story = {
|
||||
@@ -74,7 +71,6 @@ export const NoHashtag: Story = {
|
||||
}),
|
||||
},
|
||||
},
|
||||
render: (args) => <AnnualReport {...args} />,
|
||||
};
|
||||
|
||||
export const NoNewPosts: Story = {
|
||||
@@ -88,7 +84,6 @@ export const NoNewPosts: Story = {
|
||||
}),
|
||||
},
|
||||
},
|
||||
render: (args) => <AnnualReport {...args} />,
|
||||
};
|
||||
|
||||
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 {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
@@ -9,22 +20,33 @@
|
||||
pointer-events: none;
|
||||
scrollbar-color: var(--color-text-secondary) var(--color-bg-secondary);
|
||||
|
||||
@media (width < $mobile-breakpoint) {
|
||||
padding-inline: 10px;
|
||||
}
|
||||
|
||||
.loading-indicator .circular-progress {
|
||||
color: var(--lime);
|
||||
}
|
||||
}
|
||||
|
||||
.closeButton {
|
||||
position: absolute;
|
||||
top: 24px;
|
||||
right: 24px;
|
||||
padding: 8px;
|
||||
border-radius: 100%;
|
||||
|
||||
--default-icon-color: var(--color-bg-primary);
|
||||
--default-bg-color: var(--color-text-primary);
|
||||
--hover-icon-color: var(--color-bg-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 {
|
||||
@@ -45,8 +67,10 @@
|
||||
var(--color-bg-primary);
|
||||
border-radius: 40px;
|
||||
|
||||
@media (width < 600px) {
|
||||
padding: 12px;
|
||||
@media (width < $mobile-breakpoint) {
|
||||
padding-inline: 12px;
|
||||
padding-bottom: 12px;
|
||||
border-radius: 28px;
|
||||
}
|
||||
|
||||
&::after {
|
||||
@@ -65,13 +89,16 @@
|
||||
text-align: center;
|
||||
|
||||
h1 {
|
||||
font-family: monospace;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.15em;
|
||||
font-size: 30px;
|
||||
font-weight: 600;
|
||||
line-height: 1.5;
|
||||
font-family: silkscreen-wrapstodon, monospace;
|
||||
font-size: 28px;
|
||||
line-height: 1;
|
||||
margin-bottom: 8px;
|
||||
padding-inline: 40px; // Prevent overlap with close button
|
||||
|
||||
@media (width < $mobile-breakpoint) {
|
||||
font-size: 22px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
@@ -150,6 +177,10 @@
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
overflow-wrap: break-word;
|
||||
|
||||
@media (width < $mobile-breakpoint) {
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.mostBoostedPost {
|
||||
@@ -166,7 +197,7 @@
|
||||
'followers hashtag'
|
||||
'new-posts hashtag';
|
||||
|
||||
@media (width < 680px) {
|
||||
@media (width < $mobile-breakpoint) {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-areas:
|
||||
'followers new-posts'
|
||||
@@ -191,7 +222,7 @@
|
||||
grid-template-columns: 1fr 2fr;
|
||||
grid-template-areas: 'number hashtag';
|
||||
|
||||
@media (width < 680px) {
|
||||
@media (width < $mobile-breakpoint) {
|
||||
grid-template-areas:
|
||||
'number number'
|
||||
'hashtag hashtag';
|
||||
@@ -230,6 +261,10 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
|
||||
p {
|
||||
max-width: 460px;
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeArtboard {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useCallback, useEffect, useState } 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';
|
||||
|
||||
@@ -75,13 +75,7 @@ export const AnnualReport: FC<{ context?: 'modal' | 'standalone' }> = ({
|
||||
return (
|
||||
<div className={moduleClassNames(styles.wrapper, 'theme-dark')}>
|
||||
<div className={styles.header}>
|
||||
<h1>
|
||||
<FormattedMessage
|
||||
id='annual_report.summary.title'
|
||||
defaultMessage='Wrapstodon {year}'
|
||||
values={{ year: report.year }}
|
||||
/>
|
||||
</h1>
|
||||
<h1>Wrapstodon {report.year}</h1>
|
||||
{account && <p>@{account.acct}</p>}
|
||||
{context === 'modal' && (
|
||||
<IconButton
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
.wrapper {
|
||||
max-width: max-content;
|
||||
margin: 40px auto;
|
||||
margin-inline: auto;
|
||||
padding: 40px 10px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
|
||||
Reference in New Issue
Block a user