Skip to content

Commit

Permalink
Merge pull request #315 from indentlabs/sidenav-ui
Browse files Browse the repository at this point in the history
WIP UI Rework
  • Loading branch information
drusepth authored Jan 6, 2019
2 parents ce7844d + a31224b commit ac28a9d
Show file tree
Hide file tree
Showing 101 changed files with 2,168 additions and 1,240 deletions.
24 changes: 24 additions & 0 deletions app/assets/javascripts/content_types.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
$(document).ready(function() {
$('.js-enable-content-type').click(function () {
var content_type = $(this).data('content-type');
var related_card = $(this).children('.card').first();
var is_currently_active = related_card.hasClass('active');
var ie_badge = $(this).find('.enabled-badge');

$.post('/customization/toggle_content_type', {
content_type: content_type,
active: is_currently_active ? 'off' : 'on'
});

if (is_currently_active) {
related_card.removeClass('active');
ie_badge.attr('data-badge-caption', 'hidden');
} else {
related_card.addClass('active');
ie_badge.attr('data-badge-caption', 'active');
}

// Return false so we don't jump to the top of the page on link click
return false;
});
});
5 changes: 5 additions & 0 deletions app/assets/javascripts/navbar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// $(document).ready(function () {
// $('.tab-link').click(function() {
// document.location = $(this).attr('href');
// });
// });
1 change: 0 additions & 1 deletion app/assets/javascripts/navbar.js.coffee

This file was deleted.

17 changes: 17 additions & 0 deletions app/assets/stylesheets/autosave.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.autosave-bar {
position: fixed;
bottom: 0;
left: 0;
width: 100%;

margin: 0;
padding: 4px 0;

text-align: center;
background: white;
border-top: 2px solid lightgrey;

i {
font-size: 15px;
}
}
44 changes: 44 additions & 0 deletions app/assets/stylesheets/btn-group.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
.btn-group {
position: relative;
display: -ms-inline-flexbox;
display: inline-flex;
}

.btn-group.card {
margin: 0;
}

.btn-group>.btn:first-child:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}

.btn-group>.btn:not(:first-child):not(:last-child) {
border-radius: 0;
border-left: 1px solid lightgrey;
}

.btn-group>.btn:last-child:not(:first-child),
.btn-group>.dropdown-toggle:not(:first-child) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-left: 1px solid lightgrey;
}

.btn-group>.btn-inactive {
background-color: #607d8b;
}

.btn-group>.btn {
-webkit-box-shadow: 0 0px 0px 0 rgba(0, 0, 0, 0), 0 0px 0px 0px rgba(0, 0, 0, 0), 0 0px 0px 0 rgba(0, 0, 0, 0);
box-shadow: 0 0px 0px 0 rgba(0, 0, 0, 0), 0 0px 0px 0px rgba(0, 0, 0, 0), 0 0px 0px 0 rgba(0, 0, 0, 0);
}

.btn-group>.btn-inactive:hover {
background-color: #728F9D;
}

.btn-group>.btn:hover {
-webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);
}
21 changes: 13 additions & 8 deletions app/assets/stylesheets/content.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ p.long-form {
margin-bottom: 16px;
}

.card-action {
.green-text, .red-text {
i {
font-size: 90%;
}
.card-action.nice-icon-links {
i {
font-size: 90%;
}

a {
color: grey;
}
a {
color: grey;
}
}

Expand Down Expand Up @@ -127,3 +125,10 @@ p.long-form {

margin-bottom: 30px;
}

.parallax-header {
img {
-webkit-filter: blur(3px); /* Safari 6.0 - 9.0 */
filter: blur(3px);
}
}
27 changes: 27 additions & 0 deletions app/assets/stylesheets/content_types.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.js-enable-content-type .card:not(.active) {
-webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
filter: grayscale(100%);

.card-image > img {
-webkit-filter: blur(2px); /* Safari 6.0 - 9.0 */
filter: blur(2px);
}
}

.js-enable-content-type .card:not(.active):hover {
-webkit-filter: grayscale(75%); /* Safari 6.0 - 9.0 */
filter: grayscale(75%);

.card-image > img {
-webkit-filter: blur(0px); /* Safari 6.0 - 9.0 */
filter: blur(0px);
}
}

.js-enable-content-type .enabled-badge {
float: right;
position: relative;
top: -51px;
right: 7px;
z-index: 3;
}
2 changes: 1 addition & 1 deletion app/assets/stylesheets/dashboard.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
.card-image {
max-height: 200px;
}
}
}
28 changes: 28 additions & 0 deletions app/assets/stylesheets/editor.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,41 @@
min-height: 400px;
border: 1px solid #dedede;
padding: 5px 0;
margin-bottom: 600px;

