The URI of TUHH Docker Registry changed from "docker.rz.tu-harburg.de:5000" to "docker.rz.tu-harburg.de". Please update your gitlab-ci.yml files if you use images from this registry.

Commit 2ac40561 authored by Tobias Zeumer's avatar Tobias Zeumer

Add way to highlight current position if map is shown on Phex console (kiosk pc); resolves #52

parent ebbd2847
......@@ -105,6 +105,10 @@ button:hover
LEGENDS, SETTINGS, WIDGETS
############################################################################# */
/* Show some infos/buttons only if map is displayed on specific IP/Host */
.currentLocation {display: none;}
/* Legend (content)
*/
#legend_btn_close
......
......@@ -131,6 +131,16 @@
to {opacity: 1; transform-origin: translateY(0) translateX(0);}
}
#phex_console.highlight * {fill: red !important; background-color: red !important; animation: swing 4s ease;}
@keyframes swing {
15% { opacity: 0; transform: translateX(5px); }
30% { transform: translateX(-5px); }
50% { transform: translateX(3px); }
65% { transform: translateX(-3px); }
80% { transform: translateX(2px); }
100% { opacity: 1; transform-origin: transform: translateY(0) translateX(0); }
}
/* shadow */
.daylightshadow {/* filter and class defined in svg itself (thus only as reminder here): filter:url(#daylightshadow);
/* This works only in Firefox: -webkit-filter: drop-shadow( -5px -5px 5px #000 ); filter: drop-shadow( -5px -5px 5px #000 ); */}
\ No newline at end of file
......@@ -43,7 +43,7 @@
<link rel="apple-touch-icon-precomposed" href="https://www.tub.tuhh.de/wp-content/uploads/2016/02/cropped-TUB-512px-180x180.png?neverExpires" />
</head>
<body>
<body data-client-ip="<?php echo $_SERVER['REMOTE_ADDR'] ?>" data-client-host="<?php echo (isset($_SERVER['REMOTE_HOST'])) ? $_SERVER['REMOTE_HOST'] : 'HostnameLookups nor enabled in apache2.conf' ?>">
<div id="container-outer-flex">
<!-- http://w3bits.com/css-responsive-nav-menu/ -->
<nav id="menu">
......@@ -398,6 +398,7 @@
</div>
<div id="widget-levelchange">
<button id="toggle_OG1" class="iconbutton level level_OG1 level_toggle" aria-label="Go up" data-toggle-id="OG1"><svg class="icon"><use xlink:href="res/symbols.svg#icon-angle-up"></use></svg></button>
<button id="tgl_currentLocation" class="iconbutton iconbutton-dark currentLocation" aria-label="Show current location"><svg class="icon"><use xlink:href="res/symbols.svg#icon-my_location"></use></svg></button>
<button id="toggle_EG" class="iconbutton level level_EG level_toggle" aria-label="Go down" data-toggle-id="EG"><svg class="icon"><use xlink:href="res/symbols.svg#icon-angle-down"></use></svg></button>
</div>
<div id="widget-language_change">
......
......@@ -28,6 +28,9 @@ var pathJsSavePng = 'node_modules/save-svg-as-png/lib/saveSvgAsPng.js';
var pathJqMousewheel = 'node_modules/jquery.mousewheel/jquery.mousewheel.js?v3.1.9';
var screenSaverTime = 5 * 60 * 1000; // Reset page after 5 minutes
var allow_logging = true; // Requires php. Logs field:value with /logger.php
var currentLocation_ip = '134.28.29.139';
var currentLocation_name = 'bib-kat-139.b.tuhh.de';
var currentLocation_lookup = '#phex_console';
// Language and URL
var lang = new Lang();
......@@ -133,6 +136,11 @@ $( document ).ready(function() {
// search url parameter
load_search_terms();
// Show button/elements to highlight current postion and display extra information (for known IP / (Kiosk-)PC)
if ($("body").data( "client-ip") == currentLocation_ip || $("body").data( "client-host") == currentLocation_name || $("body").data( "client-ip") == '127.0.0.1' || $("body").data( "client-ip") == '::1') {
$('.currentLocation').show();
}
/* #########################################################################
# EVENT LISTENER: Global
......@@ -350,7 +358,12 @@ $( document ).ready(function() {
$("#widget_btn_search").on('click', function(event) {
search_init();
});
// Show current location, but only for TUB Phex console IP
$("#tgl_currentLocation").on('click', function(event) {
find_and_highlight(currentLocation_lookup);
});
// Listen for clicks on level change buttons
$(".level_toggle").on('click', function(event) {
let lvlId = $(this).data('toggle-id');
......
......@@ -79,5 +79,9 @@
<title>map-o</title>
<path d="M31.563 0.172c0.266 0.187 0.438 0.5 0.438 0.828v22c0 0.406-0.25 0.781-0.625 0.922l-10 4c-0.25 0.109-0.5 0.109-0.75 0l-9.625-3.844-9.625 3.844c-0.125 0.063-0.25 0.078-0.375 0.078-0.203 0-0.391-0.063-0.562-0.172-0.266-0.187-0.438-0.5-0.438-0.828v-22c0-0.406 0.25-0.781 0.625-0.922l10-4c0.25-0.109 0.5-0.109 0.75 0l9.625 3.844 9.625-3.844c0.313-0.125 0.656-0.094 0.938 0.094zM11.5 2.281v19.844l9 3.594v-19.844zM2 5.672v19.844l8.5-3.391v-19.844zM30 22.328v-19.844l-8.5 3.391v19.844z"></path>
</symbol>
<symbol id="icon-my_location" viewBox="0 0 24 24">
<title>my_location</title>
<path d="M12 18.984c3.891 0 6.984-3.094 6.984-6.984s-3.094-6.984-6.984-6.984-6.984 3.094-6.984 6.984 3.094 6.984 6.984 6.984zM20.953 11.016h2.063v1.969h-2.063c-0.469 4.172-3.797 7.5-7.969 7.969v2.063h-1.969v-2.063c-4.172-0.469-7.5-3.797-7.969-7.969h-2.063v-1.969h2.063c0.469-4.172 3.797-7.5 7.969-7.969v-2.063h1.969v2.063c4.172 0.469 7.5 3.797 7.969 7.969zM12 8.016c2.203 0 3.984 1.781 3.984 3.984s-1.781 3.984-3.984 3.984-3.984-1.781-3.984-3.984 1.781-3.984 3.984-3.984z"></path>
</symbol>
</defs>
</svg>
\ No newline at end of file
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