Skip to content

Commit

Permalink
Templates: fix some formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
yannicka committed Feb 9, 2024
1 parent 1a70c56 commit 20597c0
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*}
<section class="best-sellers-products mt-3">
<div class="container">
{include file='components/section-title.tpl' title={l s="Best Sellers" d="Shop.Theme.Catalog"}}
{include file='components/section-title.tpl' title={l s='Best Sellers' d='Shop.Theme.Catalog'}}

{include file='catalog/_partials/productlist.tpl' products=$products productClass='col-6 col-lg-4 col-xl-3'}

Expand Down
4 changes: 2 additions & 2 deletions modules/ps_emailalerts/views/templates/hook/product.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@

<div class="card card-body text-center js-mailalert mb-3 mt-3 bg-light" data-url="{url entity='module' name='ps_emailalerts' controller='actions' params=['process' => 'add']}">
{if isset($email) AND $email}
<p>{l s="Interested in this product? Drop us an email and we will let you know when it's available for order." d='Modules.Emailalerts.Shop'}</p>
<p>{l s='Interested in this product? Drop us an email and we will let you know when it\'s available for order.' d='Modules.Emailalerts.Shop'}</p>
<input class="form-control" type="email" placeholder="{l s='[email protected]' d='Modules.Emailalerts.Shop'}"/>
{else}
<p>{l s="Interested in this product? Click below and we will let you know when it's available for order." d='Modules.Emailalerts.Shop'}</p>
<p>{l s='Interested in this product? Click below and we will let you know when it\'s available for order.' d='Modules.Emailalerts.Shop'}</p>
{/if}

{if !empty($id_module)}
Expand Down
19 changes: 14 additions & 5 deletions templates/_partials/head.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{block name='head_charset'}
<meta charset="utf-8">
{/block}

{block name='head_ie_compatibility'}
<meta http-equiv="x-ua-compatible" content="ie=edge">
{/block}
Expand All @@ -15,17 +16,22 @@
{/block}

<title>{block name='head_seo_title'}{$page.meta.title}{/block}</title>

{block name='hook_after_title_tag'}
{hook h='displayAfterTitleTag'}
{/block}

<meta name="description" content="{block name='head_seo_description'}{$page.meta.description}{/block}">
<meta name="keywords" content="{block name='head_seo_keywords'}{$page.meta.keywords}{/block}">

{if $page.meta.robots !== 'index'}
<meta name="robots" content="{$page.meta.robots}">
{/if}

{if $page.canonical}
<link rel="canonical" href="{$page.canonical}">
{/if}

{block name='head_hreflang'}
{foreach from=$urls.alternative_langs item=pageUrl key=code}
<link rel="alternate" href="{$pageUrl}" hreflang="{$code}">
Expand All @@ -43,11 +49,14 @@
{/block}

{block name='head_open_graph'}
<meta property="og:title" content="{$page.meta.title}" />
<meta property="og:description" content="{$page.meta.description}" />
<meta property="og:url" content="{$urls.current_url}" />
<meta property="og:site_name" content="{$shop.name}" />
{if !isset($product) && $page.page_name != 'product'}<meta property="og:type" content="website" />{/if}
<meta property="og:title" content="{$page.meta.title}">
<meta property="og:description" content="{$page.meta.description}">
<meta property="og:url" content="{$urls.current_url}">
<meta property="og:site_name" content="{$shop.name}">

{if !isset($product) && $page.page_name !== 'product'}
<meta property="og:type" content="website">
{/if}
{/block}
{/block}

Expand Down
39 changes: 33 additions & 6 deletions templates/_partials/header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,50 @@
<div class="row gx-2 align-items-stretch {$headerBottomName}__row">
<div class="d-flex align-items-center col-auto logo order-xl-1 ms-lg-0 ms-2 me-lg-0 me-auto">
{if $shop.logo_details}
{if $page.page_name == 'index'}<h1 class="{$headerBottomName}__h1 mb-0">{/if}
{renderLogo}
{if $page.page_name == 'index'}</h1>{/if}
{if $page.page_name === 'index'}
<h1 class="{$headerBottomName}__h1 mb-0">
{/if}

{renderLogo}

{if $page.page_name === 'index'}
</h1>
{/if}
{/if}
</div>

