feat: last fiddles on the search bar

This commit is contained in:
Dimitrie Stefanescu
2021-07-22 19:25:14 +01:00
parent bed88c1b91
commit 2ed575c1a8
3 changed files with 30 additions and 9 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
</svg>
</div>
<input type="text" name="email" id="search-bar"
class="focus:ring-blue-500 focus:border-blue-500 block w-full pl-10 sm:text-sm border-gray-300 dark:bg-gray-900 dark:text-white rounded-md h h-12"
class="focus:ring-blue-500 focus:border-blue-500 transition block w-full pl-10 sm:text-sm border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-white rounded-md h h-12"
placeholder="Search...">
</div>
<div id="search-results" class="mt-4 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3"></div>
+13 -1
View File
@@ -67,7 +67,19 @@
<div class="w-default my-12 grid grid-cols-1 gap-5 md:grid-cols-2 lg:grid-cols-3 mx-auto">
{{#get "posts" filter="tag:{{slug}}" include="authors,tags" order="featured desc"}}
{{!-- Featured posts first --}}
{{#get "posts" filter="tag:{{slug}}+featured:true" include="authors,tags" order="published_at desc"}}
{{#foreach posts visibility="all"}}
{{> cardTutorial }}
{{/foreach}}
{{/get}}
{{!-- Then all the rest in desc order --}}
{{#get "posts" filter="tag:{{slug}}+featured:false" include="authors,tags" order="published_at desc" limit="50"}}
{{#foreach posts visibility="all"}}
+16 -7
View File
@@ -48,15 +48,24 @@
<div class="w-default mt-10 grid gap-8 md:grid-cols-2 lg:grid-cols-3">
{{#foreach posts columns=3}}
{{!-- {{#if featured}}
<h1>HAI</h1>
{{else}} --}}
{{> cardTutorialSm}}
{{!-- {{/if}} --}}
{{!-- {{#get "posts" filter="tag:tutorials+featured:true" include="authors,tags" order="published_at desc" as |featured_posts pages|}}
{{#foreach featured_posts visibility="all"}}
{{> cardTutorialSm }}
{{/foreach}}
{{pages.total}}
{{/get}} --}}
{{#foreach posts }}
{{> cardTutorialSm}}
{{/foreach}}
</div>