mirror of
https://github.com/netzbegruenung/green-spider.git
synced 2024-05-02 17:14:51 +02:00
Merge pull request #47 from netzbegruenung/nicer-icons
Icons und Farben anpassen
This commit is contained in:
commit
1de606f2b8
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@ secrets
|
|||
temp
|
||||
__pycache__
|
||||
.vscode/settings.json
|
||||
webapp/dist/bundle.js
|
||||
|
|
1
Makefile
1
Makefile
|
@ -28,6 +28,7 @@ webapp/node_modules:
|
|||
webapp: webapp/node_modules
|
||||
cd webapp && npx webpack --config webpack.config.js
|
||||
cp -r webapp/dist/* ./docs/
|
||||
rm webapp/dist/bundle.js
|
||||
|
||||
serve-webapp:
|
||||
cd docs && ../venv/bin/python -m http.server
|
||||
|
|
85
webapp/dist/bundle.js
vendored
85
webapp/dist/bundle.js
vendored
File diff suppressed because one or more lines are too long
11
webapp/dist/index.html
vendored
11
webapp/dist/index.html
vendored
|
@ -21,15 +21,18 @@
|
|||
font-size: 0.8rem;
|
||||
}
|
||||
.bad {
|
||||
background-color: #ffdbdb;
|
||||
color: #ae4b53;
|
||||
background-color: #d7b0ae;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.medium {
|
||||
background-color: #fce7ac;
|
||||
color: #c49863;
|
||||
background-color: #e3d9ba;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.good {
|
||||
background-color: #cfeaa8;
|
||||
color: #46962b;
|
||||
background-color: #bcd9b3;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
|
@ -54,6 +57,8 @@
|
|||
|
||||
.icon {
|
||||
font-size: 24px;
|
||||
}
|
||||
.screenshot .icon {
|
||||
color: #212529;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -17,6 +17,9 @@ $(function(){
|
|||
|
||||
var table = null;
|
||||
|
||||
var yes = '<i class="icon ion-md-checkmark-circle"></i>',
|
||||
no = '<i class="icon ion-md-close-circle"></i>';
|
||||
|
||||
$.getJSON('data/screenshots.json', function(screenshots){
|
||||
|
||||
$.getJSON('data/spider_result.json', function(data){
|
||||
|
@ -53,10 +56,10 @@ $(function(){
|
|||
|
||||
// IPs
|
||||
var ips = _.join(item.details.ipv4_addresses, ', ');
|
||||
row.append('<td class="text '+ (ips === '' ? 'bad' : 'good') +' text-center">' + (ips === '' ? '❌' : ips) + '</td>');
|
||||
row.append('<td class="text '+ (ips === '' ? 'bad' : 'good') +' text-center">' + (ips === '' ? no : ips) + '</td>');
|
||||
|
||||
// SITE_REACHABLE
|
||||
row.append('<td class="'+ (item.result.SITE_REACHABLE.value ? 'good' : 'bad') +' text-center">' + (item.result.SITE_REACHABLE.value ? '✅' : '❌') + '</td>');
|
||||
row.append('<td class="'+ (item.result.SITE_REACHABLE.value ? 'good' : 'bad') +' text-center" data-order="'+ (item.result.SITE_REACHABLE.value ? '1' : '0') +'">' + (item.result.SITE_REACHABLE.value ? yes : no) + '</td>');
|
||||
|
||||
// HTTP_RESPONSE_DURATION
|
||||
var durationClass = 'bad';
|
||||
|
@ -67,26 +70,26 @@ $(function(){
|
|||
// FAVICON
|
||||
var icon = item.result.FAVICON.value;
|
||||
var iconFile = (icon ? item.details.icons[0] : '');
|
||||
row.append('<td class="' + (icon ? 'good' : 'bad') + ' text-center" data-order="'+ iconFile +'">' + (icon ? ('<img src="/siteicons/' + iconFile + '" class="icon" title="'+ iconFile +'">') : '❌') + '</td>');
|
||||
row.append('<td class="' + (icon ? 'good' : 'bad') + ' text-center" data-order="'+ iconFile +'">' + (icon ? ('<img src="/siteicons/' + iconFile + '" class="siteicon" title="'+ iconFile +'">') : no) + '</td>');
|
||||
|
||||
// HTTPS
|
||||
var hasHTTPS = item.result.HTTPS.value;
|
||||
row.append('<td class="'+ (hasHTTPS ? 'good' : 'bad') +' text-center">' + (hasHTTPS ? '✅' : '❌') + '</td>');
|
||||
row.append('<td class="'+ (hasHTTPS ? 'good' : 'bad') +' text-center" data-order="'+ (hasHTTPS ? '1' : '0') +'">' + (hasHTTPS ? yes : no) + '</td>');
|
||||
|
||||
// WWW_OPTIONAL
|
||||
var wwwOptional = item.result.WWW_OPTIONAL.value;
|
||||
row.append('<td class="'+ (wwwOptional ? 'good' : 'bad') +' text-center">' + (wwwOptional ? '✅' : '❌') + '</td>');
|
||||
row.append('<td class="'+ (wwwOptional ? 'good' : 'bad') +' text-center" data-order="'+ (wwwOptional ? '1' : '0') +'">' + (wwwOptional ? yes : no) + '</td>');
|
||||
|
||||
// one canonical URL
|
||||
var canonical = item.result.CANONICAL_URL.value;
|
||||
row.append('<td class="'+ (canonical ? 'good' : 'bad') +' text-center">' + (canonical ? '✅' : '❌') + '</td>');
|
||||
row.append('<td class="'+ (canonical ? 'good' : 'bad') +' text-center" data-order="'+ (canonical ? '1' : '0') +'">' + (canonical ? yes : no) + '</td>');
|
||||
|
||||
var responsive = item.result.RESPONSIVE.value;
|
||||
row.append('<td class="'+ (responsive ? 'good' : 'bad') +' text-center">' + (responsive ? '✅' : '❌') + '</td>');
|
||||
row.append('<td class="'+ (responsive ? 'good' : 'bad') +' text-center" data-order="'+ (responsive ? '1' : '0') +'">' + (responsive ? yes : no) + '</td>');
|
||||
|
||||
// feeds
|
||||
var feeds = item.result.FEEDS.value;
|
||||
row.append('<td class="'+ (feeds ? 'good' : 'bad') +' text-center">' + (feeds ? '✅' : '❌') + '</td>');
|
||||
row.append('<td class="'+ (feeds ? 'good' : 'bad') +' text-center" data-order="'+ (feeds ? '1' : '0') +'">' + (feeds ? yes : no) + '</td>');
|
||||
|
||||
// screenshots
|
||||
var screenshot = false;
|
||||
|
@ -98,7 +101,7 @@ $(function(){
|
|||
screenshot += '<a class="screenshot" href="'+ lurl +'" target="_blank" title="Desktop"><i class="icon ion-md-desktop"></i></a>';
|
||||
}
|
||||
}
|
||||
row.append('<td class="'+ (screenshot ? 'good' : 'bad') +' text-center">' + (screenshot ? screenshot : '❌') + '</td>');
|
||||
row.append('<td class="'+ (screenshot ? 'good' : 'bad') +' text-center" data-order="'+ (screenshot ? '1' : '0') +'">' + (screenshot ? screenshot : no) + '</td>');
|
||||
|
||||
// cms
|
||||
row.append('<td class="text text-center">' + (item.details.cms ? item.details.cms : '') + '</td>');
|
||||
|
|
Loading…
Reference in a new issue