Skip to content

Instantly share code, notes, and snippets.

🌸
weeb dev

Haew hawezo

🌸
weeb dev
Block or report user

Report or block hawezo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hawezo
hawezo / output.css
Created Oct 26, 2019
Tailwind touch-actions
View output.css
.touch-none {
touch-action: none;
}
.touch-auto {
touch-action: auto;
}
.touch-pan-x {
touch-action: pan-x;
@hawezo
hawezo / Breakpoint.ts
Created Oct 23, 2019
Breakpoint helper in TypeScript
View Breakpoint.ts
export enum Breakpoint {
sm = 640,
md = 768,
lg = 1024,
xl = 1080,
}
@hawezo
hawezo / Input.vue
Created Oct 20, 2019
Material-inspired Input
View Input.vue
<template>
<div class="flex flex-col">
<div class="flex flex-row relative font-title" :style="`--current-color: var(--color-${currentColor});`">
<label v-if="label"
class="z-64 px-2 font-semibold text-sm absolute pointer-events-none bg-surface rounded-full transition-all transition-250"
:active="active"
:class="labelClassObject"
v-html="labelText" />
<scale-transition origin="center">
<span v-show="canClear"
@hawezo
hawezo / Layout.vue
Created Oct 17, 2019
Inertia + Vue dynamic layout
View Layout.vue
<template>
<component :is="layout"><slot /></component>
</template>
<script>
import Drawer from '@/Layout/Drawer';
import Fullscreen from '@/Layout/Fullscreen';
import v from 'voca';
const fallback = 'drawer';
@hawezo
hawezo / ExampleComponent.vue
Last active Oct 25, 2019
Inertia route guards
View ExampleComponent.vue
<template>
<!-- ... -->
</template>
<script>
export default {
// ...
beforeRouteLeave (vm, options, event) {
// vm will now refer to this component instead of the link
return window.confirm(vm.$trans('ticket.confirm_leave_creation'));
@hawezo
hawezo / DoctrineReloadCommand.php
Created Apr 9, 2019
A Symfony 4.2 command made to make fixture reloading easier. Takes into account the foreign key constraints issue.
View DoctrineReloadCommand.php
<?php
namespace App\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\BufferedOutput;
You can’t perform that action at this time.