Skip to content

Instantly share code, notes, and snippets.

Panoglobe

The Project

A Globe visualization, displaying travel lines made from GPS coordinates on planet earth.

Think about the google data-globe but do-it-yourself. Display travel routes and link to content from another website. Because weaving a 2D-website and a 3D-context is a difficult task, for now there are just hyperlinks leading to other pages.

@myogeshchavan97
myogeshchavan97 / trap_focus.js
Last active November 26, 2022 08:46
Code for trapping focus inside modal
// add all the elements inside modal which you want to make focusable
const focusableElements =
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
const modal = document.querySelector('#exampleModal'); // select the modal by it's id
const firstFocusableElement = modal.querySelectorAll(focusableElements)[0]; // get first element to be focused inside modal
const focusableContent = modal.querySelectorAll(focusableElements);
const lastFocusableElement = focusableContent[focusableContent.length - 1]; // get last element to be focused inside modal
@wpsmith
wpsmith / column-classes.css
Last active October 11, 2017 19:02
CSS: Genesis Column Classes including fifths
/* Column Classes
Link: Link: http://wpsmith.net/2013/wp/genesis-2-0-drops-fifths-from-column-classes/
Link: http://twitter.github.io/bootstrap/assets/css/bootstrap-responsive.css
--------------------------------------------- */
.five-sixths,
.four-sixths,
.four-fifths,
.one-fifth,
.one-fourth,
/** Force full width layout on single posts only*/
add_filter( 'genesis_pre_get_option_site_layout', 'full_width_layout_single_posts' );
/**
* @author Brad Dalton
* @link http://wpsites.net/web-design/change-layout-genesis/
*/
function full_width_layout_single_posts( $opt ) {
if ( is_singular( 'post' ) ) {
$opt = 'full-width-content';
return $opt;