Last active
October 5, 2016 14:27
-
-
Save marvinahv/5538743 to your computer and use it in GitHub Desktop.
Minimalistic slim layout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doctype html | |
html lang="en" | |
head | |
meta charset="utf-8" | |
meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" | |
title | |
meta name="description" content="" | |
meta name="author" content="" | |
meta name="keywords" content="" | |
meta name="viewport" content="width=device-width, initial-scale=1.0" | |
== yield_content :stylesheets | |
link rel="stylesheet" href="/css/main.css?version=0.1" | |
== csrf_meta_tags | |
== include_gon | |
body | |
#main | |
== yield | |
javascript: | |
$(window).load(function(){ | |
// set the x-csrf-token for each ajax operation | |
// rack / rack_csrf handle the rest | |
(function(jQuery) { | |
$.ajaxSetup({ | |
beforeSend: function(xhr) { | |
var token = jQuery('meta[name="csrf-token"]').attr('content'); | |
xhr.setRequestHeader('X-CSRF-Token', token); | |
} | |
}); | |
}(jQuery)); | |
}); | |
== yield_content :scripts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment