Skip to content

Instantly share code, notes, and snippets.

@props(['item', 'icon' => null, 'showUpperLine' => false, 'showLowerLine' => false])
<a href="{{ $item['url'] }}"
wire:navigate
@class([
'fi-sidebar-item-button relative flex items-center justify-center gap-x-3 rounded-lg px-2 py-2 outline-none transition duration-75',
'hover:bg-gray-100 focus-visible:bg-gray-100 dark:hover:bg-white/5 dark:focus-visible:bg-white/5' => filled($item['url']),
'bg-gray-100 dark:bg-white/5' => $item['isActive'],
])
>

Install Google Fonts

Download desired fonts

https://fonts.google.com/?selection.family=Open+Sans

Install Google Fonts on Ubuntu

cd /usr/share/fonts
sudo mkdir googlefonts
cd googlefonts
sudo unzip -d . ~/Downloads/Open_Sans.zip

@slovenianGooner
slovenianGooner / button.vue
Created November 7, 2022 12:55
DaisyUI components
<script setup lang="ts">
import {ref, useSlots} from "vue";
let button = ref<HTMLElement|null>(null);
let icon = ref<HTMLElement|null>(null)
let slots = useSlots();
let props = defineProps({
loading: { type: Boolean, default: false }
})
@slovenianGooner
slovenianGooner / Index.vue
Created March 18, 2021 08:18
Manually starting an inertia event to trigger the loading screen
<template>
<div>
<button @click="simulateLoading">
Simulate Loading
</button>
</div>
</template>
<script>
import Layout from "../Shared/Layout";
import { fireStartEvent, fireFinishEvent } from "@inertiajs/inertia/src/events";
@slovenianGooner
slovenianGooner / +.js
Last active March 13, 2021 21:16
Example Fig spec
var completionSpec = {
name: "+",
description: "A set of aliases for everyday use.",
subcommands: [
{
name: "Download From Production",
description:
"Download the latest database dump and storage files from production.",
insertValue: "\b\b./download.sh\n",
},