Skip to content

Commit

Permalink
chore(contented-preview): reduce unnecessary files to reduce publishe…
Browse files Browse the repository at this point in the history
…d website template (#519)

#### What this PR does / why we need it:

Reduce bulk.
  • Loading branch information
fuxingloh authored Jul 19, 2023
1 parent 712d62c commit a02ca22
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 127 deletions.
1 change: 1 addition & 0 deletions .idea/contented.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
93 changes: 0 additions & 93 deletions packages/contented-preview/public/fonts/lexend.txt

This file was deleted.

Binary file removed packages/contented-preview/public/fonts/lexend.woff2
Binary file not shown.
6 changes: 4 additions & 2 deletions packages/contented-preview/src/pages/404.page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ export default function NotFound() {
return (
<main className="max-w-8xl mx-auto flex w-full flex-grow flex-col px-4 sm:px-6 lg:px-8">
<div className="my-auto flex-shrink-0 py-16 sm:py-32">
<p className="text-sm font-semibold uppercase tracking-wide text-indigo-600 dark:text-indigo-500">404 error</p>
<p className="text-primary-600 dark:text-primary-500 text-sm font-semibold uppercase tracking-wide">
404 error
</p>
<h1 className="mt-2 text-4xl font-extrabold tracking-tight sm:text-5xl">Page not found</h1>
<p className="mt-2 text-base text-gray-500">Sorry, we couldn’t find the page you’re looking for.</p>
<div className="mt-6">
<a href="/" className="text-base font-medium text-indigo-600 dark:text-indigo-500">
<a href="/" className="text-primary-600 dark:text-primary-500 text-base font-medium">
Go back home<span aria-hidden="true"> &rarr;</span>
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function ContentProse({ as: Component = 'div', className, ...prop
className,
'prose prose-slate dark:prose-invert max-w-none dark:text-slate-400',
// headings
'prose-headings:scroll-mt-28 prose-headings:font-display prose-headings:font-normal lg:prose-headings:scroll-mt-[8.5rem]',
'prose-headings:scroll-mt-28 lg:prose-headings:scroll-mt-[8.5rem]',
// lead
'prose-lead:text-slate-500 dark:prose-lead:text-slate-400',
// links
Expand Down
23 changes: 0 additions & 23 deletions packages/contented-preview/src/styles/fonts.css

This file was deleted.

1 change: 0 additions & 1 deletion packages/contented-preview/src/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import 'tailwindcss/base';
@import './fonts.css';
@import './prose.css';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
4 changes: 3 additions & 1 deletion packages/contented-preview/src/styles/prose.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

.prose :is(h1, h2, h3, h4, h5, h6) {
@apply -ml-6 pl-6;
@apply font-bold;
}

.prose :is(h1, h2, h3, h4, h5, h6):hover > a:first-child {
Expand All @@ -46,7 +47,8 @@
.prose code:not(pre code):not(:where([class~='not-prose'] *)) {
padding: 0.2em 0.4em;
border-radius: 6px;
@apply rounded border font-normal;
@apply font-semibold text-slate-800;
@apply rounded border;
@apply border-slate-200/70 bg-slate-100/70;
@apply dark:border-slate-700/70 dark:bg-slate-800/70;
}
6 changes: 0 additions & 6 deletions packages/contented-preview/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
const defaultTheme = require('tailwindcss/defaultTheme');

/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
content: ['./src/**/*.{js,ts,jsx,tsx}'],
theme: {
fontFamily: {
sans: ['Inter', ...defaultTheme.fontFamily.sans],
display: ['Lexend', ...defaultTheme.fontFamily.sans],
},
extend: {
maxWidth: {
'8xl': '100rem',
Expand Down

0 comments on commit a02ca22

Please sign in to comment.