Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert, asset rewriting #9192

Merged
merged 5 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/changelog/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@tailwind components;
@tailwind utilities;


#changelogcontent {
font-family: var(--font-rubik);
}
Expand Down
6 changes: 4 additions & 2 deletions app/changelog/header.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import Image from 'next/image';

export default function Header({loading}) {
return (
<div className="w-full mx-auto h-96 relative bg-darkPurple">
<div className="relative w-full lg:max-w-7xl mx-auto px-4 lg:px-8 pt-8 grid grid-cols-12 items-center">
<img
<Image
className={`justify-self-center col-span-10 z-20 hidden lg:block ${loading ? 'animate-fade-in-left' : ''}`}
src="https://docs.sentry.io/changelog/assets/hero.png"
src="/changelog/assets/hero.png"
alt="Sentry Changelog"
height={273}
width={450}
Expand Down
10 changes: 0 additions & 10 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@ const remarkPrism = require('remark-prism');

/** @type {import('next').NextConfig} */
const nextConfig = {
headers() {
return [
{
source: '/_next/static/([^/]+/pages|chunks|runtime|css|fonts|media)/(.+)',
headers: [{key: 'Access-Control-Allow-Origin', value: '*'}],
},
];
},
assetPrefix: process.env.IS_PRODUCTION ? 'https://docs.sentry.io' : undefined,

pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],

images: {
Expand Down
15 changes: 10 additions & 5 deletions src/components/changelog/article.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {ReactNode} from 'react';
import Image from 'next/image';

import Date from './date';
import Tag from './tag';
Expand Down Expand Up @@ -30,11 +31,15 @@ export default function Article({
return (
<article className={`bg-white rounded-lg shadow-lg mb-8 ${className}`}>
{image && (
<img
className="object-cover relative w-full h-64 rounded-lg rounded-b-none"
src={image}
alt={title}
/>
<div className="relative w-full h-64">
<Image
className="object-cover rounded-lg rounded-b-none"
src={image}
fill
alt={title}
sizes="(max-width: 768px) 100vw"
/>
</div>
)}
<div className="p-6">
<h3 className="text-3xl text-primary font-semibold mb-2">{title}</h3>
Expand Down
2 changes: 1 addition & 1 deletion vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
{
"key": "Content-Security-Policy",
"value": "upgrade-insecure-requests; default-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' *.sentry-cdn.com www.googletagmanager.com plausible.io; connect-src 'self' *.sentry.io sentry.io *.algolia.net *.algolianet.com *.algolia.io plausible.io reload.getsentry.net storage.googleapis.com; img-src * 'self' data: www.google.com www.googletagmanager.com; style-src 'self' 'unsafe-inline'; font-src 'self' fonts.gstatic.com; frame-src demo.arcade.software player.vimeo.com; worker-src blob:; report-uri https://o1.ingest.sentry.io/api/1267915/security/?sentry_key=ad63ba38287245f2803dc220be959636"
"value": "upgrade-insecure-requests; default-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' *.sentry-cdn.com www.googletagmanager.com plausible.io vercel.live; connect-src 'self' *.sentry.io sentry.io *.algolia.net *.algolianet.com *.algolia.io plausible.io reload.getsentry.net storage.googleapis.com; img-src * 'self' data: www.google.com www.googletagmanager.com; style-src 'self' 'unsafe-inline'; font-src 'self' fonts.gstatic.com; frame-src demo.arcade.software player.vimeo.com; worker-src blob:; report-uri https://o1.ingest.sentry.io/api/1267915/security/?sentry_key=ad63ba38287245f2803dc220be959636"
},
{
"key": "NEL",
Expand Down
Loading