import Img from "gatsby-image"; | |
import { StaticQuery, graphql } from "gatsby"; | |
import React from "react"; | |
export default props => ( | |
<StaticQuery | |
query={graphql` | |
query { | |
images: allFile { | |
edges { |
(function() { | |
var verified = []; | |
document.querySelector('#myselector').onchange = function(e) { | |
if (this.querySelectorAll('option:checked').length <= 3) { | |
verified = Array.apply(null, this.querySelectorAll('option:checked')); | |
} else { | |
Array.apply(null, this.querySelectorAll('option')).forEach(function(e) { | |
e.selected = verified.indexOf(e) > -1; | |
}); | |
} |
a[href="/login"] { | |
display: none !important; | |
} | |
/* | |
Get current Git Branch in PHP | |
See: https://stackoverflow.com/a/7448133/3091226# | |
*/ | |
$stringfromfile = file('.git/HEAD', FILE_USE_INCLUDE_PATH); | |
$firstLine = $stringfromfile[0]; //get the string from the array | |
$explodedstring = explode("/", $firstLine, 3); //seperate out by the "/" in the string | |
$explodedstring = array_slice($explodedstring , 2); | |
$branchname = trim(implode("/", $explodedstring)); |
var data = $(this).serializeArray().reduce(function(obj, item) { | |
obj[item.name] = item.value; | |
return obj; | |
}, {}); |
body { | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; | |
} |
/* System Fonts as used by Medium and WordPress */ | |
body { | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | |
} |
/*! | |
CSS helper to highlight WAI-ARIA landmark roles etc. | |
NDF, 3 December 2013. | |
http://w3.org/TR/wai-aria/roles#landmark_roles | |
Inspiration: https://addons.mozilla.org/en-US/firefox/addon/juicy-studio-accessibility-too/ | |
javascript: | |
(function(){ |
<!doctype html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>PHPMapTileDownloader</title> | |
<style> | |
body { | |
font-family: 'Helvetica', sans-serif; | |
text-align: center; | |
margin-top: 20px; |
function export_csv() { | |
$filename = "file_" . date('Y-m-d'); | |
// get csv data | |
$data = $this->get_csv_data(); // expects: array with lines as array | |
// define header | |
$header = array('col1', 'col2', 'col3'); | |