Skip to content

Commit

Permalink
adding lock to protected categories
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomerobot committed Jun 11, 2018
1 parent 3edf360 commit b13c0f2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions common/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down
12 changes: 10 additions & 2 deletions common/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b13c0f2

Please sign in to comment.