Update Semantic
Fixes #40,#24
This commit is contained in:
parent
1715f27f44
commit
2027b94179
621 changed files with 172488 additions and 15939 deletions
|
@ -1,3 +1,18 @@
|
|||
.card {
|
||||
h2 {
|
||||
margin-bottom: 0.3em !important;
|
||||
a {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
.meta {
|
||||
.label,.button {
|
||||
margin-bottom: 0.3em;
|
||||
margin-top: 0.3em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.event.box {
|
||||
h2 {
|
||||
padding: 0.5rem;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
body {
|
||||
margin: 0;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
|
||||
header {
|
||||
|
|
|
@ -49,7 +49,6 @@ jQuery(document).ready(function () {
|
|||
if (!(jQuery('input[name=location_lat]').val() == undefined)) {
|
||||
jQuery('input[name=location_lat]').val(coords.lat);
|
||||
jQuery('input[name=location_lon]').val(coords.lng);
|
||||
jQuery('input[name=location]').css('margin-bottom', '3.2rem');
|
||||
jQuery('span.coords').text('Folgende Koordinaten sind angegeben: lat:' + coords.lat + ', lon:' + coords.lng);
|
||||
} else {
|
||||
jQuery('input[name=geocords]').val(coords.lat + ',' + coords.lng);
|
||||
|
@ -83,9 +82,35 @@ jQuery(document).ready(function () {
|
|||
}
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
function calcBoxSize(columns) {
|
||||
var card_selector = jQuery('.ui.cards .card');
|
||||
var screen_width = $(window).width() - 14 - 14; /* padding of basic segment */
|
||||
// first check if we can display 4 cards on the screen with a minimum width of 399px
|
||||
var box_width = Math.floor((screen_width / columns)) - 10;
|
||||
if ((box_width >= 395) || (columns == 1)) {
|
||||
card_selector.css('width',box_width);
|
||||
} else {
|
||||
calcBoxSize(columns - 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (jQuery('#view-map').length == 1) {
|
||||
$(window).resize(function(){
|
||||
var card_selector = jQuery('.ui.cards .card');
|
||||
|
||||
if (card_selector.length > 0) {
|
||||
calcBoxSize(4);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
var view_map_selector = jQuery('#view-map');
|
||||
var card_selector = jQuery('.ui.cards .card');
|
||||
|
||||
if (card_selector.length > 0) {
|
||||
calcBoxSize(4);
|
||||
}
|
||||
|
||||
if (view_map_selector.length == 1) {
|
||||
jQuery('.show_map').click(addGeoCoordinates);
|
||||
map = L.map('view-map');
|
||||
|
||||
|
@ -108,8 +133,8 @@ $(document).ready(function() {
|
|||
},
|
||||
onVisible: function () {
|
||||
map.invalidateSize(true);
|
||||
var lat = $('#view-map').data('lat');
|
||||
var lon = $('#view-map').data('lon');
|
||||
var lat = view_map_selector.data('lat');
|
||||
var lon = view_map_selector.data('lon');
|
||||
if ((lat > 0) && (lon > 0)) {
|
||||
map.setView([lat, lon], 16);
|
||||
var latlng = new L.LatLng(lat, lon);
|
||||
|
|
Reference in a new issue