This file contains hidden or 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
<ul class="gallery"> | |
<li> | |
<a href="/images/slide-1.jpg" data-size="1920x1080"> | |
<img src="/images/thumb-1.jpg" alt="img1"> | |
</a> | |
</li> | |
<li> | |
<a href="/images/slide-2.jpg" data-size="1920x1080"> | |
<img src="/images/thumb-2.jpg" alt="img2"> | |
</a> |
This file contains hidden or 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
$white: #fff; | |
$spacing-unit: 1em; | |
.footer-nav { | |
color: $white; | |
&__title { | |
margin-bottom: $spacing-unit; | |
color: $white; | |
} |
This file contains hidden or 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
<main> | |
<div class="detail"> | |
<h2>Hey Johnnie!</h2> | |
<p>The untold legend</p> | |
</div> | |
<div class="detail2">test</div> | |
</main> | |
<section> | |
<h2>Mom said it all</h2> |
This file contains hidden or 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
//force IE to render in latest version or use Google chrome | |
$meta_edge = array( | |
'#type' => 'html_tag', | |
'#tag' => 'meta', | |
'#attributes' => array( | |
'http-equiv' => 'X-UA-Compatible', | |
'content' => 'IE=edge,chrome=1', | |
) | |
); |
This file contains hidden or 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
<?php | |
// Create a "plugins" directory in the gs_wysiwyg module and add the ckeditor autosave plugin to it. | |
// Then add the following code into the gs_wysiwyg.module file | |
/** | |
* Implements hook_ckeditor_plugin(). | |
*/ | |
function gs_wysiwyg_ckeditor_plugin() { | |
$plugin_path = drupal_get_path('module', 'gs_wysiwyg') . '/plugins/'; |
This file contains hidden or 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
<?php | |
// Print a list of all set permissions. | |
// You can then copy the output from the website source code and paste it into a php array. | |
$user_roles = user_roles(); | |
$roles = user_role_permissions($user_roles); | |
foreach ($roles as $rid => $permissions) { | |
print "\n\n" . $user_roles[$rid] . "\n"; | |
foreach ($permissions as $permission => $bool) { | |
print "'" . $permission . "',\n"; |
This file contains hidden or 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
//http://css-tricks.com/dangers-stopping-event-propagation/ | |
$(document).click(function(event) { | |
if (!$(event.target).closest('.menucontainer').length) { | |
// Hide the menus. | |
console.log('hide the menu'); | |
} | |
}); |
This file contains hidden or 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
*, *:before, *:after { | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
img, video { | |
max-width: 100%; | |
height: auto; | |
} |
This file contains hidden or 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
$("input").focus(function() { | |
$(this).parent().addClass("add-bg"); | |
}).blur(function(){ | |
$(this).parent().removeClass("add-bg"); | |
}); |
This file contains hidden or 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
<?php | |
// node/add/project-review/%nid | |
$nid = arg(3); //Gets the nid from the url | |
if ($nid) { | |
//get the project node | |
$node = node_load($nid); | |
//add the entity reference to the project of it does not already have one | |
if (empty($form['field_project_refence'][LANGUAGE_NONE][0]['target_id']['#default_value'])) { |