Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 87 additions & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -367,4 +367,90 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
This product bundles the Casper theme, a port of Ghost's default theme,
which is available under a "MIT" license. For details, see
themes/casper/theme.css
https://github.com/TryGhost/Casper/blob/main/LICENSE

Copyright (c) 2013-2026 Ghost Foundation

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

-------------------------------------------------------------------------------
This product bundles the Minima theme, a port of Jekyll's default theme,
which is available under a "MIT" license. For details, see
themes/minima/theme.css
https://github.com/jekyll/minima/blob/master/LICENSE.txt

The MIT License (MIT)

Copyright (c) 2016-present Parker Moore and the minima contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

-------------------------------------------------------------------------------
This product bundles the PaperMod theme, a port of the PaperMod theme for
Hugo, which is available under a "MIT" license. For details, see
themes/papermod/theme.css
https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE

MIT License

Copyright (c) 2020 nanxiaobei and adityatelange
Copyright (c) 2021-2026 adityatelange

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

-------------------------------------------------------------------------------
40 changes: 40 additions & 0 deletions app/src/main/webapp/themes/casper/archives.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## Every post as a Casper card feed, under a tag.hbs-style header card.
#set($archiveEntries = $model.weblog.getRecentWeblogEntries("nil", 100))
#set($headerTitle = "Archives")
#set($headerCount = $model.weblog.entryCount)
#set($headerDescription = "")
<!DOCTYPE html>
<html lang="en" class="auto-color">
<head>
#includeTemplate($model.weblog "standard_head")
<title>Archives — $model.weblog.name</title>
</head>
<body class="tag-template is-head-left-logo">
<div class="viewport">
#includeTemplate($model.weblog "standard_header")

<div class="site-content">
<main id="site-main" class="site-main outer">
<div class="inner posts">
<div class="post-feed">
#includeTemplate($model.weblog "_tag_header")
#set($cardClass = "")
#foreach($entry in $archiveEntries)
#includeTemplate($model.weblog "_card")
#end
</div>

#if($utils.isNotEmpty($model.weblog.about))
<section class="archive-about gh-content">
<h2 id="about">About $model.weblog.name</h2>
<p>$model.weblog.about</p>
</section>
#end
</div>
</main>
</div>

#includeTemplate($model.weblog "standard_footer")
</div>
</body>
</html>
94 changes: 94 additions & 0 deletions app/src/main/webapp/themes/casper/article.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
## Casper's post.hbs article. Expects $entry.
#includeTemplate($model.weblog "_reading_time")
#set($authorName = $entry.creator.fullName)
#if($utils.isEmpty($authorName))
#set($authorName = $entry.creator.screenName)
#end
<main id="site-main" class="site-main">
<article class="article post no-image">

<header class="article-header gh-canvas">

<div class="article-tag post-card-tags">
#if($entry.category)
<span class="post-card-primary-tag">
<a href="$url.category($entry.category.name)">$entry.category.name</a>
</span>
#end
</div>

<h1 class="article-title">$entry.title</h1>

#if($utils.isNotEmpty($entry.summary))
<p class="article-excerpt">$utils.removeHTML($entry.summary)</p>
#end

<div class="article-byline">
<section class="article-byline-content">
<ul class="author-list">
<li class="author-list-item">
<span class="author-avatar author-profile-image"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><g fill="none" fill-rule="evenodd"><path d="M3.513 18.998C4.749 15.504 8.082 13 12 13s7.251 2.504 8.487 5.998C18.47 21.442 15.417 23 12 23s-6.47-1.558-8.487-4.002zM12 12c2.21 0 4-2.79 4-5s-1.79-4-4-4-4 1.79-4 4 1.79 5 4 5z" fill="#FFF"/></g></svg></span>
</li>
</ul>

<div class="article-byline-meta">
<h4 class="author-name">$authorName</h4>
<div class="byline-meta-content">
<time class="byline-meta-date" datetime="$utils.formatDate($entry.pubTime, 'yyyy-MM-dd')">$utils.formatDate($entry.pubTime, "dd MMM yyyy")</time>
<span class="byline-reading-time"><span class="bull">&bull;</span> $readingTime min read</span>
</div>
</div>
</section>
#if($utils.isUserAuthorizedToAuthor($entry.website))
<a href="$url.editEntry($entry.anchor)" class="gh-button gh-button-share">Edit</a>
#end
</div>

</header>

