Changed UI to fit the-eye.eu

This commit is contained in:
Simon 2018-06-18 22:37:05 -04:00
parent 677bfa03ea
commit 81d52a4551
9 changed files with 138 additions and 29 deletions

View File

@ -147,8 +147,9 @@ class ElasticSearchEngine(SearchEngine):
"sort": sort_by,
"highlight": {
"fields": {
"name": {"pre_tags": ["<span class='hl'>"], "post_tags": ["</span>"]},
"path": {"pre_tags": ["<span class='hl'>"], "post_tags": ["</span>"]}
"name": {"pre_tags": ["<mark>"], "post_tags": ["</mark>"]},
"name.nGram": {"pre_tags": ["<mark>"], "post_tags": ["</mark>"]},
"path": {"pre_tags": ["<mark>"], "post_tags": ["</mark>"]}
}
},
"size": per_page, "from": page * per_page}, index=self.index_name)

7
static/css/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -10,6 +10,9 @@
.list-group-item {
padding-bottom: 0.3rem;
}
.badge {
padding-bottom: 0;
}
.table td {
padding: 2px 0;
}
@ -78,6 +81,100 @@
100% {
background-color: rgba(255, 255, 255, 0.6); } }
.hl {
background: #fff217;
mark {
background-color: rgba(255, 255, 0, 0.4);
border-radius: 2px;
padding: 1px;
}
body {
color: #BBBBBB;
font-family: Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;
background-image: url(/static/img/bg.png);
}
.card {
background-color: #36393e;
border: 3px double #262626;
}
.navbar {
background: #36393e;
font-family: Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;
}
.navbar-brand {
border: none;
}
.nav-link {
color: #616161;
border-bottom: 2px solid #6c6c6c;
}
.active {
border-color: #b3b3b3;
color: #E6E6E6;
}
.nav-link:hover {
color: #c7c7c7;
}
.jumbotron {
background: #36393e;
}
a {
color: #fff;
border-bottom: 1px dotted #e0e0e0;
}
a:hover {
color:#ddd;
text-decoration: none;
}
.table a {
border: none;
}
.table th, .table td {
border-top: 1px solid #666a6e;
}
.table thead th {
border-bottom: 2px solid #999da1;
}
.form-control {
background-color: #2f3136;
color: inherit;
border: 1px solid #282b30;
}
.form-control:focus {
background-color: #2f3136;
border-color: #80bdff;
color: inherit;
}
.nav-tabs .nav-link {
border-color: transparent;
}
.nav-tabs .nav-link.active {
border-color: #8e9296 #8e9296;
background-color: transparent;
color: #E6E6E6;
}
.nav-tabs .nav-link:hover {
border-color: #e9ecef #e9ecef transparent #e9ecef;
}
.card-header-tabs {
border-bottom: 1px solid #a1a5a9;
}
* {
outline: none;
}

BIN
static/img/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,5 +1,3 @@
function drawChart(rData) {
var dataSetSize = [];
@ -39,16 +37,26 @@ function drawChart(rData) {
data: {
datasets: [{
data: rData["total_size"] < 100000 ? dataSetCount : dataSetSize,
backgroundColor: colors
backgroundColor: colors,
borderWidth: 1
}],
labels: labels
},
options: {
title: {
display: true,
text: "File types for " + rData["base_url"] + " - " + humanFileSize(rData["total_size"])
text: "File types for " + rData["base_url"] + " - " + humanFileSize(rData["total_size"]),
fontColor: "#c6c6c6",
fontSize: 16,
fontFamily: "Lato,'Helvetica Neue',Arial,Helvetica,sans-serif"
},
legend: {
labels: {
fontColor: "#bbbbbb",
fontFamily: "Lato,'Helvetica Neue',Arial,Helvetica,sans-serif",
boxWidth: 20,
}
}
}
});

View File

@ -151,7 +151,9 @@ class TaskDispatcher:
stats = dict()
for server in self.crawl_servers:
stats[server.name] = server.fetch_stats()
server_stats = server.fetch_stats()
if server_stats:
stats[server.name] = server_stats
return stats

View File

@ -14,13 +14,13 @@
<script src="/static/js/Chart.min.js" type="text/javascript"></script>
<link href="/static/css/fontawesome-all.min.css" rel="stylesheet" type="text/css">
<link href="/static/css/bootstrap4-vibrant-sea.min.css" rel="stylesheet" type="text/css">
<link href="/static/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="/static/css/main.css" rel="stylesheet" type="text/css">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light" style="background: #F7F7F7; border-bottom: solid 1px #dfdfdf;">
<nav class="navbar navbar-expand-lg">
<a class="navbar-brand" href="/"><i class="fas fa-database"></i> OD-Database</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>

View File

@ -12,10 +12,10 @@
<form action="/search">
<div class="form-row">
<div class="form-group col-md-8">
<div class="form-group col-md-7">
<input class="form-control" name="q" id="q" placeholder="Full-text Query" value="{{ q }}">
</div>
<div class="form-group col-md-2">
<div class="form-group col-md-3">
<select class="form-control" name="sort_order" title="Sort order">
<option disabled>Select sort order</option>
<option value="score" {{ "selected" if sort_order == "score" else "" }}>Relevance </option>