Skip to content

Commit 5a47134

Browse files
authored
Upgrade to Tailwind 2.0 (#584)
* Upgrade to tailwind 2.0 * Apply fixes from StyleCI * Remove config bloat * Apply fixes from StyleCI * Remove plugin
1 parent 36cfbe3 commit 5a47134

File tree

18 files changed

+331
-14275
lines changed

18 files changed

+331
-14275
lines changed

package-lock.json

Lines changed: 287 additions & 14236 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,20 @@
1111
},
1212
"devDependencies": {
1313
"axios": "^0.21.1",
14-
"highlight.js": "^10.4.1",
14+
"highlight.js": "^10.5.0",
1515
"laravel-mix": "^6.0.6",
1616
"postcss-import": "^12.0.1",
17-
"vue-template-compiler": "^2.6.11"
17+
"vue-template-compiler": "^2.6.12"
1818
},
1919
"dependencies": {
20-
"@tailwindcss/ui": "^0.1.4",
21-
"algoliasearch": "^4.0.3",
20+
"@tailwindcss/aspect-ratio": "^0.2.0",
21+
"@tailwindcss/forms": "^0.2.1",
22+
"@tailwindcss/typography": "^0.4.0",
23+
"algoliasearch": "^4.8.4",
2224
"alpinejs": "^1.12.0",
25+
"autoprefixer": "^10.2.3",
2326
"choices.js": "^9.0.1",
24-
"tailwindcss": "^1.9.6"
27+
"postcss": "^8.2.4",
28+
"tailwindcss": "^2.0.2"
2529
}
2630
}

resources/css/forms.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
.standard input[type='email'],
1919
.standard textarea,
2020
.standard select {
21-
@apply rounded border-2 p-3 w-full;
21+
@apply rounded border-2 p-3 w-full border-gray-300;
2222
}
2323

2424
.standard select {
@@ -30,7 +30,7 @@
3030
}
3131

3232
.standard input[type='checkbox'] {
33-
@apply mr-1;
33+
@apply mr-1 rounded border border-gray-300;
3434
}
3535

