From b13c0f21ac4760f4bf6af95a84b5c95a3026b327 Mon Sep 17 00:00:00 2001 From: Kris Date: Mon, 11 Jun 2018 13:54:15 -0400 Subject: [PATCH] adding lock to protected categories --- common/common.scss | 5 +++++ common/header.html | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/common/common.scss b/common/common.scss index c2e22b5..c68c1fa 100644 --- a/common/common.scss +++ b/common/common.scss @@ -7,8 +7,13 @@ .category-title-contents { max-width: 500px; padding: 40px 40px 30px; + i { + margin-right: .25em; + font-size: 1.5em; + } h1 { text-transform: capitalize; + display: inline; } } } diff --git a/common/header.html b/common/header.html index ae9c9ce..5398d85 100644 --- a/common/header.html +++ b/common/header.html @@ -28,15 +28,23 @@ return h('p', category.description_text); } } + + function ifProtected() { + if(category.read_restricted) { + return h('i.fa.fa-lock'); + } + } return h('div.category-title-header', { "attributes" : { "style" : "background-color: #" + category.color + "; color: #" + category.text_color + ";" } }, h('div.category-title-contents', [ + ifProtected(), h('h1', category.name), - catDesc() - ]) + h('div.category-title-description',catDesc()) + ]), + ); } } else {