Tweaking many components after using them for a while

This commit is contained in:
Brian 2021-12-14 09:41:00 -07:00
parent 8916410167
commit 1c77ddde0b
Signed by: brian
GPG Key ID: DE1A5390A3B84CD8
7 changed files with 54 additions and 38 deletions

View File

@ -43,4 +43,5 @@
/*"font_size": 11,*/ /*"font_size": 11,*/
/*"font_size": 9,*/ /*"font_size": 9,*/
/*"font_size": 9,*/ /*"font_size": 9,*/
/*"font_size": 12,*/
} }

View File

@ -1,7 +1,7 @@
<snippet> <snippet>
<content><![CDATA[ <content><![CDATA[
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="no-js"> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
@ -12,9 +12,12 @@
<meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="telephone=no">
<meta http-equiv="x-dns-prefetch-control" content="off"> <meta http-equiv="x-dns-prefetch-control" content="off">
<meta name="google" content="notranslate"> <meta name="google" content="notranslate">
<meta name="google" content="nositelinkssearchbox"> <meta name="google" content="nositelinkssearchbox">
<meta name="rating" content="General"> <meta name="rating" content="General">
<meta name="url" content="{{ url('/') }}"> <meta name="url" content="{{ url('/') }}">
<meta name="subject" content="your website's subject"> <meta name="subject" content="your website's subject">
<meta name="description" content="A description of the page"> <meta name="description" content="A description of the page">
@ -40,19 +43,11 @@
<!-- Font preloads (should be done for each font file) --> <!-- Font preloads (should be done for each font file) -->
<link href="{{ asset('fonts/fontfam/font.woff2') }}" rel="preload" as="font" type="font/woff2" crossorigin="anonymous"> <link href="{{ asset('fonts/fontfam/font.woff2') }}" rel="preload" as="font" type="font/woff2" crossorigin="anonymous">
<link href="{{ asset('fonts/fontfam/font.woff') }}" rel="preload" as="font" type="font/woff" crossorigin="anonymous">
<!-- Styles --> <!-- Styles -->
<link href="{{ asset('css/app.css') }}" rel="stylesheet" media="screen"> <link href="{{ asset('css/app.css') }}" rel="stylesheet" media="screen">
<link href="{{ asset('css/print.css') }}" rel="stylesheet" media="print">
@yield('css') @yield('css')
<!-- JS that must be executed before the document is loaded -->
<script type="module">
document.documentElement.classList.remove('no-js');
document.documentElement.classList.add('js');
</script>
<!-- Scripts --> <!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script> <script src="{{ asset('js/app.js') }}" defer></script>
@yield('js') @yield('js')

View File

@ -2,10 +2,9 @@
<content><![CDATA[ <content><![CDATA[
@font-face { @font-face {
font-family: "${1:FontFamily}"; font-family: "${1:FontFamily}";
src: url(fonts/${1:FontFamily}/${2:FontName}.woff2) format("woff2"), src: url(fonts/${1:FontFamily}/${2:FontName}.woff2) format("woff2");
url(fonts/${1:FontFamily}/${2:FontName}.woff) format("woff"); font-weight: 400; /* thin/100, extralight/200, light/300, normal/400, medium/500, semibold/600, bold/700, extrabold/800, black/900 */
font-weight: 400; /* normal/400, bold/700 */ font-style: normal; /* normal, italic, oblique, oblique 10deg */
font-style: normal; /* normal, italic, oblique */
font-display: swap; /* swap, fallback */ font-display: swap; /* swap, fallback */
} }

View File

@ -70,8 +70,8 @@
<script src="https://example.com/js/app.js" defer></script> <script src="https://example.com/js/app.js" defer></script>
<!-- --> <!-- -->
</head> </head>
<body> <body class="font-sans antialiased">
<div id="app"> <div id="app" class="min-h-screen bg-gray-100">
<!-- --> <!-- -->
</div> </div>
</body> </body>

View File

@ -1,9 +1,11 @@
<snippet> <snippet>
<content><![CDATA[ <content><![CDATA[
use Illuminate\Support\Facades\Auth;
public function index() public function index()
{ {
\$data = [ \$data = [
'${2:models}' => ${1:MODEL}::where('user_id', auth()->id())->paginate(), '${2:models}' => ${1:MODEL}::where('user_id', Auth::id())->paginate(),
]; ];
return view('${2:models}.index')->with(\$data); return view('${2:models}.index')->with(\$data);
@ -31,10 +33,10 @@ public function store(Request \$request)
// assign model fields // assign model fields
if (\$${3:model}->save()) { if (\$${3:model}->save()) {
return redirect()->route('dashboard.${2:models}.index')->with('status', "Successfully added {\$${3:model}->${4:field}} as a ${3:model}."); return redirect()->route('dashboard.${2:models}.index')->with('status', "Successfully added {\$${3:model}->${4:field}}.");
} }
return redirect()->back()->with('error', 'Unable to save that ${3:model}. Check the error logs.'); return redirect()->back()->with('error', 'Unable to save that ${3:model}.');
} }
public function edit(${1:MODEL} \$${3:model}) public function edit(${1:MODEL} \$${3:model})
@ -54,7 +56,7 @@ public function update(Request \$request, ${1:MODEL} \$${3:model})
return redirect()->route('dashboard.${2:models}.index')->with('status', "Successfully updated {\$${3:model}->${4:field}}."); return redirect()->route('dashboard.${2:models}.index')->with('status', "Successfully updated {\$${3:model}->${4:field}}.");
} }
return redirect()->back()->with('error', "Unable to update {\$${3:model}->${4:field}}. Check the error logs."); return redirect()->back()->with('error', "Unable to update {\$${3:model}->${4:field}}.");
} }
public function destroy(${1:MODEL} \$${3:model}) public function destroy(${1:MODEL} \$${3:model})
@ -64,7 +66,7 @@ public function destroy(${1:MODEL} \$${3:model})
return redirect()->route('dashboard.${2:models}.index')->with('status', "Successfully removed {\$${4:field}}."); return redirect()->route('dashboard.${2:models}.index')->with('status', "Successfully removed {\$${4:field}}.");
} }
return redirect()->back()->with('error', "Unable to remove {\$${4:field}}. Check the error logs."); return redirect()->back()->with('error', "Unable to remove {\$${4:field}}.");
} }
]]></content> ]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->

View File

@ -1,26 +1,40 @@
<snippet> <snippet>
<content><![CDATA[ <content><![CDATA[
use Prunable; // \Illuminate\Database\Eloquent\Prunable use App\Models\Traits\HasUidTrait;
use HasUidTrait; // \App\Models\Traits\HasUidTrait use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Prunable;
use HasUidTrait;
use Prunable;
/** @var string */
protected \$table = ''; protected \$table = '';
/** @var string */
protected \$keyType = 'string'; protected \$keyType = 'string';
/** @var bool */
public \$incrementing = false; public \$incrementing = false;
/** @var array */
protected \$fillable = []; protected \$fillable = [];
/** @var array */
protected \$hidden = []; protected \$hidden = [];
/** @var array */
protected \$casts = []; protected \$casts = [];
/** @var array */
protected \$dates = []; protected \$dates = [];
/** @var array */
protected \$appends = []; protected \$appends = [];
/** @var array */
protected \$touches = []; protected \$touches = [];
/** @var array */
protected \$dispatchesEvents = []; protected \$dispatchesEvents = [];
/* /*
@ -42,16 +56,20 @@ protected \$dispatchesEvents = [];
/** /**
* Get the prunable model query. * Get the prunable model query.
* *
* @since 1.0.0
*
* @return \Illuminate\Database\Eloquent\Builder * @return \Illuminate\Database\Eloquent\Builder
*/ */
public function prunable(): Builder public function prunable(): Builder
{ {
return static::where('created_at', '<=', now()->subMonth()); //return static::where('created_at', '<=', now()->subMonth());
} }
/** /**
* Prepare the model for pruning. * Prepare the model for pruning.
* *
* @since 1.0.0
*
* @return void * @return void
*/ */
protected function pruning(): void protected function pruning(): void

View File

@ -1,36 +1,37 @@
<snippet> <snippet>
<content><![CDATA[ <content><![CDATA[
<template> <template>
<div class="v-root"> <app-layout title="${1:TITLE}">
<slot></slot> <template #header>${1:TITLE}</template>
<div class="col-span-6">
<!-- content goes here -->
</div> </div>
</app-layout>
</template> </template>
<script> <script>
import { defineComponent, getCurrentInstance, onMounted, onUnmounted, ref } from "vue" import { defineComponent } from 'vue'
import AppLayout from '@/Layouts/AppLayout.vue'
export default defineComponent({ export default defineComponent({
emits: [], emits: [],
props: {}, props: {},
components: {}, components: {
AppLayout,
data() {
return {}
}, },
setup(props, {emit}) { setup(props, {emit}) {
let _this = getCurrentInstance() return {}
},
onMounted(() => { beforeMount() {},
//
})
onUnmounted(() => { mounted() {},
//
})
data() {
return {} return {}
}, },