Skip to content

Instantly share code, notes, and snippets.

View Jursdotme's full-sized avatar

Rasmus Jürs Jursdotme

View GitHub Profile
@Jursdotme
Jursdotme / style.css
Last active September 27, 2017 09:20
FD font rettelse
html body, h1, h2 ,h3 ,h4 ,h5 ,h6 {
font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", sans-serif !important;
}
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to make opened Markdown files always be soft wrapped:
#
# path = require 'path'
#
/* ========== Smooth Scroll ========== */
(
function ( $ ) {
$.fn.vantageSmoothScroll = function () {
$( this ).click( function ( e ) {
var $a = $( this );
var $target = $( '[name=' + this.hash.slice( 1 ) + ']' ).length ? $( '[name=' + this.hash.slice( 1 ) + ']' ) : $( $a.get( 0 ).hash );
if ( $target.length ) {
@Jursdotme
Jursdotme / .htaccess
Created August 31, 2017 09:31
Use production media files on local development wordpress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/?.*$
RewriteRule ^(.*)$ http://ntf.dk/$1 [QSA,L]
</IfModule>
@Jursdotme
Jursdotme / gulpfile.js
Created August 28, 2017 13:59
Undescores (_s) build tooling
// Gulp.js configuration
'use strict';
const
// Gulp and plugins
gulp = require('gulp'),
gutil = require('gulp-util'),
newer = require('gulp-newer'),
imagemin = require('gulp-imagemin'),
@Jursdotme
Jursdotme / snippet-1.html
Last active July 19, 2017 09:42
Emmet layout snippets
<!-- html:5>(header.site-header>span.__logo{logo}+nav.__navigation>ul.__navigation-list>li.__navigation-item*3>a.__navigation-link[href="#"]{Menuitem})|bem|c -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
@Jursdotme
Jursdotme / Script.js
Created April 18, 2017 14:05
Smooth scroll vantage
( function($) {
$.fn.vantageSmoothScroll = function () {
$( this ).click( function ( e ) {
var $a = $( this );
var $target = $( '[name=' + this.hash.slice( 1 ) + ']' ).length ? $( '[name=' + this.hash.slice( 1 ) + ']' ) : $( $a.get( 0 ).hash );
if ( $target.length ) {
var height = 0;
if ( $( '#masthead .site-navigation' ).hasClass( 'use-sticky-menu' ) ) {
@Jursdotme
Jursdotme / SassMeister-input.scss
Last active April 10, 2017 13:49
Simple menu widget styling
// ----
// libsass (v3.5.0.beta.2)
// ----
.inzite-menu-widget.simple.hierarchy {
a {
text-decoration: none;
}
ul {
list-style: none;
@Jursdotme
Jursdotme / widget_filters.php
Created May 19, 2016 12:57
Override Pagebuilder Widget template.
<?php
function mytheme_feature_widget_template( $filename, $instance, $widget ){
$filename = get_stylesheet_directory() . '/partials/feature-widget-template.php';
return $filename;
}
add_filter( 'siteorigin_widgets_template_file_secondthought-feature-widget', 'mytheme_feature_widget_template', 10, 3 );
?>
@Jursdotme
Jursdotme / Woocommerce Mover.php
Created March 3, 2015 08:30
Woocommerce move template part
// Removes tabs from their original loaction
remove_action( 'HOOK NAME', 'FUNCTION NAME', 10 );
// Inserts tabs under the main right product content
add_action( 'HOOK NAME', 'FUNCTION NAME', 60 );