<div class="search__mobile d-md-none col-auto">
<div class="header-block">
<a class="header-block__action-btn" href="#" role="button" data-bs-toggle="offcanvas" data-bs-target="#searchCanvas" aria-controls="searchCanvas">
<a
class="header-block__action-btn"
href="#"
role="button"
data-bs-toggle="offcanvas"
data-bs-target="#searchCanvas"
aria-controls="searchCanvas"
>
<span class="material-icons header-block__icon">search</span>
</a>
</div>

<div class="search__offcanvas js-search-offcanvas offcanvas offcanvas-top h-auto" data-bs-backdrop="false" data-bs-scroll="true" tabindex="-1" id="searchCanvas" aria-labelledby="offcanvasTopLabel">
<div
class="search__offcanvas js-search-offcanvas offcanvas offcanvas-top h-auto"
data-bs-backdrop="false"
data-bs-scroll="true"
tabindex="-1"
id="searchCanvas"
aria-labelledby="offcanvasTopLabel"
>
<div class="offcanvas-header">
<div id="_mobile_search" class="search__container"></div>
<button type="button" class="btn-close text-reset ms-1" data-bs-dismiss="offcanvas" aria-label="Close">{l s='Cancel' d='Shop.Theme.Global'}</button>

<button type="button"
class="btn-close text-reset ms-1"
data-bs-dismiss="offcanvas"
aria-label="Close"
>
{l s='Cancel' d='Shop.Theme.Global'}
</button>
</div>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion templates/_partials/pagination.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
</li>
{else}
<li class="page-item{if $page.current} active{/if}" {if $page.current}aria-current="page" {/if}>
<a rel="{if $page.type === 'previous'}prev{elseif $page.type === 'next'}next{else}nofollow{/if}"
<a
rel="{if $page.type === 'previous'}prev{elseif $page.type === 'next'}next{else}nofollow{/if}"
href="{$page.url}"
class="page-link btn-with-icon {if $page.type === 'previous'}previous {elseif $page.type === 'next'}next {/if}{['disabled' => !$page.clickable, 'js-pager-link' => true]|classnames}"
>
Expand Down
4 changes: 2 additions & 2 deletions templates/catalog/listing/search.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
{l s='Nothing to search for' d='Shop.Theme.Catalog'}
{else}
{if $listing.products|count}
{l s='Search results for "%s"' sprintf=[$smarty.get.s] d='Shop.Theme.Catalog' }
{l s='Search results for "%search_string%"' sprintf=['%search_string%' => $smarty.get.s] d='Shop.Theme.Catalog'}
{else}
{l s='No search results for "%s"' sprintf=[$smarty.get.s] d='Shop.Theme.Catalog'}
{l s='No search results for "%search_string%"' sprintf=['%search_string%' => $smarty.get.s] d='Shop.Theme.Catalog'}
{/if}
{/if}
</h1>
Expand Down
4 changes: 2 additions & 2 deletions templates/checkout/_partials/steps/addresses.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
{if isset($delivery_address_error)}
<p class="alert alert-danger js-address-error" name="alert-delivery" id="id-failure-address-{$delivery_address_error.id_address}">{$delivery_address_error.exception}</p>
{else}
<p class="alert alert-danger js-address-error" name="alert-delivery" style="display: none">{l s="Your address is incomplete, please update it." d="Shop.Notifications.Error"}</p>
<p class="alert alert-danger js-address-error" name="alert-delivery" style="display: none">{l s='Your address is incomplete, please update it.' d='Shop.Notifications.Error'}</p>
{/if}

<a href="{$new_address_delivery_url}" class="btn btn-outline-primary btn-with-icon w-100 w-md-auto mb-3">
Expand Down Expand Up @@ -87,7 +87,7 @@
{if isset($invoice_address_error)}
<p class="alert alert-danger js-address-error" name="alert-invoice" id="id-failure-address-{$invoice_address_error.id_address}">{$invoice_address_error.exception}</p>
{else}
<p class="alert alert-danger js-address-error" name="alert-invoice" style="display: none">{l s="Your address is incomplete, please update it." d="Shop.Notifications.Error"}</p>
<p class="alert alert-danger js-address-error" name="alert-invoice" style="display: none">{l s='Your address is incomplete, please update it.' d='Shop.Notifications.Error'}</p>
{/if}

<a href="{$new_address_invoice_url}" class="btn btn-outline-primary btn-with-icon w-100 w-md-auto">
Expand Down

0 comments on commit 20597c0

Please sign in to comment.