mirror of
https://github.com/modrinth/code.git
synced 2026-09-05 06:19:11 +00:00
chore: remove usage of cdn-raw (#7405)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
font-weight: 400;
|
||||
src: url('https://cdn-raw.modrinth.com/fonts/minecraft/regular.otf') format('opentype');
|
||||
src: url('https://cdn.modrinth.com/fonts/minecraft/regular.otf') format('opentype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
@@ -17,7 +17,7 @@
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
font-weight: 400;
|
||||
src: url('https://cdn-raw.modrinth.com/fonts/minecraft/italic.otf') format('opentype');
|
||||
src: url('https://cdn.modrinth.com/fonts/minecraft/italic.otf') format('opentype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
@@ -25,7 +25,7 @@
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
font-weight: 600;
|
||||
src: url('https://cdn-raw.modrinth.com/fonts/minecraft/bold.otf') format('opentype');
|
||||
src: url('https://cdn.modrinth.com/fonts/minecraft/bold.otf') format('opentype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
@@ -33,7 +33,7 @@
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
font-weight: 600;
|
||||
src: url('https://cdn-raw.modrinth.com/fonts/minecraft/bold-italic.otf') format('opentype');
|
||||
src: url('https://cdn.modrinth.com/fonts/minecraft/bold-italic.otf') format('opentype');
|
||||
}
|
||||
|
||||
.font-minecraft {
|
||||
|
||||
@@ -39,12 +39,12 @@ function updateAdPosition() {
|
||||
class="flex max-h-[250px] min-h-[250px] min-w-[300px] max-w-[300px] flex-col gap-4 rounded-[inherit]"
|
||||
>
|
||||
<img
|
||||
src="https://cdn-raw.modrinth.com/modrinth-hosting-medal-light.webp"
|
||||
src="https://cdn.modrinth.com/modrinth-hosting-medal-light.webp"
|
||||
alt="Host your next server with Modrinth Hosting"
|
||||
class="hidden light-image rounded-[inherit]"
|
||||
/>
|
||||
<img
|
||||
src="https://cdn-raw.modrinth.com/modrinth-hosting-medal-dark.webp"
|
||||
src="https://cdn.modrinth.com/modrinth-hosting-medal-dark.webp"
|
||||
alt="Host your next server with Modrinth Hosting"
|
||||
class="dark-image rounded-[inherit]"
|
||||
/>
|
||||
|
||||
@@ -12,12 +12,7 @@
|
||||
"copyright": "",
|
||||
"targets": "all",
|
||||
"externalBin": [],
|
||||
"icon": [
|
||||
"icons/128x128.png",
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
],
|
||||
"icon": ["icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"],
|
||||
"windows": {
|
||||
"nsis": {
|
||||
"installMode": "currentUser",
|
||||
@@ -55,9 +50,7 @@
|
||||
},
|
||||
"fileAssociations": [
|
||||
{
|
||||
"ext": [
|
||||
"mrpack"
|
||||
],
|
||||
"ext": ["mrpack"],
|
||||
"mimeType": "application/x-modrinth-modpack+zip"
|
||||
}
|
||||
]
|
||||
@@ -69,9 +62,7 @@
|
||||
"plugins": {
|
||||
"deep-link": {
|
||||
"desktop": {
|
||||
"schemes": [
|
||||
"modrinth"
|
||||
]
|
||||
"schemes": ["modrinth"]
|
||||
},
|
||||
"mobile": []
|
||||
}
|
||||
@@ -108,18 +99,11 @@
|
||||
],
|
||||
"enable": true
|
||||
},
|
||||
"capabilities": [
|
||||
"ads",
|
||||
"core",
|
||||
"plugins"
|
||||
],
|
||||
"capabilities": ["ads", "core", "plugins"],
|
||||
"csp": {
|
||||
"default-src": "'self' customprotocol: asset:",
|
||||
"connect-src": "ipc: http://ipc.localhost https://modrinth.com https://*.modrinth.com https://*.nodes.modrinth.com https://*.posthog.com https://posthog.modrinth.com https://*.sentry.io https://api.mclo.gs http://textures.minecraft.net https://textures.minecraft.net https://js.stripe.com https://*.stripe.com wss://*.stripe.com https://*.intercom.io wss://*.intercom.io https://*.intercomcdn.com https://www.intercom-reporting.com https://app.getsentry.com wss://*.nodes.modrinth.com https://*.taila228c5.ts.net https://*.taila228c5.ts.net wss://*.taila228c5.ts.net https://fill.papermc.io https://api.purpurmc.org 'self' data: blob:",
|
||||
"font-src": [
|
||||
"https://cdn-raw.modrinth.com/fonts/",
|
||||
"https://js.intercomcdn.com"
|
||||
],
|
||||
"font-src": ["https://cdn.modrinth.com/fonts/", "https://js.intercomcdn.com"],
|
||||
"img-src": "https: 'unsafe-inline' 'self' asset: http://asset.localhost http://textures.minecraft.net blob: data:",
|
||||
"style-src": "'unsafe-inline' 'self'",
|
||||
"script-src": "https://*.posthog.com https://posthog.modrinth.com https://js.stripe.com https://widget.intercom.io https://js.intercomcdn.com https://tally.so/widgets/embed.js 'self'",
|
||||
|
||||
@@ -38,7 +38,7 @@ export default defineNuxtConfig({
|
||||
...preloadedFonts.map((font): object => {
|
||||
return {
|
||||
rel: 'preload',
|
||||
href: `https://cdn-raw.modrinth.com/fonts/${font}?v=3.19`,
|
||||
href: `https://cdn.modrinth.com/fonts/${font}?v=3.19`,
|
||||
as: 'font',
|
||||
type: 'font/woff2',
|
||||
crossorigin: 'anonymous',
|
||||
|
||||
@@ -62,14 +62,14 @@ useHead({
|
||||
|
||||
const AD_PRESETS = {
|
||||
medal: {
|
||||
light: 'https://cdn-raw.modrinth.com/modrinth-hosting-medal-light.webp',
|
||||
dark: 'https://cdn-raw.modrinth.com/modrinth-hosting-medal-dark.webp',
|
||||
light: 'https://cdn.modrinth.com/modrinth-hosting-medal-light.webp',
|
||||
dark: 'https://cdn.modrinth.com/modrinth-hosting-medal-dark.webp',
|
||||
description: 'Host your next server with Modrinth Hosting',
|
||||
link: '/hosting?plan&ref=medal',
|
||||
},
|
||||
'modrinth-hosting': {
|
||||
light: 'https://cdn-raw.modrinth.com/modrinth-hosting-light.webp',
|
||||
dark: 'https://cdn-raw.modrinth.com/modrinth-hosting-dark.webp',
|
||||
light: 'https://cdn.modrinth.com/modrinth-hosting-light.webp',
|
||||
dark: 'https://cdn.modrinth.com/modrinth-hosting-dark.webp',
|
||||
description: 'Host your next server with Modrinth Hosting',
|
||||
link: '/hosting',
|
||||
},
|
||||
|
||||
@@ -2073,8 +2073,8 @@ if (!route.name.startsWith('type-project-settings')) {
|
||||
ogDescription: () => project.value?.description ?? PROJECT_NOT_FOUND_DESCRIPTION,
|
||||
ogImage: () =>
|
||||
project.value
|
||||
? (project.value?.icon_url ?? 'https://cdn-raw.modrinth.com/placeholder-square.png')
|
||||
: 'https://cdn-raw.modrinth.com/not-found.png',
|
||||
? (project.value?.icon_url ?? 'https://cdn.modrinth.com/placeholder-square.png')
|
||||
: 'https://cdn.modrinth.com/not-found.png',
|
||||
ogUrl: createCanonicalUrl,
|
||||
robots: () => (project.value?.status === 'approved' ? 'all' : 'noindex'),
|
||||
})
|
||||
|
||||
@@ -559,7 +559,7 @@ useSeoMeta({
|
||||
{{ formatMessage(messages.moreDownloadOptions) }}
|
||||
</Button>
|
||||
</div>
|
||||
<img src="https://cdn-raw.modrinth.com/app-landing/app-screenshot.webp" alt="" />
|
||||
<img src="https://cdn.modrinth.com/app-landing/app-screenshot.webp" alt="" />
|
||||
<div class="bottom-transition" />
|
||||
</div>
|
||||
<div class="features">
|
||||
@@ -617,12 +617,12 @@ useSeoMeta({
|
||||
<p>{{ formatMessage(messages.playWithFavoriteModsDescription) }}</p>
|
||||
</div>
|
||||
<img
|
||||
src="https://cdn-raw.modrinth.com/app-landing/cobblemon-launcher.webp"
|
||||
src="https://cdn.modrinth.com/app-landing/cobblemon-launcher.webp"
|
||||
:alt="formatMessage(messages.appScreenshotAlt)"
|
||||
class="launcher"
|
||||
/>
|
||||
<img
|
||||
src="https://cdn-raw.modrinth.com/app-landing/cobblemon.webp"
|
||||
src="https://cdn.modrinth.com/app-landing/cobblemon.webp"
|
||||
:alt="formatMessage(messages.minecraftScreenshotAlt)"
|
||||
class="minecraft"
|
||||
/>
|
||||
@@ -1205,8 +1205,8 @@ useSeoMeta({
|
||||
<style scoped lang="scss">
|
||||
.landing-hero {
|
||||
position: relative;
|
||||
background: #0f1121 url('https://cdn-raw.modrinth.com/app-landing/cube-black.png') no-repeat
|
||||
center 4rem;
|
||||
background: #0f1121 url('https://cdn.modrinth.com/app-landing/cube-black.png') no-repeat center
|
||||
4rem;
|
||||
background-size: cover;
|
||||
padding: 6rem 1rem 12rem 1rem;
|
||||
margin-top: -5rem;
|
||||
@@ -2376,7 +2376,7 @@ useSeoMeta({
|
||||
}
|
||||
|
||||
.landing-hero {
|
||||
background: url('https://cdn-raw.modrinth.com/app-landing/cube-light.png') no-repeat center 4rem;
|
||||
background: url('https://cdn.modrinth.com/app-landing/cube-light.png') no-repeat center 4rem;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
|
||||
@@ -736,7 +736,7 @@ watch(
|
||||
}),
|
||||
ogTitle: formatMessage(messages.collectionTitle, { name: col.name }),
|
||||
ogDescription: col.description,
|
||||
ogImage: col.icon_url ?? 'https://cdn-raw.modrinth.com/placeholder-square.png',
|
||||
ogImage: col.icon_url ?? 'https://cdn.modrinth.com/placeholder-square.png',
|
||||
ogUrl: canonicalUrl,
|
||||
robots: col.status === 'listed' && hasPublicProjects ? 'all' : 'noindex',
|
||||
})
|
||||
|
||||
@@ -166,7 +166,7 @@ onMounted(() => {
|
||||
to="/organization/modrinth"
|
||||
class="inline-flex items-center gap-1 font-semibold hover:underline hover:brightness-[--hover-brightness]"
|
||||
>
|
||||
<Avatar src="https://cdn-raw.modrinth.com/modrinth-icon-96.webp" size="24px" />
|
||||
<Avatar src="https://cdn.modrinth.com/modrinth-icon-96.webp" size="24px" />
|
||||
Modrinth Team
|
||||
</nuxt-link>
|
||||
</template>
|
||||
|
||||
@@ -396,7 +396,7 @@ watch(
|
||||
description,
|
||||
ogTitle: title,
|
||||
ogDescription: org.description,
|
||||
ogImage: org.icon_url ?? 'https://cdn-raw.modrinth.com/placeholder-square.png',
|
||||
ogImage: org.icon_url ?? 'https://cdn.modrinth.com/placeholder-square.png',
|
||||
ogUrl: canonicalUrl,
|
||||
})
|
||||
useHead({
|
||||
|
||||
@@ -111,8 +111,8 @@ useSeoMeta({
|
||||
ogDescription: () => description.value,
|
||||
ogImage: () =>
|
||||
prefetchedUser
|
||||
? (prefetchedUser?.avatar_url ?? 'https://cdn-raw.modrinth.com/placeholder-circle.png')
|
||||
: 'https://cdn-raw.modrinth.com/not-found-circle.png',
|
||||
? (prefetchedUser?.avatar_url ?? 'https://cdn.modrinth.com/placeholder-circle.png')
|
||||
: 'https://cdn.modrinth.com/not-found-circle.png',
|
||||
})
|
||||
|
||||
const projectCreateModal = ref<InstanceType<typeof ProjectCreateModal> | null>(null)
|
||||
|
||||
@@ -26,7 +26,7 @@ import StyledEmail from '../shared/StyledEmail.vue'
|
||||
width="20"
|
||||
height="20"
|
||||
alt="Time icon"
|
||||
src="https://cdn-raw.modrinth.com/email/earth.png"
|
||||
src="https://cdn.modrinth.com/email/earth.png"
|
||||
/>
|
||||
</Column>
|
||||
<Column>
|
||||
@@ -41,7 +41,7 @@ import StyledEmail from '../shared/StyledEmail.vue'
|
||||
width="20"
|
||||
height="20"
|
||||
alt="Time icon"
|
||||
src="https://cdn-raw.modrinth.com/email/monitor-smartphone.png"
|
||||
src="https://cdn.modrinth.com/email/monitor-smartphone.png"
|
||||
/>
|
||||
</Column>
|
||||
<Column>
|
||||
@@ -56,7 +56,7 @@ import StyledEmail from '../shared/StyledEmail.vue'
|
||||
width="20"
|
||||
height="20"
|
||||
alt="Time icon"
|
||||
src="https://cdn-raw.modrinth.com/email/clock.png"
|
||||
src="https://cdn.modrinth.com/email/clock.png"
|
||||
/>
|
||||
</Column>
|
||||
<Column>
|
||||
|
||||
@@ -19,37 +19,37 @@ const socialLinks = Object.freeze<readonly SocialLink[]>([
|
||||
{
|
||||
href: 'https://discord.modrinth.com',
|
||||
alt: 'Discord',
|
||||
src: 'https://cdn-raw.modrinth.com/email/discord.png',
|
||||
src: 'https://cdn.modrinth.com/email/discord.png',
|
||||
},
|
||||
{
|
||||
href: 'https://bsky.app/profile/modrinth.com',
|
||||
alt: 'Bluesky',
|
||||
src: 'https://cdn-raw.modrinth.com/email/bluesky.png',
|
||||
src: 'https://cdn.modrinth.com/email/bluesky.png',
|
||||
},
|
||||
{
|
||||
href: 'https://floss.social/@modrinth',
|
||||
alt: 'Mastodon',
|
||||
src: 'https://cdn-raw.modrinth.com/email/mastodon.png',
|
||||
src: 'https://cdn.modrinth.com/email/mastodon.png',
|
||||
},
|
||||
{
|
||||
href: 'https://x.com/modrinth',
|
||||
alt: 'X (Twitter)',
|
||||
src: 'https://cdn-raw.modrinth.com/email/x.png',
|
||||
src: 'https://cdn.modrinth.com/email/x.png',
|
||||
},
|
||||
{
|
||||
href: 'https://www.instagram.com/modrinth/',
|
||||
alt: 'Instagram',
|
||||
src: 'https://cdn-raw.modrinth.com/email/instagram.png',
|
||||
src: 'https://cdn.modrinth.com/email/instagram.png',
|
||||
},
|
||||
{
|
||||
href: 'https://www.youtube.com/@modrinth',
|
||||
alt: 'YouTube',
|
||||
src: 'https://cdn-raw.modrinth.com/email/youtube.png',
|
||||
src: 'https://cdn.modrinth.com/email/youtube.png',
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/modrinth',
|
||||
alt: 'GitHub',
|
||||
src: 'https://cdn-raw.modrinth.com/email/github.png',
|
||||
src: 'https://cdn.modrinth.com/email/github.png',
|
||||
},
|
||||
])
|
||||
</script>
|
||||
|
||||
@@ -353,7 +353,7 @@ pub async fn send_slack_project_webhook(
|
||||
"elements": [
|
||||
{
|
||||
"type": "image",
|
||||
"image_url": "https://cdn-raw.modrinth.com/modrinth-new.png",
|
||||
"image_url": "https://cdn.modrinth.com/modrinth-new.png",
|
||||
"alt_text": "Author"
|
||||
},
|
||||
{
|
||||
@@ -492,7 +492,7 @@ pub async fn send_discord_webhook(
|
||||
footer: Some(DiscordEmbedFooter {
|
||||
text: format!("{} on Modrinth", project.display_project_type),
|
||||
icon_url: Some(
|
||||
"https://cdn-raw.modrinth.com/modrinth-new.png".to_string(),
|
||||
"https://cdn.modrinth.com/modrinth-new.png".to_string(),
|
||||
),
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user