3636
.standard .help-block {

resources/views/_partials/_editor.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div x-data="editorConfig()" x-init="minHeight = $refs.editor.scrollHeight">
2-
<div class="border-2 border-b-0 rounded-t p-2 bg-gray-200">
2+
<div class="border-gray-300 border-2 border-b-0 rounded-t p-2 bg-gray-200">
33
<ul class="flex">
44
<li>
55
<button

resources/views/_partials/_search.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
type="text"
1111
name="search"
1212
id="search"
13-
class="nav-search block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:border-blue-300 focus:shadow-outline-blue sm:text-sm transition duration-150 ease-in-out"
13+
class="nav-search block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:border-blue-300 focus:ring-blue-500 sm:text-sm transition duration-150 ease-in-out"
1414
placeholder="Search for threads..."
1515
/>
1616
<template x-if="results">
1717
<div 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="search mt-1 origin-top-right absolute right-0 rounded-md shadow-lg z-10">
18-
<div class="rounded-md bg-white shadow-xs w-full">
18+
<div class="rounded-md bg-white ring-1 ring-black ring-opacity-5 w-full">
1919
<div class="flex flex-col border-b md:flex-row">
2020
<div class="py-1 w-full border-b md:w-1/2 md:border-r md:border-b-0">
2121
<span class="text-xl px-4 py-2 text-gray-700">Threads</span>

resources/views/articles/_form.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class="button button-primary h-full button-dropdown-right relative inline-flex i
113113
</svg>
114114
</button>
115115
<div class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg" x-show="showDropdown" x-cloak>
116-
<div class="rounded-md bg-white shadow-xs">
116+
<div class="rounded-md bg-white ring-1 ring-black ring-opacity-5">
117117
<div class="py-1">
118118
<button
119119
type="submit"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@props(['type' => 'button'])
22

33
<span class="inline-flex rounded-md shadow-sm">
4-
<button type="{{ $type }}" class="bg-red-600 border border-transparent rounded-md py-2 px-4 inline-flex justify-center text-sm leading-5 font-medium text-white hover:bg-red-700 focus:outline-none focus:border-red-900 focus:shadow-outline-red active:bg-red-900 transition duration-150 ease-in-out" {{ $attributes }}>
4+
<button type="{{ $type }}" class="bg-red-600 border border-transparent rounded-md py-2 px-4 inline-flex justify-center text-sm leading-5 font-medium text-white hover:bg-red-700 focus:outline-none focus:border-red-900 focus:ring-red-900 active:bg-red-900 transition duration-150 ease-in-out" {{ $attributes }}>
55
{{ $slot }}
66
</button>
77
</span>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@props(['type' => 'button'])
22

33
<span class="inline-flex rounded-md shadow-sm">
4-
<button type="{{ $type }}" class="bg-lio-600 border border-transparent rounded-md py-2 px-4 inline-flex justify-center text-sm leading-5 font-medium text-white hover:bg-lio-700 focus:outline-none focus:border-lio-900 focus:shadow-outline-lio active:bg-lio-900 transition duration-150 ease-in-out">
4+
<button type="{{ $type }}" class="bg-lio-600 border border-transparent rounded-md py-2 px-4 inline-flex justify-center text-sm leading-5 font-medium text-white hover:bg-lio-700 focus:outline-none focus:border-lio-900 focus:ring-lio-900 active:bg-lio-900 transition duration-150 ease-in-out">
55
{{ $slot }}
66
</button>
77
</span>

resources/views/home.blade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@
1818
<div class="mt-5 max-w-lg mx-auto sm:flex sm:justify-center md:mt-8">
1919
@if (Auth::guest())
2020
<div class="rounded-md shadow">
21-
<a href="{{ route('register') }}" class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base leading-6 font-medium rounded-md text-white bg-lio-600 hover:bg-lio-500 focus:outline-none focus:shadow-outline-indigo transition duration-150 ease-in-out md:py-4 md:text-lg md:px-10">
21+
<a href="{{ route('register') }}" class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base leading-6 font-medium rounded-md text-white bg-lio-600 hover:bg-lio-500 focus:outline-none-500 transition duration-150 ease-in-out md:py-4 md:text-lg md:px-10">
2222
Join the Community
2323
</a>
2424
</div>
2525
<div class="mt-3 rounded-md shadow sm:mt-0 sm:ml-3">
26-
<a href="{{ route('forum') }}" class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base leading-6 font-medium rounded-md text-lio-500 bg-white hover:text-lio-600 focus:outline-none focus:shadow-outline-blue transition duration-150 ease-in-out md:py-4 md:text-lg md:px-10">
26+
<a href="{{ route('forum') }}" class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base leading-6 font-medium rounded-md text-lio-500 bg-white hover:text-lio-600 focus:outline-none transition duration-150 ease-in-out md:py-4 md:text-lg md:px-10">
2727
Visit the Forum
2828
</a>
2929
</div>
3030
@else
3131
<div class="rounded-md shadow">
32-
<a href="{{ route('threads.create') }}" class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base leading-6 font-medium rounded-md text-white bg-lio-600 hover:bg-lio-500 focus:outline-none focus:shadow-outline-indigo transition duration-150 ease-in-out md:py-4 md:text-lg md:px-10">
32+
<a href="{{ route('threads.create') }}" class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base leading-6 font-medium rounded-md text-white bg-lio-600 hover:bg-lio-500 focus:outline-none transition duration-150 ease-in-out md:py-4 md:text-lg md:px-10">
3333
Start a Thread
3434
</a>
3535
</div>
3636
<div class="mt-3 rounded-md shadow sm:mt-0 sm:ml-3">
37-
<a href="{{ route('articles.create') }}" class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base leading-6 font-medium rounded-md text-white bg-lio-600 hover:bg-lio-500 focus:outline-none focus:shadow-outline-indigo transition duration-150 ease-in-out md:py-4 md:text-lg md:px-10">
37+
<a href="{{ route('articles.create') }}" class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base leading-6 font-medium rounded-md text-white bg-lio-600 hover:bg-lio-500 focus:outline-none transition duration-150 ease-in-out md:py-4 md:text-lg md:px-10">
3838
Share an Article
3939
</a>
4040
</div>
@@ -93,7 +93,7 @@
9393
</div>
9494
<div class="w-full md:w-1/2 mx-auto relative mb-8">
9595
<form action="{{ route('forum') }}" method="GET">
96-
<input type="search" class="rounded-full border-2 w-full p-3 text-xl bg-gray-100" placeholder="Search for threads..." name="search">
96+
<input type="search" class="rounded-full border-gray-300 border-2 w-full p-3 text-xl bg-gray-100" placeholder="Search for threads..." name="search">
9797
<button type="submit" class="absolute top-0 right-0 w-10 h-10 my-2 mx-3">
9898
<x-heroicon-o-search class="w-full"/>
9999
</button>

resources/views/layouts/_nav.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</button>
2828
</div>
2929
<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="dropdown absolute right-0 mt-2 w-48 rounded-md shadow-lg z-50" x-cloak>
30-
<div class="py-1 rounded-md bg-white shadow-xs">
30+
<div class="py-1 rounded-md bg-white ring-1 ring-black ring-opacity-5">
3131
<a href="https://discord.gg/KxwQuKb">Discord</a>
3232
<a href="https://larachat.co">Larachat</a>
3333
<a href="https://webchat.freenode.net/?nick=laravelnewbie&channels=%23laravel&prompt=1">IRC</a>
@@ -46,7 +46,7 @@
4646
</button>
4747
</div>
4848
<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="dropdown absolute right-0 mt-2 w-48 rounded-md shadow-lg z-50" x-cloak>
49-
<div class="py-1 rounded-md bg-white shadow-xs">
49+
<div class="py-1 rounded-md bg-white ring-1 ring-black ring-opacity-5">
5050
<a href="https://github.com/laravelio">Github</a>
5151
<a href="https://larachat.co">Twitter</a>
5252
<div class="border-t border-gray-100"></div>
@@ -95,7 +95,7 @@
9595
</button>
9696
</div>
9797
<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="dropdown origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg z-50" x-cloak>
98-
<div class="py-1 rounded-md bg-white shadow-xs">
98+
<div class="py-1 rounded-md bg-white ring-1 ring-black ring-opacity-5">
9999
<a href="{{ route('profile', Auth::user()->username()) }}">
100100
Your Profile
101101
</a>

0 commit comments

Comments
 (0)