Postcss-import and admin tweaks

This commit is contained in:
Ryan Scherler
2020-03-12 17:13:15 -07:00
parent 3a48b2923b
commit 21b385bfc0
10 changed files with 96 additions and 144768 deletions
+1 -142946
View File
File diff suppressed because one or more lines are too long
+1 -1786
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,4 +1,4 @@
{
"/js/app.js": "/js/app.js?id=afac66bd8e09c6732150",
"/css/app.css": "/css/app.css?id=589d82870c07c4a00097"
"/js/app.js": "/js/app.js?id=abb20b4f5a63c37faeaf",
"/css/app.css": "/css/app.css?id=d9ecac721f9d0fab2b3b"
}
+37
View File
@@ -7132,6 +7132,26 @@
}
}
},
"postcss-import": {
"version": "12.0.1",
"resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-12.0.1.tgz",
"integrity": "sha512-3Gti33dmCjyKBgimqGxL3vcV8w9+bsHwO5UrBawp796+jdardbcFl4RP5w/76BwNL7aGzpKstIfF9I+kdE8pTw==",
"dev": true,
"requires": {
"postcss": "^7.0.1",
"postcss-value-parser": "^3.2.3",
"read-cache": "^1.0.0",
"resolve": "^1.1.7"
},
"dependencies": {
"postcss-value-parser": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
"integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
"dev": true
}
}
},
"postcss-js": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-2.0.3.tgz",
@@ -7939,6 +7959,23 @@
"unpipe": "1.0.0"
}
},
"read-cache": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
"integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=",
"dev": true,
"requires": {
"pify": "^2.3.0"
},
"dependencies": {
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true
}
}
},
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+1
View File
@@ -14,6 +14,7 @@
"@tailwindcss/ui": "^0.1.3",
"cross-env": "^7.0.2",
"laravel-mix": "^5.0.1",
"postcss-import": "^12.0.1",
"postcss-nested": "^4.2.1",
"prettier": "^1.19.1",
"rimraf": "^3.0.2",
-12
View File
@@ -8,15 +8,3 @@
[x-cloak] {
@apply hidden;
}
a {
@apply text-blue-600 transition ease-in-out duration-150;
&:hover {
@apply text-blue-700;
}
&:focus {
@apply outline-none underline;
}
}
+3 -3
View File
@@ -1,9 +1,9 @@
@tailwind base;
@import 'tailwindcss/base';
@import './_base.css';
@tailwind components;
@import 'tailwindcss/components';
@import './components/_alerts.css';
@import './components/_buttons.css';
@tailwind utilities;
@import 'tailwindcss/utilities';
@import './_utilities.css';
+3
View File
@@ -0,0 +1,3 @@
<svg stroke="currentColor" fill="none" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l9-9 9 9M5 10v10a1 1 0 001 1h3a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1h3a1 1 0 001-1V10M9 21h6"/>
</svg>

After

Width:  |  Height:  |  Size: 261 B

