Skip to content

Commit

Permalink
fix: dropdown only for posts
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackin7 authored and wei2912 committed Jul 26, 2024
1 parent 9c419f2 commit e683d41
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
4 changes: 4 additions & 0 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,10 @@ function colourTags() {
}

function contentDropdown() {
var element = document.getElementById('content-dropdown-enable');
if (typeof element == 'undefined' || element == null) {
return;
}
$('div.single-content h2').each(function () {
var $header = $(this);
var $nextElement = $header.next();
Expand Down
35 changes: 18 additions & 17 deletions post.hbs
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{{!< default}}

{{#contentFor "title"}}{{meta_title}}{{/contentFor}}

<div class="content-area">
<main class="site-main">
{{#post}}
{{> content width="wide"}}
{{/post}}
{{#is "post"}}
{{#if @custom.show_related_posts}}
{{> related}}
{{/if}}
{{> comment}}
{{/is}}
</main>
</div>
{{!< default}}

{{#contentFor "title"}}{{meta_title}}{{/contentFor}}

<div class="content-area">
<main class="site-main">
{{#post}}
{{> content width="wide"}}
{{/post}}
{{#is "post"}}
<div id="content-dropdown-enable"></div>
{{#if @custom.show_related_posts}}
{{> related}}
{{/if}}
{{> comment}}
{{/is}}
</main>
</div>

0 comments on commit e683d41

Please sign in to comment.