Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Commit

Permalink
Merge pull request #95 from gskema/refactor
Browse files Browse the repository at this point in the history
[*] HTML: Refactor blockbanner
  • Loading branch information
Gytis Šk committed Jan 24, 2016
2 parents a997b08 + 98834f1 commit 6a8afa8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
10 changes: 4 additions & 6 deletions themes/community-theme-16/header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,14 @@
{/if}

<header id="header">

{capture name='displayBanner'}{hook h='displayBanner'}{/capture}
{if $smarty.capture.displayBanner}
<div class="banner">
<div class="container">
<div class="row">
{$smarty.capture.displayBanner}
</div>
</div>
<div id="header-banners">
{$smarty.capture.displayBanner}
</div>
{/if}

{capture name='displayNav'}{hook h='displayNav'}{/capture}
{if $smarty.capture.displayNav}
<div class="nav">
Expand Down
9 changes: 9 additions & 0 deletions themes/community-theme-16/modules/blockbanner/blockbanner.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{if !empty($banner_img)}
<div id="blockbanner">
<div class="container">
<a href="{if $banner_link}{$banner_link|escape:'htmlall':'UTF-8'}{else}{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}{/if}"{if !empty($banner_desc)} title="{$banner_desc|escape:'htmlall':'UTF-8'}"{/if}>
<img class="img-responsive" src="{$banner_img|escape:'htmlall':'UTF-8'}"{if !empty($banner_desc)} alt="{$banner_desc|escape:'htmlall':'UTF-8'}" title="{$banner_desc|escape:'htmlall':'UTF-8'}"{/if}/>
</a>
</div>
</div>
{/if}
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#header .banner a {
display: block;
max-width: 1170px;
max-height: 65px;
}
#header .banner a img {
display: block;
width: 100%;
height: 100%;
max-height: 65px;
max-width: 1170px;
#blockbanner {
.container {
padding-left: 0;
padding-right: 0;
}
}
13 changes: 6 additions & 7 deletions themes/community-theme-16/sass/partials/_page.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
$header-banner-bg: #000;

body {
background-color: #ccc;
}
Expand Down Expand Up @@ -29,13 +31,6 @@ body {
#header {
// z-index: 1;
position: relative;
.banner {
background: black;
max-height: 100%;
.row {
margin: 0px;
}
}
.nav {
background: #333;
.row {
Expand Down Expand Up @@ -70,3 +65,7 @@ body {
}
}
}

#header-banners {
background-color: $header-banner-bg;
}

0 comments on commit 6a8afa8

Please sign in to comment.