Initial commit of Palina Ghost theme
This commit is contained in:
28
.gitea/workflows/deploy.yml
Normal file
28
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Deploy Theme
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up pnpm
|
||||
uses: pnpm/action-setup@v3
|
||||
with:
|
||||
version: 10.28.0
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Build theme
|
||||
run: pnpm build
|
||||
- name: Deploy Ghost Theme
|
||||
uses: TryGhost/action-deploy-theme@v1
|
||||
with:
|
||||
api-url: ${{ secrets.GHOST_ADMIN_API_URL }}
|
||||
api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}
|
||||
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
node_modules/
|
||||
pnpm-lock.yaml
|
||||
palina.tar.gz
|
||||
assets/built/
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
20
assets/css/tailwind.css
Normal file
20
assets/css/tailwind.css
Normal file
@@ -0,0 +1,20 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
@theme {
|
||||
--color-gray-900: #1a1a1a;
|
||||
--color-gray-800: #2b2b2b;
|
||||
--color-gray-700: #3c3c3c;
|
||||
--color-gray-500: #808080;
|
||||
--color-gray-400: #a0a0a0;
|
||||
--color-gray-200: #e0e0e0;
|
||||
--color-gray-100: #f5f5f5;
|
||||
--color-indigo-600: #4f46e5;
|
||||
--color-indigo-700: #4338ca;
|
||||
--font-family-sans: "Inter", sans-serif;
|
||||
}
|
||||
|
||||
@layer base {
|
||||
body {
|
||||
@apply bg-gray-900 text-gray-100;
|
||||
}
|
||||
}
|
||||
7
assets/js/main.js
Normal file
7
assets/js/main.js
Normal file
@@ -0,0 +1,7 @@
|
||||
// Main JavaScript file for Palina theme
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
console.log('Palina theme loaded!');
|
||||
|
||||
// Add any interactive JavaScript here
|
||||
// For example, a simple image modal or lazy loading
|
||||
});
|
||||
25
default.hbs
Normal file
25
default.hbs
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{@site.lang}}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{meta_title}}</title>
|
||||
<link rel="stylesheet" href="{{asset "built/screen.css"}}">
|
||||
{{ghost_head}}
|
||||
</head>
|
||||
<body class="{{body_class}} font-sans bg-gray-900 text-gray-100 antialiased">
|
||||
|
||||
<div class="min-h-screen flex flex-col">
|
||||
{{> header}}
|
||||
|
||||
<main class="flex-grow">
|
||||
{{{body}}}
|
||||
</main>
|
||||
|
||||
{{> footer}}
|
||||
</div>
|
||||
|
||||
{{ghost_foot}}
|
||||
<script src="{{asset "js/main.js"}}"></script>
|
||||
</body>
|
||||
</html>
|
||||
41
index.hbs
Normal file
41
index.hbs
Normal file
@@ -0,0 +1,41 @@
|
||||
{{!< default}}
|
||||
|
||||
<header class="container mx-auto px-4 py-8 text-center">
|
||||
<h1 class="text-5xl font-bold tracking-tight text-white">Palina Photo Blog</h1>
|
||||
<p class="mt-2 text-xl text-gray-400">{{@site.description}}</p>
|
||||
</header>
|
||||
|
||||
<div class="container mx-auto px-4">
|
||||
{{#if posts}}
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
|
||||
{{#foreach posts}}
|
||||
<article class="relative bg-gray-800 rounded-lg shadow-lg overflow-hidden group">
|
||||
<a href="{{url}}" class="block">
|
||||
{{#if feature_image}}
|
||||
<img
|
||||
class="w-full h-72 object-cover transition-transform duration-300 ease-in-out group-hover:scale-105"
|
||||
src="{{img_url feature_image size="m"}}"
|
||||
srcset="{{img_url feature_image size="s"}} 400w,
|
||||
{{img_url feature_image size="m"}} 600w,
|
||||
{{img_url feature_image size="l"}} 1000w,
|
||||
{{img_url feature_image size="xl"}} 2000w"
|
||||
sizes="(max-width: 800px) 400px, (max-width: 1200px) 600px, 1000px"
|
||||
alt="{{title}}"
|
||||
loading="lazy"
|
||||
>
|
||||
{{else}}
|
||||
<div class="w-full h-72 flex items-center justify-center bg-gray-700 text-gray-300 text-2xl">No Image</div>
|
||||
{{/if}}
|
||||
<div class="absolute inset-0 bg-black bg-opacity-50 flex items-end p-4 opacity-0 group-hover:opacity-100 transition-opacity duration-300 ease-in-out">
|
||||
<h2 class="text-white text-xl font-semibold leading-tight">{{title}}</h2>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
{{/foreach}}
|
||||
</div>
|
||||
|
||||
{{pagination}}
|
||||
{{else}}
|
||||
<p class="text-center text-gray-400 text-2xl py-20">No posts found.</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
28
package.json
Normal file
28
package.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "palina",
|
||||
"description": "A beautiful and minimalistic photo blog theme for Ghost CMS.",
|
||||
"version": "0.0.1",
|
||||
"engines": {
|
||||
"ghost": ">=5.0.0"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "Gemini"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "postcss ./assets/css/tailwind.css -o ./assets/built/screen.css --watch",
|
||||
"build": "NODE_ENV=production postcss ./assets/css/tailwind.css -o ./assets/built/screen.css"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/nesting": "0.0.0-insiders.565cd3e",
|
||||
"@tailwindcss/postcss": "^4.0.0-alpha.13",
|
||||
"autoprefixer": "^10.4.17",
|
||||
"cssnano": "^6.0.5",
|
||||
"postcss": "^8.4.35",
|
||||
"postcss-cli": "^11.0.0",
|
||||
"tailwindcss": "^4.0.0-alpha.13"
|
||||
},
|
||||
"config": {
|
||||
"posts_per_page": 12
|
||||
}
|
||||
}
|
||||
26
partials/footer.hbs
Normal file
26
partials/footer.hbs
Normal file
@@ -0,0 +1,26 @@
|
||||
<footer class="text-gray-400 bg-gray-900 body-font">
|
||||
<div class="container px-5 py-8 mx-auto flex items-center sm:flex-row flex-col">
|
||||
<a href="{{@site.url}}" class="flex title-font font-medium items-center md:justify-start justify-center text-white">
|
||||
<span class="ml-3 text-xl">{{@site.title}}</span>
|
||||
</a>
|
||||
<p class="text-sm text-gray-500 sm:ml-4 sm:pl-4 sm:border-l-2 sm:border-gray-800 sm:py-2 sm:mt-0 mt-4">
|
||||
© {{date format="YYYY"}} {{@site.title}} — Powered by Ghost
|
||||
</p>
|
||||
<span class="inline-flex sm:ml-auto sm:mt-0 mt-4 justify-center sm:justify-start">
|
||||
{{#if @site.facebook}}
|
||||
<a href="{{@site.facebook_url}}" class="text-gray-500 hover:text-white transition duration-200">
|
||||
<svg fill="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-5 h-5" viewBox="0 0 24 24">
|
||||
<path d="M18 2h-3a5 5 0 00-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 011-1h3z"></path>
|
||||
</svg>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if @site.twitter}}
|
||||
<a href="{{@site.twitter_url}}" class="ml-3 text-gray-500 hover:text-white transition duration-200">
|
||||
<svg fill="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-5 h-5" viewBox="0 0 24 24">
|
||||
<path d="M23 3a10.9 10.9 0 01-3.14 1.53 4.48 4.48 0 00-7.86 3v1A10.66 10.66 0 013 4s-4 9 5 13a11.64 11.64 0 01-7 2c9 5 20 0 20-11.5a4.5 4.5 0 00-.08-.83A7.72 7.72 0 0023 3z"></path>
|
||||
</svg>
|
||||
</a>
|
||||
{{/if}}
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
10
partials/header.hbs
Normal file
10
partials/header.hbs
Normal file
@@ -0,0 +1,10 @@
|
||||
<header class="text-gray-100 body-font shadow-lg bg-gray-900">
|
||||
<div class="container mx-auto flex flex-wrap p-5 flex-col md:flex-row items-center">
|
||||
<a href="{{@site.url}}" class="flex title-font font-medium items-center text-white mb-4 md:mb-0">
|
||||
<span class="ml-3 text-xl">{{@site.title}}</span>
|
||||
</a>
|
||||
<nav class="md:ml-auto flex flex-wrap items-center text-base justify-center">
|
||||
{{navigation type="primary"}}
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
37
post.hbs
Normal file
37
post.hbs
Normal file
@@ -0,0 +1,37 @@
|
||||
{{!< default}}
|
||||
|
||||
<article class="container mx-auto px-4 py-12">
|
||||
<header class="text-center mb-8">
|
||||
<h1 class="text-6xl font-bold tracking-tight text-white mb-4">{{title}}</h1>
|
||||
<section class="post-meta text-gray-400 text-lg">
|
||||
<time datetime="{{date format="YYYY-MM-DD"}}">{{date format="MMMM DD, YYYY"}}</time>
|
||||
{{#if primary_tag}}
|
||||
<span class="mx-2">•</span>
|
||||
<a href="{{primary_tag.url}}" class="text-gray-400 hover:text-white transition duration-200">{{primary_tag.name}}</a>
|
||||
{{/if}}
|
||||
</section>
|
||||
</header>
|
||||
|
||||
{{#if feature_image}}
|
||||
<figure class="mb-12 rounded-lg overflow-hidden shadow-xl">
|
||||
<img
|
||||
class="w-full h-auto object-cover"
|
||||
src="{{img_url feature_image size="xl"}}"
|
||||
srcset="{{img_url feature_image size="l"}} 1000w,
|
||||
{{img_url feature_image size="xl"}} 2000w"
|
||||
sizes="(max-width: 1000px) 1000px, 2000px"
|
||||
alt="{{title}}"
|
||||
>
|
||||
</figure>
|
||||
{{/if}}
|
||||
|
||||
<section class="post-content max-w-3xl mx-auto text-gray-200 leading-relaxed text-lg prose prose-invert">
|
||||
{{content}}
|
||||
</section>
|
||||
|
||||
<footer class="mt-12 pt-8 border-t border-gray-700 text-center">
|
||||
<a href="/" class="inline-flex items-center px-6 py-3 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition duration-200">
|
||||
← Back to Home
|
||||
</a>
|
||||
</footer>
|
||||
</article>
|
||||
8
postcss.config.js
Normal file
8
postcss.config.js
Normal file
@@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
'@tailwindcss/nesting': {},
|
||||
'@tailwindcss/postcss': {},
|
||||
'autoprefixer': {},
|
||||
...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user