/**
* Localize current URL having a {parameter}.
*
* Awaiting a fix to the laravel-localization package
* this helper will translate any translated route
* that accept a mandatory slug, but no ?query.
*
* GitHub issue: https://github.com/mcamara/laravel-localization/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20getLocalizedURL
*
/* Answer to https://twitter.com/stevepiron/status/900732215415508994 | |
* | |
* How can I not show the :focus style when clicking an element, but keep it for keyboard navigation? | |
*/ | |
// hover (mouse only) | |
:hover {} | |
// click (mouse only) | |
:active:hover {} |
########################### LAST UPDATE: 2018-10-03 ########################### | |
# # | |
# Source: https://gist.github.com/meduzen/030aa314afeb4a9806c4c59994ed7ed4 # | |
# # | |
# Main idea: target every browser with at least 0.3% market shares, plus # | |
# IE 11, Safari 9 and Edge 15, no matter their shares evolution. # | |
# # | |
# Browserslist documentation: https://github.com/ai/browserslist#queries # | |
# # | |
############################################################################### |
// IE & Edge do not support :focus-within, so they ignore the 3 selectors. | |
@media screen and (min-width:896px) { | |
.sub-nav:target, | |
.sub-nav__parent:focus-within .sub-nav, | |
.sub-nav__parent:hover .sub-nav { | |
opacity: 1; | |
visibility: visible; | |
} | |
} |
const trackingCode = '324567890' | |
const postCode = 1000 | |
const language = 'EN' // 'FR', 'NL', 'EN' | |
let intervalId = null | |
let status = null | |
let deliveryWindow = null | |
const deliveredPicApi = 'https://track.bpost.cloud/track/asset' |
<html> | |
<head> | |
<style> | |
:root { | |
/* Like me, you probably add a space between the semicolon and the value. | |
👇 */ | |
--bg: hsl(0 0% 100%); | |
} |
Hi,
I’m playing a bit with the regular browser media queries and noticed that there’s no square
value for orientation
. And more surprisingly, the definition of portrait orientation includes the square orientation:
The orientation media feature is portrait when the value of the height media feature is greater than or equal to the value of the width media feature. […] Otherwise orientation is landscape.
So the only way to query a square viewport is by using the aspect-ratio media query:
@media (aspect-ratio: 1/1) {
/* css declarations for a square visual output */
Dev things will break when your macOS sessions enters the Active Directocrap. Here are some things to help.
(This supposes your user stays administrator of the computer.)
You may end up by doing some find and replace in some place where the macOS username is hardcoded (like Vagrant files, Homestead.yaml
or $PATH
: it’s the only ones I remember). So: /Users/oldUsername
should become /Users/newUsername
.
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Facades\Blade; | |
use Illuminate\Support\ServiceProvider; | |
class ViewServiceProvider extends ServiceProvider | |
{ | |
/** |
This works on a Digital Ocean’s server managed by Laravel Forge. What this does:
- install the ngx_headers_more module
- edit Nginx configuration to have a custom value for the
server
header.
- Power off the server by connecting through
ssh
and runningsudo poweroff
. - Take a snapshot of the server in the Digital Ocean panel. If things goes wrong, it’ll help server restauration.
- Warning step:
- Starting step 4, instructions are largely inspired from a Stack Overflow / Server Fault answer.