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

@ -79,6 +79,8 @@
</div><!--//content-->
</div><!--//section-inner-->
</aside><!--//section-->
<?php if (theme_config('recent_posts')):?>
<aside class="recent-posts aside section">
<div class="section-inner">
<!-- Tab nav -->
@ -123,6 +125,8 @@
</div>
</div><!--//section-inner-->
</aside><!--//section-->
<?php endif;?>
<?php if (disqus()): ?>
<aside class="comments aside section">
<div class="section-inner">
@ -134,6 +138,8 @@
</div><!--//section-inner-->
</aside><!--//section-->
<?php endif; ?>
<?php if (theme_config('archive')):?>
<aside class="archive aside section">
<div class="section-inner">
<h2 class="heading"><?php echo i18n("Archives");?></h2>
@ -142,6 +148,9 @@
</div><!--//content-->
</div><!--//section-inner-->
</aside><!--//section-->
<?php endif;?>
<?php if (theme_config('category_list')):?>
<aside class="category-list aside section">
<div class="section-inner">
<h2 class="heading"><?php echo i18n('Category');?></h2>
@ -150,6 +159,9 @@
</div><!--//content-->
</div><!--//section-inner-->
</aside><!--//section-->
<?php endif;?>
<?php if (theme_config('tagcloud')):?>
<aside class="category-list aside section">
<div class="section-inner">
<h2 class="heading"><?php echo i18n("Tags");?></h2>
@ -160,6 +172,8 @@
</div><!--//content-->
</div><!--//section-inner-->
</aside><!--//section-->
<?php endif;?>
</div><!--//secondary-->
</div><!--//row-->
</div><!--//masonry-->

View file

@ -3,5 +3,35 @@
"version": "",
"author": "Xiaoying Riley",
"homepage": "https://3rdwavemedia.com",
"description": "Blog theme ported to HTMLy."
"description": "Blog theme ported to HTMLy.",
"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"
}
]
}

View file

@ -25,15 +25,28 @@
</div>
<div class="social"><?php echo social() ?></div>
<div class="menu"><?php echo menu() ?></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 (theme_config('archive')):?>
<div class="archive"><h3><?php echo i18n('Archives');?></h3><?php echo archive_list() ?></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>
<?php endif;?>
<div class="copyright"><?php echo copyright() ?></div>
</aside>
<section id="content">

View file

@ -3,5 +3,35 @@
"version": "",
"author": "",
"homepage": "https://www.htmly.com",
"description": "Clean HTMLy theme."
"description": "Clean 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"
}
]
}

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>
<?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"
}
]
}

View file

@ -82,12 +82,16 @@
</div>
<footer>
<div class="divide-gray-200 text-sm font-medium leading-5 dark:divide-gray-700 xl:col-start-1 xl:row-start-2 xl:divide-y">
<?php if (theme_config('recent_posts')):?>
<div class="py-4 xl:py-8">
<h2 class="text-xs uppercase tracking-wide text-gray-500 dark:text-gray-400"><?php echo i18n('tags');?></h2>
<div class="flex flex-wrap">
<span class="mr-3 text-sm font-medium uppercase text-primary-500" ><span class="tags"><?php echo $p->tag;?></span></span>
</div>
</div>
<?php endif;?>
<?php if (theme_config('post_navigation')):?>
<div class="flex justify-between py-4 xl:block xl:space-y-8 xl:py-8">
<?php if (!empty($prev)): ?>
<div>
@ -102,12 +106,17 @@
</div>
<?php endif;?>
</div>
<?php endif;?>
<?php if (theme_config('tagcloud')):?>
<div class="py-4 xl:py-8">
<h2 class="text-xs uppercase tracking-wide text-gray-500 dark:text-gray-400">Tag Cloud</h2>
<div class="flex flex-wrap">
<span class="mr-3 text-sm font-medium uppercase text-primary-500"><span class="tags"><?php echo tag_cloud();?></span></span>
</div>
</div>
<?php endif;?>
</div>
<?php if (config('blog.enable') === 'true') {?>
<div class="pt-4 xl:pt-8"><a class="text-primary-500 hover:text-primary-600 dark:hover:text-primary-400" aria-label="Back to the blog" href="<?php echo site_url() . blog_path();?>"> <?php echo i18n('back_to');?> <?php echo blog_string();?></a></div>

View file

@ -5,10 +5,13 @@
<div class="prose max-w-none text-lg leading-7 pb-6 text-gray-500 dark:text-gray-400 dark:prose-invert">
<?php echo $static->body;?>
</div>
<?php if(theme_config('frontpage_posts')):?>
<div class="space-y-2 md:space-y-5">
<h2 class="text-2xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-4xl md:leading-14"><?php echo i18n('recent_posts');?></h2>
</div>
<?php endif;?>
</div>
<?php if(theme_config('frontpage_posts')):?>
<?php $posts = recent_posts(true);?>
<?php $teaserType = config('teaser.type'); $readMore = config('read.more');?>
<ul class="divide-y divide-gray-200 dark:divide-gray-700">
@ -109,3 +112,4 @@
<?php if (config('blog.enable') === 'true'):?>
<div style="border:none;text-align:right;"><a class="text-primary-500 hover:text-primary-600 dark:hover:text-primary-400" aria-label="<?php echo i18n('all_blog_posts');?>" href="<?php echo site_url() . blog_path();?>"><?php echo i18n('all_blog_posts');?> →</a></div>
<?php endif;?>
<?php endif;?>

View file

@ -3,5 +3,35 @@
"version": "",
"author": "Timothy Lin",
"homepage": "https://www.timlrx.com",
"description": "Tailwind Nextjs Starter Blog ported to HTMLy."
"description": "Tailwind Nextjs Starter Blog ported to HTMLy.",
"settings": [
{
"type": "checkbox",
"name": "recent_posts",
"label": "Recent Posts",
"value": "",
"info": "Enable Recent Posts widget"
},
{
"type": "checkbox",
"name": "post_navigation",
"label": "Post Navigation",
"value": "",
"info": "Enable post navigation"
},
{
"type": "checkbox",
"name": "tagcloud",
"label": "TagCloud",
"value": "",
"info": "Enable TagCloud widget"
},
{
"type": "checkbox",
"name": "frontpage_posts",
"label": "Static Frontpage Posts",
"value": "",
"info": "Show recent posts on static frontpage"
}
]
}

