forked from metal/metal.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating Footer component | Fixes metal#360
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use strict'; | ||
|
||
import {isServerSide} from 'metal'; | ||
import Component from 'metal-component'; | ||
import Soy from 'metal-soy'; | ||
|
||
import templates from './Footer.soy.js'; | ||
|
||
class Footer extends Component { | ||
attached() { | ||
if (isServerSide()) { | ||
return; | ||
} | ||
this.year = new Date().getFullYear(); | ||
} | ||
|
||
}; | ||
|
||
Soy.register(Footer, templates); | ||
|
||
export default Footer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{namespace Footer} | ||
|
||
/** | ||
* | ||
*/ | ||
{template .render} | ||
{@param year: ?} | ||
{@param? haveSidebar: ?} | ||
|
||
{let $footer kind="html"} | ||
<footer class="footer"> | ||
<div class="container"> | ||
<div class="row"> | ||
<p class="footer-description col-md-6 col-md-offset-2"> | ||
Copyright © {$year} <a href="https://liferay.com">Liferay, Inc</a> | ||
</p> | ||
<p class="footer-description col-md-6"> | ||
Powered by <a href="http://wedeploy.com">WeDeploy™</a> | ||
</p> | ||
</div> | ||
</div> | ||
</footer> | ||
{/let} | ||
|
||
{if $haveSidebar} | ||
<div class="sidebar-offset"> | ||
{$footer} | ||
</div> | ||
{else} | ||
{$footer} | ||
{/if} | ||
|
||
|
||
{/template} |