Basic theme settings

This commit is contained in:
danpros 2025-11-01 20:15:16 +07:00
commit 1038839dd1
13 changed files with 372 additions and 117 deletions

View file

@ -47,20 +47,28 @@
<h3><?php echo i18n('Follow');?></h3>
<?php echo social() ?>
</div>
<?php if (theme_config('recent_posts')):?>
<div class="recent">
<h3><?php echo i18n('Recent_posts');?></h3>
<?php echo recent_posts() ?>
</div>
<?php endif;?>
<?php if(config('views.counter') === 'true') :?>
<div class="popular">
<h3><?php echo i18n('Popular_posts');?></h3>
<?php echo popular_posts() ?>
</div>
<?php endif;?>
<?php if (theme_config('archive')):?>
<div class="archive">
<h3><?php echo i18n('Archives');?></h3>
<?php echo archive_list() ?>
</div>
<?php endif;?>
<?php if (disqus()): ?>
<div class="comments">
<h3><?php echo i18n('Comments');?></h3>
@ -68,16 +76,23 @@
<style>li.dsq-widget-item {border-bottom: 1px solid #ebebeb;margin:0;margin-bottom:10px;padding:0;padding-bottom:10px;}a.dsq-widget-user {font-weight:normal;}img.dsq-widget-avatar {margin-right:10px; }.dsq-widget-comment {display:block;padding-top:5px;}.dsq-widget-comment p {display:block;margin:0;}p.dsq-widget-meta {padding-top:5px;margin:0;}#dsq-combo-widget.grey #dsq-combo-content .dsq-combo-box {background: transparent;}#dsq-combo-widget.grey #dsq-combo-tabs li {background: none repeat scroll 0 0 #DDDDDD;}</style>
</div>
<?php endif; ?>
<?php if (theme_config('category_list')):?>
<div class="category-list">
<h3><?php echo i18n('Category');?></h3>
<?php echo category_list() ?>
</div>
<?php endif;?>
<?php if (theme_config('tagcloud')):?>
<div class="tagcloud">
<h3><?php echo i18n('Tags');?></h3>
<div class="tag-cloud">
<?php echo tag_cloud();?>
</div>
<div class="tag-cloud">
<?php echo tag_cloud();?>
</div>
</div>
<?php endif;?>
</aside>
</div>
</div>

View file

@ -3,5 +3,35 @@
"version": "",
"author": "",
"homepage": "https://www.htmly.com",
"description": "Logs HTMLy theme."
"description": "Logs HTMLy theme.",
"settings": [
{
"type": "checkbox",
"name": "recent_posts",
"label": "Recent Posts",
"value": "",
"info": "Enable Recent Posts widget"
},
{
"type": "checkbox",
"name": "archive",
"label": "Archive",
"value": "",
"info": "Enable Archive widget"
},
{
"type": "checkbox",
"name": "category_list",
"label": "Category List",
"value": "",
"info": "Enable Category List widget"
},
{
"type": "checkbox",
"name": "tagcloud",
"label": "TagCloud",
"value": "",
"info": "Enable TagCloud widget"
}
]
}