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
| /* Variant 1 */ | |
| .full-width { | |
| margin-left: calc(-50vw + 50%); | |
| margin-right: calc(-50vw + 50%); | |
| } | |
| /* Variant 2 */ | |
| .full-width { | |
| width: 100vw; | |
| margin-left: -50vw; |
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
| RewriteBase / | |
| # Remove trailing slash | |
| RewriteRule ^(.*)/$ $1 [R=301,L] |
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
| $('a[href^="http://"], a[href^="https://"]').not('a[href*=mydomainname]').attr('target','_blank'); |
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
| // var 1 | |
| $('a[href^="http://"]').attr('href', function(i, oldhref){ | |
| oldhref.replace("http://","https://") | |
| }); | |
| // var 2 | |
| $('a[href^="http://"]').each(function(){ | |
| $(this).attr('href', $(this).attr('href').replace("http://","https://")) | |
| }); |
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
| # Redirect to HTTPS | |
| RewriteCond %{HTTPS} off | |
| RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
| RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
| # Redirect to HTTPS | |
| RewriteCond %{HTTPS} off [OR] | |
| RewriteCond %{HTTP_HOST} ^www.example\.com* | |
| RewriteRule ^(.*)$ https://example.com/$1 [L,R=301] |
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
| RewriteEngine on | |
| RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L] |
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
| var quotes = [{ | |
| quote: "It's not a faith in technology. It's faith in people.", | |
| author: "Steve Jobs" | |
| }, | |
| { | |
| quote: "The first rule of any technology used in a business is that automation applied to an efficient operation will magnify the efficiency. The second is that automation applied to an inefficient operation will magnify the inefficiency.", | |
| author: "Bill Gates" | |
| } | |
| ]; |
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
| // CSS | |
| .grayscale { | |
| filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */ | |
| filter: gray; /* IE6-9 */ | |
| -webkit-filter: grayscale(100%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */ | |
| } | |
| // JS | |
| $('.image-list img').addClass('grayscale'); | |
| $('.image-list a').hover(function() { |
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[type='search'] { | |
| &::-webkit-input-placeholder { | |
| color: #666; | |
| } | |
| &::-moz-placeholder { | |
| color: #666; | |
| } | |
| &:-ms-input-placeholder { | |
| color: #666; | |
| } |
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
| .box { | |
| position: relative; | |
| &::after { | |
| position: absolute; | |
| content: ''; | |
| top: 50%; | |
| left: 50%; | |
| transform: translate(-50%, -50%); | |
| } |