more style

This commit is contained in:
Gustavo Adolfo Mesa Roldán
2020-03-30 03:44:12 +02:00
parent cb5008f0ab
commit 223572f952
12 changed files with 87 additions and 83 deletions
+13 -16
View File
@@ -4,7 +4,6 @@
}
body{
background-image: url(/images/bg.jpg);
height: 100%;
background-position: center;
background-repeat: no-repeat;
@@ -12,12 +11,11 @@ body{
background-attachment: fixed;
overflow-y:scroll;
color: white;
text-shadow: 0px 0px 3px rgb(0, 153, 153);
font-family: ark;
}
#menu{
background: rgba(0, 153, 153, 0.5);
background: rgba(0, 153, 153, 0.6);
width: 150px;
float: left;
padding-top: 50px;
@@ -31,26 +29,29 @@ body{
#menu h4 a, h1{
font-family: ark;
font-weight: bold;
text-shadow: 0px 0px 2px rgb(0, 0, 0);
}
#menu h4 a span, h1 span{
color: black;
}
h2{
font-family: ark;
}
#menu h4 a:hover{
#menu li a:hover, #menu h4 a:hover{
cursor: pointer;
color: rgb(0, 153, 153);
color: black;
}
#menu li a:hover span, #menu h4 a:hover span{
color: white;
}
#menu li a{
cursor: pointer;
}
#menu li a:hover{
color: rgb(0, 153, 153);
text-shadow: 0px 0px 3px rgb(0, 0, 0);
}
#menu li h4{
text-align: center;
}
@@ -97,7 +98,7 @@ label, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_pag
width: 176px;
}
td.options-table{
td.options-table-species, td.options-table{
text-align: center;
}
@@ -105,10 +106,6 @@ td.options-table{
width: 60px;
}
td.options-table-species{
text-align: center;
}
table.info{
margin: auto;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 551 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 KiB

+3 -2
View File
@@ -9,13 +9,14 @@
<script src="/js/jquery.dataTables.min.js"></script>
<script src="/js/raphael.js"></script>
<script src="/js/Treant.js"></script>
<script src="https://rewish.github.io/jquery-bgswitcher/jquery.bgswitcher.js"></script>
<script src="/js/main.js"></script>
<script src="/js/buttons.js"></script>
<script src="/js/functions.js"></script>
<script src="/js/main.js"></script>
</head>
<body>
<nav id="menu" class="text-center">
<h4><a id="home">FamilyARK</a></h4>
<h4><a id="home">Family<span>ARK</span></a></h4>
<ul class="list-unstyled text-center">
<li>&nbsp;</li>
<li><a id="animals">Dinos</a></li>
+13 -22
View File
@@ -17,27 +17,16 @@ $('document').ready(function(){
$("#animals").click(function(){
$("#load").fadeIn(0);
$.get( "/animal", function( data ) {
$.get( "/species", function( species_r ) {
var species = {};
species_r.data.map(function(item) {
species[item._id] = item.name
});
$( "#body" ).html("<h1>Yours Dinos <button id='animal-add' class='btn btn-success btn-sm float-right'>+ New Dino</button></h1><table id='animals-table'></table>");
$( "#body" ).html("<h1>Yours <span>Dinos</span> <button id='animal-add' class='btn btn-success btn-sm float-right'>+ New Dino</button></h1><table id='animals-table'></table>");
$( "#animal-add").click(function(){
$( "#body" ).load( "/templates/animal-form.html", function (){
set_animal_include("");
});
})
dataSet = data.data.map(function(item) {
return [item._id, item.name, item.initial_level + " - " + item.level, species[item.specie]];
});
// dataSet = data.data.reduce(function(acc, item, i) {
// if(i == 1) acc = []
// acc.push([item._id, item.name, item.initial_level + " - " + item.level, species[item.specie]]);
// return acc
// });
dataSet = data.data.map(function(item) {
return [item._id, item.name, item.initial_level + " - " + item.level, species[item.specie].name];
});
$('#animals-table').DataTable({
data: dataSet,
@@ -54,14 +43,17 @@ $('document').ready(function(){
$("#load").fadeOut("fast");
});
});
});
$("#species").click(function(){
$("#load").fadeIn(0);
$.get( "/species", function( data ) {
$( "#body" ).html("<h1>All Species</h1><table id='species-table'></table>");
dataSet = data.data.map(function(item) {
return [item.name, item.description];
});
$( "#body" ).html("<h1>All <span>Species</span></h1><table id='species-table'></table>")
dataSet = [];
for(var i in species){
dataSet.push([species[i].name, species[i].description]);
}
$('#species-table').DataTable({
data: dataSet,
responsive: true,
@@ -72,7 +64,6 @@ $('document').ready(function(){
});
$("#load").fadeOut("fast");
});
});
$("#about").click(function(){
$("#load").fadeIn(0);
+4 -2
View File
@@ -57,13 +57,15 @@ function editAnimal(id){
function showAnimal(id){
$("#load").fadeIn(0);
$( "#body" ).load( "/templates/animal-show.html", function(){
var text = "<table>";
var text = "<table class=\"dataTable\">";
$.get( "/animal/"+ id, function( data ) {
var animal = data.data,
j = 1;
$.each(animal, function(i, val) {
if(i != "_id" && i != "__v" && i != "father" && i != "mother" && i != "name" && i.indexOf("initial") < 0)
if(i == "specie")
text += "<tr><td>"+i+"</td><td>" + species[val].name + "</td></tr>";
else if(i != "_id" && i != "__v" && i != "father" && i != "mother" && i != "name" && i.indexOf("initial") < 0)
text += "<tr><td>"+i+"</td><td>"+(val ? val.$numberDecimal ? val.$numberDecimal : val : "")+"</td></tr>";
// if(j % 3 == 0) text += "</tr><tr>"
j++;
+13 -1
View File
@@ -1,4 +1,10 @@
var species = {};
$('document').ready(function(){
$.get( "/species", function( species_r ) {
species_r.data.map(function(item) {
species[item._id] = item
});
$( "#body" ).load( "/templates/home.html", function(){$("#load").fadeOut("slow");
$.get("/info", function( data ) {
var text = "<table class=\"info\">"
@@ -10,4 +16,10 @@ $('document').ready(function(){
$("#load").fadeOut("slow");
});
});
})
$("body").bgswitcher({
images: ["/images/bg0.jpg", "/images/bg1.jpg", "/images/bg2.jpg", "/images/bg3.jpg", "/images/bg4.jpg"],
loop: true,
duration: 1500
});
});
});
+1 -1
View File
@@ -1,4 +1,4 @@
<h1>Welcome to FamilyARK</h1>
<h1>Welcome to Family<span>ARK</span></h1>
<div class="text-center">
<h4>Your app for your dinos.</h4>
<h4>Inventory, breeding and family.</h4>
+1
View File
@@ -28,6 +28,7 @@ router.get('/species', (req, res, next) => {
})
})
router.get('/animal', (req, res, next) => {
animal.find({}, (err, result) => {
if (err) next(err)