Skip to content

Commit

Permalink
Add new theme
Browse files Browse the repository at this point in the history
Based on Tailwind Starter Blog theme, see https://github.com/timlrx/tailwind-nextjs-starter-blog
  • Loading branch information
danpros committed Nov 20, 2024
1 parent cb7a8a6 commit 4abd8b2
Show file tree
Hide file tree
Showing 30 changed files with 4,494 additions and 36 deletions.
2 changes: 1 addition & 1 deletion config/config.ini.example
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ autosave.enable = "true"
show.version = "true"

; Set the theme here
views.root = "themes/twentysixteen"
views.root = "themes/tailwind"

; Framework config. No need to edit.
views.layout = "layout"
Expand Down
6 changes: 3 additions & 3 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,9 @@ protected function runForm()
<input name="blog_copyright" value="" placeholder="(c) Your name.">
<br/>
<br/>
<label for="social_bluesky">Bluesky Link:</label>
<input name="social_bluesky" type="url" value="" placeholder="https://bsky.app/profile/username.bsky.social">
<br/>
<label for="social_bluesky">Bluesky Link:</label>
<input name="social_bluesky" type="url" value="" placeholder="https://bsky.app/profile/username.bsky.social">
<br/>
<label for="social_twitter">Twitter Link:</label>
<input name="social_twitter" type="url" value="" placeholder="https://twitter.com/gohtmly">
<br/>
Expand Down
20 changes: 4 additions & 16 deletions robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,19 @@

User-agent: *

# Allow directories
Allow: /system/resources/

# Disallow directories
Disallow: /config/
Disallow: /system/
Disallow: /themes/
Disallow: /vendor/
Disallow: /cache/
Disallow: /lang/

# Disallow files
Disallow: /changelog.txt
Disallow: /composer.json
Disallow: /composer.lock
Disallow: /composer.phar

# Disallow paths
Disallow: /search/
Disallow: /admin/

