-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2f21f4
commit 558e3d4
Showing
7 changed files
with
463 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"semi": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,144 @@ | ||
<template> | ||
<h1>Home</h1> | ||
<p> | ||
<img src="../assets/logo.png" alt="logo" /> | ||
</p> | ||
<button @click="state.count++">count is: {{ state.count }}</button> | ||
<Foo /> | ||
<p class="virtual">msg from virtual module: {{ foo.msg }}</p> | ||
<p class="inter">this will be styled with a font-face</p> | ||
|
||
<ImportType /> | ||
<div> | ||
<p>hello</p> | ||
<!-- <header class="header"> | ||
<h1 class="header-title"> | ||
<a href="/"> | ||
vue-instantsearch-app | ||
</a> | ||
</h1> | ||
<p class="header-subtitle"> | ||
using | ||
<a href="https://github.com/algolia/vue-instantsearch"> | ||
Vue InstantSearch | ||
</a> | ||
</p> | ||
</header> | ||
<div class="container"> | ||
<ais-instant-search | ||
:search-client="searchClient" | ||
index-name="instant_search" | ||
> | ||
<div class="search-panel"> | ||
<div class="search-panel__filters"> | ||
<ais-panel> | ||
<ais-refinement-list attribute="brand" /> | ||
</ais-panel> | ||
</div> | ||
<div class="search-panel__results"> | ||
<div class="searchbox"> | ||
<ais-search-box placeholder="" /> | ||
</div> | ||
<ais-hits> | ||
<template v-slot:item="{ item }"> | ||
<article> | ||
<h1> | ||
<ais-highlight :hit="item" attribute="name" /> | ||
</h1> | ||
<p> | ||
<ais-highlight :hit="item" attribute="description" /> | ||
</p> | ||
</article> | ||
</template> | ||
</ais-hits> | ||
<div class="pagination"> | ||
<ais-pagination /> | ||
</div> | ||
</div> | ||
</div> | ||
</ais-instant-search> | ||
</div> --> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import foo from '@foo' | ||
import { reactive, defineAsyncComponent } from 'vue' | ||
const ImportType = load('ImportType') | ||
const Foo = defineAsyncComponent(() => | ||
import('../components/Foo').then((mod) => mod.Foo) | ||
) | ||
function load(file) { | ||
return defineAsyncComponent(() => import(`../components/${file}.vue`)) | ||
} | ||
const state = reactive({ count: 0 }) | ||
<script> | ||
// import algoliasearch from 'algoliasearch/lite' | ||
export default { | ||
data() { | ||
return { | ||
// searchClient: algoliasearch( | ||
// 'latency', | ||
// '6be0576ff61c053d5f9a3225e2a90f76' | ||
// ), | ||
} | ||
}, | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
h1, | ||
a { | ||
color: green; | ||
body, | ||
h1 { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
body { | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, | ||
Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; | ||
} | ||
em { | ||
background: cyan; | ||
font-style: normal; | ||
} | ||
.header { | ||
display: flex; | ||
align-items: center; | ||
min-height: 50px; | ||
padding: 0.5rem 1rem; | ||
background-image: linear-gradient(to right, #4dba87, #2f9088); | ||
color: #fff; | ||
margin-bottom: 1rem; | ||
} | ||
.header a { | ||
color: #fff; | ||
text-decoration: none; | ||
} | ||
.header-title { | ||
font-size: 1.2rem; | ||
font-weight: normal; | ||
} | ||
.header-title::after { | ||
content: ' ▸ '; | ||
padding: 0 0.5rem; | ||
} | ||
.header-subtitle { | ||
font-size: 1.2rem; | ||
} | ||
.container { | ||
max-width: 1200px; | ||
margin: 0 auto; | ||
padding: 1rem; | ||
} | ||
.search-panel { | ||
display: flex; | ||
} | ||
.search-panel__filters { | ||
flex: 1; | ||
} | ||
.search-panel__results { | ||
flex: 3; | ||
} | ||
.searchbox { | ||
margin-bottom: 2rem; | ||
} | ||
.pagination { | ||
margin: 2rem auto; | ||
text-align: center; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.