View file

@ -50,36 +50,51 @@
<aside class="widget search">
<form><input type="search" name="search" class="form-control" placeholder="<?php echo i18n('Type_to_search');?>"></form>
</aside>
<?php if (theme_config('recent_posts')):?>
<aside class="widget widget_meta">
<h2 class="widget-title"><?php echo i18n("Recent_posts");?></h2>
<?php echo recent_posts() ?>
</aside>
<?php endif;?>
<?php if (config('views.counter') === 'true') :?>
<aside class="widget widget_meta">
<h2 class="widget-title"><?php echo i18n("Popular_posts");?></h2>
<?php echo popular_posts() ?>
</aside>
<?php endif;?>
<?php if (disqus()): ?>
<aside class="widget widget_meta">
<h2 class="widget-title">Recent comments</h2>
<script src="//<?php echo config('disqus.shortname');?>.disqus.com/recent_comments_widget.js?num_items=5&amp;hide_avatars=0&amp;avatar_size=48&amp;excerpt_length=200&amp;hide_mods=0" type="text/javascript"></script><style>li.dsq-widget-item {padding-top:15px;} img.dsq-widget-avatar {margin-right:5px;}</style>
</aside>
<?php endif;?>
<?php if (theme_config('archive')):?>
<aside class="widget widget_meta">
<h2 class="widget-title"><?php echo i18n("Archives");?></h2>
<?php echo archive_list() ?>
</aside>
<?php endif;?>
<?php if (theme_config('category_list')):?>
<aside class="widget widget_meta">
<h2 class="widget-title"><?php echo i18n('Category');?></h2>
<?php echo category_list() ?>
</aside>
<?php endif;?>
<?php if (theme_config('tagcloud')):?>
<aside class="widget widget_meta">
<h2 class="widget-title"><?php echo i18n("Tags");?></h2>
<div class="tag-cloud">
<?php echo tag_cloud();?>
</div>
</aside>
<?php endif;?>
</div>
</div>
</div>

View file

@ -5,6 +5,34 @@
"homepage": "https://wordpress.org",
"description": "Twenty Fifteen theme ported to HTMLy.",
"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"
},
{
"type": "checkbox",
"name": "left_sidebar",

View file

@ -54,7 +54,6 @@
</main><!-- .site-main -->
</div><!-- .content-area -->
<aside id="secondary" class="sidebar widget-area" role="complementary">
<section class="widget widget_text">
<h2 class="widget-title"><?php echo i18n("About");?></h2>
@ -72,10 +71,12 @@
</form>
</section>
<?php if(theme_config('recent_posts')):?>
<section id="recent-posts" class="widget widget_recent_entries">
<h2 class="widget-title"><?php echo i18n("Recent_posts");?></h2>
<?php echo recent_posts();?>
</section>
<?php endif;?>
<?php if (config('views.counter') === 'true') :?>
<section id="popular-posts" class="widget widget_popular_entries">
@ -91,22 +92,28 @@
</section>
<?php endif;?>
<?php if(theme_config('archive')):?>
<section id="archives" class="widget widget_archive">
<h2 class="widget-title"><?php echo i18n("Archives");?></h2>
<?php echo archive_list() ?>
</section>
<?php endif;?>
<?php if(theme_config('category_list')):?>
<section id="category" class="widget widget_category">
<h2 class="widget-title"><?php echo i18n("Categories");?></h2>
<?php echo category_list() ?>
</section>
<?php endif;?>
<?php if(theme_config('tagcloud')):?>
<section id="popular-tags" class="widget widget_popular_tags">
<h2 class="widget-title"><?php echo i18n("Tags");?></h2>
<div class="tag-cloud">
<?php echo tag_cloud();?>
</div>
</section>
<?php endif;?>
</aside><!-- .sidebar .widget-area -->

View file

@ -3,5 +3,35 @@
"version": "",
"author": "WordPress.org & Automattic.com",
"homepage": "https://wordpress.org",
"description": "Twenty Sixteen theme ported to HTMLy."
"description": "Twenty Sixteen theme ported to HTMLy.",
"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"
}
]
}