# Allow themes
Allow: /themes/*/css/
Allow: /themes/*/images/
Allow: /themes/*/img/
Allow: /themes/*/js/
Allow: /themes/*/fonts/

# Allow content images
Allow: /content/images/*.jpg
Allow: /content/images/*.png
Allow: /content/images/*.gif
2 changes: 1 addition & 1 deletion system/admin/views/update.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

$updater = new HubUpdater(array(
'name' => 'danpros/htmly',
'prerelease' => !!config("prerelease"),
'prerelease' => config("prerelease"),
));

$dir = 'cache/';
Expand Down
6 changes: 3 additions & 3 deletions system/htmly.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

use PragmaRX\Google2FA\Google2FA;

// Get search query. Redir to /search/
get_search_query();

// Load the configuration file
config('source', $config_file);

Expand All @@ -19,9 +22,6 @@
// Publish scheduled post
publish_scheduled();

// Get search query. Redir to /search/
get_search_query();

// The front page of the blog
get('/index', function () {

Expand Down
Binary file added system/resources/images/share-facebook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added system/resources/images/share-twitter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 2 additions & 6 deletions themes/clean/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -745,15 +745,11 @@ aside .copyright p {
}

.share a.twitter {
background: url(../../readable/img/share-twitter.png) left top no-repeat;
background: url(../../../system/resources/images/share-twitter.png) left top no-repeat;
}

.share a.facebook {
background: url(../../readable/img/share-facebook.png) left top no-repeat;
}

.share a.googleplus {
background: url(../../readable/img/share-googleplus.png) left top no-repeat;
background: url(../../../system/resources/images/share-facebook.png) left top no-repeat;
}

.share a:hover {
Expand Down
8 changes: 2 additions & 6 deletions themes/logs/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -553,15 +553,11 @@ ul li, ol li {
}

.share a.twitter {
background: url(../../readable/img/share-twitter.png) left top no-repeat;
background: url(../../../system/resources/images/share-twitter.png) left top no-repeat;
}

.share a.facebook {
background: url(../../readable/img/share-facebook.png) left top no-repeat;
}

.share a.googleplus {
background: url(../../readable/img/share-googleplus.png) left top no-repeat;
background: url(../../../system/resources/images/share-facebook.png) left top no-repeat;
}

.share a:hover {
Expand Down
21 changes: 21 additions & 0 deletions themes/tailwind/404-search.html.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php if (!defined('HTMLY')) die('HTMLy'); ?>
<div class="divide-y divide-gray-200 dark:divide-gray-700">
<div class="space-y-2 pb-8 pt-6 md:space-y-5">
<h1 class="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">Search results not found!</h1>
</div>
<div class="items-start space-y-2 xl:grid xl:gap-x-8 xl:space-y-0">
<div class="prose max-w-none pb-8 pt-8 dark:prose-invert">
<p>Please search to find what you're looking for or visit our <a href="<?php echo site_url() ?>">homepage</a> instead.</p>
</div>

<div class="relative max-w-lg">
<label>
<span class="sr-only">Search articles</span>
<form><input aria-label="Search articles" name="search" placeholder="Search articles" class="block w-full rounded-md border border-gray-300 bg-white px-4 py-2 text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-900 dark:bg-gray-800 dark:text-gray-100" type="text"></form>
</label>
<svg class="absolute right-3 top-3 h-5 w-5 text-gray-400 dark:text-gray-300" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
</div>


</div>
</div>
20 changes: 20 additions & 0 deletions themes/tailwind/404.html.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php if (!defined('HTMLY')) die('HTMLy'); ?>
<div class="divide-y divide-gray-200 dark:divide-gray-700">
<div class="space-y-2 pb-8 pt-6 md:space-y-5">
<h1 class="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">This page doesn't exist!</h1>
</div>
<div class="items-start space-y-2 xl:grid xl:gap-x-8 xl:space-y-0">
<div class="prose max-w-none pb-8 pt-8 dark:prose-invert">
<p>Please search to find what you're looking for or visit our <a href="<?php echo site_url() ?>">homepage</a> instead.</p>
</div>

<div class="relative max-w-lg">
<label>
<span class="sr-only">Search articles</span>
<form><input aria-label="Search articles" name="search" placeholder="Search articles" class="block w-full rounded-md border border-gray-300 bg-white px-4 py-2 text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-900 dark:bg-gray-800 dark:text-gray-100" type="text"></form>
</label>
<svg class="absolute right-3 top-3 h-5 w-5 text-gray-400 dark:text-gray-300" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
</div>

</div>
</div>
21 changes: 21 additions & 0 deletions themes/tailwind/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Timothy Lin

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.
12 changes: 12 additions & 0 deletions themes/tailwind/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# HTMLy Theme Tailwind

Tailwind CSS blogging starter template ported to HTMLy.

## Installations

- Upload and extract the zip file into themes directory.
- Activate it from HTMLy panel.

## License

See the LICENSE.txt
144 changes: 144 additions & 0 deletions themes/tailwind/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
.pr-6 {
padding-right:1.5rem
}

.anchor svg {
display:inline;
}

.dark .toc-wrapper {
background-color: var(--tw-prose-pre-bg)!important;
border-color: rgb(55 65 81/var(--tw-divide-opacity))!important;
}

.light .toc-wrapper {
border-color: rgb(229 231 235/var(--tw-divide-opacity))!important;
}

.toc-wrapper a, .related-posts a {
text-decoration: none;
}

.toc-link a {
display:none;
}

.toc-link:hover a{
display:inline-block;
}

.tags a {
margin-right: .75rem;
}

.category a {
margin-right: .1rem;
}

.category {
line-height:3.2rem;
}

.read-more {
text-decoration:inherit;
}

.nav-top li {
display:inline-block;
margin-left: 1.5rem;
font-weight: 500;
}

.nav-mobile li{
outline-width: 0;
outline-style: solid;
letter-spacing: .1em;
font-weight: 700;
font-size: 1.5rem;
line-height: 2rem;
padding-right: 1rem;
padding-top: .5rem;
padding-bottom: .5rem;
margin-bottom: 1rem;
}

.menu-mobile {
display:none;
}

@media (max-width: 640px) {
.nav-top {
display:none;
}
.is-menu-open .menu-mobile {
display:block!important;
}
}

.search-form {
display:none;
}

.is-search-open .search-form {
display: flex;
}

.tags a:hover {
color:rgb(190 24 93);
}


.dark .tags a:hover {
color:rgb(244 114 182);
}

.thumbnail {
position:relative;
display:block;
}

.nav li > ul {
display:none;
}

.footnotes {
margin-top:0;
border:none;
}

.footnotes ol {
margin-bottom:0;
padding-top: 1.5em;
}

.footnotes > hr {
margin:0;
}

.thumb-icon {
background: rgba(0,0,0,0.7);
color: #fff;
text-align: center;
display: block;
width: 32px;
height: 32px;
position: absolute;
bottom: 50%;
left: 50%;
margin-left: -16px;
margin-bottom: -16px;
-webkit-border-radius: 4px;
border-radius: 4px;
-moz-transition: all 0.7s ease;
-webkit-transition: all 0.7s ease;
transition: all 0.7s ease;
}

.thumb-icon svg {
margin: 1px 0 0 2px;
}

.thumbnail:hover .thumb-icon {
background: #fff;
color: #333;
}
Loading

0 comments on commit 4abd8b2

Please sign in to comment.