css and stuff
This commit is contained in:
parent
b9767805a8
commit
eb29d8ffae
@ -1,16 +1,109 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: 'seven';
|
||||||
|
src: url('./font.ttf');
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: "seven";
|
||||||
|
background-image: url('./bg.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: 0%;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
#main {
|
#main {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
width: 66%;
|
width: 66%;
|
||||||
background-color: red;
|
background-color: #CFAB5D;
|
||||||
padding: 2%;
|
padding: 2%;
|
||||||
|
padding-bottom: 3.5%;
|
||||||
margin-top: 2%;
|
margin-top: 2%;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
|
height: 135px;
|
||||||
|
|
||||||
|
-webkit-box-shadow: 5px 5px 6px 2px #01030F;
|
||||||
|
box-shadow: 5px 5px 6px 2px #01030F;
|
||||||
|
}
|
||||||
|
|
||||||
|
.-autocomplete-container {
|
||||||
|
top: 35% !important;
|
||||||
|
background-color: #FCEDD1 !important;
|
||||||
|
width: 66% !important;
|
||||||
|
border-radius: 15px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.options {
|
||||||
|
padding-top: 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.-autocomplete-item.selected {
|
||||||
|
background-color: #85351C !important;
|
||||||
|
border-radius : 15px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#spin {
|
#spin {
|
||||||
margin-left: 10%;
|
float: right;
|
||||||
|
margin-top: -1.5%;
|
||||||
|
margin-right: 1;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#legend {
|
#legend {
|
||||||
font-size: 190%;
|
font-size: 190%;
|
||||||
|
font-family: "seven";
|
||||||
|
width: 75%;
|
||||||
|
margin-top: 4.5%;
|
||||||
|
margin-left: 3%;
|
||||||
|
background-color: #FCEDD1;
|
||||||
|
padding-left: 1%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#spin > div {
|
||||||
|
padding-bottom: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#beforespin {
|
||||||
|
background-color: #79B766;
|
||||||
|
border-color: #01030F;
|
||||||
|
}
|
||||||
|
|
||||||
|
#afterspin {
|
||||||
|
background-color: #79B766;
|
||||||
|
border-color: #01030F;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub {
|
||||||
|
background-color: #79B766;
|
||||||
|
|
||||||
|
-webkit-transition: background-color 0.5s ease !important;
|
||||||
|
-moz-transition: background-color 0.5s ease !important;
|
||||||
|
-ms-transition: background-color 0.5s ease !important;
|
||||||
|
-o-transition: background-color 0.5s ease !important;
|
||||||
|
transition: background-color 0.5s ease !important;
|
||||||
|
border-color: #01030F !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add {
|
||||||
|
background-color: #79B766;
|
||||||
|
|
||||||
|
-webkit-transition: background-color 0.5s ease !important;
|
||||||
|
-moz-transition: background-color 0.5s ease !important;
|
||||||
|
-ms-transition: background-color 0.5s ease !important;
|
||||||
|
-o-transition: background-color 0.5s ease !important;
|
||||||
|
transition: background-color 0.5s ease !important;
|
||||||
|
border-color: #01030F !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub:hover {
|
||||||
|
background-color: #537F47 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add:hover {
|
||||||
|
background-color: #537F47 !important;
|
||||||
}
|
}
|
||||||
@ -8,20 +8,23 @@
|
|||||||
|
|
||||||
<template name="hello">
|
<template name="hello">
|
||||||
<div id="main">
|
<div id="main">
|
||||||
{{> inputAutocomplete settings=settings id="legend" class="form-control" name="legend" placeholder="Quote Fragment" }}
|
<h1> Kung Fu Quoting </h1>
|
||||||
|
{{> inputAutocomplete settings=settings id="legend" class="form-control" name="legend" placeholder="Quote" }}
|
||||||
<div id="spin">
|
<div id="spin">
|
||||||
<div>
|
<div id='before'>
|
||||||
<p>Padding Before</p>
|
<p>Padding Before</p>
|
||||||
{{> numberSpinner min=0 max=10 value=0 id="before"}}
|
{{> numberSpinner min=0 max=10 value=0 id="beforespin"}}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div id='after'>
|
||||||
<p>Padding After</p>
|
<p>Padding After</p>
|
||||||
{{> numberSpinner min=0 max=10 value=0 id="after"}}
|
{{> numberSpinner min=0 max=10 value=0 id="afterspin"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="kung">
|
<template name="kung">
|
||||||
{{name}}
|
<div class="options">
|
||||||
|
{{name}}
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -1,10 +1,45 @@
|
|||||||
test = "";
|
function playQuote () {
|
||||||
|
search = document.getElementById('legend').value;
|
||||||
|
before = document.getElementById('beforespin').value;
|
||||||
|
after = document.getElementById('afterspin').value;
|
||||||
|
|
||||||
|
document.getElementById('legend').value = "";
|
||||||
|
document.getElementById('beforespin').value = "0";
|
||||||
|
document.getElementById('afterspin').value = "0";
|
||||||
|
|
||||||
|
|
||||||
|
if (before === "" || before === NaN) {
|
||||||
|
before = 0;
|
||||||
|
} else {
|
||||||
|
before = parseInt(before) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (after === "" || after === NaN) {
|
||||||
|
after = 0;
|
||||||
|
} else {
|
||||||
|
after = parseInt(after) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
search = subtitles.find({"subtitle": search}).fetch()[0];
|
||||||
|
|
||||||
|
start = search['start'];
|
||||||
|
start = start.split(":");
|
||||||
|
start = 1000 * ((60 * 60 * parseInt(start[0])) + (60 * parseInt(start[1])) + parseInt(start[2]));
|
||||||
|
|
||||||
|
|
||||||
|
end = search.end;
|
||||||
|
end = end.split(":")
|
||||||
|
end = 1000 * ((60 * 60 * parseInt(end[0])) + (60 * parseInt(end[1])) + parseInt(end[2])) + 500;
|
||||||
|
|
||||||
|
mySound = new Audio("http://68.56.19.11:5000/getquote?start=" + (start - before) + "&end=" + (end + after) );
|
||||||
|
mySound.play();
|
||||||
|
}
|
||||||
|
|
||||||
Template.hello.helpers({
|
Template.hello.helpers({
|
||||||
settings: function() {
|
settings: function() {
|
||||||
return {
|
return {
|
||||||
position: "bottom",
|
position: "bottom",
|
||||||
limit: 10,
|
limit: 6,
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
token: '',
|
token: '',
|
||||||
@ -15,39 +50,19 @@ Template.hello.helpers({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
|
||||||
sounurl: function() {
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.hello.events({
|
Template.hello.events({
|
||||||
'click button': function() {
|
'click .options': function() {
|
||||||
console.log("clicked");
|
playQuote();
|
||||||
|
|
||||||
},
|
},
|
||||||
'keyup #legend': function(event) {
|
'keyup #legend': function(event) {
|
||||||
search = document.getElementById('legend').value;
|
if (event.which === 13) {
|
||||||
before = document.getElementById('before').value
|
playQuote();
|
||||||
if (before === "" || before === NaN) {
|
};
|
||||||
before = 0;
|
},
|
||||||
} else {
|
|
||||||
before = parseInt(before);
|
|
||||||
}
|
|
||||||
// search = "I figured it out. Skadoosh."
|
|
||||||
search = subtitles.find({"subtitle": search}).fetch()[0];
|
|
||||||
|
|
||||||
start = search.start;
|
|
||||||
start = start.split(":")
|
|
||||||
start = 1000 * ((60 * 60 * parseInt(start[0])) + (60 * parseInt(start[1])) + parseInt(start[2]));
|
|
||||||
|
|
||||||
end = search.end;
|
|
||||||
end = end.split(":")
|
|
||||||
end = 1000 * ((60 * 60 * parseInt(end[0])) + (60 * parseInt(end[1])) + parseInt(end[2])) + 500;
|
|
||||||
|
|
||||||
mySound = new Audio("http://127.0.0.1:5000/getquote?start=" + start + "&end=" + (end + (1000*before)));
|
|
||||||
mySound.play();
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.kung.helpers({
|
Template.kung.helpers({
|
||||||
|
|||||||
BIN
kung-fu-quoting/public/bg.png
Normal file
BIN
kung-fu-quoting/public/bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
BIN
kung-fu-quoting/public/font.ttf
Normal file
BIN
kung-fu-quoting/public/font.ttf
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user