Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadajmi committed Sep 6, 2023
0 parents commit 5b9fa7e
Show file tree
Hide file tree
Showing 22 changed files with 304 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
16 changes: 16 additions & 0 deletions .github/workflows/deploy-theme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Plain Theme Deploy
on:
push:
branches:
- master
- main
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Deploy to Plain Demo
uses: TryGhost/[email protected]
with:
api-url: ${{ secrets.GHOST_ADMIN_API_URL }}
api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
node_modules
bower_components
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
### Plain — Ghost Theme
65 changes: 65 additions & 0 deletions assets/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
:root {
--font-size: 18px;
--line-height: 1.6;
--line-height-headings: 1.2;
--body-width: 650px;
}

body {
margin: 32px auto;
padding: 0 16px;
font-size: var(--font-size);
line-height: var(--line-height);
max-width: var(--body-width);
}

h1,
h2,
h3 {
line-height: var(--line-height-headings);
}

nav ul {
display: flex;
gap: 16px;
padding: 0;
list-style: none;
}

/*
Cards
*/

.kg-card {
margin: 0;
}

/* Responsive embeds (Video) */

.kg-embed-card {
width: 100%;
display: flex;
align-items: center;
flex-direction: column;
}

.kg-embed-card iframe {
width: 100%;
height: 100%;
aspect-ratio: 16 / 9;
}

/* kg-image */

.kg-image {
max-width: 100%;
height: auto;
}

.kg-width-wide {
width: calc(100vw - calc(var(--body-width)));
}

.kg-width-full {
width: 100vw;
}
23 changes: 23 additions & 0 deletions author.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{!< default}}

{{#author}}
<header>
<h1>{{ name }}</h1>

{{#if twitter}}
<a href='{{ twitter_url }}'>Twitter</a>
{{/if}}

{{#if facebook}}
<a href='{{ facebook_url }}'>Facebook</a>
{{/if}}

{{#if bio}}
<p>{{ bio }}</p>
{{/if}}
</header>
{{/author}}

{{> loop }}

{{ pagination }}
17 changes: 17 additions & 0 deletions default.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html>
<html lang='{{ @site.locale }}'>

{{> structure/head }}

<body class='{{ body_class }}'>
{{> structure/header }}

<main id='main'>
{{{ body }}}
</main>

{{> structure/footer }}

{{ ghost_foot }}
</body>
</html>
6 changes: 6 additions & 0 deletions error.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{!< default}}

<header>
<h1>404</h1>
<p>{{t 'Page Not Found' }}</p>
</header>
14 changes: 14 additions & 0 deletions index.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{!< default}}

{{#if @site.description}}
<p>{{ @site.description }}</p>
{{/if}}

<h2>{{t 'Posts' }}</h2>

{{> loop }}

{{#if next}}
<br>
{{ pagination }}
{{/if}}
3 changes: 3 additions & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"Published with {ghostLink} & {themeLink}": "Published with {ghostLink} & {themeLink}"
}
22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "plain",
"description": "Ghost CMS Theme",
"demo": "https://plain.aspirethemes.com/",
"version": "1.0.0",
"engines": {
"ghost": ">=5.0.0"
},
"keywords": [
"ghost-theme"
],
"author": {
"name": "Aspire Themes",
"email": "[email protected]",
"url": "https://aspirethemes.com/"
},
"config": {
"custom": {},
"card_assets": true,
"posts_per_page": 15
}
}
11 changes: 11 additions & 0 deletions page.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{!< default}}

{{#post}}
{{#match @page.show_title_and_feature_image}}
{{> page-header }}
{{/match}}

<article class='{{ post_class }}'>
{{ content }}
</article>
{{/post}}
7 changes: 7 additions & 0 deletions partials/loop.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{#foreach posts}}
<div class='post-item {{ post_class }}'>
<a href='{{ url }}'>{{ title }}</a>

<time datetime='{{ date format='YYYY-MM-DD' }}'>{{ date format='MMM D, YYYY' }}</time>
</div>
{{/foreach}}
3 changes: 3 additions & 0 deletions partials/navigation.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{#foreach navigation}}
<li><a href='{{ url absolute='true' }}' class='c-nav__link {{#if current}} c-nav__link--current {{/if}}'>{{ label }}</a></li>
{{/foreach}}
13 changes: 13 additions & 0 deletions partials/page-header.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{!--
Used in the post.hbs & page.hbs file
--}}

<header>
<h1>{{ title }}</h1>

{{#if custom_excerpt}}
<p>{{ custom_excerpt }}</p>
{{/if}}

<time datetime='{{ date format='YYYY-MM-DD' }}'><i>{{ date format='MMM D, YYYY' }}</i></time>
</header>
15 changes: 15 additions & 0 deletions partials/social-links.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<nav aria-label='Social menu'>
<ul>
{{#if @site.twitter}}
<li>
<a href='{{ twitter_url }}' class='c-social-link'>Twitter</a>
</li>
{{/if}}

{{#if @site.facebook}}
<li>
<a href='{{ facebook_url }}' class='c-social-link'>Facebook</a>
</li>
{{/if}}
</ul>
</nav>
16 changes: 16 additions & 0 deletions partials/structure/footer.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<footer class='c-footer'>
{{> social-links }}

{{#if @site.secondary_navigation}}
<nav aria-label='Secondary menu'>
<ul>{{ navigation type='secondary' }}</ul>
</nav>
{{/if}}

<div class='o-grid'>
<div class='c-footer-copy'>
&copy; {{ date format='YYYY' }} {{ @site.title }} -
{{{t 'Published with {ghostLink} & {themeLink}' ghostLink='<a href=\'https://ghost.org\'>Ghost</a>' themeLink='<a href=\'https://aspirethemes.com/\'>Plain</a>' }}}
</div>
</div>
</footer>
9 changes: 9 additions & 0 deletions partials/structure/head.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<head>
<meta charset='utf-8'>
<title>{{ meta_title }}</title>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>

<link rel='stylesheet' type='text/css' href="{{asset 'css/style.css'}}">

{{ ghost_head }}
</head>
5 changes: 5 additions & 0 deletions partials/structure/header.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<header>
<nav aria-label='Main menu'>
<ul>{{ navigation }}</ul>
</nav>
</header>
20 changes: 20 additions & 0 deletions post.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{!< default}}

{{#post}}
{{> page-header }}

<hr>

<article class='{{ post_class }}'>
{{ content }}
</article>

{{comments title="Join the club"
count=false
mode="auto"
saturation=80}}

{{#if tags}}
{{ tags separator=', ' }}
{{/if}}
{{/post}}
8 changes: 8 additions & 0 deletions routes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
collections:
/:
permalink: /{slug}/
template: index

taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/
17 changes: 17 additions & 0 deletions tag.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{!< default}}

{{#tag}}
<header>
<h1>{{ name }}</h1>

{{#if description}}
<p>{{ description }}</p>
{{/if}}
</header>
{{/tag}}

{{> loop }}

<br>

{{ pagination }}

0 comments on commit 5b9fa7e

Please sign in to comment.