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
| @mixin phone { | |
| @media (max-width: #{$phone-width}) { | |
| @content; | |
| } | |
| } | |
| | |
| @mixin tablet { | |
| @media (max-width: #{$tablet-width}) { | |
| @content; | |
| } |
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
| // Using Kirby structure field with a selection field inside for images | |
| <?php foreach($page->structureName()->yaml() as $name) { | |
| $title = $name['fieldNameText']; | |
| $image = $name['fieldNameImage']; | |
| $imageUrl = $page->file($image)->url(); | |
| echo html('<h1>'.$title.'</h1><img src="'.$imageUrl.'" alt="'.$title.'">'); | |
| } |
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
| // sprite for images | |
| .sprite-1 { | |
| background-image: url(../img/icon_sprite.png); // Fallback going on here | |
| background-image: url(../img/icon_sprite.svg); | |
| } | |
| // mixin for logos and large image that needs text-indext | |
| @mixin sprite($sprite-class, $x: 0, $y: 0, $h: 0, $w: 0) { | |
| @extend .#{$sprite-class}; |
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
| // <form id="myForm" name="myForm" action="demo_form.asp" onsubmit="return validateForm()" method="post" class="form" novalidate> | |
| function validateForm() | |
| { | |
| var x=document.forms["myForm"]["fname"].value; | |
| if (x==null || x=="") | |
| { | |
| $('input.required').addClass('warning'); | |
| $('input.required').after('<p class="warning four-eight">Form field entered incorrectly please try again</p>'); | |
| return false; |
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
| // Asynchronous Loading Google maps | |
| function initialize() { | |
| var styles = [ ] | |
| var position = new google.maps.LatLng(); | |
| var mapOptions = { | |
| zoom: 15, |
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
| $(document).ready(function(){ | |
| ajaxCall('nav a', '#container', '#guts', 200); | |
| }); | |
| var ajaxCall = function(link, container, guts, speed){ | |
| var mainContent = $(container); | |
| var contents = $(guts); |
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
| @mixin sprite { | |
| display: inline-block; | |
| position: relative; | |
| text-indent: -9999px; | |
| } | |
| @mixin sprite-after { | |
| content: ""; | |
| position: absolute; | |
| top: 0; |
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
| $('.images').each(function(i,el){ | |
| var tLeft = Math.floor(Math.random()*960), | |
| tTop = Math.floor(Math.random()*1000); | |
| console.log('left =' + tLeft); | |
| $(el).css({left:tLeft, top: tTop}); |
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
| $('#wrapper').hide(); | |
| //loads content | |
| function loadContent(url) { | |
| $('#wrapper').load(url).delay(500).fadeIn(500); | |
| } | |
| $(function() { | |
| $('#nav a').on('click', function(e) { | |
| e.preventDefault(); |
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
| <section class="panel bg-gray-bg"> | |
| <div class="content-wrapper"> | |
| <div class="row"> | |
| <li class="d5-d10 two-up media-on-panel" > | |
| <img src="http://placehold.it/470x290/000000/ffffff" alt="Image Alt"> | |
| <span class="box-out ual-white-bg block"> | |
| <h3>This is a title</h3> |
NewerOlder