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>
</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 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>
</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

@ -1,111 +1,115 @@
<?php if (!defined('HTMLY')) die('HTMLy'); ?>
<div class="space-y-2 pb-6 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"><?php echo $static->title;?></h1>
<?php if (authorized($p)):?><span><a href="<?php echo $p->url;?>/edit?destination=post"><?php echo i18n('edit');?></a></span><?php endif;?>
<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>
<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>
<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"><?php echo $static->title;?></h1>
<?php if (authorized($p)):?><span><a href="<?php echo $p->url;?>/edit?destination=post"><?php echo i18n('edit');?></a></span><?php endif;?>
<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">
<?php foreach ($posts as $p):?>
<?php $img = get_image($p->body);?>
<li class="py-12">
<article>
<div class="space-y-2 xl:grid xl:grid-cols-4 xl:items-baseline xl:space-y-0">
<dl>
<dt class="sr-only"><?php echo i18n('posted_on');?></dt>
<dd class="text-base font-medium leading-6 text-gray-500 dark:text-gray-400"><time><?php echo format_date($p->date);?></time>
<?php if (authorized($p)):?> • <span><a href="<?php echo $p->url;?>/edit?destination=post"><?php echo i18n('edit');?></a></span><?php endif;?>
</dd>
<?php if ($teaserType === 'trimmed') :?>
<dt class="sr-only"><?php echo i18n('featured_image');?></dt>
<dd class="pt-4 pr-6">
<?php if (!empty($p->image)) {?>
<a class="thumbnail" href="<?php echo $p->url;?>"><img src="<?php echo $p->image;?>" width="100%" alt="<?php echo $p->title;?>"></a>
<?php } elseif (!empty($p->video)) {?>
<a class="thumbnail" href="<?php echo $p->url;?>"><img src="//img.youtube.com/vi/<?php echo get_video_id($p->video);?>/sddefault.jpg" width="100%" alt="<?php echo $p->title;?>">
<span class="thumb-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor" class="bi bi-play" viewBox="0 0 16 16"><path d="M10.804 8 5 4.633v6.734zm.792-.696a.802.802 0 0 1 0 1.392l-6.363 3.692C4.713 12.69 4 12.345 4 11.692V4.308c0-.653.713-.998 1.233-.696z"/></svg>
</span>
</a>
<?php } elseif (!empty($p->audio)) {?>
<a class="thumbnail" href="<?php echo $p->url;?>">
<img src="<?php echo theme_path();?>img/soundcloud.jpg" width="100%" alt="<?php echo $p->title;?>">
<span class="thumb-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor" class="bi bi-volume-up" viewBox="0 0 16 16"><path d="M11.536 14.01A8.47 8.47 0 0 0 14.026 8a8.47 8.47 0 0 0-2.49-6.01l-.708.707A7.48 7.48 0 0 1 13.025 8c0 2.071-.84 3.946-2.197 5.303z"/><path d="M10.121 12.596A6.48 6.48 0 0 0 12.025 8a6.48 6.48 0 0 0-1.904-4.596l-.707.707A5.48 5.48 0 0 1 11.025 8a5.48 5.48 0 0 1-1.61 3.89z"/><path d="M10.025 8a4.5 4.5 0 0 1-1.318 3.182L8 10.475A3.5 3.5 0 0 0 9.025 8c0-.966-.392-1.841-1.025-2.475l.707-.707A4.5 4.5 0 0 1 10.025 8M7 4a.5.5 0 0 0-.812-.39L3.825 5.5H1.5A.5.5 0 0 0 1 6v4a.5.5 0 0 0 .5.5h2.325l2.363 1.89A.5.5 0 0 0 7 12zM4.312 6.39 6 5.04v5.92L4.312 9.61A.5.5 0 0 0 4 9.5H2v-3h2a.5.5 0 0 0 .312-.11"/></svg>
</span>
</a>
<?php } elseif (!empty($img)) {?>
<a class="thumbnail" href="<?php echo $p->url;?>"><img src="<?php echo $img;?>" width="100%" alt="<?php echo $p->title;?>"></a>
<?php } ?>
</dd>
<?php endif;?>
</dl>
<div class="space-y-5 xl:col-span-3">
<div class="space-y-6">
<div>
<?php if (!empty($p->link)) {?>
<h2 class="text-2xl font-bold leading-8 tracking-tight">
<a class="text-gray-900 dark:text-gray-100" href="<?php echo $p->link;?>" target="_blank"><?php echo $p->title;?>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" style="display:inline-block;margin-left: 3px;" class=" bi bi-link-45deg" viewBox="0 0 16 16">
<path d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1 1 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4 4 0 0 1-.128-1.287z"/>
<path d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243z"/>
</svg>
</a>
</h2>
<?php } else { ?>
<h2 class="text-2xl font-bold leading-8 tracking-tight">
<a class="text-gray-900 dark:text-gray-100" href="<?php echo $p->url;?>"><?php echo $p->title;?></a>
</h2>
<?php } ?>
<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>
<div class="prose max-w-none text-gray-500 dark:text-gray-400 dark:prose-invert">
<?php if ($teaserType !== 'trimmed') :?>
<?php if (!empty($p->image)) {?>
<img src="<?php echo $p->image;?>" width="100%" alt="<?php echo $p->title;?>">
<?php } elseif (!empty($p->video)) {?>
<div class="relative" style="padding-top: 56.25%">
<iframe class="absolute inset-0 w-full h-full" src="https://www.youtube.com/embed/<?php echo get_video_id($p->video); ?>" frameborder="0" allowfullscreen></iframe>
</div>
<?php } elseif (!empty($p->audio)) {?>
<iframe width="100%" height="100%" class="embed-responsive-item" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $p->audio;?>&amp;auto_play=false&amp;visual=true"></iframe>
<?php } elseif (!empty($p->quote)) {?>
<blockquote class="text-2xl italic font-bold leading-8 tracking-tight">
<?php echo $p->quote;?>
</blockquote>
<?php } ?>
<?php endif;?>
<?php foreach ($posts as $p):?>
<?php $img = get_image($p->body);?>
<li class="py-12">
<article>
<div class="space-y-2 xl:grid xl:grid-cols-4 xl:items-baseline xl:space-y-0">
<dl>
<dt class="sr-only"><?php echo i18n('posted_on');?></dt>
<dd class="text-base font-medium leading-6 text-gray-500 dark:text-gray-400"><time><?php echo format_date($p->date);?></time>
<?php if (authorized($p)):?> • <span><a href="<?php echo $p->url;?>/edit?destination=post"><?php echo i18n('edit');?></a></span><?php endif;?>
</dd>
<?php if ($teaserType === 'trimmed') :?>
<dt class="sr-only"><?php echo i18n('featured_image');?></dt>
<dd class="pt-4 pr-6">
<?php if (!empty($p->image)) {?>
<a class="thumbnail" href="<?php echo $p->url;?>"><img src="<?php echo $p->image;?>" width="100%" alt="<?php echo $p->title;?>"></a>
<?php } elseif (!empty($p->video)) {?>
<a class="thumbnail" href="<?php echo $p->url;?>"><img src="//img.youtube.com/vi/<?php echo get_video_id($p->video);?>/sddefault.jpg" width="100%" alt="<?php echo $p->title;?>">
<span class="thumb-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor" class="bi bi-play" viewBox="0 0 16 16"><path d="M10.804 8 5 4.633v6.734zm.792-.696a.802.802 0 0 1 0 1.392l-6.363 3.692C4.713 12.69 4 12.345 4 11.692V4.308c0-.653.713-.998 1.233-.696z"/></svg>
</span>
</a>
<?php } elseif (!empty($p->audio)) {?>
<a class="thumbnail" href="<?php echo $p->url;?>">
<img src="<?php echo theme_path();?>img/soundcloud.jpg" width="100%" alt="<?php echo $p->title;?>">
<span class="thumb-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor" class="bi bi-volume-up" viewBox="0 0 16 16"><path d="M11.536 14.01A8.47 8.47 0 0 0 14.026 8a8.47 8.47 0 0 0-2.49-6.01l-.708.707A7.48 7.48 0 0 1 13.025 8c0 2.071-.84 3.946-2.197 5.303z"/><path d="M10.121 12.596A6.48 6.48 0 0 0 12.025 8a6.48 6.48 0 0 0-1.904-4.596l-.707.707A5.48 5.48 0 0 1 11.025 8a5.48 5.48 0 0 1-1.61 3.89z"/><path d="M10.025 8a4.5 4.5 0 0 1-1.318 3.182L8 10.475A3.5 3.5 0 0 0 9.025 8c0-.966-.392-1.841-1.025-2.475l.707-.707A4.5 4.5 0 0 1 10.025 8M7 4a.5.5 0 0 0-.812-.39L3.825 5.5H1.5A.5.5 0 0 0 1 6v4a.5.5 0 0 0 .5.5h2.325l2.363 1.89A.5.5 0 0 0 7 12zM4.312 6.39 6 5.04v5.92L4.312 9.61A.5.5 0 0 0 4 9.5H2v-3h2a.5.5 0 0 0 .312-.11"/></svg>
</span>
</a>
<?php } elseif (!empty($img)) {?>
<a class="thumbnail" href="<?php echo $p->url;?>"><img src="<?php echo $img;?>" width="100%" alt="<?php echo $p->title;?>"></a>
<?php } ?>
</dd>
<?php endif;?>
</dl>
<div class="space-y-5 xl:col-span-3">
<div class="space-y-6">
<div>
<?php if (!empty($p->link)) {?>
<h2 class="text-2xl font-bold leading-8 tracking-tight">
<a class="text-gray-900 dark:text-gray-100" href="<?php echo $p->link;?>" target="_blank"><?php echo $p->title;?>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" style="display:inline-block;margin-left: 3px;" class=" bi bi-link-45deg" viewBox="0 0 16 16">
<path d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1 1 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4 4 0 0 1-.128-1.287z"/>
<path d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243z"/>
</svg>
</a>
</h2>
<?php } else { ?>
<h2 class="text-2xl font-bold leading-8 tracking-tight">
<a class="text-gray-900 dark:text-gray-100" href="<?php echo $p->url;?>"><?php echo $p->title;?></a>
</h2>
<?php } ?>
<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>
<div class="prose max-w-none text-gray-500 dark:text-gray-400 dark:prose-invert">
<?php if ($teaserType !== 'trimmed') :?>
<?php if (!empty($p->image)) {?>
<img src="<?php echo $p->image;?>" width="100%" alt="<?php echo $p->title;?>">
<?php } elseif (!empty($p->video)) {?>
<div class="relative" style="padding-top: 56.25%">
<iframe class="absolute inset-0 w-full h-full" src="https://www.youtube.com/embed/<?php echo get_video_id($p->video); ?>" frameborder="0" allowfullscreen></iframe>
</div>
<?php } elseif (!empty($p->audio)) {?>
<iframe width="100%" height="100%" class="embed-responsive-item" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $p->audio;?>&amp;auto_play=false&amp;visual=true"></iframe>
<?php } elseif (!empty($p->quote)) {?>
<blockquote class="text-2xl italic font-bold leading-8 tracking-tight">
<?php echo $p->quote;?>
</blockquote>
<?php } ?>
<?php endif;?>
<?php if (!empty($p->quote) && $teaserType === 'trimmed'):?>
<blockquote class="text-2xl italic font-bold leading-8 tracking-tight" style="margin: 1.6em 0;">
<?php echo $p->quote;?>
</blockquote>
<?php endif; ?>
<?php echo get_teaser($p->body, $p->url);?>
</div>
</div>
<?php if ($teaserType === 'trimmed'):?>
<div class="text-base font-medium leading-6">
<a class="text-primary-500 hover:text-primary-600 dark:hover:text-primary-400" aria-label="<?php echo $p->title;?>" href="<?php echo $p->url;?>"><?php echo $readMore;?></a>
</div>
<?php endif;?>
</div>
</div>
</article>
</li>
<?php endforeach;?>
<?php if (!empty($p->quote) && $teaserType === 'trimmed'):?>
<blockquote class="text-2xl italic font-bold leading-8 tracking-tight" style="margin: 1.6em 0;">
<?php echo $p->quote;?>
</blockquote>
<?php endif; ?>
<?php echo get_teaser($p->body, $p->url);?>
</div>
</div>
<?php if ($teaserType === 'trimmed'):?>
<div class="text-base font-medium leading-6">
<a class="text-primary-500 hover:text-primary-600 dark:hover:text-primary-400" aria-label="<?php echo $p->title;?>" href="<?php echo $p->url;?>"><?php echo $readMore;?></a>
</div>
<?php endif;?>
</div>
</div>
</article>
</li>
<?php endforeach;?>
</ul>
<?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,14 +54,13 @@
</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>
<div class="textwidget"><p><?php echo blog_description();?></p>
</div>
</section>
<section id="search" class="widget widget_search">
<form role="search" class="search-form">
<label>
@ -71,12 +70,14 @@
<button type="submit" class="search-submit"><span class="screen-reader-text">Search</span></button>
</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">
<h2 class="widget-title"><?php echo i18n('Popular_posts');?></h2>
@ -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();?>
<?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"
}
]
}