Linting fixes.

This commit is contained in:
Christopher Charbonneau Wells 2017-10-22 15:05:58 -04:00
parent de36cec1e9
commit f23ea78cef
7 changed files with 119 additions and 116 deletions

View File

@ -39,7 +39,7 @@ $body-color: $gray-400;
// //
// Style anchor elements. // Style anchor elements.
$link-color: theme-color("info"); $link-color: theme-color('info');
$link-hover-color: darken($link-color, 15%); $link-hover-color: darken($link-color, 15%);
@ -49,7 +49,7 @@ $link-hover-color: darken($link-color, 15%);
$border-color: $gray-200; $border-color: $gray-200;
$component-active-color: $gray-400; $component-active-color: $gray-400;
$component-active-bg: theme-color("primary"); $component-active-bg: theme-color('primary');
// Fonts // Fonts
@ -67,9 +67,9 @@ $mark-bg: #fcf8e3 !default;
// Customizes the `.table` component with basic values, each used across all table variations. // Customizes the `.table` component with basic values, each used across all table variations.
$table-border-color: $gray-800; $table-border-color: $gray-800;
$table-head-bg: theme-color("primary"); $table-head-bg: theme-color('primary');
$table-inverse-bg: theme-color("primary"); $table-inverse-bg: theme-color('primary');
$table-accent-bg: rgba(theme-color("primary"), .1); $table-accent-bg: rgba(theme-color('primary'), .1);
// Forms // Forms
@ -88,7 +88,7 @@ $dropdown-bg: $gray-700;
$dropdown-divider-bg: $gray-800; $dropdown-divider-bg: $gray-800;
$dropdown-link-color: $body-color; $dropdown-link-color: $body-color;
$dropdown-link-hover-color: darken($body-color, 5%); $dropdown-link-hover-color: darken($body-color, 5%);
$dropdown-link-hover-bg: theme-color("primary"); $dropdown-link-hover-bg: theme-color('primary');
$dropdown-link-active-color: $component-active-color; $dropdown-link-active-color: $component-active-color;
$dropdown-link-active-bg: $component-active-bg; $dropdown-link-active-bg: $component-active-bg;
$dropdown-header-color: darken($body-color, 25%); $dropdown-header-color: darken($body-color, 25%);
@ -97,16 +97,16 @@ $dropdown-header-color: darken($body-color, 25%);
// Pagination // Pagination
$pagination-color: $link-color; $pagination-color: $link-color;
$pagination-bg: theme-color("dark"); $pagination-bg: theme-color('dark');
$pagination-border-color: lighten(theme-color("dark"), 5%); $pagination-border-color: lighten(theme-color('dark'), 5%);
$pagination-hover-color: $link-hover-color; $pagination-hover-color: $link-hover-color;
$pagination-hover-bg: $gray-900; $pagination-hover-bg: $gray-900;
$pagination-hover-border-color: $gray-800; $pagination-hover-border-color: $gray-800;
$pagination-active-color: $body-color; $pagination-active-color: $body-color;
$pagination-active-bg: theme-color("primary"); $pagination-active-bg: theme-color('primary');
$pagination-active-border-color: theme-color("primary"); $pagination-active-border-color: theme-color('primary');
$pagination-disabled-color: $gray-600; $pagination-disabled-color: $gray-600;
$pagination-disabled-bg: $pagination-bg; $pagination-disabled-bg: $pagination-bg;
@ -115,13 +115,13 @@ $pagination-disabled-border-color: $pagination-border-color;
// Jumbotron // Jumbotron
$jumbotron-bg: theme-color("dark"); $jumbotron-bg: theme-color('dark');
// Cards // Cards
$card-bg: theme-color("dark"); $card-bg: theme-color('dark');
$card-cap-bg: rgba(theme-color("light"), .05); $card-cap-bg: rgba(theme-color('light'), .05);
// Progress bars // Progress bars
@ -131,7 +131,7 @@ $progress-bg: $gray-600;
// List group // List group
$list-group-bg: theme-color("dark"); $list-group-bg: theme-color('dark');
$list-group-hover-bg: darken($list-group-bg, 5%); $list-group-hover-bg: darken($list-group-bg, 5%);
$list-group-active-color: $component-active-color !default; $list-group-active-color: $component-active-color !default;
$list-group-active-bg: $component-active-bg !default; $list-group-active-bg: $component-active-bg !default;

