This commit is contained in:
2025-03-21 20:24:43 +01:00
parent 224398df90
commit f34c9162d4
12427 changed files with 5329941 additions and 373384 deletions

View File

@@ -16,61 +16,62 @@
<a href="{$blog.link|escape:'html':'UTF-8'}" title="{$blog.title|escape:'html':'UTF-8'}">{$blog.title|escape:'html':'UTF-8'}</a>
</h4>
{/if}
<div class="blog-meta">
{if $config->get('listing_show_author','1')&&!empty($blog.author)}
<span class="blog-author">
<i class="material-icons">person</i> <span>{l s='Posted By' d='Shop.Theme.Global'}:</span>
<a href="{$blog.author_link|escape:'html':'UTF-8'}" title="{$blog.author|escape:'html':'UTF-8'}">{$blog.author|escape:'html':'UTF-8'}</a>
</span>
{/if}
{if $config->get('listing_show_category','1')}
<span class="blog-cat">
<i class="material-icons">list</i> <span>{l s='In' d='Shop.Theme.Global'}:</span>
<a href="{$blog.category_link|escape:'html':'UTF-8'}" title="{$blog.category_title|escape:'html':'UTF-8'}">{$blog.category_title|escape:'html':'UTF-8'}</a>
</span>
{/if}
{if $config->get('listing_show_created','1')}
<span class="blog-created">
<i class="material-icons">&#xE192;</i> <span>{l s='On' d='Shop.Theme.Global'}: </span>
<time class="date" datetime="{strtotime($blog.date_add)|date_format:"%Y"|escape:'html':'UTF-8'}">
{assign var='blog_date' value=strtotime($blog.date_add)|date_format:"%A"}
{l s=$blog_date d='Shop.Theme.Global'}, <!-- day of week -->
{assign var='blog_month' value=strtotime($blog.date_add)|date_format:"%B"}
{l s=$blog_month d='Shop.Theme.Global'} <!-- month-->
{assign var='blog_day' value=strtotime($blog.date_add)|date_format:"%e"}
{l s=$blog_day d='Shop.Theme.Global'} <!-- day of month -->
{assign var='blog_year' value=strtotime($blog.date_add)|date_format:"%Y"}
{l s=$blog_year d='Shop.Theme.Global'} <!-- year -->
</time>
</span>
{/if}
{if isset($blog.comment_count)&&$config->get('listing_show_counter','1')}
<span class="blog-ctncomment">
<i class="material-icons">comment</i> <span>{l s='Comment' d='Shop.Theme.Global'}:</span>
{$blog.comment_count|intval}
</span>
{/if}
{if $config->get('listing_show_hit','1')}
<span class="blog-hit">
<i class="material-icons">favorite</i> <span>{l s='Hit' d='Shop.Theme.Global'}:</span>
{$blog.hits|intval}
</span>
{/if}
</div>
{if $blog.image && $config->get('listing_show_image',1)}
<div class="blog-image">
<img src="{$blog.preview_url|escape:'html':'UTF-8'}" title="{$blog.title|escape:'html':'UTF-8'}" alt="" class="img-fluid" />
</div>
{/if}
</div>
<div class="blog-meta">
{if $config->get('listing_show_author','1')&&!empty($blog.author)}
<span class="blog-author">
<i class="material-icons">person</i> <span>{l s='Posted By' d='Shop.Theme.Global'}:</span>
<a href="{$blog.author_link|escape:'html':'UTF-8'}" title="{$blog.author|escape:'html':'UTF-8'}">{$blog.author|escape:'html':'UTF-8'}</a>
</span>
{/if}
{if $config->get('listing_show_category','1')}
<span class="blog-cat">
<i class="material-icons">list</i> <span>{l s='In' d='Shop.Theme.Global'}:</span>
<a href="{$blog.category_link|escape:'html':'UTF-8'}" title="{$blog.category_title|escape:'html':'UTF-8'}">{$blog.category_title|escape:'html':'UTF-8'}</a>
</span>
{/if}
{if $config->get('listing_show_created','1')}
<span class="blog-created">
<i class="material-icons">&#xE192;</i> <span>{l s='On' d='Shop.Theme.Global'}: </span>
<time class="date" datetime="{strtotime($blog.date_add)|date_format:"%Y"|escape:'html':'UTF-8'}">
{assign var='blog_date' value=strtotime($blog.date_add)|date_format:"%A"}
{l s=$blog_date d='Shop.Theme.Global'}, <!-- day of week -->
{assign var='blog_day' value=strtotime($blog.date_add)|date_format:"%e"}
{l s=$blog_day d='Shop.Theme.Global'} <!-- day of month -->
{assign var='blog_month' value=strtotime($blog.date_add)|date_format:"%B"}
{l s=$blog_month d='Shop.Theme.Global'} <!-- month-->
{assign var='blog_year' value=strtotime($blog.date_add)|date_format:"%Y"}
{l s=$blog_year d='Shop.Theme.Global'} <!-- year -->
</time>
</span>
{/if}
{if isset($blog.comment_count)&&$config->get('listing_show_counter','1')}
<span class="blog-ctncomment">
<i class="material-icons">comment</i> <span>{l s='Comment' d='Shop.Theme.Global'}:</span>
{$blog.comment_count|intval}
</span>
{/if}
{if $config->get('listing_show_hit','1')}
<span class="blog-hit">
<i class="material-icons">favorite</i> <span>{l s='Hit' d='Shop.Theme.Global'}:</span>
{$blog.hits|intval}
</span>
{/if}
</div>
<div class="blog-info">
{if $config->get('listing_show_description','1')}
<div class="blog-shortinfo">
{$blog.description|strip_tags:'UTF-8'|truncate:160:'...' nofilter}{* HTML form , no escape necessary *}
{$blog.description|strip_tags:'UTF-8'|truncate:95:'...' nofilter}{* HTML form , no escape necessary *}
</div>
{/if}
{if $config->get('listing_show_readmore',1)}

