mirror of
https://github.com/mastodon/mastodon.git
synced 2025-12-12 20:43:07 +00:00
Implement custom font for Wrapstodon heading (#37193)
This commit is contained in:
parent
76184c998c
commit
c42b9f6996
100
app/javascript/fonts/silkscreen-wrapstodon/OFL.txt
Normal file
100
app/javascript/fonts/silkscreen-wrapstodon/OFL.txt
Normal file
|
|
@ -0,0 +1,100 @@
|
||||||
|
Below you'll find the original License file for the Silkscreen font.
|
||||||
|
The file used on Mastodon is a custom file subset to only include the
|
||||||
|
characters "Wrapstodon 0123456789" using the Font Squirrel Font-face Generator
|
||||||
|
(https://www.fontsquirrel.com/tools/webfont-generator)
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
Copyright 2001 The Silkscreen Project Authors (https://github.com/googlefonts/silkscreen)
|
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
This license is copied below, and is also available with a FAQ at:
|
||||||
|
https://openfontlicense.org
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||||
|
development of collaborative font projects, to support the font creation
|
||||||
|
efforts of academic and linguistic communities, and to provide a free and
|
||||||
|
open framework in which fonts may be shared and improved in partnership
|
||||||
|
with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and
|
||||||
|
redistributed freely as long as they are not sold by themselves. The
|
||||||
|
fonts, including any derivative works, can be bundled, embedded,
|
||||||
|
redistributed and/or sold with any software provided that any reserved
|
||||||
|
names are not used by derivative works. The fonts and derivatives,
|
||||||
|
however, cannot be released under any other type of license. The
|
||||||
|
requirement for fonts to remain under this license does not apply
|
||||||
|
to any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
"Font Software" refers to the set of files released by the Copyright
|
||||||
|
Holder(s) under this license and clearly marked as such. This may
|
||||||
|
include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the
|
||||||
|
copyright statement(s).
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as
|
||||||
|
distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||||
|
or substituting -- in part or in whole -- any of the components of the
|
||||||
|
Original Version, by changing formats or by porting the Font Software to a
|
||||||
|
new environment.
|
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical
|
||||||
|
writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||||
|
redistribute, and sell modified and unmodified copies of the Font
|
||||||
|
Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components,
|
||||||
|
in Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled,
|
||||||
|
redistributed and/or sold with any software, provided that each copy
|
||||||
|
contains the above copyright notice and this license. These can be
|
||||||
|
included either as stand-alone text files, human-readable headers or
|
||||||
|
in the appropriate machine-readable metadata fields within text or
|
||||||
|
binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font
|
||||||
|
Name(s) unless explicit written permission is granted by the corresponding
|
||||||
|
Copyright Holder. This restriction only applies to the primary font name as
|
||||||
|
presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||||
|
Software shall not be used to promote, endorse or advertise any
|
||||||
|
Modified Version, except to acknowledge the contribution(s) of the
|
||||||
|
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole,
|
||||||
|
must be distributed entirely under this license, and must not be
|
||||||
|
distributed under any other license. The requirement for fonts to
|
||||||
|
remain under this license does not apply to any document created
|
||||||
|
using the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This license becomes null and void if any of the above conditions are
|
||||||
|
not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||||
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||||
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||||
Binary file not shown.
|
|
@ -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 {
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,6 @@
|
||||||
"annual_report.summary.percentile.text": "<topLabel>That puts you in the top</topLabel><percentage></percentage><bottomLabel>of {domain} users.</bottomLabel>",
|
"annual_report.summary.percentile.text": "<topLabel>That puts you in the top</topLabel><percentage></percentage><bottomLabel>of {domain} users.</bottomLabel>",
|
||||||
"annual_report.summary.percentile.we_wont_tell_bernie": "We won't tell Bernie.",
|
"annual_report.summary.percentile.we_wont_tell_bernie": "We won't tell Bernie.",
|
||||||
"annual_report.summary.share_message": "I got the {archetype} archetype!",
|
"annual_report.summary.share_message": "I got the {archetype} archetype!",
|
||||||
"annual_report.summary.title": "Wrapstodon {year}",
|
|
||||||
"attachments_list.unprocessed": "(unprocessed)",
|
"attachments_list.unprocessed": "(unprocessed)",
|
||||||
"audio.hide": "Hide audio",
|
"audio.hide": "Hide audio",
|
||||||
"block_modal.remote_users_caveat": "We will ask the server {domain} to respect your decision. However, compliance is not guaranteed since some servers may handle blocks differently. Public posts may still be visible to non-logged-in users.",
|
"block_modal.remote_users_caveat": "We will ask the server {domain} to respect your decision. However, compliance is not guaranteed since some servers may handle blocks differently. Public posts may still be visible to non-logged-in users.",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user