Update README and add titles to admin routes

This commit is contained in:
Justin Edmund 2025-06-17 07:41:29 +01:00
parent ac0ecf2a92
commit fdf1ce5e21
16 changed files with 96 additions and 22 deletions

View file

@ -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 ```bash
# create a new project in the current directory npm install
npm create svelte@latest
# create a new project in my-app
npm create svelte@latest my-app
``` ```
## Developing Start development server:
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
```bash ```bash
npm run dev npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
``` ```
## Building Build for production:
To create a production version of your app:
```bash ```bash
npm run build 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

View file

@ -6,3 +6,7 @@
goto('/admin/projects', { replaceState: true }) goto('/admin/projects', { replaceState: true })
}) })
</script> </script>
<svelte:head>
<title>Admin @jedmund</title>
</svelte:head>

View file

@ -271,6 +271,10 @@
} }
</script> </script>
<svelte:head>
<title>Albums - Admin @jedmund</title>
</svelte:head>
<AdminPage> <AdminPage>
<AdminHeader title="Albums" slot="header"> <AdminHeader title="Albums" slot="header">
{#snippet actions()} {#snippet actions()}

View file

@ -585,6 +585,10 @@
} }
</script> </script>
<svelte:head>
<title>{album && album.title ? `${album.title} - Admin @jedmund` : 'Edit Album - Admin @jedmund'}</title>
</svelte:head>
<AdminPage> <AdminPage>
<header slot="header"> <header slot="header">
{#if !isLoading && album} {#if !isLoading && album}

View file

@ -263,6 +263,10 @@
const canSave = $derived(title.trim().length > 0 && slug.trim().length > 0) const canSave = $derived(title.trim().length > 0 && slug.trim().length > 0)
</script> </script>
<svelte:head>
<title>New Album - Admin @jedmund</title>
</svelte:head>
<AdminPage> <AdminPage>
<header slot="header"> <header slot="header">
<div class="header-left"> <div class="header-left">

View file

@ -36,6 +36,10 @@
} }
</script> </script>
<svelte:head>
<title>Admin Login @jedmund</title>
</svelte:head>
<div class="login-page"> <div class="login-page">
<div class="login-card"> <div class="login-card">
<form onsubmit={handleLogin}> <form onsubmit={handleLogin}>

View file

@ -365,6 +365,10 @@
} }
</script> </script>
<svelte:head>
<title>Media Library - Admin @jedmund</title>
</svelte:head>
<AdminPage> <AdminPage>
<AdminHeader title="Media Library" slot="header"> <AdminHeader title="Media Library" slot="header">
{#snippet actions()} {#snippet actions()}

View file

@ -206,6 +206,10 @@
} }
</script> </script>
<svelte:head>
<title>Media Audit - Admin @jedmund</title>
</svelte:head>
<AdminPage> <AdminPage>
<header slot="header"> <header slot="header">
<div class="header-left"> <div class="header-left">

View file

@ -135,6 +135,10 @@
} }
</script> </script>
<svelte:head>
<title>Upload Media - Admin @jedmund</title>
</svelte:head>
<AdminPage> <AdminPage>
<header slot="header"> <header slot="header">
<h1>Upload Media</h1> <h1>Upload Media</h1>

View file

@ -268,6 +268,10 @@
} }
</script> </script>
<svelte:head>
<title>Universe - Admin @jedmund</title>
</svelte:head>
<AdminPage> <AdminPage>
<AdminHeader title="Universe" slot="header"> <AdminHeader title="Universe" slot="header">
{#snippet actions()} {#snippet actions()}

View file

@ -305,6 +305,10 @@
}) })
</script> </script>
<svelte:head>
<title>{post && post.title ? `${post.title} - Admin @jedmund` : 'Edit Post - Admin @jedmund'}</title>
</svelte:head>
<AdminPage> <AdminPage>
<header slot="header"> <header slot="header">
{#if !loading && post} {#if !loading && post}

View file

@ -123,6 +123,10 @@
}) })
</script> </script>
<svelte:head>
<title>New Post - Admin @jedmund</title>
</svelte:head>
<AdminPage> <AdminPage>
<header slot="header"> <header slot="header">
<div class="header-left"> <div class="header-left">

View file

@ -242,6 +242,10 @@
} }
</script> </script>
<svelte:head>
<title>Projects - Admin @jedmund</title>
</svelte:head>
<AdminPage> <AdminPage>
<AdminHeader title="Projects" slot="header"> <AdminHeader title="Projects" slot="header">
{#snippet actions()} {#snippet actions()}

View file

@ -42,6 +42,10 @@
} }
</script> </script>
<svelte:head>
<title>{project ? `Edit ${project.title}` : 'Edit Project'} - Admin @jedmund</title>
</svelte:head>
{#if isLoading} {#if isLoading}
<div class="loading">Loading project...</div> <div class="loading">Loading project...</div>
{:else if error} {:else if error}

View file

@ -2,4 +2,8 @@
import ProjectForm from '$lib/components/admin/ProjectForm.svelte' import ProjectForm from '$lib/components/admin/ProjectForm.svelte'
</script> </script>
<svelte:head>
<title>New Project - Admin @jedmund</title>
</svelte:head>
<ProjectForm mode="create" /> <ProjectForm mode="create" />

View file

@ -10,6 +10,10 @@
: undefined : undefined
</script> </script>
<svelte:head>
<title>Compose - Universe - Admin @jedmund</title>
</svelte:head>
<AdminPage> <AdminPage>
<UniverseComposer isOpen={true} initialMode="page" initialPostType={postType} {initialContent} /> <UniverseComposer isOpen={true} initialMode="page" initialPostType={postType} {initialContent} />
</AdminPage> </AdminPage>