Skip to content

Instantly share code, notes, and snippets.

Jesper Wøldiche woeldiche

Block or report user

Report or block woeldiche

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View frontend-trackdescription.md

Design & Frontend

Description

Building successful, useable high-performing and beautiful websites requires you to go beyond the framework. Every time.

Having a framework to build on - no matter how flexible and powerful - is only the first step. This year's frontend track will focus on implementing established best practices in both design, workflow and code.

Together we will take your Drupal websites that important step further.

Main themes

Applying frontend and UX best practices in Drupal

View fluidvideo.html
<script type="text/javascript">
(function ($) {
"use strict";
$(document).ready(function() {
Modernizr.load([
{
load : "/sites/all/themes/cowiscope/script/libs/jquery.fitvids.js",
callback : function() {
$('.fluid-video-wrapper').fitVids();
}
@woeldiche
woeldiche / videooverlay.html
Last active Dec 16, 2015
Embed vimeo, using JS API to remove itself when finished playing.
View videooverlay.html
<div style="width:100%; height:100%; clear:both; position:absolute; top: 0; left: 0; z-index:99; overflow:hidden;" id="video-layer">
<iframe id="player1" src="http://player.vimeo.com/video/63243786?api=1&player_id=player1&title=0&byline=0&portrait=0&autoplay=1" width="1200" height="675" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen style="min-height: 100%; max-height: 100%; min-width: 100%; max-width: 100%; width: 100%; height: 100%; position: absolute; z-index: 50;"></iframe>
<a class="video-link" href="#" style="position: absolute; z-index: 55; bottom: 10%; left: 10%; color: #fff;">Skip Video</a>
</div>
<script type="text/javascript">
(function ($) {
"use strict";
var f = $('#player1'),
@woeldiche
woeldiche / template.php
Created Nov 28, 2012
Add classes to fields in egedal theme
View template.php
<?php
/**
* Implements template_preprocess_field().
*
* Adds classes to field based on field name.
*
* Good options are:
* - Field name: $vars['element']['#field_name'].
* - Content type: $vars['element']['#bundle'].
@woeldiche
woeldiche / template.php
Created Sep 23, 2011
Move fields til other regions
View template.php
<?php
/**
* Implements hook_page_alter().
* Moves field_title_image from node to 'featured' region.
* Moves secondary content from node (downloads, links) to 'sidebar-two' region.
*/
function pufdk_page_alter(&$page) {
// Declare variables
$image = array();
$secondary_content = array();
View index.jade
//- Include file with mixin
include ./titles
//- Use mixin
+titlepage(title)
//- Other content
.u-containedSmall.u-trailer.u-padded
include ../includes/search
View Gruntfile.js
// Generated on 2013-11-11 using generator-webapp 0.4.4
/* jshint camelcase: false */
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
View myfiles
// Generated on 2013-11-11 using generator-webapp 0.4.4
/* jshint camelcase: false */
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
View tn.config.js
TN.config.table = TN.config.table || {};
TN.config.table.data = TN.config.table.data || {};
TN.config.table.data['example-table'] = {
serverside: false,
pipeline: 200,
ajaxurl: "src/data/my-subscriptions.json",
order: [1, 'asc'],
pagingType: 'simple_numbers',
processing: true,
language: {
View template.hbs
<div data-desk-after="logo" data-mobile-append="main-menu" data-responsive>
<h2 class="aria--visible">Main menu</h2>
<ul class="menu--main mobile-one-whole tablet-one-half">
{{#each links}}
{{#if this.active}}
<li class="item--open active-trail" data-menu="tree">
<a id="main-menu--active" href="#" class="active-trail">{{this.label}}</a>
{{> menu-subnav this.menu-second}}
</li>
{{else}}
You can’t perform that action at this time.