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
Binary file modified haihara.zip
Binary file not shown.
381 changes: 213 additions & 168 deletions haihara/assets/css/style.css

Large diffs are not rendered by default.

25 changes: 15 additions & 10 deletions haihara/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,22 @@ jQuery(document).ready(function($) {
'infinite-scroll': false,
'infinite-scroll-step': 3,
'disqus-shortname': 'hauntedthemes-haihara',
'content-api-host': '',
'content-api-key': '',
'content-api-host': (apiHost ? apiHost : ''),
'content-api-key': (apiKey ? apiKey : ''),
};

var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0),
h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0),
lang = $('body').attr('lang'),
monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];

var ghostAPI = new GhostContentAPI({
host: config['content-api-host'],
key: config['content-api-key'],
version: 'v2'
});
if (config['content-api-key']) {
var ghostAPI = new GhostContentAPI({
host: config['content-api-host'],
key: config['content-api-key'],
version: 'v2'
});
}

// Featured posts slider

Expand Down Expand Up @@ -112,10 +114,13 @@ jQuery(document).ready(function($) {
// Search trigger
$('.search-trigger').on('click', function(event) {
event.preventDefault();
setTimeout(function() {
$('.search #search-field').focus();
}, 300);
$('body').focus();
$('body').toggleClass('search-visible');
if ($('body').hasClass('search-visible')) {
setTimeout(function () {
$('.search #search-field').focus();
}, 300);
}
});

var ghostSearch = new GhostSearch({
Expand Down
9 changes: 8 additions & 1 deletion haihara/default.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@
var maxPages = parseInt('{{pagination.pages}}');
</script>
{{/if}}

<script type="text/javascript">
{{#if @custom.api_key }}
const apiKey = "{{ @custom.api_key }}";
{{/if}}
{{#if @custom.api_host }}
const apiHost = "{{ @custom.api_host }}";
{{/if}}
</script>
<script type="text/javascript" src="{{asset "js/main.js"}}"></script>

{{!-- Ghost outputs important scripts and data with this tag --}}
Expand Down
52 changes: 51 additions & 1 deletion haihara/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "haihara",
"description": "If you are a busy publisher we are pleased to inform that this theme is a little monster that feeds on content for lunch, supper and dinner. You have been warned...",
"demo": "https://haihara.hauntedthemes.com/",
"version": "2.0.1",
"version": "2.1.0",
"license": "GNU General Public License, Version 2",
"engines": {
"ghost": ">=2.0.0",
Expand Down Expand Up @@ -40,6 +40,56 @@
"l": {
"width": 1110
}
},
"custom": {
"primary": {
"type": "color",
"default": "#0025C8"
},
"secondary": {
"type": "color",
"default": "#f0f0f0"
},
"accent": {
"type": "color",
"default": "#FB0007"
},
"primary_font": {
"type": "text",
"default": "\"sofia-pro\", \"Roboto\", sans-serif"
},
"secondary_font": {
"type": "text",
"default": "\"ropa-soft-pro\", \"Roboto Condensed\", sans-serif"
},
"tertiary_font": {
"type": "text",
"default": "\"dienstag\", \"Montserrat\", sans-serif"
},
"api_host": {
"type": "text",
"default": ""
},
"api_key": {
"type": "text",
"default": ""
},
"advertise": {
"type": "boolean",
"default": true
},
"instagram": {
"type": "text",
"default": ""
},
"linkedin": {
"type": "text",
"default": ""
},
"youtube": {
"type": "text",
"default": ""
}
}
}
}
2 changes: 2 additions & 0 deletions haihara/partials/sidebar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@
</ul>
{{/get}}
</div>
{{#if @custom.advertise}}
<div class="widget ads">
<h3>{{t "Advertisement"}}</h3>
<div class="ads-container">{{t "Your ad here"}}</div>
</div>
{{/if}}
</div>
14 changes: 12 additions & 2 deletions haihara/partials/theme_footer.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,18 @@
{{#if @site.twitter}}
<a href="{{twitter_url}}" class="twitter" title="{{@site.twitter}}" target="_blank" rel="noopener noreferrer"><i class="fab fa-twitter"></i></a>
{{/if}}
<a href="https://www.youtube.com/" class="youtube" title="{{@site.title}} - {{t "YouTube"}}" target="_blank" rel="noopener noreferrer"><i class="fab fa-youtube" aria-hidden="true"></i></a>
<a href="https://www.instagram.com/" class="instagram" title="{{@site.title}} - {{t "Instagram"}}" target="_blank" rel="noopener noreferrer"><i class="fab fa-instagram" aria-hidden="true"></i></a>
{{#if @custom.linkedin}}
<a href="{{ @custom.linkedin }}" class="instagram" title="{{@site.title}} - {{t " Linkedin"}}"
target="_blank" rel="noopener noreferrer"><i class="fab fa-linkedin-in"></i></a>
{{/if}}
{{#if @custom.youtube}}
<a href="{{ @custom.youtube }}" class="youtube" title="{{@site.title}} - {{t " YouTube"}}" target="_blank"
rel="noopener noreferrer"><i class="fab fa-youtube" aria-hidden="true"></i></a>
{{/if}}
{{#if @custom.instagram}}
<a href="{{ @custom.instagram }}" class="instagram" title="{{@site.title}} - {{t " Instagram"}}" target="_blank"
rel="noopener noreferrer"><i class="fab fa-instagram" aria-hidden="true"></i></a>
{{/if}}
<a href="{{@site.url}}/rss" title="{{@site.title}} - {{t "RSS Feed"}}"><i class="fa fa-rss" aria-hidden="true"></i></a>
</div>
</div>
Expand Down
22 changes: 22 additions & 0 deletions haihara/partials/theme_head.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,28 @@
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/all.css">
<link rel="stylesheet" type="text/css" href="{{asset "css/libraries.css"}}" />
<link rel="stylesheet" type="text/css" href="{{asset "css/style.css"}}" />
<style>
:root {
{{#if @custom.primary}}
--primary: {{@custom.primary}};
{{/if}}
{{#if @custom.secondary}}
--secondary: {{@custom.secondary}};
{{/if}}
{{#if @custom.accent}}
--accent: {{@custom.accent}};
{{/if}}
{{#if @custom.primary_font}}
--primary-font-family: {{{@custom.primary_font}}};
{{/if}}
{{#if @custom.secondary_font}}
--secondary-font-family: {{{@custom.secondary_font}}};
{{/if}}
{{#if @custom.tertiary_font}}
--tertiary-font-family: {{{@custom.tertiary_font}}};
{{/if}}
}
</style>

{{!-- Google Fonts embed code --}}
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700%7CRoboto+Condensed:400,700%7CRoboto:400,700" rel="stylesheet">
22 changes: 17 additions & 5 deletions haihara/partials/theme_header.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,26 @@
{{navigation}}
<div class="social">
{{#if @site.facebook}}
<a href="{{facebook_url}}" class="facebook" title="{{@site.facebook}}" target="_blank" rel="noopener noreferrer"><i class="fab fa-facebook-f"></i></a>
<a href="{{facebook_url}}" class="facebook" title="{{@site.facebook}}" target="_blank" rel="noopener noreferrer"><i
class="fab fa-facebook-f"></i></a>
{{/if}}
{{#if @site.twitter}}
<a href="{{twitter_url}}" class="twitter" title="{{@site.twitter}}" target="_blank" rel="noopener noreferrer"><i class="fab fa-twitter"></i></a>
<a href="{{twitter_url}}" class="twitter" title="{{@site.twitter}}" target="_blank" rel="noopener noreferrer"><i
class="fab fa-twitter"></i></a>
{{/if}}
<a href="https://www.youtube.com/" class="youtube" title="{{@site.title}} - {{t "YouTube"}}" target="_blank" rel="noopener noreferrer"><i class="fab fa-youtube" aria-hidden="true"></i></a>
<a href="https://www.instagram.com/" class="instagram" title="{{@site.title}} - {{t "Instagram"}}" target="_blank" rel="noopener noreferrer"><i class="fab fa-instagram" aria-hidden="true"></i></a>
<a href="{{@site.url}}/rss" title="{{@site.title}} - {{t "RSS Feed"}}"><i class="fa fa-rss" aria-hidden="true"></i></a>
{{#if @custom.linkedin}}
<a href="{{ @custom.linkedin }}" class="instagram" title="{{@site.title}} - {{t " Linkedin"}}" target="_blank"
rel="noopener noreferrer"><i class="fab fa-linkedin-in"></i></a>
{{/if}}
{{#if @custom.youtube}}
<a href="{{ @custom.youtube }}" class="youtube" title="{{@site.title}} - {{t " YouTube"}}" target="_blank"
rel="noopener noreferrer"><i class="fab fa-youtube" aria-hidden="true"></i></a>
{{/if}}
{{#if @custom.instagram}}
<a href="{{ @custom.instagram }}" class="instagram" title="{{@site.title}} - {{t " Instagram"}}" target="_blank"
rel="noopener noreferrer"><i class="fab fa-instagram" aria-hidden="true"></i></a>
{{/if}}
<a href="{{@site.url}}/rss" title="{{@site.title}} - {{t " RSS Feed"}}"><i class="fa fa-rss" aria-hidden="true"></i></a>
</div>
<a href="#" class="nav-trigger">
<i class="fa fa-bars" aria-hidden="true"></i>
Expand Down