Commit b94008ee authored by Piotr Gawron's avatar Piotr Gawron
Browse files

css is bundled

parent 11fe8bcc
......@@ -3,14 +3,45 @@ var fs = require('fs');
var CleanCSS = require('clean-css');
return new CleanCSS({rebase: false, returnPromise: true}).minify([
"node_modules/jquery-ui/themes/base/jquery.ui.all.css",
"node_modules/bootstrap/dist/css/bootstrap.css",
"node_modules/openlayers/dist/ol.css",
"node_modules/dual-listbox/dist/dual-listbox.css",
"node_modules/multi-checkbox-list/dist/multi-checkbox-list.css",
"src/main/css/global.css"
]).then(function (output) {
var files = [
{source: "node_modules/jquery-ui/themes/base/jquery.ui.all.css", targetBase: "../../minerva/resources/jquery-ui/"},
{source: "node_modules/jstree/dist/themes/default/style.css", targetBase: "../../minerva/resources/jstree/"},
{source: "node_modules/pileup/style/pileup.css"},
{source: "node_modules/bootstrap/dist/css/bootstrap.css"},
{source: "node_modules/openlayers/dist/ol.css"},
{source: "node_modules/dual-listbox/dist/dual-listbox.css"},
{source: "node_modules/multi-checkbox-list/dist/multi-checkbox-list.css"},
{source: "src/main/css/global.css", targetBase: "../../minerva/resources/"}
];
var inputs = [];
for (var i = 0; i < files.length; i++) {
var file = files[i];
var output = new CleanCSS({rebase: false}).minify([file.source]);
if (output.errors.length > 0) {
console.log("Problem with css: ", output.errors);
process.exit(-1);
}
if (output.warnings.length > 0) {
console.log("Problem with css: ", output.warnings);
process.exit(-2);
}
file.content = output.styles;
var tmp = file.source.split("/");
file.filename = tmp[tmp.length - 1];
var input = {};
var base = "./";
if (file.targetBase !== undefined) {
base = file.targetBase;
}
input[base + file.filename] = {styles: file.content};
inputs.push(input);
}
return new CleanCSS({returnPromise: true, rebaseTo: '.'}).minify(inputs).then(function (output) {
if (output.errors.length > 0) {
console.log("Problem with css: ", output.errors);
process.exit(-1);
......
body {
html {
font-size: 14px;
}
h5 {
font-size: 14px;
}
.table > tbody > tr > td,
.table > tbody > tr > th,
.table > tfoot > tr > td,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > thead > tr > th {
padding: 8px;
}
.table {
color: #666;
}
.ui-widget-content a {
text-decoration: underline;
}
......
......@@ -9,25 +9,14 @@
<f:view contentType="text/html">
<h:head>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"/>
<script src="https://twitter.github.io/typeahead.js/releases/latest/typeahead.bundle.min.js" type="text/javascript"/>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" />
<link rel="shortcut icon" href="./resources/images/favicon.png" type="image/png" />
<h:outputScript library="js" name="minerva.js" />
<f:facet name="first">
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
</f:facet>
<h:outputScript library="js" name="minerva.js" />
<h:outputStylesheet library="css" name="style.css" />
<h:outputStylesheet library="css" name="minerva.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/spectrum/1.8.0/spectrum.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/spectrum/1.8.0/spectrum.min.css"/>
<script type="text/javascript">
//<![CDATA[
......@@ -49,12 +38,6 @@ function initMap(){
</script>
</h:head>
<h:body onload="initMap();" >
<f:facet name="last">
<h:outputStylesheet library="css" name="style.css"/>
<h:outputStylesheet library="css" name="pileup.css"/>
<h:outputStylesheet library="css" name="bootstrap.min.css"/>
<h:outputStylesheet library="css" name="minerva.css" />
</f:facet>
<h:outputScript library="primefaces" name="jquery/jquery.js" target="head" />
<div id="minervaAppDiv" style="height: 100%;width: 100%;margin: 0;"/>
......
......@@ -9,21 +9,12 @@
<f:view contentType="text/html">
<h:head>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"/>
<script src="https://twitter.github.io/typeahead.js/releases/latest/typeahead.bundle.min.js" type="text/javascript"/>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css"/>
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" />
<link rel="shortcut icon" href="./resources/images/favicon.png" type="image/png" />
<h:outputScript library="js" name="minerva.js" />
<h:outputScript library="js" name="minerva.js" />
<h:outputStylesheet library="css" name="style.css" />
<h:outputStylesheet library="css" name="minerva.css" />
<script type="text/javascript">
//<![CDATA[
......@@ -44,12 +35,6 @@ function initMap(){
</script>
</h:head>
<h:body onload="initMap();" >
<h:outputStylesheet library="css" name="style.css"/>
<h:outputStylesheet library="css" name="minerva.css" />
<h:outputStylesheet library="css" name="pileup.css"/>
<h:outputStylesheet library="css" name="bootstrap.min.css"/>
<h:outputScript library="primefaces" name="jquery/jquery.js" target="head" />
<div id="minervaAppDiv" style="height: 100%;width: 100%;margin: 0;"/>
</h:body>
......
......@@ -11,7 +11,6 @@
<h:head>
<h:outputStylesheet library="css" name="style.css"/>
<h:outputStylesheet library="css" name="pileup.css"/>
<h:outputStylesheet library="css" name="minerva.css" />
<link rel="shortcut icon" href="./resources/images/favicon.png" type="image/png" />
......
......@@ -11,21 +11,10 @@
<link rel="shortcut icon" href="./resources/images/favicon.png"
type="image/png" />
<script src="https://code.jquery.com/jquery-1.12.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script
src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
<h:outputScript library="js" name="minerva.js" />
<h:outputStylesheet library="css" name="style.css" />
<h:outputStylesheet library="css" name="minerva.css" />
<link rel="stylesheet" type="text/css"
href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" />
<script type="text/javascript">
//<![CDATA[
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment