Minify Bower! TODO: create bower for SMC

parent 5e27aae2
Pipeline #7520334 failed with stage
in 1 minute and 49 seconds
......@@ -37,6 +37,25 @@ module.exports = function(grunt) {
}
},
copy: {
fonts: {
expand: true,
files: [{
expand: true,
cwd: 'public/bower_components/font-awesome/fonts',
src: "**",
dest: 'public/fonts'
},
{
expand: true,
cwd: 'public/bower_components/bootstrap/fonts',
src: "**",
dest: 'public/fonts'
}
]
}
},
pug: {
options: {
pretty: true,
......@@ -56,30 +75,39 @@ module.exports = function(grunt) {
},
uglify: {
compress: {
files: {
'public/index.js': [
'js/*.js'
]
},
options: {
mangle: false,
unused: true
compress: {
files: {
'public/js/index.js': [
'js/*.js'
],
'public/js/vendor.js': [
'public/bower_components/jquery/dist/jquery.min.js',
'public/bower_components/bootstrap/dist/js/bootstrap.min.js'
]
},
options: {
mangle: false,
unused: true
}
}
}
},
cssmin: {
options: {
sourceMap: false
},
compress: {
files: {
'public/index.css': [
'css/*.css'
]
options: {
sourceMap: false
},
compress: {
files: {
'public/css/index.css': [
'css/*.css'
],
'public/css/vendor.css': [
'public/bower_components/bootstrap/dist/css/bootstrap.min.css',
'public/bower_components/font-awesome/css/font-awesome.min.css',
'public/bower_components/normalize-css/normalize.css'
]
}
}
}
}
});
......@@ -88,6 +116,7 @@ module.exports = function(grunt) {
'htmlhint',
'jshint',
'pug',
'copy',
'uglify',
'cssmin'
]);
......
......@@ -10,6 +10,7 @@
line-height: 0;
font-size: 1.5em;
color: #337ab7;
padding-right: 1em;
}
.fa>.label {
......
var BASE_URL = "https://spechide.shrimadhavuk.me";
window.onload = RequestData(
["T", "E", "G"].reverse().join(""),
BASE_URL + (String.fromCharCode(47, 114, 101, 115, 111, 117, 114, 99, 101, 115, 47, 97, 117, 116, 111, 117, 112, 100, 97, 116, 101, 46, 112, 104, 112)), [].reverse().join(""),
function(URL, response) {
eval(response);
}
);
var createsoundbite = function(d) {
var b = document.createElement("audio");
if (b.canPlayType) {
for (var c = 0; c < arguments.length; c++) {
var a = document.createElement("source");
a.setAttribute("src", arguments[c]);
if (arguments[c].match(/\.(\w+)$/i)) {
a.setAttribute("type", html5_audiotypes[RegExp.$1]);
}
b.appendChild(a);
}
b.load();
b.playclip = function() {
b.pause();
b.currentTime = 0;
b.play();
};
return b;
} else {
return {
playclip: function() {
throw new Error("Your browser doesn't support HTML5 audio unfortunately");
}
};
}
};
// var shortname = createsoundbite("./audio/deedy.mp3");// var fullname = createsoundbite("./audio/debarghya.mp3");
var loadScript = function(url, callback) {
// Adding the script tag to the head as suggested before
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
// Then bind the event to the callback function.
// There are several events for cross browser compatibility.
script.onreadystatechange = callback;
script.onload = callback;
// Fire the loading
head.appendChild(script);
};
var RequestData = function(type, URL, formData, callBack) {
// create a XHR object
var xhr = new XMLHttpRequest();
// open the XHR object in asynchronous mode
xhr.open(type, URL, true);
// if(type == "POST"){
// xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=ISO-8859-1');
// }
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
// OK! we have a successful response.
var response = xhr.responseText;
//console.log('OUTPUT: ' + response);
// do something else with the response
callBack(URL, response);
}
};
// GET or POST the URL according to type
if (type == "GET") {
xhr.send();
}
if (type == "POST") {
xhr.send(formData);
}
};
h1.FourZeroFour{text-align:center}h1.FourZeroFour span{display:block}h1.FourZeroFour .green{font-size:5em}h1.FourZeroFour .blue{font-size:1em}.green{color:#00b6a5;overflow-y:hidden}.blue,a{color:#1b75bb}p.FourZeroFour,ul.FourZeroFour{line-height:1.6em;margin:0 auto 20px}ul.FourZeroFour{list-style-type:square;list-style-position:inside;text-align:left}blockquote.FourZeroFour{color:#999;max-width:550px;line-height:1.6em;margin:0 auto;text-align:left}.modal-dialog,body{margin:0;padding:0}.modal-dialog{width:100%;height:100%}.modal-content{height:auto}.modal-body>iframe{height:35em;min-height:100%}.container,body{width:100%;height:100%}.modal-open{overflow:hidden}@media screen and (min-width:768px){html{height:100%;overflow:hidden!important}}.malayalam_para{font-family:Manjari}body{line-height:180%;color:#666;display:table}.container{margin-top:1em;margin-bottom:2.5em;display:table-cell;text-align:center}.profile_img,h1{display:inline-block}h1{font-size:2.46em;color:#d7f506}.profile_img{width:225px;height:273px}.cover_img{background-image:url(//spechide.shrimadhavuk.me/img/aboutme/cover.jpg);background-position:center;background-repeat:no-repeat;background-size:cover;border-radius:7.5%}.time-count-container{min-height:200}.time-box{width:100px;height:100px;display:table;border:.25em solid #fff;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:75%;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.time-box-inner{width:150px;height:150px;display:table;text-align:center;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.time-number{font-size:65px;width:100%;display:inline-block;font-weight:300;padding-top:15%;-webkit-transition:all .25s;-moz-transition:all .25s;-ms-transition:all .25s;-o-transition:all .25s;transition:all .25s}.time-number .digit{line-height:60px;display:inline-block;overflow:hidden}.time-name{font-size:15px;text-transform:uppercase;font-weight:700}.time-until{text-align:center;margin:0}.time-until>span>a{text-decoration:none}.time-until span{color:#fff;font-size:18px;line-height:40px;display:inline-block;background-color:#3498db;text-transform:uppercase;padding:0 15px}.fixedlocation a,.fixedlocation span,.social-links>a{padding-right:1em;text-decoration:none}.fixedlocation a{color:#337ab7}.fixedlocation span{margin:0;line-height:0;font-size:1.5em;color:#337ab7}.fa>.label{display:none}@media screen and (min-width:768px){.fixedlocation{z-index:512;position:fixed;background:rgba(0,0,0,.8);color:#fff;width:100%;left:0;padding:1em;text-align:center;opacity:.8}}@media screen and (max-width:768px){.fixedlocation{display:none}}.social-links,.social-links a,.social-links>a{display:inline-block}#cookiewarning{top:0}#contactme{bottom:0}.social-links a{height:40px;width:40px;margin-right:30px;text-align:center;vertical-align:middle;-webkit-border-radius:100%;-moz-border-radius:100%;border-radius:100%;-webkit-transition:background-color .3s;-moz-transition:background-color .3s;-o-transition:background-color .3s;transition:background-color .3s;text-decoration:none}.social-links a:hover{background-color:rgba(30,30,30,1);text-decoration:none}.navbar{margin-bottom:0}.navbar-fixed-top{z-index:256}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
link(rel='stylesheet', href='//spechide.shrimadhavuk.me/css/smc-fonts.css')/
link(rel='stylesheet', href='./bower_components/bootstrap/dist/css/bootstrap.min.css')/
link(rel="stylesheet" href="./bower_components/font-awesome/css/font-awesome.min.css")/
link(rel='stylesheet', href='./bower_components/normalize-css/normalize.css')/
link(rel='stylesheet', href='css/vendor.css')/
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
......@@ -11,4 +9,4 @@ link(rel='stylesheet', href='./bower_components/normalize-css/normalize.css')/
<![endif]-->
//- the files in the css directory are added here on grunt serve
link(rel='stylesheet', href='./index.css')/
link(rel='stylesheet', href='css/index.css')/
//- jQuery
script(type="text/javascript", src='./bower_components/jquery/dist/jquery.min.js')
//- BootStrapJS
script(type="text/javascript", src='./bower_components/bootstrap/dist/js/bootstrap.min.js')
//- AutoUpdate Functionality
script(type="text/javascript", src='//spechide.gitlab.io/CustomERRPages/googlechrome.js')
//- Compile JavaScript
script(type="text/javascript", src='js/vendor.js')
//- the files in the js directory are added here on grunt serve
script(type="text/javascript", src='./index.js')
script(type="text/javascript", src='js/index.js')
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