More cleanup of CSS

This commit is contained in:
2023-11-06 16:40:44 +00:00
parent 7bf339f020
commit 7b27ab1ea9
12 changed files with 33 additions and 148 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,53 +0,0 @@
var layers = [new ol.layer.Tile({ source: new ol.source.OSM() })];
var layer = layers[0];
var dragPan = new ol.interaction.DragPan();
// function createStyle(src, img) {
// return new Style({
// image: new Icon({
// anchor: [-2.49259, 53.4929387],
// crossOrigin: 'anonymous',
// src: src,
// img: img,
// imgSize: img ? [img.width, img.height] : undefined,
// }),
// });
// }
// const iconFeature = new Feature(new Point([0, 0]));
// iconFeature.set('style', createStyle('data/icon.png', undefined));
var map = new ol.Map({
interactions:[
],
controls: [
],
layers: layers,
target: 'map',
view: new ol.View({
center: ol.proj.fromLonLat([-2.493739, 53.493150]),
// center: [-2.49258, 53.4929384],
zoom: 17
}),
});
// Create markers
var markers = new ol.layer.Vector({
source: new ol.source.Vector(),
style: new ol.style.Style({
image: new ol.style.Icon({
anchor: [0.5, 1],
scale: 0.5,
src: '/user/themes/leighhack/images/leighhackspace-map-marker.png'
})
})
});
map.addLayer(markers);
// Display Hackspace
var hackspace = new ol.Feature(new ol.geom.Point(ol.proj.fromLonLat([-2.49370, 53.4931])));
markers.getSource().addFeature(hackspace);
// Greyscale the map
// var enhance = new ol.filter.Colorize({ operation: 'grayscale', value: 1 });
// layer.addFilter(enhance);

View File

@@ -1,56 +0,0 @@
// Initialize and add the map
function initMap() {
// The location of leighhack
var leighhack = {lat: 53.493037, lng:-2.493562};
// The map, centered at leighhack
var map = new google.maps.Map(
document.getElementById('map'), {
zoom: 17,
disableDefaultUI: true,
center: leighhack,
styles:
[{
featureType: "poi.business",
elementType: "labels",
stylers:
[{
visibility: "off"
}]
}]
}
);
// The marker, positioned at leighhack
var hackmarker = {
url: "/map-icon.svg",
anchor: new google.maps.Point(25,50),
scaledSize: new google.maps.Size(32,32)
}
var marker = new google.maps.Marker({
position: leighhack,
map: map,
icon: hackmarker
});
// var styles = {
// default: null,
// hidden: [
// {
// featureType: 'poi.business',
// stylers: [{visibility: 'off'}]
// },
// {
// featureType: 'transit',
// elementType: 'labels.icon',
// stylers: [{visibility: 'off'}]
// }
// ]
// };
// map.setOptions({ styles: ['hidden'] });
}

View File

@@ -1,28 +0,0 @@
// Hide and show menu
document.addEventListener('DOMContentLoaded', () => {
// Get all "navbar-burger" elements
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
// Check if there are any navbar burgers
if ($navbarBurgers.length > 0) {
// Add a click event on each of them
$navbarBurgers.forEach(el => {
el.addEventListener('click', () => {
// Get the target from the "data-target" attribute
const target = el.dataset.target;
const $target = document.getElementById(target);
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
el.classList.toggle('is-active');
$target.classList.toggle('is-active');
});
});
}
});