<section class="gh-content gh-canvas">
$entry.displayContent
</section>

#if($entry.tags && $entry.tags.size() > 0)
<section class="article-tags gh-canvas" aria-label="Tags">
<ul>
#foreach($tag in $entry.tags)
<li><a href="$url.tag($tag.name)">#$tag.name</a></li>
#end
</ul>
</section>
#end

#if($entry.commentCount > 0 || $entry.commentsStillAllowed)
<section class="article-comments gh-canvas">
#if($entry.commentCount > 0 || $model.commentForm.preview)
#showWeblogEntryComments($entry)
#end
#if($entry.commentsStillAllowed)
#showWeblogEntryCommentForm($entry)
#end
</section>
#end

</article>
</main>

## Read more: the latest three other posts, like post.hbs with show_recent_posts_footer.
#set($currentAnchor = $entry.anchor)
#set($moreEntries = [])
#foreach($recentEntry in $model.weblog.getRecentWeblogEntries("nil", 4))
#if($recentEntry.anchor != $currentAnchor && $moreEntries.size() < 3)
#set($ignored = $moreEntries.add($recentEntry))
#end
#end
#if($moreEntries.size() > 0)
<aside class="read-more-wrap outer">
<div class="read-more inner">
#set($cardClass = "")
#foreach($entry in $moreEntries)
#includeTemplate($model.weblog "_card")
#end
</div>
</aside>
#end
32 changes: 32 additions & 0 deletions app/src/main/webapp/themes/casper/card.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## Casper's partials/post-card.hbs. Expects $entry and $cardClass.
#includeTemplate($model.weblog "_reading_time")
#if($utils.isNotEmpty($entry.summary))
#set($excerptSource = $entry.summary)
#{else}
#set($excerptSource = $entry.text)
#end
#set($excerpt = $utils.truncateNicely($utils.removeHTML($excerptSource), 180, 240, "…"))
<article class="post-card post no-image$cardClass">
<div class="post-card-content">
<a class="post-card-content-link" href="$entry.permalink">
<header class="post-card-header">
<div class="post-card-tags">
#if($entry.category)
<span class="post-card-primary-tag">$entry.category.name</span>
#end
#if($entry.pinnedToMain)
<span class="post-card-featured"><svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path d="M4.49365 4.58752C3.53115 6.03752 2.74365 7.70002 2.74365 9.25002C2.74365 10.6424 3.29678 11.9778 4.28134 12.9623C5.26591 13.9469 6.60127 14.5 7.99365 14.5C9.38604 14.5 10.7214 13.9469 11.706 12.9623C12.6905 11.9778 13.2437 10.6424 13.2437 9.25002C13.2437 6.00002 10.9937 3.50002 9.16865 1.68127L6.99365 6.25002L4.49365 4.58752Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg> Featured</span>
#end
</div>
<h2 class="post-card-title">$entry.title</h2>
</header>
#if($utils.isNotEmpty($excerpt))
<div class="post-card-excerpt">$excerpt</div>
#end
</a>
<footer class="post-card-meta">
<time class="post-card-meta-date" datetime="$utils.formatDate($entry.pubTime, 'yyyy-MM-dd')">$utils.formatDate($entry.pubTime, "dd MMM yyyy")</time>
<span class="post-card-meta-length">$readingTime min read</span>
</footer>
</div>
</article>
1 change: 1 addition & 0 deletions app/src/main/webapp/themes/casper/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* Add your own Casper overrides here. */
19 changes: 19 additions & 0 deletions app/src/main/webapp/themes/casper/entry.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#set($entry = $model.weblogEntry)
<!DOCTYPE html>
<html lang="en" class="auto-color">
<head>
#includeTemplate($model.weblog "standard_head")
<title>$entry.title — $model.weblog.name</title>
</head>
<body class="post-template is-head-left-logo">
<div class="viewport">
#includeTemplate($model.weblog "standard_header")

<div class="site-content">
#includeTemplate($model.weblog "_article")
</div>

