Added revisioning to assets and added print styles. Closes #23.

This commit is contained in:
Dan Brown 2015-10-22 19:41:49 +01:00
parent d7520f224c
commit 9425f227fe
5 changed files with 44 additions and 6 deletions

1
.gitignore vendored
View File

@ -9,5 +9,6 @@ Homestead.yaml
/public/js
/public/uploads
/public/bower
/public/build
/storage/images
_ide_helper.php

View File

@ -6,6 +6,8 @@ elixir.config.js.browserify.transformers.push({
});
elixir(function(mix) {
mix.sass('styles.scss');
mix.browserify(['jquery-extensions.js', 'global.js'], 'public/js/common.js');
mix.sass('styles.scss')
.sass('print-styles.scss')
.browserify(['jquery-extensions.js', 'global.js'], 'public/js/common.js')
.version(['css/styles.css', 'css/print-styles.css', 'js/common.js']);
});

View File

@ -0,0 +1,34 @@
@import "variables";
header {
display: none;
}
body {
font-size: 12px;
}
.faded-small {
display: none;
}
.page-content {
margin: 0 auto;
}
.print-hidden {
display: none;
}
.print-full-width {
width: 100%;
float: none;
display: block;
}
h2 {
font-size: 2em;
line-height: 1;
margin-top: 0.6em;
margin-bottom: 0.3em;
}

View File

@ -9,7 +9,8 @@
<meta charset="utf-8">
<!-- Styles and Fonts -->
<link rel="stylesheet" href="/css/styles.css">
<link rel="stylesheet" href="{{ elixir('css/styles.css') }}">
<link rel="stylesheet" media="print" href="{{ elixir('css/print-styles.css') }}">
<link href='//fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,300italic,100,300' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/bower/material-design-iconic-font/dist/css/material-design-iconic-font.min.css">
@ -89,6 +90,6 @@
</section>
@yield('bottom')
<script src="/js/common.js"></script>
<script src="{{ elixir('js/common.js') }}"></script>
</body>
</html>

View File

@ -35,7 +35,7 @@
<div class="container">
<div class="row">
<div class="col-md-9">
<div class="col-md-9 print-full-width">
<div class="page-content anim fadeIn">
<div class="pointer-container" id="pointer">
@ -58,7 +58,7 @@
</div>
</div>
<div class="col-md-3">
<div class="col-md-3 print-hidden">
@include('pages/sidebar-tree-list', ['book' => $book])