Update README and add titles to admin routes
This commit is contained in:
parent
ac0ecf2a92
commit
fdf1ce5e21
16 changed files with 96 additions and 22 deletions
58
README.md
58
README.md
|
|
@ -1,38 +1,52 @@
|
|||
# create-svelte
|
||||
# jedmund.com
|
||||
|
||||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
|
||||
Personal portfolio website built with SvelteKit featuring a content management system for showcasing creative work, writing, and personal interests.
|
||||
|
||||
## Creating a project
|
||||
## Features
|
||||
|
||||
If you're seeing this, you've probably already done this step. Congrats!
|
||||
- Content management system for organizing and displaying various types of media
|
||||
- Photo galleries with masonry layout and infinite scrolling
|
||||
- Blog/journal section for long-form writing
|
||||
- Music listening history integration via Last.fm API
|
||||
- Gaming activity tracking from Steam and PlayStation
|
||||
- Project showcase pages with detailed case studies
|
||||
- Responsive design with customizable themes
|
||||
|
||||
## Tech Stack
|
||||
|
||||
- SvelteKit with Svelte 5 (Runes mode)
|
||||
- Redis for caching external API responses
|
||||
- SCSS for styling
|
||||
- Integration with Last.fm, Steam, PSN, iTunes, and Giant Bomb APIs
|
||||
|
||||
## Development
|
||||
|
||||
Install dependencies:
|
||||
```bash
|
||||
# create a new project in the current directory
|
||||
npm create svelte@latest
|
||||
|
||||
# create a new project in my-app
|
||||
npm create svelte@latest my-app
|
||||
npm install
|
||||
```
|
||||
|
||||
## Developing
|
||||
|
||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||
|
||||
Start development server:
|
||||
```bash
|
||||
npm run dev
|
||||
|
||||
# or start the server and open the app in a new browser tab
|
||||
npm run dev -- --open
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
To create a production version of your app:
|
||||
|
||||
Build for production:
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
You can preview the production build with `npm run preview`.
|
||||
## Environment Variables
|
||||
|
||||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
||||
Required environment variables:
|
||||
- `LASTFM_API_KEY` - Last.fm API key for music data
|
||||
- `REDIS_URL` - Redis connection URL for caching
|
||||
|
||||
## Commands
|
||||
|
||||
- `npm run dev` - Start development server
|
||||
- `npm run build` - Build for production
|
||||
- `npm run preview` - Preview production build
|
||||
- `npm run check` - Type check with svelte-check
|
||||
- `npm run lint` - Check formatting and linting
|
||||
- `npm run format` - Auto-format code with prettier
|
||||
|
|
@ -6,3 +6,7 @@
|
|||
goto('/admin/projects', { replaceState: true })
|
||||
})
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Admin @jedmund</title>
|
||||
</svelte:head>
|
||||
|
|
|
|||
|
|
@ -271,6 +271,10 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Albums - Admin @jedmund</title>
|
||||
</svelte:head>
|
||||
|
||||
<AdminPage>
|
||||
<AdminHeader title="Albums" slot="header">
|
||||
{#snippet actions()}
|
||||
|
|
|
|||
|
|
@ -585,6 +585,10 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{album && album.title ? `${album.title} - Admin @jedmund` : 'Edit Album - Admin @jedmund'}</title>
|
||||
</svelte:head>
|
||||
|
||||
<AdminPage>
|
||||
<header slot="header">
|
||||
{#if !isLoading && album}
|
||||
|
|
|
|||
|
|
@ -263,6 +263,10 @@
|
|||
const canSave = $derived(title.trim().length > 0 && slug.trim().length > 0)
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>New Album - Admin @jedmund</title>
|
||||
</svelte:head>
|
||||
|
||||
<AdminPage>
|
||||
<header slot="header">
|
||||
<div class="header-left">
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Admin Login @jedmund</title>
|
||||
</svelte:head>
|
||||
|
||||
<div class="login-page">
|
||||
<div class="login-card">
|
||||
<form onsubmit={handleLogin}>
|
||||
|
|
|
|||
|
|
@ -365,6 +365,10 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Media Library - Admin @jedmund</title>
|
||||
</svelte:head>
|
||||
|
||||
<AdminPage>
|
||||
<AdminHeader title="Media Library" slot="header">
|
||||
{#snippet actions()}
|
||||
|
|
|
|||
|
|
@ -206,6 +206,10 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Media Audit - Admin @jedmund</title>
|
||||
</svelte:head>
|
||||
|
||||
<AdminPage>
|
||||
<header slot="header">
|
||||
<div class="header-left">
|
||||
|
|
|
|||
|
|
@ -135,6 +135,10 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Upload Media - Admin @jedmund</title>
|
||||
</svelte:head>
|
||||
|
||||
<AdminPage>
|
||||
<header slot="header">
|
||||
<h1>Upload Media</h1>
|
||||
|
|
|
|||
|
|
@ -268,6 +268,10 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Universe - Admin @jedmund</title>
|
||||
</svelte:head>
|
||||
|
||||
<AdminPage>
|
||||
<AdminHeader title="Universe" slot="header">
|
||||
{#snippet actions()}
|
||||
|
|
|
|||
|
|
@ -305,6 +305,10 @@
|
|||
})
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{post && post.title ? `${post.title} - Admin @jedmund` : 'Edit Post - Admin @jedmund'}</title>
|
||||
</svelte:head>
|
||||
|
||||
<AdminPage>
|
||||
<header slot="header">
|
||||
{#if !loading && post}
|
||||
|
|
|
|||
|
|
@ -123,6 +123,10 @@
|
|||
})
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>New Post - Admin @jedmund</title>
|
||||
</svelte:head>
|
||||
|
||||
<AdminPage>
|
||||
<header slot="header">
|
||||
<div class="header-left">
|
||||
|
|
|
|||
|
|
@ -242,6 +242,10 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Projects - Admin @jedmund</title>
|
||||
</svelte:head>
|
||||
|
||||
<AdminPage>
|
||||
<AdminHeader title="Projects" slot="header">
|
||||
{#snippet actions()}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{project ? `Edit ${project.title}` : 'Edit Project'} - Admin @jedmund</title>
|
||||
</svelte:head>
|
||||
|
||||
{#if isLoading}
|
||||
<div class="loading">Loading project...</div>
|
||||
{:else if error}
|
||||
|
|
|
|||
|
|
@ -2,4 +2,8 @@
|
|||
import ProjectForm from '$lib/components/admin/ProjectForm.svelte'
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>New Project - Admin @jedmund</title>
|
||||
</svelte:head>
|
||||
|
||||
<ProjectForm mode="create" />
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@
|
|||
: undefined
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Compose - Universe - Admin @jedmund</title>
|
||||
</svelte:head>
|
||||
|
||||
<AdminPage>
|
||||
<UniverseComposer isOpen={true} initialMode="page" initialPostType={postType} {initialContent} />
|
||||
</AdminPage>
|
||||
|
|
|
|||
Loading…
Reference in a new issue