Skip to content

Commit

Permalink
Creating Footer component | Fixes metal#360
Browse files Browse the repository at this point in the history
  • Loading branch information
diegonvs committed Mar 27, 2018
1 parent 5712682 commit ecd1ce3
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/metaljs.com/src/partials/Footer.js
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;
34 changes: 34 additions & 0 deletions packages/metaljs.com/src/partials/Footer.soy
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}

0 comments on commit ecd1ce3

Please sign in to comment.