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
#### Helper | |
```csharp | |
@helper obfuscateEmail( string email , string text) | |
{ | |
<a href="/contact/@email.Replace("@",":").Replace(".","+")">@text</a> | |
} | |
``` | |
#### Usage | |
```html |
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
// This will add the 'open' class on hover to all dropdowns if the user is on a wide screen | |
// and then remove the 'open' class when you mouse out | |
$('.dropdown').hover(function () { | |
if ($(window).width() >= 768) { | |
$(this).toggleClass('open'); | |
} | |
}, function () { | |
$(this).removeClass('open'); | |
}); |
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
/*============================================================= | |
e.g. <div class="scrollhere"></div> | |
<a data-scroll="scrollhere" href="#"></a> | |
TODO Detect whether class or id without indication | |
Allow class="js-scroll-{element}" to initiate | |
==============================================================*/ | |
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
Add the following to a snippet in DevTools | |
Save it | |
Close DevTools | |
Open DevTools | |
Snippet not saved |
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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> |
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
var MaterialEffect = { | |
self: null, | |
modalContent: null, | |
baseClass: "material-box", | |
openClass: "material-box--show", | |
contentClass: "material-box__content", | |
init: function(){ | |
self = $("<div />").addClass(baseClass); | |
modalContent = $(contentClass, self); |
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
function ScrollToElement(elmID, scrollOffset) { | |
if (!scrollOffset) scrollOffset = 0; | |
$('html,body').animate({ scrollTop: $(elmID).offset().top - scrollOffset }, 'slow'); | |
} | |
function ScrollToElementNew(options, callback) { | |
var defaults = { | |
speed: 400, |
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
var data = { | |
url: url, | |
data: data, | |
success: function(data) { | |
if (data.error) { | |
if (data.error.message.indexOf("Please log in") != -1) { | |
$('.quick-account-login a:eq(0)').trigger('click'); | |
} else { | |
alert(data.error.message); | |
} |
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
@helper NumberToWords(int number){ | |
// http://stackoverflow.com/questions/2729752/converting-numbers-in-to-words-c-sharp | |
if (number == 0){ | |
<text>zero</text> | |
} | |
if (number < 0){ | |
<text>minus @NumberToWords(Math.Abs(number))</text> | |
} |
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
.tile-cascade( @interval: 60ms, @delay: 0ms ) { | |
& > * { | |
&:first-child { | |
transition-delay: (@interval * 1) + @delay !important; | |
} | |
&:nth-child(2) { | |
transition-delay: @interval * 2 + @delay !important; |
OlderNewer