Skip to content

Instantly share code, notes, and snippets.

View vejnoe's full-sized avatar

Andreas Vejnø Andersen vejnoe

View GitHub Profile
@vejnoe
vejnoe / gist:7b45ccb167242ee17a5c
Last active August 29, 2015 14:16
HTML & Foundation 5 Markup test page - v1.0
<p>
<a class="button large" href="#">Button Large</a><br />
<a class="button" href="#">Button</a><br />
<a class="button small" href="#" style="font-size: 16px;">Button Small</a><br />
<a class="button tiny" href="#" style="font-size: 16px;">Button Tiny</a>
</p>
<h1>
CSS Basic Elements
</h1>
@vejnoe
vejnoe / drupal-7-theming-snippets.mdown
Last active August 29, 2015 14:17
Drupal 7 Theming Snippets

#Drupal 7 Theming Snippets By Andreas Vejnø Andersen – vejnoe.dk

##Image node.tpl.php

URL to nodes:

<?php print $node_url; ?>
@vejnoe
vejnoe / rebuild_permissions
Created January 10, 2017 12:32 — forked from level09/rebuild_permissions
Drush: rebuild permissions table using command line in Drupal
drush php-eval 'node_access_rebuild();'
@vejnoe
vejnoe / template.php
Last active January 16, 2017 07:48
Making user mail available in user-profile.tpl.php via template.php – Drupal 7
<?php
/**
* Process variables for user-profile.tpl.php.
*
* The $variables array contains the following arguments:
* - $account
*
* @see user-profile.tpl.php
*/
function YOUR_THEMENAME_preprocess_user_profile(&$variables) {
@vejnoe
vejnoe / webflow-breakpoints.css
Last active July 17, 2024 22:36
Webflow Standard Breakpoints
@media screen and (max-width: 991px) {
/* Your responsive CSS */
}
@media screen and (max-width: 767px) {
/* Your responsive CSS */
}
@media screen and (max-width: 479px) {
/* Your responsive CSS */
}
@vejnoe
vejnoe / jq-document-ready.js
Created January 8, 2020 10:47
jQuery wrapper
(function($){
$(document).ready(function() {
})
})(jQuery);
@vejnoe
vejnoe / webflow-resize.js
Created March 26, 2020 09:16 — forked from danro/webflow-resize.js
Webflow.js resize example
var Webflow = Webflow || [];
Webflow.push(function () {
// Find example element
var $element = $('.resize-demo');
var $parent = $element.parent();
// Listen for optimized resize event
Webflow.resize.on(function () {
@vejnoe
vejnoe / webflow-snippet.html
Last active August 3, 2020 07:24 — forked from danro/webflow-snippet.js
Webflow.js front-end JS wrapper
<script>
var Webflow = Webflow || [];
Webflow.push(function () {
// DOMready has fired, may now use jQuery and Webflow api
});
</script>
@vejnoe
vejnoe / 301.php
Created September 30, 2020 07:07 — forked from CrowderSoup/301.php
Simple PHP Redirect
<?php
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://example.com');
?>
@vejnoe
vejnoe / include-title-in-form.html
Last active October 30, 2020 07:09
Include title in form submission - Webflow
<script>
// Adding the title of the page to a hidden form element.
var Webflow = Webflow || [];
Webflow.push(function () {
$('#event').attr( 'value', $('title').html() );
});
</script>
<input type="hidden" id="event" name="event" value="Unknown">