+46 -18
View File
@@ -22,9 +22,7 @@
</div>
<nav class="mt-5 px-2">
<a href="#" class="group flex items-center px-2 py-2 text-base leading-6 font-medium rounded-md text-white bg-gray-900 focus:outline-none focus:bg-gray-700 transition ease-in-out duration-150">
<svg class="mr-4 h-6 w-6 text-gray-300 group-hover:text-gray-300 group-focus:text-gray-300 transition ease-in-out duration-150" stroke="currentColor" fill="none" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l9-9 9 9M5 10v10a1 1 0 001 1h3a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1h3a1 1 0 001-1V10M9 21h6"/>
</svg>
{{ Alpine::svg('icon-home', 'mr-4 h-6 w-6 text-gray-300 group-hover:text-gray-300 group-focus:text-gray-300 transition ease-in-out duration-150') }}
Dashboard
</a>
{{--
@@ -76,11 +74,28 @@
{{ auth()->user()->name }}
</div>
</button>
<div x-show="open" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100" x-transition:leave-end="transform opacity-0 scale-95" class="origin-bottom-left absolute left-0 bottom-0 mb-12 w-48 rounded-md shadow-lg">
<div class="py-1 rounded-md bg-white shadow-xs">
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition ease-in-out duration-150">Your Profile</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition ease-in-out duration-150">Settings</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition ease-in-out duration-150">Sign out</a>
<div x-show="open" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100" x-transition:leave-end="transform opacity-0 scale-95" class="origin-bottom-left absolute left-0 bottom-0 mb-12 w-56 rounded-md shadow-lg">
<div class="rounded-md bg-white shadow-xs">
<div class="px-4 py-3">
<p class="text-sm leading-5">
Signed in as
</p>
<p class="text-sm leading-5 font-medium text-gray-900">
{{ auth()->user()->email }}
</p>
</div>
<div class="border-t border-gray-100"></div>
<div class="py-1">
<a href="#" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">Account settings</a>
</div>
<div class="border-t border-gray-100"></div>
<div class="py-1">
<x-alpine-form :action="route('alpine.auth.logout')">
<button type="submit" class="block w-full text-left px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">
{{ __('Sign Out') }}
</button>
</x-alpine-form>
</div>
</div>
</div>
</div>
@@ -101,9 +116,7 @@
<!-- Sidebar component, swap this element with another sidebar if you like -->
<nav class="mt-5 flex-1 px-2 bg-gray-800">
<a href="#" class="group flex items-center px-2 py-2 text-sm leading-5 font-medium text-white rounded-md bg-gray-900 focus:outline-none focus:bg-gray-700 transition ease-in-out duration-150">
<svg class="mr-3 h-6 w-6 text-gray-300 group-hover:text-gray-300 group-focus:text-gray-300 transition ease-in-out duration-150" stroke="currentColor" fill="none" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l9-9 9 9M5 10v10a1 1 0 001 1h3a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1h3a1 1 0 001-1V10M9 21h6"/>
</svg>
{{ Alpine::svg('icon-home', 'mr-3 h-6 w-6 text-gray-300 group-hover:text-gray-300 group-focus:text-gray-300 transition ease-in-out duration-150') }}
Dashboard
</a>
{{--
@@ -155,13 +168,28 @@
{{ auth()->user()->name }}
</div>
</button>
<div x-show="open" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100" x-transition:leave-end="transform opacity-0 scale-95" class="origin-bottom-left absolute left-0 bottom-0 mb-12 w-48 rounded-md shadow-lg">
<div class="py-1 rounded-md bg-white shadow-xs">
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition ease-in-out duration-150">Your Profile</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition ease-in-out duration-150">Settings</a>
<x-alpine-form :action="route('alpine.auth.logout')" class="block">
<button type="submit" class="w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition ease-in-out duration-150">{{ __('Logout') }}</button>
</x-alpine-form>
<div x-show="open" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100" x-transition:leave-end="transform opacity-0 scale-95" class="origin-bottom-left absolute left-0 bottom-0 mb-12 w-56 rounded-md shadow-lg">
<div class="rounded-md bg-white shadow-xs">
<div class="px-4 py-3">
<p class="text-sm leading-5">
Signed in as
</p>
<p class="text-sm leading-5 font-medium text-gray-900">
{{ auth()->user()->email }}
</p>
</div>
<div class="border-t border-gray-100"></div>
<div class="py-1">
<a href="#" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">Account settings</a>
</div>
<div class="border-t border-gray-100"></div>
<div class="py-1">
<x-alpine-form :action="route('alpine.auth.logout')">
<button type="submit" class="block w-full text-left px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">
{{ __('Sign Out') }}
</button>
</x-alpine-form>
</div>
</div>
</div>
</div>
+2 -1
View File
@@ -8,7 +8,7 @@ const purgecss = require('@fullhuman/postcss-purgecss')({
'./resources/js/**/*.js',
],
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || [],
// whitelistPatterns: [/help/,],
whitelistPatterns: [/alert/],
})
/*
@@ -27,6 +27,7 @@ mix
.setResourceRoot('/resources/')
.js('resources/js/app.js', 'js')
.postCss('resources/css/app.css', 'css', [
require('postcss-import'),
require('tailwindcss'),
require('postcss-nested'),
...(process.env.NODE_ENV === 'production' ? [purgecss] : []),