View File

@ -1,101 +1,101 @@
@import '../../../node_modules/font-awesome/scss/font-awesome'; @import '../../../node_modules/font-awesome/scss/font-awesome';
.icon { .icon {
@extend .fa @extend .fa;
} }
.icon-2x { .icon-2x {
@extend .fa-2x @extend .fa-2x;
} }
.icon-add { .icon-add {
@extend .fa-plus @extend .fa-plus;
} }
.icon-chevron-left { .icon-chevron-left {
@extend .fa-chevron-left @extend .fa-chevron-left;
} }
.icon-chevron-right { .icon-chevron-right {
@extend .fa-chevron-right @extend .fa-chevron-right;
} }
.icon-child { .icon-child {
@extend .fa-child @extend .fa-child;
} }
.icon-dashboard { .icon-dashboard {
@extend .fa-tachometer @extend .fa-tachometer;
} }
.icon-delete { .icon-delete {
@extend .fa-trash-o @extend .fa-trash-o;
} }
.icon-diaperchange { .icon-diaperchange {
@extend .fa-trash @extend .fa-trash;
} }
.icon-envelope { .icon-envelope {
@extend .fa-envelope @extend .fa-envelope;
} }
.icon-false { .icon-false {
@extend .fa-times-circle-o @extend .fa-times-circle-o;
} }
.icon-feeding { .icon-feeding {
@extend .fa-spoon @extend .fa-spoon;
} }
.icon-graph { .icon-graph {
@extend .fa-bar-chart-o @extend .fa-bar-chart-o;
} }
.icon-list { .icon-list {
@extend .fa-list @extend .fa-list;
} }
.icon-lock { .icon-lock {
@extend .fa-lock @extend .fa-lock;
} }
.icon-note { .icon-note {
@extend .fa-sticky-note @extend .fa-sticky-note;
} }
.icon-refresh { .icon-refresh {
@extend .fa-refresh @extend .fa-refresh;
} }
.icon-sad { .icon-sad {
@extend .fa-frown-o @extend .fa-frown-o;
} }
.icon-sleep { .icon-sleep {
@extend .fa-bed @extend .fa-bed;
} }
.icon-stop { .icon-stop {
@extend .fa-stop @extend .fa-stop;
} }
.icon-timer { .icon-timer {
@extend .fa-clock-o @extend .fa-clock-o;
} }
.icon-true { .icon-true {
@extend .fa-check-circle-o @extend .fa-check-circle-o;
} }
.icon-tummytime { .icon-tummytime {
@extend .fa-smile-o @extend .fa-smile-o;
} }
.icon-update { .icon-update {
@extend .fa-pencil @extend .fa-pencil;
} }
.icon-user { .icon-user {
@extend .fa-user @extend .fa-user;
} }

View File

@ -103,7 +103,8 @@ class FormsTestCase(TestCase):
timer = models.Timer.objects.create(user=self.user) timer = models.Timer.objects.create(user=self.user)
timer.save() timer.save()
page = self.c.post('/tummy-time/add/?timer={}'.format(timer.id), params) page = self.c.post(
'/tummy-time/add/?timer={}'.format(timer.id), params)
self.assertEqual(page.status_code, 302) self.assertEqual(page.status_code, 302)
entry = models.TummyTime.objects.first() entry = models.TummyTime.objects.first()

View File

@ -32,6 +32,7 @@ gulp.task('lint:styles', function(cb) {
'indentation': [ 1, { 'size': 4 } ], 'indentation': [ 1, { 'size': 4 } ],
'no-ids': 0, 'no-ids': 0,
'no-vendor-prefixes': 2, 'no-vendor-prefixes': 2,
'placeholder-in-extend': 0,
'property-sort-order': 0 'property-sort-order': 0
} }
}), }),

View File