color: black;

p {
margin-top: 0;
}

/* PAGES */
background: white;
padding: 30px;
border-bottom: 1px solid grey;
}

/* Materialize hacks */
b, strong {
font-weight: bolder !important;
}

.document-name-bar {
.input-field.inline {
margin-bottom: 0;
}

.row {
margin-bottom: 0;
}

margin-bottom: 40px;
}

.smart-sidebar {
opacity: 0.4;

&:hover {
opacity: 1.0;
}
}
4 changes: 4 additions & 0 deletions app/assets/stylesheets/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ body {
main {
flex: 1 0 auto;
}

.stealth-page-footer {
padding-bottom: 20px;
}
10 changes: 7 additions & 3 deletions app/assets/stylesheets/materialize-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
@media only screen and (min-width: 1024px) {
.fixed-card-content
{
height: 8em;
height: 8em;
}
}

@media only screen and (max-width: 1024px) {
.fixed-card-content
{
height: 10em;
height: 10em;
}
}
}

body {
background: #f4f4f4;
}
35 changes: 28 additions & 7 deletions app/assets/stylesheets/navbar.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,34 @@
.dropdown-content {
min-width: 300px !important;
min-width: 400px !important;
}

.navbar-fixed {
margin-bottom: 15px;
z-index: 1000 !important;
@media only screen and (min-width: 993px) {
body.has-fixed-sidenav {
padding-left: 300px !important;
}

nav.navbar.logged-in {
width: calc(100% - 300px);
}
}

@media only screen and (max-width: 993px) {
body.has-fixed-sidenav {
padding-left: 0 !important;
}
}

@media only screen and (min-width: 601px) {
nav, nav .nav-wrapper i, nav a.sidenav-trigger, nav a.sidenav-trigger i {
height: 64px;
line-height: 64px;
}
}

.universe-filter-active {
background: purple;
height: 100%;
nav.navbar {
z-index: 10;
transition: box-shadow .3s, background-color .3s;
padding: 0 20px;
background-color: #fff;
color: rgba(0,0,0,0.87);
}
47 changes: 38 additions & 9 deletions app/assets/stylesheets/sidenav.css.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,43 @@
.sidenav {
padding-top: 64px;
li {
display: block;
}

.logo-container {
padding: 0 16px;
height: 64px;
line-height: 64px;
font-size: 24px;
border-bottom: 1px solid rgba(0,0,0,0.2);
box-sizing: content-box;

i.material-icons.right {
position: relative;
top: 8px;
left: 26px;
}
}

.header {
background: #10B6FF;
color: white;
margin: 0;
text-align: center;
.collapsible .collapsible-header {
text-transform: uppercase;
height: 64px;
line-height: 64px;

.material-icons.left {
margin-top: 8px;
}
}

.collapsible .collapsible-header .chevron {
float: right;
height: 24px;
width: 24px;
line-height: 24px;
margin: 20px 0 0 0;
transition: transform .2s;
}

font-size: 12px;
height: 20px;
line-height: 20px;
.collapsible>.active .collapsible-header .chevron {
transform: rotate(-90deg);
}
}
Loading

0 comments on commit ac28a9d

Please sign in to comment.