1
1
<div x-data =" searchConfig()" x-init =" $watch('searchVisible', value => toggle())" x-show =" searchVisible" x-cloak
2
2
class =" fixed inset-0 z-50 overflow-y-auto p-4 sm:p-6 md:p-20" role =" dialog" aria-modal =" true" >
3
- <div class =" fixed inset-0 bg-gray-700 bg-opacity-50 transition-opacity" aria-hidden =" true" ></div >
3
+ <div class =" fixed inset-0 bg-gray-700 bg-opacity-50 transition-opacity -z-10 " aria-hidden =" true" ></div >
4
4
5
5
<div @click .outside =" searchVisible = false"
6
6
class =" mx-auto max-w-xl transform overflow-hidden rounded-xl bg-white shadow-2xl ring-1 ring-black ring-opacity-5 transition-all" >
@@ -36,8 +36,7 @@ class="border-t border-gray-100 py-14 px-6 text-center text-sm sm:px-14">
36
36
x-show =" searchQuery.length && (threads.total || articles.total || users.total)"
37
37
x-data =" tabConfig()"
38
38
x-init =" $watch('activeTab', value => setActiveTab(value))"
39
- x-cloak
40
- >
39
+ x-cloak >
41
40
<ul class =" grid grid-flow-col text-center text-gray-500 bg-gray-100 rounded-lg p-1" >
42
41
<li >
43
42
<a href =" javascript:void(0)" @click =" activeTab = 'threads'" class =" flex justify-center py-4" :class =" currentTab('threads')" >
@@ -61,33 +60,33 @@ class="border-t border-gray-100 py-14 px-6 text-center text-sm sm:px-14">
61
60
<ul >
62
61
<li x-show =" activeTab === 'threads'" class =" mt-2 text-sm text-gray-800" >
63
62
<template x-for =" thread in threads.threads" >
64
- <li class =" cursor-default select-none px-4 py-2 hover:bg-lio-100" :id =" `option-${thread.id}`" role =" option" tabindex =" -1" >
65
- <a :href =" '/forum/'+thread.slug" class =" flex flex-col" >
66
- <span class =" text-black-900 font-medium break-all" x-html =" thread._highlightResult.subject.value" ></span >
67
- <span class =" text-black-900 break-all" x-html =" thread._snippetResult.body.value" ></span >
68
- </a >
69
- </li >
70
- </template >
63
+ <li class =" cursor-default select-none px-4 py-2 hover:bg-lio-100" :id =" `option-${thread.id}`" role =" option" tabindex =" -1" >
64
+ <a :href =" '/forum/'+thread.slug" class =" flex flex-col" >
65
+ <span class =" text-black-900 font-medium break-all" x-html =" thread._highlightResult.subject.value" ></span >
66
+ <span class =" text-black-900 break-all" x-html =" thread._snippetResult.body.value" ></span >
67
+ </a >
68
+ </li >
69
+ </template >
71
70
</li >
72
71
<li x-show =" activeTab === 'articles'" class =" mt-2 text-sm text-gray-800" >
73
72
<template x-for =" article in articles.articles" >
74
- <li class =" cursor-default select-none px-4 py-2 hover:bg-lio-100" :id =" `option-${article.id}`" role =" option" tabindex =" -1" >
75
- <a :href =" '/articles/'+article.slug" class =" flex flex-col" >
76
- <span class =" text-black-900 font-medium break-all" x-html =" article._highlightResult.title.value" ></span >
77
- <span class =" text-black-900 break-all" x-html =" article._snippetResult.body.value" ></span >
78
- </a >
79
- </li >
80
- </template >
73
+ <li class =" cursor-default select-none px-4 py-2 hover:bg-lio-100" :id =" `option-${article.id}`" role =" option" tabindex =" -1" >
74
+ <a :href =" '/articles/'+article.slug" class =" flex flex-col" >
75
+ <span class =" text-black-900 font-medium break-all" x-html =" article._highlightResult.title.value" ></span >
76
+ <span class =" text-black-900 break-all" x-html =" article._snippetResult.body.value" ></span >
77
+ </a >
78
+ </li >
79
+ </template >
81
80
</li >
82
81
<li x-show =" activeTab === 'users'" class =" mt-2 text-sm text-gray-800" >
83
82
<template x-for =" user in users.users" >
84
- <li class =" cursor-default select-none px-4 py-2 hover:bg-lio-100" :id =" `option-${user.id}`" role =" option" tabindex =" -1" >
85
- <a :href =" '/user/'+user.username" class =" flex flex-col" >
86
- <span class =" text-black-900 font-medium break-all" x-html =" user._highlightResult.username.value" ></span >
87
- <span class =" text-black-900 break-all" x-html =" user._highlightResult.name.value" ></span >
88
- </a >
89
- </li >
90
- </template >
83
+ <li class =" cursor-default select-none px-4 py-2 hover:bg-lio-100" :id =" `option-${user.id}`" role =" option" tabindex =" -1" >
84
+ <a :href =" '/user/'+user.username" class =" flex flex-col" >
85
+ <span class =" text-black-900 font-medium break-all" x-html =" user._highlightResult.username.value" ></span >
86
+ <span class =" text-black-900 break-all" x-html =" user._highlightResult.name.value" ></span >
87
+ </a >
88
+ </li >
89
+ </template >
91
90
</li >
92
91
</ul >
93
92
</div >
@@ -109,4 +108,4 @@ class="border-t border-gray-100 py-14 px-6 text-center text-sm sm:px-14">
109
108
</a >
110
109
</div >
111
110
</div >
112
- </div >
111
+ </div >
0 commit comments