Use Elixir for compiling SCSS into CSS.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
/bootstrap/compiled.php
|
||||
/vendor
|
||||
/node_modules
|
||||
composer.phar
|
||||
composer.lock
|
||||
.env.*.php
|
||||
|
||||
28
app/helpers.php
Normal file
28
app/helpers.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
if ( ! function_exists('elixir'))
|
||||
{
|
||||
/**
|
||||
* Get the path to a versioned Elixir file.
|
||||
*
|
||||
* @param string $file
|
||||
* @return string
|
||||
*/
|
||||
function elixir($file)
|
||||
{
|
||||
static $manifest = null;
|
||||
|
||||
if (is_null($manifest))
|
||||
{
|
||||
$manifest = json_decode(file_get_contents(public_path().'/build/rev-manifest.json'), true);
|
||||
}
|
||||
|
||||
if (isset($manifest[$file]))
|
||||
{
|
||||
return '/build/'.$manifest[$file];
|
||||
}
|
||||
|
||||
throw new InvalidArgumentException("File {$file} not defined in asset manifest.");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -81,3 +81,5 @@ App::down(function()
|
||||
require app_path().'/filters.php';
|
||||
|
||||
require app_path().'/view-composers.php';
|
||||
|
||||
require app_path().'/helpers.php';
|
||||
|
||||
@@ -10,40 +10,7 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<link href='http://fonts.googleapis.com/css?family=Raleway:400,700,300,600' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
|
||||
<style type='text/css'>
|
||||
body {
|
||||
color: #333333;
|
||||
}
|
||||
.masthead-container {
|
||||
margin: 0 auto;
|
||||
}
|
||||
.masthead-container .masthead {
|
||||
position: relative;
|
||||
margin-bottom: 70px;
|
||||
}
|
||||
.masthead-container .masthead .text-container {
|
||||
background-color: rgba(0,0,0,0.8);
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.masthead-container .masthead .text-container .page-name {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
float: left;
|
||||
color: white;
|
||||
line-height: 37px;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
.masthead-container .masthead .text-container .page-name a {
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="{{ elixir('css/application.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class='container'>
|
||||
|
||||
5
gulpfile.js
Normal file
5
gulpfile.js
Normal file
@@ -0,0 +1,5 @@
|
||||
var elixir = require('laravel-elixir');
|
||||
|
||||
elixir(function(mix) {
|
||||
mix.sass("application.scss").version('css/application.css');
|
||||
});
|
||||
6
package.json
Normal file
6
package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"gulp": "^3.8.8",
|
||||
"laravel-elixir": "*"
|
||||
}
|
||||
}
|
||||
3
public/assets/sass/application.scss
Normal file
3
public/assets/sass/application.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
body {
|
||||
color: #333333;
|
||||
}
|
||||
2
public/build/css/application-ce1dc7c2.css
Normal file
2
public/build/css/application-ce1dc7c2.css
Normal file
@@ -0,0 +1,2 @@
|
||||
body {
|
||||
color: #333333; }
|
||||
2
public/build/css/application.css
Normal file
2
public/build/css/application.css
Normal file
@@ -0,0 +1,2 @@
|
||||
body {
|
||||
color: #333333; }
|
||||
3
public/build/rev-manifest.json
Normal file
3
public/build/rev-manifest.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"css/application.css": "css/application-ce1dc7c2.css"
|
||||
}
|
||||
2
public/css/application.css
Normal file
2
public/css/application.css
Normal file
@@ -0,0 +1,2 @@
|
||||
body {
|
||||
color: #333333; }
|
||||
Reference in New Issue
Block a user