The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
| // Center anything horizontally, vertically or both (assuming that the parents position is set to relative) | |
| // Codepen Example Usage: https://codepen.io/anon/pen/yPbgYW | |
| @mixin center($center: 'all') { | |
| position: absolute; | |
| @if $center == 'all' { | |
| top: 50%; | |
| left: 50%; | |
| transform: translate(-50%, -50%); |
| $(function() { | |
| var collect_chat_completed = Cookies.get('collect_chat_completed'); | |
| if (collect_chat_completed == "true" && !Cookies.get('collect_chat_timer')) { | |
| Cookies.set('collect_chat_timer', 'true', { expires: 1 }); | |
| Cookies.set('collect_chat_completed', 'true', { expires: 1 }); | |
| Cookies.set('collect_chat_closed', 'true', { expires: 1 }); | |
| } | |
| if (Cookies.get('collect_chat_completed') == "true") { | |
| $('#collect-chat-launcher').hide(); | |
| } |
| <?php | |
| /** | |
| * Adds Schema pieces to our output. | |
| * | |
| * @param array $pieces Graph pieces to output. | |
| * @param \WPSEO_Schema_Context $context Object with context variables. | |
| * | |
| * @return array $pieces Graph pieces to output. | |
| */ |
| import Router from 'next/router' | |
| import React from 'react' | |
| const DONE_DURATION = 250 | |
| export const RouteIndicator = () => { | |
| const [loading, setLoading] = React.useState(null) | |
| const [timeoutId, setTimeoutId] = React.useState(null) | |
| const onLoad = () => setLoading(true) |