View File

@@ -0,0 +1,333 @@
{*
* @Module Name: Leo Blog
* @Website: leotheme.com.com - prestashop template provider
* @author Leotheme <leotheme@gmail.com>
* @copyright 2007-2018 Leotheme
* @description: Content Management
*}
{extends file=$layout}
{block name='content'}
<section id="main">
{if isset($error)}
<div id="blogpage">
<div class="blog-detail">
<div class="alert alert-warning">{l s='Sorry, We are updating data, please come back later!!!!' mod='leoblog'}</div>
</div>
</div>
{else}
<div id="blogpage">
<article class="blog-detail">
{if $is_active}
<h1 class="blog-title">{$blog->meta_title|escape:'html':'UTF-8'}</h1>
<span id="post_id" hidden>{$blog->id}</span>
<div class="blog-meta">
{if $config->get('item_show_author','1')}
<span class="blog-author">
<i class="material-icons">person</i> <span>{l s='Posted By' mod='leoblog'}: </span>
<a href="{$blog->author_link|escape:'html':'UTF-8'}" title="{$blog->author|escape:'html':'UTF-8'}">{$blog->author|escape:'html':'UTF-8'}</a>
</span>
{/if}
{if $config->get('item_show_category','1')}
<span class="blog-cat">
<i class="material-icons">list</i> <span>{l s='In' mod='leoblog'}: </span>
<a href="{$blog->category_link|escape:'html':'UTF-8'}" title="{$blog->category_title|escape:'html':'UTF-8'}">{$blog->category_title|escape:'html':'UTF-8'}</a>
</span>
{/if}
{if $config->get('item_show_created','1')}
<span class="blog-created">
<time class="date" datetime="{strtotime($blog->date_add)|date_format:"%Y"|escape:'html':'UTF-8'}">
{assign var='blog_date' value=strtotime($blog->date_add)|date_format:"%A"}
{l s=$blog_date mod='leoblog'}, <!-- day of week -->
{assign var='blog_day' value=strtotime($blog->date_add)|date_format:"%e"}
{l s=$blog_day mod='leoblog'} <!-- day of month -->
{assign var='blog_month' value=strtotime($blog->date_add)|date_format:"%B"}
{l s=$blog_month mod='leoblog'} <!-- month-->
{assign var='blog_year' value=strtotime($blog->date_add)|date_format:"%Y"}
{l s=$blog_year mod='leoblog'} <!-- year -->
</time>
</span>
{/if}
{if isset($blog_count_comment)&&$config->get('item_show_counter','1')}
<span class="blog-ctncomment">
<i class="material-icons">comment</i> <span>{l s='Comment' mod='leoblog'}:</span>
{$blog_count_comment|intval}
</span>
{/if}
{if isset($blog->hits)&&$config->get('item_show_hit','1')}
<span class="blog-hit">
<i class="material-icons">favorite</i> <span>{l s='Hit' mod='leoblog'}:</span>
{$blog->hits|intval}
</span>
{/if}
</div>
{if $blog->preview_url && $config->get('item_show_image','1')}
<div class="blog-image">
<img src="{$blog->preview_url|escape:'html':'UTF-8'}" title="{$blog->meta_title|escape:'html':'UTF-8'}" class="img-fluid" />
</div>
{/if}
<div class="blog-description">
<div id="leoblog_toc"></div>
{if $config->get('item_show_description',1)}
{$blog->description nofilter}{* HTML form , no escape necessary *}
{/if}
{$blog->content nofilter}{* HTML form , no escape necessary *}
<div class="category-internal-nav">
<h2>Popularne kategorie</h2>
<ul style="padding-left:0px;">
<li><a href="https://drmaterac.pl/42-materace">Materace</a></li>
<li><a href="https://drmaterac.pl/43-lozka">Łóżka</a></li>
<li><a href="https://drmaterac.pl/44-stelaze">Stelaże</a></li>
<li><a href="https://drmaterac.pl/45-akcesoria">Akcesoria</a></li>
<li><a href="https://drmaterac.pl/47-meble">Meble</a></li>
<li><a href="https://drmaterac.pl/243-oswietlenie">Oświetlenie</a></li>
</ul>
</div>
</div>
{literal}
<script>
document.addEventListener("DOMContentLoaded", function () {
const blogDescription = document.querySelector(".blog-description");
const categoryNav = document.querySelector(".category-internal-nav");
if (!blogDescription || !categoryNav) return;
const headings = blogDescription.querySelectorAll("h2");
if (headings.length >= 3) {
if (headings[1]) {
headings[1].insertAdjacentElement("beforebegin", categoryNav);
}
} else {
blogDescription.appendChild(categoryNav);
}
});
</script>
{/literal}
{if trim($blog->video_code)}
<div class="blog-video-code">
<div class="inner ">
{$blog->video_code nofilter}{* HTML form , no escape necessary *}
</div>
</div>
{/if}
<div class="social-share">
{include file="module:leoblog/views/templates/front/default/_social.tpl"}
</div>
{if $tags}
<div class="blog-tags">
<span>{l s='Tags:' mod='leoblog'}</span>
{foreach from=$tags item=tag name=tag}
<a href="{$tag.link|escape:'html':'UTF-8'}" title="{$tag.tag|escape:'html':'UTF-8'}"><span>{$tag.tag|escape:'html':'UTF-8'}</span></a>
{/foreach}
</div>
{/if}
{if !empty($samecats)||!empty($tagrelated)}
<div class="extra-blogs row">
{if !empty($samecats)}
<div class="col-lg-6 col-md-6 col-xs-12">
<h4>{l s='In Same Category' mod='leoblog'}</h4>
<ul>
{foreach from=$samecats item=cblog name=cblog}
<li>
{if !empty($cblog.image)}
<img src="/themes/leo_gstore/assets/img/modules/leoblog/{$id_shop}/b/{$cblog.image}" style="width:50px;margin-right: 15px;">
{/if}
<a href="{$cblog.link|escape:'html':'UTF-8'}">{$cblog.meta_title|escape:'html':'UTF-8'}</a>
</li>
{/foreach}
</ul>
</div>
{/if}
{if !empty($tagrelated)}
<div class="col-lg-6 col-md-6 col-xs-12">
<h4>{l s='Related by Tags' mod='leoblog'}</h4>
<ul>
{foreach from=$tagrelated item=cblog name=cblog}
<li><a href="{$cblog.link|escape:'html':'UTF-8'}">{$cblog.meta_title|escape:'html':'UTF-8'}</a></li>
{/foreach}
</ul>
</div>
{/if}
</div>
{/if}
<!-- <div >
<a href="{$blog->category_link}" >
<h4>{$blog->category_title}</h4>
<img src="{$blog->category_image}" alt="" height="250" />
</a>
</div> -->
{if $productrelated}
{/if}
{if $config->get('item_show_listcomment','1') == 1}
<div class="blog-comment-block clearfix">
{if $config->get('item_comment_engine','local')=='facebook'}
{include file="module:leoblog/views/templates/front/default/_facebook_comment.tpl"}
{elseif $config->get('item_comment_engine','local')=='diquis'}
{include file="module:leoblog/views/templates/front/default/_diquis_comment.tpl"}
{else}
{include file="module:leoblog/views/templates/front/default/_local_comment.tpl"}
{/if}
{elseif $config->get('item_show_listcomment','1') == 0 && $config->get('item_show_formcomment','1') == 1}
<div class="blog-comment-block clearfix">
{include file="module:leoblog/views/templates/front/default/_local_comment.tpl"}
</div>
{/if}
{else}
<div class="alert alert-warning">{l s='Sorry, This blog is not avariable. May be this was unpublished or deleted.' mod='leoblog'}</div>
{/if}
</article>
<div id="s_test" hidden>
{hook h='displayApSC' sc_key=sc3749181901}
</div>
</div>
<div class="hidden-xl-down hidden-xl-up datetime-translate">
{l s='Sunday' mod='leoblog'}
{l s='Monday' mod='leoblog'}
{l s='Tuesday' mod='leoblog'}
{l s='Wednesday' mod='leoblog'}
{l s='Thursday' mod='leoblog'}
{l s='Friday' mod='leoblog'}
{l s='Saturday' mod='leoblog'}
{l s='January' mod='leoblog'}
{l s='February' mod='leoblog'}
{l s='March' mod='leoblog'}
{l s='April' mod='leoblog'}
{l s='May' mod='leoblog'}
{l s='June' mod='leoblog'}
{l s='July' mod='leoblog'}
{l s='August' mod='leoblog'}
{l s='September' mod='leoblog'}
{l s='October' mod='leoblog'}
{l s='November' mod='leoblog'}
{l s='December' mod='leoblog'}
</div>
{/if}
</section>
{literal}
<style>
#leoblog_toc {
display: none;
width: 100%;
border: 2px solid #f1f1f1;
padding: 1.4rem 2rem;
margin: 1.4rem auto;
}
#leoblog_toc.active {
display: block;
}
#leoblog_toc .toc_title {
margin-bottom: .5rem;
font-size: 1rem;
font-weight: 500;
}
#leoblog_toc #tocList {
padding-left: 0;
list-style: none;
}
#leoblog_toc #tocList li a:hover {
text-decoration: underline;
color: #34d6ad;
}
#leoblog_toc .toclist__next-level {
padding-left: 1rem;
}
#leoblog_toc #tocList a {
font-size: .85rem;
}
@media (min-width: 991px) {
#blogpage .blog-detail .blog-description h2,
#blogpage .blog-detail .blog-description h3 {
scroll-margin-top: 140px;
}
}
</style>
<script>
window.addEventListener('DOMContentLoaded', function (event) {
var contentContainer = document.querySelector('#blogpage .blog-detail .blog-description');
var headings = contentContainer.querySelectorAll('h2, h3');
var tocContainer = document.getElementById('leoblog_toc');
if (headings && headings.length > 0){
var ul = document.createElement('ul');
ul.setAttribute('id', 'tocList');
for (i = 0; i <= headings.length - 1; i++) {
var id = 'naglowek-' + (i+1);
var level = headings[i].localName.replace("h", "");
var title = headings[i].innerHTML;
title = title.replaceAll('<strong>', '');
title = title.replaceAll('</strong>', '');
title = title.replaceAll(/<[^>]*>/g, '');
headings[i].setAttribute("id", id)
var li = document.createElement('li');
//li.innerHTML = (i+1) + '. ';
var a = document.createElement('a');
a.setAttribute("href", "#" + id)
a.innerHTML = title;
if (level == 2) {
child = document.createElement('ul');
li.appendChild(a);
child.appendChild(li);
ul.appendChild(li);
} else if (level == 3) {
grandchild = document.createElement('ul');
grandchild.setAttribute('class', 'toclist__next-level')
li.appendChild(a);
grandchild.appendChild(li);
ul.appendChild(grandchild);
}
}
var tocTitle = document.createElement('p');
tocTitle.setAttribute("class", "toc_title")
tocTitle.innerHTML = 'Spis treści';
tocContainer.appendChild(tocTitle);
tocContainer.appendChild(ul);
tocContainer.classList.add("active");
document.getElementById('tocList').querySelectorAll('a').forEach(function(link) {
link.addEventListener('click', function(event) {
event.preventDefault();
var targetId = link.getAttribute('href').substring(1);
var targetElement = document.getElementById(targetId);
if(targetElement) {
targetElement.scrollIntoView({ behavior: 'smooth' });
}
});
});
}
});
</script>
{/literal}
{/block}