.
9 |
10 | .list-group {
11 | // No need to set list-style: none; since .list-group-item is block level
12 | margin-bottom: 20px;
13 | padding-left: 0; // reset padding because ul and ol
14 | }
15 |
16 |
17 | // Individual list items
18 | //
19 | // Use on `li`s or `div`s within the `.list-group` parent.
20 |
21 | .list-group-item {
22 | position: relative;
23 | display: block;
24 | padding: 10px 15px;
25 | // Place the border on the list items and negative margin up for better styling
26 | margin-bottom: -1px;
27 | background-color: $list-group-bg;
28 | border: 1px solid $list-group-border;
29 |
30 | // Round the first and last items
31 | &:first-child {
32 | @include border-top-radius($list-group-border-radius);
33 | }
34 | &:last-child {
35 | margin-bottom: 0;
36 | @include border-bottom-radius($list-group-border-radius);
37 | }
38 | }
39 |
40 |
41 | // Interactive list items
42 | //
43 | // Use anchor or button elements instead of `li`s or `div`s to create interactive items.
44 | // Includes an extra `.active` modifier class for showing selected items.
45 |
46 | a.list-group-item,
47 | button.list-group-item {
48 | color: $list-group-link-color;
49 |
50 | .list-group-item-heading {
51 | color: $list-group-link-heading-color;
52 | }
53 |
54 | // Hover state
55 | &:hover,
56 | &:focus {
57 | text-decoration: none;
58 | color: $list-group-link-hover-color;
59 | background-color: $list-group-hover-bg;
60 | }
61 | }
62 |
63 | button.list-group-item {
64 | width: 100%;
65 | text-align: left;
66 | }
67 |
68 | .list-group-item {
69 | // Disabled state
70 | &.disabled,
71 | &.disabled:hover,
72 | &.disabled:focus {
73 | background-color: $list-group-disabled-bg;
74 | color: $list-group-disabled-color;
75 | cursor: $cursor-disabled;
76 |
77 | // Force color to inherit for custom content
78 | .list-group-item-heading {
79 | color: inherit;
80 | }
81 | .list-group-item-text {
82 | color: $list-group-disabled-text-color;
83 | }
84 | }
85 |
86 | // Active class on item itself, not parent
87 | &.active,
88 | &.active:hover,
89 | &.active:focus {
90 | z-index: 2; // Place active items above their siblings for proper border styling
91 | color: $list-group-active-color;
92 | background-color: $list-group-active-bg;
93 | border-color: $list-group-active-border;
94 |
95 | // Force color to inherit for custom content
96 | .list-group-item-heading,
97 | .list-group-item-heading > small,
98 | .list-group-item-heading > .small {
99 | color: inherit;
100 | }
101 | .list-group-item-text {
102 | color: $list-group-active-text-color;
103 | }
104 | }
105 | }
106 |
107 |
108 | // Contextual variants
109 | //
110 | // Add modifier classes to change text and background color on individual items.
111 | // Organizationally, this must come after the `:hover` states.
112 |
113 | @include list-group-item-variant(success, $state-success-bg, $state-success-text);
114 | @include list-group-item-variant(info, $state-info-bg, $state-info-text);
115 | @include list-group-item-variant(warning, $state-warning-bg, $state-warning-text);
116 | @include list-group-item-variant(danger, $state-danger-bg, $state-danger-text);
117 |
118 |
119 | // Custom content options
120 | //
121 | // Extra classes for creating well-formatted content within `.list-group-item`s.
122 |
123 | .list-group-item-heading {
124 | margin-top: 0;
125 | margin-bottom: 5px;
126 | }
127 | .list-group-item-text {
128 | margin-bottom: 0;
129 | line-height: 1.3;
130 | }
131 |
--------------------------------------------------------------------------------
/assets/styles/bootstrap/bootstrap/_scaffolding.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Scaffolding
3 | // --------------------------------------------------
4 |
5 |
6 | // Reset the box-sizing
7 | //
8 | // Heads up! This reset may cause conflicts with some third-party widgets.
9 | // For recommendations on resolving such conflicts, see
10 | // http://getbootstrap.com/getting-started/#third-box-sizing
11 | * {
12 | @include box-sizing(border-box);
13 | }
14 | *:before,
15 | *:after {
16 | @include box-sizing(border-box);
17 | }
18 |
19 |
20 | // Body reset
21 |
22 | html {
23 | font-size: 10px;
24 | -webkit-tap-highlight-color: rgba(0,0,0,0);
25 | }
26 |
27 | body {
28 | font-family: $font-family-base;
29 | font-size: $font-size-base;
30 | line-height: $line-height-base;
31 | color: $text-color;
32 | background-color: $body-bg;
33 | }
34 |
35 | // Reset fonts for relevant elements
36 | input,
37 | button,
38 | select,
39 | textarea {
40 | font-family: inherit;
41 | font-size: inherit;
42 | line-height: inherit;
43 | }
44 |
45 |
46 | // Links
47 |
48 | a {
49 | color: $link-color;
50 | text-decoration: none;
51 |
52 | &:hover,
53 | &:focus {
54 | color: $link-hover-color;
55 | text-decoration: $link-hover-decoration;
56 | }
57 |
58 | &:focus {
59 | @include tab-focus;
60 | }
61 | }
62 |
63 |
64 | // Figures
65 | //
66 | // We reset this here because previously Normalize had no `figure` margins. This
67 | // ensures we don't break anyone's use of the element.
68 |
69 | figure {
70 | margin: 0;
71 | }
72 |
73 |
74 | // Images
75 |
76 | img {
77 | vertical-align: middle;
78 | }
79 |
80 | // Responsive images (ensure images don't scale beyond their parents)
81 | .img-responsive {
82 | @include img-responsive;
83 | }
84 |
85 | // Rounded corners
86 | .img-rounded {
87 | border-radius: $border-radius-large;
88 | }
89 |
90 | // Image thumbnails
91 | //
92 | // Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.
93 | .img-thumbnail {
94 | padding: $thumbnail-padding;
95 | line-height: $line-height-base;
96 | background-color: $thumbnail-bg;
97 | border: 1px solid $thumbnail-border;
98 | border-radius: $thumbnail-border-radius;
99 | @include transition(all .2s ease-in-out);
100 |
101 | // Keep them at most 100% wide
102 | @include img-responsive(inline-block);
103 | }
104 |
105 | // Perfect circle
106 | .img-circle {
107 | border-radius: 50%; // set radius in percents
108 | }
109 |
110 |
111 | // Horizontal rules
112 |
113 | hr {
114 | margin-top: $line-height-computed;
115 | margin-bottom: $line-height-computed;
116 | border: 0;
117 | border-top: 1px solid $hr-border;
118 | }
119 |
120 |
121 | // Only display content to screen readers
122 | //
123 | // See: http://a11yproject.com/posts/how-to-hide-content
124 |
125 | .sr-only {
126 | position: absolute;
127 | width: 1px;
128 | height: 1px;
129 | margin: -1px;
130 | padding: 0;
131 | overflow: hidden;
132 | clip: rect(0,0,0,0);
133 | border: 0;
134 | }
135 |
136 | // Use in conjunction with .sr-only to only display content when it's focused.
137 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
138 | // Credit: HTML5 Boilerplate
139 |
140 | .sr-only-focusable {
141 | &:active,
142 | &:focus {
143 | position: static;
144 | width: auto;
145 | height: auto;
146 | margin: 0;
147 | overflow: visible;
148 | clip: auto;
149 | }
150 | }
151 |
152 |
153 | // iOS "clickable elements" fix for role="button"
154 | //
155 | // Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
156 | // for traditionally non-focusable elements with role="button"
157 | // see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
158 |
159 | [role="button"] {
160 | cursor: pointer;
161 | }
162 |
--------------------------------------------------------------------------------
/assets/styles/bootstrap/bootstrap/_popovers.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Popovers
3 | // --------------------------------------------------
4 |
5 |
6 | .popover {
7 | position: absolute;
8 | top: 0;
9 | left: 0;
10 | z-index: $zindex-popover;
11 | display: none;
12 | max-width: $popover-max-width;
13 | padding: 1px;
14 | // Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element.
15 | // So reset our font and text properties to avoid inheriting weird values.
16 | @include reset-text;
17 | font-size: $font-size-base;
18 |
19 | background-color: $popover-bg;
20 | background-clip: padding-box;
21 | border: 1px solid $popover-fallback-border-color;
22 | border: 1px solid $popover-border-color;
23 | border-radius: $border-radius-large;
24 | @include box-shadow(0 5px 10px rgba(0,0,0,.2));
25 |
26 | // Offset the popover to account for the popover arrow
27 | &.top { margin-top: -$popover-arrow-width; }
28 | &.right { margin-left: $popover-arrow-width; }
29 | &.bottom { margin-top: $popover-arrow-width; }
30 | &.left { margin-left: -$popover-arrow-width; }
31 | }
32 |
33 | .popover-title {
34 | margin: 0; // reset heading margin
35 | padding: 8px 14px;
36 | font-size: $font-size-base;
37 | background-color: $popover-title-bg;
38 | border-bottom: 1px solid darken($popover-title-bg, 5%);
39 | border-radius: ($border-radius-large - 1) ($border-radius-large - 1) 0 0;
40 | }
41 |
42 | .popover-content {
43 | padding: 9px 14px;
44 | }
45 |
46 | // Arrows
47 | //
48 | // .arrow is outer, .arrow:after is inner
49 |
50 | .popover > .arrow {
51 | &,
52 | &:after {
53 | position: absolute;
54 | display: block;
55 | width: 0;
56 | height: 0;
57 | border-color: transparent;
58 | border-style: solid;
59 | }
60 | }
61 | .popover > .arrow {
62 | border-width: $popover-arrow-outer-width;
63 | }
64 | .popover > .arrow:after {
65 | border-width: $popover-arrow-width;
66 | content: "";
67 | }
68 |
69 | .popover {
70 | &.top > .arrow {
71 | left: 50%;
72 | margin-left: -$popover-arrow-outer-width;
73 | border-bottom-width: 0;
74 | border-top-color: $popover-arrow-outer-fallback-color; // IE8 fallback
75 | border-top-color: $popover-arrow-outer-color;
76 | bottom: -$popover-arrow-outer-width;
77 | &:after {
78 | content: " ";
79 | bottom: 1px;
80 | margin-left: -$popover-arrow-width;
81 | border-bottom-width: 0;
82 | border-top-color: $popover-arrow-color;
83 | }
84 | }
85 | &.right > .arrow {
86 | top: 50%;
87 | left: -$popover-arrow-outer-width;
88 | margin-top: -$popover-arrow-outer-width;
89 | border-left-width: 0;
90 | border-right-color: $popover-arrow-outer-fallback-color; // IE8 fallback
91 | border-right-color: $popover-arrow-outer-color;
92 | &:after {
93 | content: " ";
94 | left: 1px;
95 | bottom: -$popover-arrow-width;
96 | border-left-width: 0;
97 | border-right-color: $popover-arrow-color;
98 | }
99 | }
100 | &.bottom > .arrow {
101 | left: 50%;
102 | margin-left: -$popover-arrow-outer-width;
103 | border-top-width: 0;
104 | border-bottom-color: $popover-arrow-outer-fallback-color; // IE8 fallback
105 | border-bottom-color: $popover-arrow-outer-color;
106 | top: -$popover-arrow-outer-width;
107 | &:after {
108 | content: " ";
109 | top: 1px;
110 | margin-left: -$popover-arrow-width;
111 | border-top-width: 0;
112 | border-bottom-color: $popover-arrow-color;
113 | }
114 | }
115 |
116 | &.left > .arrow {
117 | top: 50%;
118 | right: -$popover-arrow-outer-width;
119 | margin-top: -$popover-arrow-outer-width;
120 | border-right-width: 0;
121 | border-left-color: $popover-arrow-outer-fallback-color; // IE8 fallback
122 | border-left-color: $popover-arrow-outer-color;
123 | &:after {
124 | content: " ";
125 | right: 1px;
126 | border-right-width: 0;
127 | border-left-color: $popover-arrow-color;
128 | bottom: -$popover-arrow-width;
129 | }
130 | }
131 | }
132 |
--------------------------------------------------------------------------------
/app/controllers/user_profile/profiles.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | const mysql = require('../../../lib/mysql');
3 | const Joi = require('joi');
4 | exports.showProfiles = {
5 | description: 'Returns the User Profile',
6 | handler: function(request, reply) {
7 | var user = {
8 | email: request.auth.credentials.email,
9 | name: request.auth.credentials.name,
10 | dob: request.auth.credentials.dob
11 | };
12 | reply.view('user_profile/profiles', {
13 | user: user
14 | });
15 | },
16 | tags: ['api'] //swagger documentation
17 | };
18 | exports.editProfiles = {
19 | description: 'Edit the User Profile',
20 | auth: {
21 | mode: 'try',
22 | strategy: 'standard'
23 | },
24 | validate: {
25 | payload: {
26 | name: Joi.string().required(),
27 | },
28 | options: {
29 | allowUnknown: true
30 | },
31 | failAction: function(request, reply, source, error) {
32 | request.yar.flash('error', error.data.details[0].message);
33 | return reply.redirect('/signup');
34 | }
35 | },
36 | handler: function(request, reply) {
37 | var name = request.payload.name;
38 | var dob = request.payload.dob;
39 | update(request, reply, name, dob);
40 | },
41 | tags: ['api'] //swagger documentation
42 | };
43 |
44 | function update(request, reply, name, dob) {
45 | mysql.getConnection(function(err, connection) {
46 | if (err) {
47 | connection.release();
48 | request.yar.flash('error', 'An internal server error occurred');
49 | return reply.redirect('/profiles');
50 | }
51 | connection.query('update Web_App_Users set name=?, dob=? where email=? ', [name, dob, request.params.email], function(err, rows) {
52 | if (err) {
53 | request.yar.flash('error', 'An internal server error occurred');
54 | return reply.redirect('/profiles');
55 | } else {
56 | var role = request.auth.credentials.role;
57 | var user = {
58 | email: request.params.email,
59 | name: name,
60 | dob: dob,
61 | role: role
62 | };
63 | request.cookieAuth.clear();
64 | request.cookieAuth.set(user);
65 | request.yar.flash('success', 'Profile updated successfully!');
66 | reply.redirect('/profiles', {
67 | user: user
68 | });
69 | }
70 | });
71 | connection.release();
72 | });
73 | }
74 | exports.deleteProfile = {
75 | description: 'Delete the User Profile',
76 | auth: {
77 | mode: 'try',
78 | strategy: 'standard'
79 | },
80 | validate: {
81 | failAction: function(request, reply, source, error) {
82 | request.yar.flash('error', error.data.details[0].message);
83 | return reply.redirect('/');
84 | }
85 | },
86 | handler: function(request, reply) {
87 | var email = request.payload.email;
88 | deleteUser(request, reply, email);
89 | },
90 | tags: ['api'] //swagger documentation
91 | };
92 |
93 | function deleteUser(request, reply, email) {
94 | mysql.getConnection(function(err, connection) {
95 | if (err) {
96 | connection.release();
97 | request.yar.flash('error', 'An internal server error occurred');
98 | return reply.redirect('/');
99 | }
100 | connection.query('delete from Web_App_Users where email=? ', [email], function(err, rows) {
101 | if (err) {
102 | request.yar.flash('error', 'An internal server error occurred');
103 | return reply.redirect('/');
104 | } else {
105 | request.cookieAuth.clear();
106 | request.yar.flash('success', 'Your account deleted successfully!');
107 | reply.redirect('/');
108 | }
109 | });
110 | connection.release();
111 | });
112 | }
--------------------------------------------------------------------------------
/assets/styles/bootstrap/bootstrap/_modals.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Modals
3 | // --------------------------------------------------
4 |
5 | // .modal-open - body class for killing the scroll
6 | // .modal - container to scroll within
7 | // .modal-dialog - positioning shell for the actual modal
8 | // .modal-content - actual modal w/ bg and corners and shit
9 |
10 | // Kill the scroll on the body
11 | .modal-open {
12 | overflow: hidden;
13 | }
14 |
15 | // Container that the modal scrolls within
16 | .modal {
17 | display: none;
18 | overflow: hidden;
19 | position: fixed;
20 | top: 0;
21 | right: 0;
22 | bottom: 0;
23 | left: 0;
24 | z-index: $zindex-modal;
25 | -webkit-overflow-scrolling: touch;
26 |
27 | // Prevent Chrome on Windows from adding a focus outline. For details, see
28 | // https://github.com/twbs/bootstrap/pull/10951.
29 | outline: 0;
30 |
31 | // When fading in the modal, animate it to slide down
32 | &.fade .modal-dialog {
33 | @include translate(0, -25%);
34 | @include transition-transform(0.3s ease-out);
35 | }
36 | &.in .modal-dialog { @include translate(0, 0) }
37 | }
38 | .modal-open .modal {
39 | overflow-x: hidden;
40 | overflow-y: auto;
41 | }
42 |
43 | // Shell div to position the modal with bottom padding
44 | .modal-dialog {
45 | position: relative;
46 | width: auto;
47 | margin: 10px;
48 | }
49 |
50 | // Actual modal
51 | .modal-content {
52 | position: relative;
53 | background-color: $modal-content-bg;
54 | border: 1px solid $modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
55 | border: 1px solid $modal-content-border-color;
56 | border-radius: $border-radius-large;
57 | @include box-shadow(0 3px 9px rgba(0,0,0,.5));
58 | background-clip: padding-box;
59 | // Remove focus outline from opened modal
60 | outline: 0;
61 | }
62 |
63 | // Modal background
64 | .modal-backdrop {
65 | position: fixed;
66 | top: 0;
67 | right: 0;
68 | bottom: 0;
69 | left: 0;
70 | z-index: $zindex-modal-background;
71 | background-color: $modal-backdrop-bg;
72 | // Fade for backdrop
73 | &.fade { @include opacity(0); }
74 | &.in { @include opacity($modal-backdrop-opacity); }
75 | }
76 |
77 | // Modal header
78 | // Top section of the modal w/ title and dismiss
79 | .modal-header {
80 | padding: $modal-title-padding;
81 | border-bottom: 1px solid $modal-header-border-color;
82 | @include clearfix;
83 | }
84 | // Close icon
85 | .modal-header .close {
86 | margin-top: -2px;
87 | }
88 |
89 | // Title text within header
90 | .modal-title {
91 | margin: 0;
92 | line-height: $modal-title-line-height;
93 | }
94 |
95 | // Modal body
96 | // Where all modal content resides (sibling of .modal-header and .modal-footer)
97 | .modal-body {
98 | position: relative;
99 | padding: $modal-inner-padding;
100 | }
101 |
102 | // Footer (for actions)
103 | .modal-footer {
104 | padding: $modal-inner-padding;
105 | text-align: right; // right align buttons
106 | border-top: 1px solid $modal-footer-border-color;
107 | @include clearfix; // clear it in case folks use .pull-* classes on buttons
108 |
109 | // Properly space out buttons
110 | .btn + .btn {
111 | margin-left: 5px;
112 | margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
113 | }
114 | // but override that for button groups
115 | .btn-group .btn + .btn {
116 | margin-left: -1px;
117 | }
118 | // and override it for block buttons as well
119 | .btn-block + .btn-block {
120 | margin-left: 0;
121 | }
122 | }
123 |
124 | // Measure scrollbar width for padding body during modal show/hide
125 | .modal-scrollbar-measure {
126 | position: absolute;
127 | top: -9999px;
128 | width: 50px;
129 | height: 50px;
130 | overflow: scroll;
131 | }
132 |
133 | // Scale up the modal
134 | @media (min-width: $screen-sm-min) {
135 | // Automatically set modal's width for larger viewports
136 | .modal-dialog {
137 | width: $modal-md;
138 | margin: 30px auto;
139 | }
140 | .modal-content {
141 | @include box-shadow(0 5px 15px rgba(0,0,0,.5));
142 | }
143 |
144 | // Modal sizes
145 | .modal-sm { width: $modal-sm; }
146 | }
147 |
148 | @media (min-width: $screen-md-min) {
149 | .modal-lg { width: $modal-lg; }
150 | }
151 |
--------------------------------------------------------------------------------
/app/controllers/auth/signup.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | const mysql = require('../../../lib/mysql');
3 | const Joi = require('joi');
4 | const Boom = require('boom');
5 | const Crypto = require('crypto');
6 |
7 | exports.showForm = {
8 | description: 'Returns the signup page',
9 | auth: {
10 | mode: 'try',
11 | strategy: 'standard'
12 | },
13 | handler: function(request, reply) {
14 | if (request.auth.isAuthenticated) {
15 | return reply.redirect('/crash');
16 | }
17 | reply.view('auth/signup');
18 | },
19 | tags: ['api'] //swagger documentation
20 | };
21 | exports.postForm = {
22 | description: 'Submit the signup page',
23 | auth: {
24 | mode: 'try',
25 | strategy: 'standard'
26 | },
27 | validate: {
28 | payload: {
29 | name: Joi.string().required(),
30 | password: Joi.string().min(6).max(20).required(),
31 | verify: Joi.string().required(),
32 | email: Joi.string().email().required()
33 | },
34 | failAction: function(request, reply, source, error) {
35 | var user = {
36 | name: request.payload.name,
37 | email: request.payload.email
38 | };
39 | request.cookieAuth.set(user);
40 | request.yar.flash('error', error.data.details[0].message);
41 | return reply.redirect('/signup');
42 | }
43 | },
44 | handler: function(request, reply) {
45 | var user = {
46 | name: request.payload.name,
47 | email: request.payload.email
48 | };
49 | request.cookieAuth.set(user);
50 | if (request.payload.password !== request.payload.verify) {
51 | request.cookieAuth.set(user);
52 | request.yar.flash('error', 'Password does not match');
53 | return reply.redirect('/signup');
54 | }
55 | save(request, reply);
56 | },
57 | tags: ['api'] //swagger documentation
58 | };
59 |
60 | function save(request, reply) {
61 | mysql.getConnection(function(err, connection) {
62 | if (err) {
63 | connection.release();
64 | request.yar.flash('error', 'An internal server error occurred');
65 | return reply.redirect('/signup');
66 | }
67 | connection.query('select * from Web_App_Users where email=? ', request.payload.email, function(err, rows) {
68 | if (rows.length) {
69 | request.yar.flash('error', 'Email already exists.');
70 | return reply.redirect('/signup');
71 | } else {
72 | if (request.payload.password && request.payload.password.length >= 6) {
73 | var password = new Buffer(request.payload.password).toString('base64');
74 | insertUserDetails(request, reply, password);
75 | }
76 | }
77 | if (err) {
78 | request.yar.flash('error', 'An internal server error occurred in save');
79 | return reply.redirect('/signup');
80 | }
81 | });
82 | connection.release();
83 | });
84 | }
85 |
86 | function insertUserDetails(request, reply, password) {
87 | var num = Math.floor(Math.random() * 90000) + 10000;
88 | mysql.getConnection(function(err, connection) {
89 | if (err) {
90 | connection.release();
91 | request.yar.flash('error', 'An internal server error occurred');
92 | return reply.redirect('/signup');
93 | }
94 | connection.query('insert into Web_App_Users(`user_id`,`name`,`email`,`password`) VALUES(?,?,?,?)', [num, request.payload.name, request.payload.email, password], function(err, rows) {
95 | if (err) {
96 | request.yar.flash('error', 'An internal server error occurred in insertUserDetails');
97 | return reply.redirect('/signup');
98 | } else {
99 | var user = {
100 | name: request.payload.name,
101 | password: password,
102 | email: request.payload.email
103 | };
104 | request.cookieAuth.set(user);
105 | reply.redirect('/crash');
106 | }
107 | });
108 | connection.release();
109 | });
110 | }
--------------------------------------------------------------------------------
/assets/styles/bootstrap/bootstrap/mixins/_gradients.scss:
--------------------------------------------------------------------------------
1 | // Gradients
2 |
3 |
4 |
5 | // Horizontal gradient, from left to right
6 | //
7 | // Creates two color stops, start and end, by specifying a color and position for each color stop.
8 | // Color stops are not available in IE9 and below.
9 | @mixin gradient-horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
10 | background-image: -webkit-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
11 | background-image: -o-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // Opera 12
12 | background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
13 | background-repeat: repeat-x;
14 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down
15 | }
16 |
17 | // Vertical gradient, from top to bottom
18 | //
19 | // Creates two color stops, start and end, by specifying a color and position for each color stop.
20 | // Color stops are not available in IE9 and below.
21 | @mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
22 | background-image: -webkit-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
23 | background-image: -o-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Opera 12
24 | background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
25 | background-repeat: repeat-x;
26 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down
27 | }
28 |
29 | @mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
30 | background-repeat: repeat-x;
31 | background-image: -webkit-linear-gradient($deg, $start-color, $end-color); // Safari 5.1-6, Chrome 10+
32 | background-image: -o-linear-gradient($deg, $start-color, $end-color); // Opera 12
33 | background-image: linear-gradient($deg, $start-color, $end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
34 | }
35 | @mixin gradient-horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
36 | background-image: -webkit-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
37 | background-image: -o-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
38 | background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
39 | background-repeat: no-repeat;
40 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down, gets no color-stop at all for proper fallback
41 | }
42 | @mixin gradient-vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
43 | background-image: -webkit-linear-gradient($start-color, $mid-color $color-stop, $end-color);
44 | background-image: -o-linear-gradient($start-color, $mid-color $color-stop, $end-color);
45 | background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
46 | background-repeat: no-repeat;
47 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
48 | }
49 | @mixin gradient-radial($inner-color: #555, $outer-color: #333) {
50 | background-image: -webkit-radial-gradient(circle, $inner-color, $outer-color);
51 | background-image: radial-gradient(circle, $inner-color, $outer-color);
52 | background-repeat: no-repeat;
53 | }
54 | @mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
55 | background-image: -webkit-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
56 | background-image: -o-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
57 | background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
58 | }
59 |
--------------------------------------------------------------------------------
/assets/styles/modules/dropdown.scss:
--------------------------------------------------------------------------------
1 | /* Copyright 2016 Resumite Corporation
2 |
3 | dropdown.scss
4 | Dropdown module
5 |
6 | Syntax: componentName__
[--]
7 | ------------------------------------------------------------------------*/
8 | $dropdown__caretWidth: .3em !default;
9 | $dropdown__zIndex: 1000 !default;
10 | $dropdown__border: rgba(0, 0, 0, .15) !default;
11 | $dropdown__color: $color__foreground--light;
12 | $dropdown__color--hover: $color__foreground--dark;
13 | $dropdown__color--active: $color__foreground--darkest;
14 | $dropdown__borderColor: $color__foreground--lightest;
15 | $dropdown__borderColor--hover: $color__foreground--lighter;
16 | $dropdown__fontSize: $fontSize--small;
17 | $dropdown__bgColor : $color__background;
18 |
19 | // The dropdown wrapper (div)
20 | .dropup,
21 | .dropdown {
22 | position: relative;
23 | }
24 | .dropdown-toggle {
25 | // caret
26 | &::after {
27 | display: inline-block;
28 | width: 0;
29 | height: 0;
30 | margin-left: .25rem;
31 | content: '';
32 | vertical-align: middle;
33 | border-top: $dropdown__caretWidth solid;
34 | border-right: $dropdown__caretWidth solid transparent;
35 | border-left: $dropdown__caretWidth solid transparent;
36 | }
37 | // Prevent the focus on the dropdown toggle when closing dropdowns
38 | &:focus {
39 | outline: 0;
40 | }
41 | }
42 | .dropup {
43 | .dropdown-toggle {
44 | &::after {
45 | border-top: 0;
46 | border-bottom: $dropdown__caretWidth solid;
47 | }
48 | }
49 | }
50 | // The dropdown menu (ul)
51 | .dropdown-menu {
52 | position: absolute;
53 | z-index: $dropdown__zIndex;
54 | top: 100%;
55 | left: 0;
56 | display: none;
57 | float: left;
58 | min-width: 160px;
59 | margin: 2px 0 0;
60 | padding: 5px 0;
61 | list-style: none;
62 | text-align: left;
63 | border-radius: $borderRadius--base;
64 | background: $dropdown__bgColor;
65 | background-clip: padding-box;
66 | box-shadow: $shadow--normal;
67 | }
68 | .dropdown-menu-pointing {
69 | margin-top: 14px;
70 | }
71 | .dropdown-menu-pointing:before {
72 | position: absolute;
73 | display: block;
74 | width: 14px;
75 | height: 14px;
76 | content: '';
77 | -webkit-transform: rotate(45deg) translate(6px, 6px);
78 | -ms-transform: rotate(45deg) translate(6px, 6px);
79 | transform: rotate(45deg) translate(6px, 6px);
80 | background: $dropdown__bgColor;
81 | box-shadow: -1px -1px 1px -1px rgba(0, 0, 0, .44);
82 | }
83 | .dropdown-menu-right.dropdown-menu-pointing:before {
84 | top: -14px;
85 | right: 10px;
86 | }
87 | .dropdown-menu-left.dropdown-menu-pointing:before {
88 | top: -14px;
89 | left: 10px;
90 | }
91 | // Links, buttons, and more within the dropdown menu
92 | .dropdown-item {
93 | font-weight: normal;
94 | display: block;
95 | clear: both;
96 | width: 100%; // For ``s
97 | padding: 4px 2rem;
98 | text-align: inherit; // For ``s
99 | white-space: nowrap; // prevent links from randomly breaking onto new lines
100 | color: $dropdown__color;
101 | border: 0; // For ``s
102 | background: none; // For ``s
103 | }
104 | .dropdown-item:hover {
105 | color: $dropdown__color--hover;
106 | }
107 | .dropdown-item.small {
108 | font-size: .88em
109 | }
110 | .dropdown-menu .divider {
111 | height: 1px;
112 | background-color: lighten($dropdown__color, 80%);
113 | margin: 10px auto;
114 | }
115 | .open {
116 | > .dropdown-menu {
117 | display: block;
118 | }
119 | // Remove the outline when :focus is triggered
120 | > a {
121 | outline: 0;
122 | }
123 | }
124 | .dropdown-menu-right {
125 | right: 0;
126 | left: auto;
127 | }
128 | // This is only for left-aligning a dropdown menu within a `.navbar-right` or
129 | // `.pull-right` nav component.
130 | .dropdown-menu-left {
131 | right: auto;
132 | left: 0;
133 | }
134 | // Backdrop to catch body clicks on mobile, etc.
135 | .dropdown-backdrop {
136 | position: fixed;
137 | z-index: ($dropdown__zIndex - 10);
138 | top: 0;
139 | right: 0;
140 | bottom: 0;
141 | left: 0;
142 | }
143 | // Right aligned dropdowns
144 | .pull-right > .dropdown-menu {
145 | right: 0;
146 | left: auto;
147 | }
148 | .dropup {
149 | // Reverse the caret
150 | .caret {
151 | content: '';
152 | border-top: 0;
153 | border-bottom: $dropdown__caretWidth solid;
154 | }
155 | // Different positioning for bottom up menu
156 | .dropdown-menu {
157 | top: auto;
158 | bottom: 100%;
159 | margin-bottom: 2px;
160 | }
161 | }
162 |
--------------------------------------------------------------------------------
/assets/styles/bootstrap/bootstrap/_buttons.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Buttons
3 | // --------------------------------------------------
4 |
5 |
6 | // Base styles
7 | // --------------------------------------------------
8 |
9 | .btn {
10 | display: inline-block;
11 | margin-bottom: 0; // For input.btn
12 | font-weight: $btn-font-weight;
13 | text-align: center;
14 | vertical-align: middle;
15 | touch-action: manipulation;
16 | cursor: pointer;
17 | background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
18 | border: 1px solid transparent;
19 | white-space: nowrap;
20 | @include button-size($padding-base-vertical, $padding-base-horizontal, $font-size-base, $line-height-base, $btn-border-radius-base);
21 | @include user-select(none);
22 |
23 | &,
24 | &:active,
25 | &.active {
26 | &:focus,
27 | &.focus {
28 | @include tab-focus;
29 | }
30 | }
31 |
32 | &:hover,
33 | &:focus,
34 | &.focus {
35 | color: $btn-default-color;
36 | text-decoration: none;
37 | }
38 |
39 | &:active,
40 | &.active {
41 | outline: 0;
42 | background-image: none;
43 | @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
44 | }
45 |
46 | &.disabled,
47 | &[disabled],
48 | fieldset[disabled] & {
49 | cursor: $cursor-disabled;
50 | @include opacity(.65);
51 | @include box-shadow(none);
52 | }
53 |
54 | // [converter] extracted a& to a.btn
55 | }
56 |
57 | a.btn {
58 | &.disabled,
59 | fieldset[disabled] & {
60 | pointer-events: none; // Future-proof disabling of clicks on `` elements
61 | }
62 | }
63 |
64 |
65 | // Alternate buttons
66 | // --------------------------------------------------
67 |
68 | .btn-default {
69 | @include button-variant($btn-default-color, $btn-default-bg, $btn-default-border);
70 | }
71 | .btn-primary {
72 | @include button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border);
73 | }
74 | // Success appears as green
75 | .btn-success {
76 | @include button-variant($btn-success-color, $btn-success-bg, $btn-success-border);
77 | }
78 | // Info appears as blue-green
79 | .btn-info {
80 | @include button-variant($btn-info-color, $btn-info-bg, $btn-info-border);
81 | }
82 | // Warning appears as orange
83 | .btn-warning {
84 | @include button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border);
85 | }
86 | // Danger and error appear as red
87 | .btn-danger {
88 | @include button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border);
89 | }
90 |
91 |
92 | // Link buttons
93 | // -------------------------
94 |
95 | // Make a button look and behave like a link
96 | .btn-link {
97 | color: $link-color;
98 | font-weight: normal;
99 | border-radius: 0;
100 |
101 | &,
102 | &:active,
103 | &.active,
104 | &[disabled],
105 | fieldset[disabled] & {
106 | background-color: transparent;
107 | @include box-shadow(none);
108 | }
109 | &,
110 | &:hover,
111 | &:focus,
112 | &:active {
113 | border-color: transparent;
114 | }
115 | &:hover,
116 | &:focus {
117 | color: $link-hover-color;
118 | text-decoration: $link-hover-decoration;
119 | background-color: transparent;
120 | }
121 | &[disabled],
122 | fieldset[disabled] & {
123 | &:hover,
124 | &:focus {
125 | color: $btn-link-disabled-color;
126 | text-decoration: none;
127 | }
128 | }
129 | }
130 |
131 |
132 | // Button Sizes
133 | // --------------------------------------------------
134 |
135 | .btn-lg {
136 | // line-height: ensure even-numbered height of button next to large input
137 | @include button-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $btn-border-radius-large);
138 | }
139 | .btn-sm {
140 | // line-height: ensure proper height of button next to small input
141 | @include button-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $btn-border-radius-small);
142 | }
143 | .btn-xs {
144 | @include button-size($padding-xs-vertical, $padding-xs-horizontal, $font-size-small, $line-height-small, $btn-border-radius-small);
145 | }
146 |
147 |
148 | // Block button
149 | // --------------------------------------------------
150 |
151 | .btn-block {
152 | display: block;
153 | width: 100%;
154 | }
155 |
156 | // Vertically space out multiple block buttons
157 | .btn-block + .btn-block {
158 | margin-top: 5px;
159 | }
160 |
161 | // Specificity overrides
162 | input[type="submit"],
163 | input[type="reset"],
164 | input[type="button"] {
165 | &.btn-block {
166 | width: 100%;
167 | }
168 | }
169 |
--------------------------------------------------------------------------------
/config/manifest.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const Confidence = require('confidence');
4 | const Config = require('./config');
5 | const Meta = require('./meta');
6 |
7 |
8 | let internals = {
9 | criteria: {
10 | env: process.env.NODE_ENV
11 | }
12 | };
13 |
14 | internals.manifest = {
15 | $meta: 'App manifest document',
16 | server: {
17 | connections: {
18 | router: {
19 | stripTrailingSlash: true,
20 | isCaseSensitive: false
21 | },
22 | routes: {
23 | security: true
24 | }
25 | }
26 | },
27 | connections: [{
28 | port: Config.get('/port/web'),
29 | labels: ['web']
30 | }],
31 | registrations: [
32 |
33 | // Cookie authentication
34 | {
35 | plugin: 'hapi-auth-cookie'
36 | },
37 |
38 | // Crumb
39 | {
40 | plugin: {
41 | register: 'crumb',
42 | options: {
43 | cookieOptions: {
44 | isSecure: false
45 | },
46 | skip: function(request,reply){
47 | if(request.path === '/report'){
48 | return true;
49 | }
50 | }
51 | }
52 | }
53 | },
54 |
55 | // Static file and directory handlers
56 | {
57 | plugin: 'inert'
58 | },
59 |
60 | // Templates rendering support
61 | {
62 | plugin: 'vision'
63 | },
64 |
65 | // Swagger support
66 | {
67 | plugin: 'hapi-swagger'
68 | },
69 |
70 | // Views loader
71 | {
72 | plugin: {
73 | register: 'visionary',
74 | options: {
75 | engines: {
76 | hbs: 'handlebars'
77 | },
78 | path: './app/templates',
79 | layoutPath: './app/templates/layouts',
80 | helpersPath: './app/templates/helpers',
81 | partialsPath: './app/templates/partials',
82 | layout: 'default'
83 | }
84 | }
85 | },
86 |
87 | //credentials view loader
88 | {
89 | plugin: 'hapi-context-credentials'
90 | },
91 |
92 | // Mysql connector
93 | {
94 | plugin: {
95 | register: './lib/mysql',
96 | options: Config.get('/mysql')
97 | }
98 | },
99 |
100 | // Logging connector
101 | {
102 | plugin: {
103 | register: 'good',
104 | options: Config.get('/good')
105 | }
106 | },
107 |
108 | // Flash Plugin
109 | {
110 | plugin: {
111 | register: './lib/flash'
112 | }
113 | },
114 |
115 | // Hapi cookie jar
116 | {
117 | plugin: {
118 | register: 'yar',
119 | options: Config.get('/yarCookie')
120 | }
121 | },
122 |
123 | // Authentication strategy
124 | {
125 | plugin: {
126 | register: './lib/auth',
127 | options: Config.get('/authCookie')
128 | }
129 | },
130 |
131 | // App context decorator
132 | {
133 | plugin: {
134 | register: './lib/context',
135 | options: {
136 | meta: Meta.get('/')
137 | }
138 | }
139 | },
140 |
141 | // Core routes
142 | {
143 | plugin: './app/routes/core.js'
144 | },
145 |
146 | // Auth routes
147 | {
148 | plugin: './app/routes/auth.js',
149 | options: {
150 | select: ['web'] //Restricted availability of the plugin to 'web' server only
151 | }
152 | },
153 |
154 | // Dashboard routes
155 | {
156 | plugin: './app/routes/dashboard.js'
157 | },
158 |
159 | // Profile routes
160 | {
161 | plugin: './app/routes/profiles.js'
162 | },
163 |
164 | // Erroreport routes
165 |
166 | {
167 | plugin: './app/routes/errorReport.js'
168 | },
169 |
170 | // User rotes
171 | {
172 | plugin: './app/routes/users.js'
173 | }
174 | ]
175 | };
176 |
177 | internals.store = new Confidence.Store(internals.manifest);
178 |
179 | exports.get = function(key) {
180 | return internals.store.get(key, internals.criteria);
181 | };
182 | exports.meta = function(key) {
183 | return internals.store.meta(key, internals.criteria);
184 | };
185 |
--------------------------------------------------------------------------------
/assets/styles/bootstrap/bootstrap/_input-groups.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Input groups
3 | // --------------------------------------------------
4 |
5 | // Base styles
6 | // -------------------------
7 | .input-group {
8 | position: relative; // For dropdowns
9 | display: table;
10 | border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table
11 |
12 | // Undo padding and float of grid classes
13 | &[class*="col-"] {
14 | float: none;
15 | padding-left: 0;
16 | padding-right: 0;
17 | }
18 |
19 | .form-control {
20 | // Ensure that the input is always above the *appended* addon button for
21 | // proper border colors.
22 | position: relative;
23 | z-index: 2;
24 |
25 | // IE9 fubars the placeholder attribute in text inputs and the arrows on
26 | // select elements in input groups. To fix it, we float the input. Details:
27 | // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
28 | float: left;
29 |
30 | width: 100%;
31 | margin-bottom: 0;
32 |
33 | &:focus {
34 | z-index: 3;
35 | }
36 | }
37 | }
38 |
39 | // Sizing options
40 | //
41 | // Remix the default form control sizing classes into new ones for easier
42 | // manipulation.
43 |
44 | .input-group-lg > .form-control,
45 | .input-group-lg > .input-group-addon,
46 | .input-group-lg > .input-group-btn > .btn {
47 | @extend .input-lg;
48 | }
49 | .input-group-sm > .form-control,
50 | .input-group-sm > .input-group-addon,
51 | .input-group-sm > .input-group-btn > .btn {
52 | @extend .input-sm;
53 | }
54 |
55 |
56 | // Display as table-cell
57 | // -------------------------
58 | .input-group-addon,
59 | .input-group-btn,
60 | .input-group .form-control {
61 | display: table-cell;
62 |
63 | &:not(:first-child):not(:last-child) {
64 | border-radius: 0;
65 | }
66 | }
67 | // Addon and addon wrapper for buttons
68 | .input-group-addon,
69 | .input-group-btn {
70 | width: 1%;
71 | white-space: nowrap;
72 | vertical-align: middle; // Match the inputs
73 | }
74 |
75 | // Text input groups
76 | // -------------------------
77 | .input-group-addon {
78 | padding: $padding-base-vertical $padding-base-horizontal;
79 | font-size: $font-size-base;
80 | font-weight: normal;
81 | line-height: 1;
82 | color: $input-color;
83 | text-align: center;
84 | background-color: $input-group-addon-bg;
85 | border: 1px solid $input-group-addon-border-color;
86 | border-radius: $input-border-radius;
87 |
88 | // Sizing
89 | &.input-sm {
90 | padding: $padding-small-vertical $padding-small-horizontal;
91 | font-size: $font-size-small;
92 | border-radius: $input-border-radius-small;
93 | }
94 | &.input-lg {
95 | padding: $padding-large-vertical $padding-large-horizontal;
96 | font-size: $font-size-large;
97 | border-radius: $input-border-radius-large;
98 | }
99 |
100 | // Nuke default margins from checkboxes and radios to vertically center within.
101 | input[type="radio"],
102 | input[type="checkbox"] {
103 | margin-top: 0;
104 | }
105 | }
106 |
107 | // Reset rounded corners
108 | .input-group .form-control:first-child,
109 | .input-group-addon:first-child,
110 | .input-group-btn:first-child > .btn,
111 | .input-group-btn:first-child > .btn-group > .btn,
112 | .input-group-btn:first-child > .dropdown-toggle,
113 | .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
114 | .input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
115 | @include border-right-radius(0);
116 | }
117 | .input-group-addon:first-child {
118 | border-right: 0;
119 | }
120 | .input-group .form-control:last-child,
121 | .input-group-addon:last-child,
122 | .input-group-btn:last-child > .btn,
123 | .input-group-btn:last-child > .btn-group > .btn,
124 | .input-group-btn:last-child > .dropdown-toggle,
125 | .input-group-btn:first-child > .btn:not(:first-child),
126 | .input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
127 | @include border-left-radius(0);
128 | }
129 | .input-group-addon:last-child {
130 | border-left: 0;
131 | }
132 |
133 | // Button input groups
134 | // -------------------------
135 | .input-group-btn {
136 | position: relative;
137 | // Jankily prevent input button groups from wrapping with `white-space` and
138 | // `font-size` in combination with `inline-block` on buttons.
139 | font-size: 0;
140 | white-space: nowrap;
141 |
142 | // Negative margin for spacing, position for bringing hovered/focused/actived
143 | // element above the siblings.
144 | > .btn {
145 | position: relative;
146 | + .btn {
147 | margin-left: -1px;
148 | }
149 | // Bring the "active" button to the front
150 | &:hover,
151 | &:focus,
152 | &:active {
153 | z-index: 2;
154 | }
155 | }
156 |
157 | // Negative margin to only have a 1px border between the two
158 | &:first-child {
159 | > .btn,
160 | > .btn-group {
161 | margin-right: -1px;
162 | }
163 | }
164 | &:last-child {
165 | > .btn,
166 | > .btn-group {
167 | z-index: 2;
168 | margin-left: -1px;
169 | }
170 | }
171 | }
172 |
--------------------------------------------------------------------------------
/assets/styles/bootstrap/bootstrap/_responsive-utilities.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Responsive: Utility classes
3 | // --------------------------------------------------
4 |
5 |
6 | // IE10 in Windows (Phone) 8
7 | //
8 | // Support for responsive views via media queries is kind of borked in IE10, for
9 | // Surface/desktop in split view and for Windows Phone 8. This particular fix
10 | // must be accompanied by a snippet of JavaScript to sniff the user agent and
11 | // apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at
12 | // our Getting Started page for more information on this bug.
13 | //
14 | // For more information, see the following:
15 | //
16 | // Issue: https://github.com/twbs/bootstrap/issues/10497
17 | // Docs: http://getbootstrap.com/getting-started/#support-ie10-width
18 | // Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
19 | // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
20 |
21 | @at-root {
22 | @-ms-viewport {
23 | width: device-width;
24 | }
25 | }
26 |
27 |
28 | // Visibility utilities
29 | // Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0
30 |
31 | @include responsive-invisibility('.visible-xs');
32 | @include responsive-invisibility('.visible-sm');
33 | @include responsive-invisibility('.visible-md');
34 | @include responsive-invisibility('.visible-lg');
35 |
36 | .visible-xs-block,
37 | .visible-xs-inline,
38 | .visible-xs-inline-block,
39 | .visible-sm-block,
40 | .visible-sm-inline,
41 | .visible-sm-inline-block,
42 | .visible-md-block,
43 | .visible-md-inline,
44 | .visible-md-inline-block,
45 | .visible-lg-block,
46 | .visible-lg-inline,
47 | .visible-lg-inline-block {
48 | display: none !important;
49 | }
50 |
51 | @media (max-width: $screen-xs-max) {
52 | @include responsive-visibility('.visible-xs');
53 | }
54 | .visible-xs-block {
55 | @media (max-width: $screen-xs-max) {
56 | display: block !important;
57 | }
58 | }
59 | .visible-xs-inline {
60 | @media (max-width: $screen-xs-max) {
61 | display: inline !important;
62 | }
63 | }
64 | .visible-xs-inline-block {
65 | @media (max-width: $screen-xs-max) {
66 | display: inline-block !important;
67 | }
68 | }
69 |
70 | @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
71 | @include responsive-visibility('.visible-sm');
72 | }
73 | .visible-sm-block {
74 | @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
75 | display: block !important;
76 | }
77 | }
78 | .visible-sm-inline {
79 | @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
80 | display: inline !important;
81 | }
82 | }
83 | .visible-sm-inline-block {
84 | @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
85 | display: inline-block !important;
86 | }
87 | }
88 |
89 | @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
90 | @include responsive-visibility('.visible-md');
91 | }
92 | .visible-md-block {
93 | @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
94 | display: block !important;
95 | }
96 | }
97 | .visible-md-inline {
98 | @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
99 | display: inline !important;
100 | }
101 | }
102 | .visible-md-inline-block {
103 | @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
104 | display: inline-block !important;
105 | }
106 | }
107 |
108 | @media (min-width: $screen-lg-min) {
109 | @include responsive-visibility('.visible-lg');
110 | }
111 | .visible-lg-block {
112 | @media (min-width: $screen-lg-min) {
113 | display: block !important;
114 | }
115 | }
116 | .visible-lg-inline {
117 | @media (min-width: $screen-lg-min) {
118 | display: inline !important;
119 | }
120 | }
121 | .visible-lg-inline-block {
122 | @media (min-width: $screen-lg-min) {
123 | display: inline-block !important;
124 | }
125 | }
126 |
127 | @media (max-width: $screen-xs-max) {
128 | @include responsive-invisibility('.hidden-xs');
129 | }
130 |
131 | @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
132 | @include responsive-invisibility('.hidden-sm');
133 | }
134 |
135 | @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
136 | @include responsive-invisibility('.hidden-md');
137 | }
138 |
139 | @media (min-width: $screen-lg-min) {
140 | @include responsive-invisibility('.hidden-lg');
141 | }
142 |
143 |
144 | // Print utilities
145 | //
146 | // Media queries are placed on the inside to be mixin-friendly.
147 |
148 | // Note: Deprecated .visible-print as of v3.2.0
149 |
150 | @include responsive-invisibility('.visible-print');
151 |
152 | @media print {
153 | @include responsive-visibility('.visible-print');
154 | }
155 | .visible-print-block {
156 | display: none !important;
157 |
158 | @media print {
159 | display: block !important;
160 | }
161 | }
162 | .visible-print-inline {
163 | display: none !important;
164 |
165 | @media print {
166 | display: inline !important;
167 | }
168 | }
169 | .visible-print-inline-block {
170 | display: none !important;
171 |
172 | @media print {
173 | display: inline-block !important;
174 | }
175 | }
176 |
177 | @media print {
178 | @include responsive-invisibility('.hidden-print');
179 | }
180 |
--------------------------------------------------------------------------------
/assets/styles/bootstrap/bootstrap/_tables.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Tables
3 | // --------------------------------------------------
4 |
5 |
6 | table {
7 | background-color: $table-bg;
8 | }
9 | caption {
10 | padding-top: $table-cell-padding;
11 | padding-bottom: $table-cell-padding;
12 | color: $text-muted;
13 | text-align: left;
14 | }
15 | th {
16 | text-align: left;
17 | }
18 |
19 |
20 | // Baseline styles
21 |
22 | .table {
23 | width: 100%;
24 | max-width: 100%;
25 | margin-bottom: $line-height-computed;
26 | // Cells
27 | > thead,
28 | > tbody,
29 | > tfoot {
30 | > tr {
31 | > th,
32 | > td {
33 | padding: $table-cell-padding;
34 | line-height: $line-height-base;
35 | vertical-align: top;
36 | border-top: 1px solid $table-border-color;
37 | }
38 | }
39 | }
40 | // Bottom align for column headings
41 | > thead > tr > th {
42 | vertical-align: bottom;
43 | border-bottom: 2px solid $table-border-color;
44 | }
45 | // Remove top border from thead by default
46 | > caption + thead,
47 | > colgroup + thead,
48 | > thead:first-child {
49 | > tr:first-child {
50 | > th,
51 | > td {
52 | border-top: 0;
53 | }
54 | }
55 | }
56 | // Account for multiple tbody instances
57 | > tbody + tbody {
58 | border-top: 2px solid $table-border-color;
59 | }
60 |
61 | // Nesting
62 | .table {
63 | background-color: $body-bg;
64 | }
65 | }
66 |
67 |
68 | // Condensed table w/ half padding
69 |
70 | .table-condensed {
71 | > thead,
72 | > tbody,
73 | > tfoot {
74 | > tr {
75 | > th,
76 | > td {
77 | padding: $table-condensed-cell-padding;
78 | }
79 | }
80 | }
81 | }
82 |
83 |
84 | // Bordered version
85 | //
86 | // Add borders all around the table and between all the columns.
87 |
88 | .table-bordered {
89 | border: 1px solid $table-border-color;
90 | > thead,
91 | > tbody,
92 | > tfoot {
93 | > tr {
94 | > th,
95 | > td {
96 | border: 1px solid $table-border-color;
97 | }
98 | }
99 | }
100 | > thead > tr {
101 | > th,
102 | > td {
103 | border-bottom-width: 2px;
104 | }
105 | }
106 | }
107 |
108 |
109 | // Zebra-striping
110 | //
111 | // Default zebra-stripe styles (alternating gray and transparent backgrounds)
112 |
113 | .table-striped {
114 | > tbody > tr:nth-of-type(odd) {
115 | background-color: $table-bg-accent;
116 | }
117 | }
118 |
119 |
120 | // Hover effect
121 | //
122 | // Placed here since it has to come after the potential zebra striping
123 |
124 | .table-hover {
125 | > tbody > tr:hover {
126 | background-color: $table-bg-hover;
127 | }
128 | }
129 |
130 |
131 | // Table cell sizing
132 | //
133 | // Reset default table behavior
134 |
135 | table col[class*="col-"] {
136 | position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
137 | float: none;
138 | display: table-column;
139 | }
140 | table {
141 | td,
142 | th {
143 | &[class*="col-"] {
144 | position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
145 | float: none;
146 | display: table-cell;
147 | }
148 | }
149 | }
150 |
151 |
152 | // Table backgrounds
153 | //
154 | // Exact selectors below required to override `.table-striped` and prevent
155 | // inheritance to nested tables.
156 |
157 | // Generate the contextual variants
158 | @include table-row-variant('active', $table-bg-active);
159 | @include table-row-variant('success', $state-success-bg);
160 | @include table-row-variant('info', $state-info-bg);
161 | @include table-row-variant('warning', $state-warning-bg);
162 | @include table-row-variant('danger', $state-danger-bg);
163 |
164 |
165 | // Responsive tables
166 | //
167 | // Wrap your tables in `.table-responsive` and we'll make them mobile friendly
168 | // by enabling horizontal scrolling. Only applies <768px. Everything above that
169 | // will display normally.
170 |
171 | .table-responsive {
172 | overflow-x: auto;
173 | min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)
174 |
175 | @media screen and (max-width: $screen-xs-max) {
176 | width: 100%;
177 | margin-bottom: ($line-height-computed * 0.75);
178 | overflow-y: hidden;
179 | -ms-overflow-style: -ms-autohiding-scrollbar;
180 | border: 1px solid $table-border-color;
181 |
182 | // Tighten up spacing
183 | > .table {
184 | margin-bottom: 0;
185 |
186 | // Ensure the content doesn't wrap
187 | > thead,
188 | > tbody,
189 | > tfoot {
190 | > tr {
191 | > th,
192 | > td {
193 | white-space: nowrap;
194 | }
195 | }
196 | }
197 | }
198 |
199 | // Special overrides for the bordered tables
200 | > .table-bordered {
201 | border: 0;
202 |
203 | // Nuke the appropriate borders so that the parent can handle them
204 | > thead,
205 | > tbody,
206 | > tfoot {
207 | > tr {
208 | > th:first-child,
209 | > td:first-child {
210 | border-left: 0;
211 | }
212 | > th:last-child,
213 | > td:last-child {
214 | border-right: 0;
215 | }
216 | }
217 | }
218 |
219 | // Only nuke the last row's bottom-border in `tbody` and `tfoot` since
220 | // chances are there will be only one `tr` in a `thead` and that would
221 | // remove the border altogether.
222 | > tbody,
223 | > tfoot {
224 | > tr:last-child {
225 | > th,
226 | > td {
227 | border-bottom: 0;
228 | }
229 | }
230 | }
231 |
232 | }
233 | }
234 | }
235 |
--------------------------------------------------------------------------------
/assets/styles/bootstrap/bootstrap/_dropdowns.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Dropdown menus
3 | // --------------------------------------------------
4 |
5 |
6 | // Dropdown arrow/caret
7 | .caret {
8 | display: inline-block;
9 | width: 0;
10 | height: 0;
11 | margin-left: 2px;
12 | vertical-align: middle;
13 | border-top: $caret-width-base dashed;
14 | border-top: $caret-width-base solid \9; // IE8
15 | border-right: $caret-width-base solid transparent;
16 | border-left: $caret-width-base solid transparent;
17 | }
18 |
19 | // The dropdown wrapper (div)
20 | .dropup,
21 | .dropdown {
22 | position: relative;
23 | }
24 |
25 | // Prevent the focus on the dropdown toggle when closing dropdowns
26 | .dropdown-toggle:focus {
27 | outline: 0;
28 | }
29 |
30 | // The dropdown menu (ul)
31 | .dropdown-menu {
32 | position: absolute;
33 | top: 100%;
34 | left: 0;
35 | z-index: $zindex-dropdown;
36 | display: none; // none by default, but block on "open" of the menu
37 | float: left;
38 | min-width: 160px;
39 | padding: 5px 0;
40 | margin: 2px 0 0; // override default ul
41 | list-style: none;
42 | font-size: $font-size-base;
43 | text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
44 | background-color: $dropdown-bg;
45 | border: 1px solid $dropdown-fallback-border; // IE8 fallback
46 | border: 1px solid $dropdown-border;
47 | border-radius: $border-radius-base;
48 | @include box-shadow(0 6px 12px rgba(0,0,0,.175));
49 | background-clip: padding-box;
50 |
51 | // Aligns the dropdown menu to right
52 | //
53 | // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
54 | &.pull-right {
55 | right: 0;
56 | left: auto;
57 | }
58 |
59 | // Dividers (basically an hr) within the dropdown
60 | .divider {
61 | @include nav-divider($dropdown-divider-bg);
62 | }
63 |
64 | // Links within the dropdown menu
65 | > li > a {
66 | display: block;
67 | padding: 3px 20px;
68 | clear: both;
69 | font-weight: normal;
70 | line-height: $line-height-base;
71 | color: $dropdown-link-color;
72 | white-space: nowrap; // prevent links from randomly breaking onto new lines
73 | }
74 | }
75 |
76 | // Hover/Focus state
77 | .dropdown-menu > li > a {
78 | &:hover,
79 | &:focus {
80 | text-decoration: none;
81 | color: $dropdown-link-hover-color;
82 | background-color: $dropdown-link-hover-bg;
83 | }
84 | }
85 |
86 | // Active state
87 | .dropdown-menu > .active > a {
88 | &,
89 | &:hover,
90 | &:focus {
91 | color: $dropdown-link-active-color;
92 | text-decoration: none;
93 | outline: 0;
94 | background-color: $dropdown-link-active-bg;
95 | }
96 | }
97 |
98 | // Disabled state
99 | //
100 | // Gray out text and ensure the hover/focus state remains gray
101 |
102 | .dropdown-menu > .disabled > a {
103 | &,
104 | &:hover,
105 | &:focus {
106 | color: $dropdown-link-disabled-color;
107 | }
108 |
109 | // Nuke hover/focus effects
110 | &:hover,
111 | &:focus {
112 | text-decoration: none;
113 | background-color: transparent;
114 | background-image: none; // Remove CSS gradient
115 | @include reset-filter;
116 | cursor: $cursor-disabled;
117 | }
118 | }
119 |
120 | // Open state for the dropdown
121 | .open {
122 | // Show the menu
123 | > .dropdown-menu {
124 | display: block;
125 | }
126 |
127 | // Remove the outline when :focus is triggered
128 | > a {
129 | outline: 0;
130 | }
131 | }
132 |
133 | // Menu positioning
134 | //
135 | // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
136 | // menu with the parent.
137 | .dropdown-menu-right {
138 | left: auto; // Reset the default from `.dropdown-menu`
139 | right: 0;
140 | }
141 | // With v3, we enabled auto-flipping if you have a dropdown within a right
142 | // aligned nav component. To enable the undoing of that, we provide an override
143 | // to restore the default dropdown menu alignment.
144 | //
145 | // This is only for left-aligning a dropdown menu within a `.navbar-right` or
146 | // `.pull-right` nav component.
147 | .dropdown-menu-left {
148 | left: 0;
149 | right: auto;
150 | }
151 |
152 | // Dropdown section headers
153 | .dropdown-header {
154 | display: block;
155 | padding: 3px 20px;
156 | font-size: $font-size-small;
157 | line-height: $line-height-base;
158 | color: $dropdown-header-color;
159 | white-space: nowrap; // as with > li > a
160 | }
161 |
162 | // Backdrop to catch body clicks on mobile, etc.
163 | .dropdown-backdrop {
164 | position: fixed;
165 | left: 0;
166 | right: 0;
167 | bottom: 0;
168 | top: 0;
169 | z-index: ($zindex-dropdown - 10);
170 | }
171 |
172 | // Right aligned dropdowns
173 | .pull-right > .dropdown-menu {
174 | right: 0;
175 | left: auto;
176 | }
177 |
178 | // Allow for dropdowns to go bottom up (aka, dropup-menu)
179 | //
180 | // Just add .dropup after the standard .dropdown class and you're set, bro.
181 | // TODO: abstract this so that the navbar fixed styles are not placed here?
182 |
183 | .dropup,
184 | .navbar-fixed-bottom .dropdown {
185 | // Reverse the caret
186 | .caret {
187 | border-top: 0;
188 | border-bottom: $caret-width-base dashed;
189 | border-bottom: $caret-width-base solid \9; // IE8
190 | content: "";
191 | }
192 | // Different positioning for bottom up menu
193 | .dropdown-menu {
194 | top: auto;
195 | bottom: 100%;
196 | margin-bottom: 2px;
197 | }
198 | }
199 |
200 |
201 | // Component alignment
202 | //
203 | // Reiterate per navbar.less and the modified component alignment there.
204 |
205 | @media (min-width: $grid-float-breakpoint) {
206 | .navbar-right {
207 | .dropdown-menu {
208 | right: 0; left: auto;
209 | }
210 | // Necessary for overrides of the default right aligned menu.
211 | // Will remove come v4 in all likelihood.
212 | .dropdown-menu-left {
213 | left: 0; right: auto;
214 | }
215 | }
216 | }
217 |
--------------------------------------------------------------------------------