#includeTemplate($model.weblog "standard_footer")
</div>
</body>
</html>
38 changes: 38 additions & 0 deletions app/src/main/webapp/themes/casper/feed.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## Casper's post feed. Expects $pager, $classicHome (first card large, next two wide) and $feedHeader.
<main id="site-main" class="site-main outer">
<div class="inner posts">
<div class="post-feed">
#if($feedHeader)
#includeTemplate($model.weblog "_tag_header")
#end
#set($cardIndex = 0)
#foreach($day in $pager.entries.keySet())
#foreach($entry in $pager.entries.get($day))
#set($cardClass = "")
#if($classicHome && $cardIndex == 0)
#set($cardClass = " post-card-large")
#elseif($classicHome && $cardIndex < 3)
#set($cardClass = " dynamic")
#end
#includeTemplate($model.weblog "_card")
#set($cardIndex = $cardIndex + 1)
#end
#end
</div>

#if($pager.prevLink || $pager.nextLink || $pager.prevCollectionLink || $pager.nextCollectionLink)
<nav class="pagination" aria-label="Pagination">
#if($pager.prevLink)
<a class="newer-posts" href="$pager.prevLink"><span aria-hidden="true">&larr;</span> Newer Posts</a>
#elseif($pager.prevCollectionLink)
<a class="newer-posts" href="$pager.prevCollectionLink"><span aria-hidden="true">&larr;</span> $pager.prevCollectionName</a>
#end
#if($pager.nextLink)
<a class="older-posts" href="$pager.nextLink">Older Posts <span aria-hidden="true">&rarr;</span></a>
#elseif($pager.nextCollectionLink)
<a class="older-posts" href="$pager.nextCollectionLink">$pager.nextCollectionName <span aria-hidden="true">&rarr;</span></a>
#end
</nav>
#end
</div>
</main>
18 changes: 18 additions & 0 deletions app/src/main/webapp/themes/casper/footer.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<footer class="site-footer outer">
<div class="inner">
<section class="copyright"><a href="$url.home">$model.weblog.name</a> &copy; $utils.formatDate($utils.now, "yyyy")</section>
<div class="site-footer-center">
<nav class="site-footer-nav" aria-label="Secondary navigation">
<ul>
#foreach($footerCategory in $model.weblog.weblogCategories)
#if($footerCategory.inUse)
<li><a href="$url.category($footerCategory.name)">$footerCategory.name</a></li>
#end
#end
<li><a href="$url.feed.entries.atom">Atom feed</a></li>
</ul>
</nav>
</div>
<div class="gh-powered-by"><a href="https://roller.apache.org/" target="_blank" rel="noopener">Powered by Apache Roller</a></div>
</div>
</footer>
9 changes: 9 additions & 0 deletions app/src/main/webapp/themes/casper/head.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<meta charset="utf-8" />
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src * data:; font-src 'self'; base-uri 'self'; connect-src 'self'; form-action 'self'">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="$url.resource('theme.css')" />
<link rel="stylesheet" href="$url.page('custom.css')" />
<script src="$url.resource('theme.js')" defer></script>
#showAutodiscoveryLinks($model.weblog)
#showMetaDescription()
#showAnalyticsTrackingCode($model.weblog)
28 changes: 28 additions & 0 deletions app/src/main/webapp/themes/casper/header.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<header id="gh-head" class="gh-head outer">
<div class="gh-head-inner inner">
<div class="gh-head-brand">
<a class="gh-head-logo no-image" href="$url.home">$model.weblog.name</a>
<a class="gh-search gh-icon-btn" href="$url.search" aria-label="Search this site">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" width="20" height="20" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
</a>
<button class="gh-burger" aria-label="Main Menu"></button>
</div>

<nav class="gh-head-menu" aria-label="Primary navigation">
<ul class="nav">
<li class="nav-home"><a href="$url.home">Home</a></li>
#foreach($navPage in $model.weblog.templates)
#if($navPage.navbar && !$navPage.hidden && $navPage.link)
<li><a href="$url.page($navPage.link)">$navPage.name</a></li>
#end
#end
</ul>
</nav>

<div class="gh-head-actions">
<a class="gh-search gh-icon-btn" href="$url.search" aria-label="Search this site">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" width="20" height="20" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
</a>
</div>
</div>
</header>
Binary file added app/src/main/webapp/themes/casper/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions app/src/main/webapp/themes/casper/reading-time.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Sets $readingTime for $entry: words / 275 per minute, like Ghost's reading_time helper.
#set($readingWords = 0)
#set($readingText = $utils.removeHTML($entry.text))
#if($readingText && $readingText.trim().length() > 0)
#set($readingWords = $readingText.trim().split("\s+").size())
#end
#set($readingTime = ($readingWords + 137) / 275)
#if($readingTime < 1)
#set($readingTime = 1)
#end
Loading
Loading