From 48ac8b026ffdf8b3823c573e5693dcf1765383e2 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Sun, 23 Aug 2015 11:09:48 +0200 Subject: Implement board archive and restoration --- client/components/main/header.jade | 6 +++++- client/components/main/header.js | 6 ++++++ client/components/main/header.styl | 2 ++ client/components/main/layouts.styl | 6 +++++- 4 files changed, 18 insertions(+), 2 deletions(-) (limited to 'client/components/main') diff --git a/client/components/main/header.jade b/client/components/main/header.jade index 1185da85..da7999cf 100644 --- a/client/components/main/header.jade +++ b/client/components/main/header.jade @@ -31,7 +31,7 @@ template(name="header") The main bar is a colorful bar that provide all the meta-data for the current page. This bar is contextual based. If the user is not connected we display "sign in" and "log in" buttons. - #header-main-bar + #header-main-bar(class="{{#if wrappedHeader}}wrapper{{/if}}") if $.Session.get 'currentBoard' +headerBoard else @@ -39,3 +39,7 @@ template(name="header") template(name="headerTitle") h1 LibreBoard + .board-header-btns.right + a.board-header-btn.js-open-archived-board + i.fa.fa-archive + span Archives diff --git a/client/components/main/header.js b/client/components/main/header.js index 2a545309..864f889d 100644 --- a/client/components/main/header.js +++ b/client/components/main/header.js @@ -2,6 +2,12 @@ Template.header.helpers({ // Reactively set the color of the page from the color of the current board. headerTemplate: function() { return 'headerBoard'; + }, + + wrappedHeader: function() { + var unwrapedRoutes = ['board', 'card']; + var currentRouteName = FlowRouter.getRouteName(); + return unwrapedRoutes.indexOf(currentRouteName) === -1; } }); diff --git a/client/components/main/header.styl b/client/components/main/header.styl index 1840becb..e31f0992 100644 --- a/client/components/main/header.styl +++ b/client/components/main/header.styl @@ -106,6 +106,8 @@ margin: 0 10px + span + display: inline-block + margin-top: 1px margin-right: 10px .board-header-btn-close diff --git a/client/components/main/layouts.styl b/client/components/main/layouts.styl index 42a70310..f3d9bfe9 100644 --- a/client/components/main/layouts.styl +++ b/client/components/main/layouts.styl @@ -42,6 +42,7 @@ body width: 660px min-height: 160px margin: 42px auto + padding: 12px border-radius: 4px background: darken(white, 13%) z-index: 110 @@ -49,7 +50,6 @@ body .modal-close-btn display: block float: right - margin: 12px font-size: 24px h1 @@ -206,6 +206,10 @@ dd margin-bottom: 0 padding-bottom: 0 +.wrapper + max-width: 1200px + margin: 0 auto + .relative position: relative -- cgit v1.2.3-1-g7c22