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
* { | |
-webkit-touch-callout:none; /* prevent callout to copy image, etc when tap to hold */ | |
-webkit-text-size-adjust:none; /* prevent webkit from resizing text to fit */ | |
-webkit-tap-highlight-color:rgba(0,0,0,0); /* prevent tap highlight color / shadow */ | |
-webkit-user-select:none; /* prevent copy paste, to allow, change 'none' to '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
<!-- IPAD 3 --> | |
<link rel="stylesheet" href="/stylesheets/ipad3.css" type="text/css" | |
media="only screen and (min-device-width:768px) and (max-device-width:1024px) and (-webkit-min-device-pixel-ratio:1.5)" /> | |
<!-- IPAD 2 --> | |
<link rel="stylesheet" href="/stylesheets/ipad2.css" type="text/css" | |
media="only screen and (min-device-width:768px) and (max-device-width:1024px) and (-webkit-max-device-pixel-ratio:1.5)" /> | |
<!-- IPAD --> | |
<link rel="stylesheet" href="/stylesheets/ipad.css" type="text/css" | |
media="only screen and (min-device-width:768px) and (max-device-width:1024px)" /> | |
<!-- IPHONE 4 --> |
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
<div class="bg-header" | |
<?php | |
/* | |
This is to show a custom field from an article. | |
It will need to be created in the metadata section before it can be used in the post edit area. | |
In this case the custom field will need to be called 'image' and be set as an image custom field in the dropdown for type. | |
*/ | |
$image = article_custom_field('image'); // Applying a variable to the custom field, so it can be reused with ease | |
if ( !empty($image) ) : // Check if the field is empty, if it is the process stops here | |
?> |
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
<?php | |
// allowCat contains all catergory ID that you want on your page | |
$allowCat = array(2,3,4,5,6); | |
function article_category_id() { | |
if($category = Registry::prop('article', 'category')) { | |
$categories = Registry::get('all_categories'); | |
return $categories[$category]->id; | |
} |
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
export default Ember.Component.extend({ | |
fadeDurationInMilliseconds: 300, | |
didInsertElement() { | |
let duration = this.get("fadeDurationInMilliseconds"), | |
element = this.$(); | |
element.fadeIn(duration); | |
}, | |
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
// update a parameter in a URL | |
// or removes it if value is null | |
// browser should support forEach() function or use a polyfill | |
var updateUrlParameter = function(url, key, value){ | |
var parser = document.createElement('a'); | |
parser.href = url; | |
var newUrl = parser.protocol+'//'+parser.host+parser.pathname; |
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
{ | |
"keys": ["tab"], | |
"command": "expand_abbreviation_by_tab", | |
// put comma-separated syntax selectors for which | |
// you want to expandEmmet abbreviations into "operand" key | |
// instead of SCOPE_SELECTOR. | |
// Examples: source.js, text.html - source | |
"context": [ | |
{ |
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
{# | |
Parameters: | |
* nbPages (int): number of pages | |
* currentPage (int): current pages | |
* url (string): route name & query (string): route parameter | |
ex: list/page-5?q=myFilter (5 = page and query = myFilter) | |
#} | |
{% spaceless %} | |
{% if nbPages > 1 %} |
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 encode-uri($uri) { | |
$enc: str-replace($uri, '"', "'"); | |
$enc: str-replace($enc, '<', '%3C'); | |
$enc: str-replace($enc, '>', '%3E'); | |
$enc: str-replace($enc, '&', '%26'); | |
$enc: str-replace($enc, '#', '%23'); | |
@return $enc; | |
} |
OlderNewer