updated empty page notification
This commit is contained in:
@@ -92,9 +92,7 @@ export default function Editor({ editSlug }: Props) {
|
|||||||
const [showModal, setShowModal] = useState(false);
|
const [showModal, setShowModal] = useState(false);
|
||||||
const [showPreview, setShowPreview] = useState(false);
|
const [showPreview, setShowPreview] = useState(false);
|
||||||
const [mobileView, setMobileView] = useState<'edit' | 'preview'>('edit');
|
const [mobileView, setMobileView] = useState<'edit' | 'preview'>('edit');
|
||||||
const [vimEnabled, setVimEnabled] = useState(() =>
|
const [vimEnabled, setVimEnabled] = useState(false);
|
||||||
typeof window !== 'undefined' && window.innerWidth > 768
|
|
||||||
);
|
|
||||||
const [showAutocomplete, setShowAutocomplete] = useState(false);
|
const [showAutocomplete, setShowAutocomplete] = useState(false);
|
||||||
const [autocompleteAssets, setAutocompleteAssets] = useState<Asset[]>([]);
|
const [autocompleteAssets, setAutocompleteAssets] = useState<Asset[]>([]);
|
||||||
const [autocompletePos, setAutocompletePos] = useState({ top: 0, left: 0 });
|
const [autocompletePos, setAutocompletePos] = useState({ top: 0, left: 0 });
|
||||||
@@ -120,7 +118,7 @@ export default function Editor({ editSlug }: Props) {
|
|||||||
const state = EditorState.create({
|
const state = EditorState.create({
|
||||||
doc: '',
|
doc: '',
|
||||||
extensions: [
|
extensions: [
|
||||||
vimCompartment.of(window.innerWidth > 768 ? vim() : []),
|
vimCompartment.of([]),
|
||||||
keymap.of([...defaultKeymap, ...searchKeymap, indentWithTab]),
|
keymap.of([...defaultKeymap, ...searchKeymap, indentWithTab]),
|
||||||
search(),
|
search(),
|
||||||
closeBrackets(),
|
closeBrackets(),
|
||||||
|
|||||||
@@ -108,13 +108,13 @@ const isAdmin = Astro.cookies.get('admin_session')?.value === '1';
|
|||||||
|
|
||||||
{posts.length === 0 && !error && (
|
{posts.length === 0 && !error && (
|
||||||
<div class="glass p-12 md:p-20 text-center max-w-2xl mx-auto">
|
<div class="glass p-12 md:p-20 text-center max-w-2xl mx-auto">
|
||||||
<div class="font-display italic text-[var(--subtext0)] text-sm tracking-[0.3em] uppercase mb-4">Notice</div>
|
<div class="font-display italic text-[var(--subtext0)] text-sm tracking-[0.3em] uppercase mb-4">Nothing here yet</div>
|
||||||
<p class="font-display italic text-[var(--text)] text-2xl md:text-3xl leading-snug mb-2">
|
<p class="font-display italic text-[var(--text)] text-2xl md:text-3xl leading-snug mb-2">
|
||||||
The exhibition is currently being arranged.
|
No posts to show.
|
||||||
</p>
|
</p>
|
||||||
<p class="font-sans text-[var(--subtext1)] mt-4">Please return shortly.</p>
|
<p class="font-sans text-[var(--subtext1)] mt-4">Check back soon.</p>
|
||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
<a href="/admin/editor" class="btn-stamp mt-8">Hang the first work</a>
|
<a href="/admin/editor" class="btn-stamp mt-8">Create the first post</a>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user