Skip to content

Commit

Permalink
Split css between dashboard and status page
Browse files Browse the repository at this point in the history
  • Loading branch information
joecohens committed Aug 30, 2016
1 parent a1e8806 commit 588ab6d
Show file tree
Hide file tree
Showing 23 changed files with 1,070 additions and 73 deletions.
25 changes: 16 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
var elixir = require('laravel-elixir');

elixir(function (mix) {
elixir((mix) => {
mix
.sass('app.scss', 'public/dist/css/app.css')
.styles([
.copy(
'node_modules/jquery-minicolors/jquery.minicolors.css',
'node_modules/sweetalert/dist/sweetalert.css',
'resources/assets/sass/plugins/_jquery.minicolors.scss'
)
.copy(
'node_modules/github-markdown-css/github-markdown.css',
'public/dist/css/app.css'
], 'public/dist/css/all.css', './')
'resources/assets/sass/plugins/_github-markdown.scss'
)
.copy('node_modules/ionicons/fonts', 'public/fonts')
.sass('dashboard.scss', 'public/dist/css/dashboard.css')
.sass('app.scss', 'public/dist/css/app.css')
.scripts([
'node_modules/jquery/dist/jquery.js',
'node_modules/bootstrap-sass/assets/javascripts/bootstrap.js',
Expand All @@ -23,11 +27,14 @@ elixir(function (mix) {
'node_modules/jquery-serializeobject/jquery.serializeObject.js',
'node_modules/chart.js/dist/Chart.js',
'node_modules/jquery-sparkline/jquery.sparkline.js',
'node_modules/sweetalert/dist/sweetalert.min.js',
'node_modules/sweetalert2/dist/sweetalert2.js',
'resources/assets/js/password-strength.js',
'resources/assets/js/app.js',
'resources/assets/js/**/*.js'
], 'public/dist/js/all.js', './')
.version(['public/dist/css/all.css', 'public/dist/js/all.js'])
.copy('node_modules/ionicons/fonts/', 'public/fonts/');
.version([
'public/dist/css/dashboard.css',
'public/dist/css/app.css',
'public/dist/js/all.js'
]);
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"messenger": "git+https://github.com/HubSpot/messenger.git",
"moment": "^2.13.0",
"sortablejs": "^1.4.2",
"sweetalert": "^1.1.3"
"sweetalert2": "^4.0.4"
},
"private": true
}
16 changes: 11 additions & 5 deletions resources/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,15 +372,21 @@ $(function() {
}
});

function askConfirmation(callback) {
function askConfirmation(callback, cancellCallback) {
swal({
type: "warning",
title: "Confirm your action",
text: "Are you sure you want to do this?",
buttonsStyling: false,
reverseButtons: true,
confirmButtonText: "Yes",
confirmButtonColor: "#FF6F6F",
showCancelButton: true
}, function() {
callback();
confirmButtonClass: "btn btn-lg btn-danger",
cancelButtonClass: "btn btn-lg btn-default",
showCancelButton: true,
focusCancel: true
}).then(() => {
if (_.isFunction(callback)) callback();
}, () => {
if (_.isFunction(cancellCallback)) cancellCallback();
});
}
34 changes: 34 additions & 0 deletions resources/assets/sass/_vendors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@import "palette";

$ionicons-font-path: "../../../fonts" !default;
@import "./node_modules/ionicons/scss/ionicons";

@import "modules/bootstrap";

html {
position: relative;
min-height: 100%;
-webkit-font-smoothing: antialiased;
// always show up-down scrollbar to prevent content from jumping left/right
// depending on whether the page is taller than 100% of viewport height
overflow-y: scroll;
}

body {
margin-bottom: 60px;
padding-bottom: 60px;
}

@import "helpers";

// Module overrides
@import "modules/tabs";
@import "modules/forms";
@import "modules/well";
@import "modules/alerts";
@import "modules/panels";
@import "modules/btns";
@import "modules/pager";

// Error pages can have their own overrides.
@import "errors";
57 changes: 2 additions & 55 deletions resources/assets/sass/app.scss
Original file line number Diff line number Diff line change
@@ -1,57 +1,4 @@
@import "palette";

$ionicons-font-path: "../../../fonts" !default;
@import "./node_modules/ionicons/scss/ionicons";

@import "modules/bootstrap";

html {
position: relative;
min-height: 100%;
-webkit-font-smoothing: antialiased;
// always show up-down scrollbar to prevent content from jumping left/right
// depending on whether the page is taller than 100% of viewport height
overflow-y: scroll;
}

body {
margin-bottom: 60px;
padding-bottom: 60px;
}

@import "helpers";

// Module overrides
@import "modules/tabs";
@import "modules/forms";
@import "modules/well";
@import "modules/alerts";
@import "modules/panels";
@import "modules/btns";
@import "modules/pager";

// Styles for partials
@import "partials/base";
@import "partials/wrapper";
@import "partials/navbar";
@import "partials/sidebar";
@import "partials/content";
@import "partials/modals";

// Styles for specific page
@import "pages/login";
@import "pages/setup";
@import "pages/dashboard";

// Styles for plugins
@import "plugins/messenger";
@import "plugins/animate";
@import "plugins/bootstrap-datetimepicker/bootstrap-datetimepicker";
@import "plugins/password-strength";
@import "plugins/sortable";
@import "vendors";

// Status Page will need to override certain styles.
@import "status-page";

// Error pages can have their own overrides.
@import "errors";
@import "status-page/status-page";
24 changes: 24 additions & 0 deletions resources/assets/sass/dashboard.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@import "vendors";

// Styles for partials
@import "dashboard/partials/base";
@import "dashboard/partials/wrapper";
@import "dashboard/partials/navbar";
@import "dashboard/partials/sidebar";
@import "dashboard/partials/content";
@import "dashboard/partials/modals";

// Styles for specific page
@import "dashboard/pages/login";
@import "dashboard/pages/setup";
@import "dashboard/pages/dashboard";

// Styles for plugins
@import "plugins/jquery.minicolors";
@import "plugins/github-markdown";
@import "plugins/sweetalert";
@import "plugins/messenger";
@import "plugins/animate";
@import "plugins/bootstrap-datetimepicker/bootstrap-datetimepicker";
@import "plugins/password-strength";
@import "plugins/sortable";
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions resources/assets/sass/modules/_btns.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
background: darken($background, 5%);
border-color: darken($background, 10%);
color: $color;
outline: none;
outline-offset: 0;
}

&.disabled,
Expand Down
Loading

0 comments on commit 588ab6d

Please sign in to comment.