@ -1,14 +1,16 @@
/* Adapted for Bootstrap 4 from https://www.bootply.com/SzXin8KDZJ. */ // Adapted for Bootstrap 4 from https://www.bootply.com/SzXin8KDZJ.
$card-shadow: rgba(0, 0, 0, .175);
.timeline { .timeline {
list-style: none; list-style: none;
padding: 10px 0 10px; padding: 10px 0;
position: relative; position: relative;
&:before { &::before {
top: 0; top: 0;
bottom: 0; bottom: 0;
position: absolute; position: absolute;
content: " "; content: ' ';
width: 3px; width: 3px;
background-color: theme-color('primary'); background-color: theme-color('primary');
left: 50%; left: 50%;
@ -20,13 +22,13 @@
margin-bottom: 10px; margin-bottom: 10px;
position: relative; position: relative;
&:before { &::before {
content: " "; content: ' ';
display: table; display: table;
} }
&:after { &::after {
content: " "; content: ' ';
display: table; display: table;
clear: both; clear: both;
} }
@ -35,9 +37,9 @@
width: 47%; width: 47%;
float: left; float: left;
position: relative; position: relative;
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175); box-shadow: 0 1px 6px $card-shadow;
&:before { &::before {
position: absolute; position: absolute;
top: 26px; top: 26px;
right: -15px; right: -15px;
@ -46,10 +48,10 @@
border-left: 15px solid theme-color('dark'); border-left: 15px solid theme-color('dark');
border-right: 0 solid theme-color('dark'); border-right: 0 solid theme-color('dark');
border-bottom: 15px solid transparent; border-bottom: 15px solid transparent;
content: " "; content: ' ';
} }
&:after { &::after {
position: absolute; position: absolute;
top: 27px; top: 27px;
right: -14px; right: -14px;
@ -58,7 +60,7 @@
border-left: 14px solid theme-color('dark'); border-left: 14px solid theme-color('dark');
border-right: 0 solid theme-color('dark'); border-right: 0 solid theme-color('dark');
border-bottom: 14px solid transparent; border-bottom: 14px solid transparent;
content: " "; content: ' ';
} }
} }
@ -66,14 +68,14 @@
.card { .card {
float: right; float: right;
&:before { &::before {
border-left-width: 0; border-left-width: 0;
border-right-width: 15px; border-right-width: 15px;
left: -15px; left: -15px;
right: auto; right: auto;
} }
&:after { &::after {
border-left-width: 0; border-left-width: 0;
border-right-width: 14px; border-right-width: 14px;
left: -14px; left: -14px;
@ -83,7 +85,7 @@
} }
.timeline-badge { .timeline-badge {
color: #fff; color: $white;
width: 50px; width: 50px;
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
@ -96,10 +98,9 @@
background-color: theme-color('dark'); background-color: theme-color('dark');
z-index: 100; z-index: 100;
border-radius: 50%; border-radius: 50%;
}
.timeline-badge.arrow { .arrow {
color: #fff; color: $white;
width: 50px; width: 50px;
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
@ -115,39 +116,39 @@
} }
} }
} }
}
@media (max-width: 767px) { @media (max-width: 767px) {
ul.timeline:before { .timeline {
&::before {
left: 40px; left: 40px;
} }
ul.timeline > li > .card { li {
width: calc(100% - 90px); .card {
width: -moz-calc(100% - 90px);
width: -webkit-calc(100% - 90px);
}
ul.timeline > li > .timeline-badge {
left: 15px;
margin-left: 0;
top: 16px;
}
ul.timeline > li > .card {
float: right; float: right;
} width: calc(100% - 90px);
ul.timeline > li > .card:before { &::before {
border-left-width: 0; border-left-width: 0;
border-right-width: 15px; border-right-width: 15px;
left: -15px; left: -15px;
right: auto; right: auto;
} }
ul.timeline > li > .card:after { &::after {
border-left-width: 0; border-left-width: 0;
border-right-width: 14px; border-right-width: 14px;
left: -14px; left: -14px;
right: auto; right: auto;
} }
} }
.timeline-badge {
left: 15px;
margin-left: 0;
top: 16px;
}
}
}
}

View File

@ -18,8 +18,8 @@ class DiaperChangeLifetimesChildReport(PermissionRequiredMixin, DetailView):
template_name = 'reports/diaperchange_lifetimes.html' template_name = 'reports/diaperchange_lifetimes.html'
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super(DiaperChangeLifetimesChildReport, self).get_context_data( context = super(
**kwargs) DiaperChangeLifetimesChildReport, self).get_context_data(**kwargs)
child = context['object'] child = context['object']
context['html'], context['javascript'] = diaperchange_lifetimes(child) context['html'], context['javascript'] = diaperchange_lifetimes(child)
return context return context