Skip to content
This repository was archived by the owner on May 27, 2019. It is now read-only.

Commit 7e97ddf

Browse files
authored
Merge pull request #8 from algolia/feat/nuxt
feat(nuxt): init Nuxt example
2 parents 71f9b5a + 6261bf0 commit 7e97ddf

File tree

21 files changed

+5470
-0
lines changed

21 files changed

+5470
-0
lines changed

examples/nuxt/.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_size = 2
6+
indent_style = space
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

examples/nuxt/.eslintrc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
root: true,
3+
parser: 'babel-eslint',
4+
env: {
5+
browser: true,
6+
node: true
7+
},
8+
extends: 'standard',
9+
// required to lint *.vue files
10+
plugins: [
11+
'html'
12+
],
13+
// add your custom rules here
14+
rules: {},
15+
globals: {}
16+
}

examples/nuxt/.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# dependencies
2+
node_modules
3+
4+
# logs
5+
npm-debug.log
6+
7+
# Nuxt build
8+
.nuxt
9+
10+
# Nuxt generate
11+
dist

examples/nuxt/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# nuxt-instantsearch
2+
3+
> Nuxt.js integration with Vue InstantSearch
4+
5+
## Build Setup
6+
7+
``` bash
8+
# install dependencies
9+
$ npm install # Or yarn install
10+
11+
# serve with hot reload at localhost:3000
12+
$ npm run dev
13+
14+
# build for production and launch server
15+
$ npm run build
16+
$ npm start
17+
18+
# generate static project
19+
$ npm run generate
20+
```
21+
22+
For detailed explanation on how things work, checkout the [Nuxt.js docs](https://github.com/nuxt/nuxt.js).

examples/nuxt/assets/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ASSETS
2+
3+
This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
4+
5+
More information about the usage of this directory in the documentation:
6+
https://nuxtjs.org/guide/assets#webpacked
7+
8+
**This directory is not required, you can delete it if you don't want to use it.**

examples/nuxt/components/Logo.vue

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<template>
2+
<div class="VueToNuxtLogo">
3+
<div class="Triangle Triangle--two"></div>
4+
<div class="Triangle Triangle--one"></div>
5+
<div class="Triangle Triangle--three"></div>
6+
<div class="Triangle Triangle--four"></div>
7+
</div>
8+
</template>
9+
10+
<style>
11+
.VueToNuxtLogo
12+
{
13+
display: inline-block;
14+
animation: turn 2s linear forwards 1s;
15+
transform: rotateX(180deg);
16+
position: relative;
17+
overflow: hidden;
18+
height: 180px;
19+
width: 245px;
20+
}
21+
.Triangle
22+
{
23+
position: absolute;
24+
top: 0;
25+
left: 0;
26+
width: 0;
27+
height: 0;
28+
}
29+
.Triangle--one
30+
{
31+
border-left: 105px solid transparent;
32+
border-right: 105px solid transparent;
33+
border-bottom: 180px solid #41B883;
34+
}
35+
.Triangle--two
36+
{
37+
top: 30px;
38+
left: 35px;
39+
animation: goright 0.5s linear forwards 3.5s;
40+
border-left: 87.5px solid transparent;
41+
border-right: 87.5px solid transparent;
42+
border-bottom: 150px solid #3B8070;
43+
}
44+
.Triangle--three
45+
{
46+
top: 60px;
47+
left: 35px;
48+
animation: goright 0.5s linear forwards 3.5s;
49+
border-left: 70px solid transparent;
50+
border-right: 70px solid transparent;
51+
border-bottom: 120px solid #35495E;
52+
}
53+
.Triangle--four
54+
{
55+
top: 120px;
56+
left: 70px;
57+
animation: godown 0.5s linear forwards 3s;
58+
border-left: 35px solid transparent;
59+
border-right: 35px solid transparent;
60+
border-bottom: 60px solid #fff;
61+
}
62+
63+
@keyframes turn {
64+
100% {
65+
transform: rotateX(0deg);
66+
}
67+
}
68+
@keyframes godown {
69+
100% {
70+
top: 180px;
71+
}
72+
}
73+
@keyframes goright {
74+
100% {
75+
left: 70px;
76+
}
77+
}
78+
</style>

examples/nuxt/components/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# COMPONENTS
2+
3+
The components directory contains your Vue.js Components.
4+
Nuxt.js doesn't supercharge these components.
5+
6+
**This directory is not required, you can delete it if you don't want to use it.**

examples/nuxt/layouts/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# LAYOUTS
2+
3+
This directory contains your Application Layouts.
4+
5+
More information about the usage of this directory in the documentation:
6+
https://nuxtjs.org/guide/views#layouts
7+
8+
**This directory is not required, you can delete it if you don't want to use it.**

examples/nuxt/layouts/default.vue

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<template>
2+
<div>
3+
<nuxt/>
4+
</div>
5+
</template>
6+
7+
<style>
8+
html
9+
{
10+
font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
11+
font-size: 16px;
12+
word-spacing: 1px;
13+
-ms-text-size-adjust: 100%;
14+
-webkit-text-size-adjust: 100%;
15+
-moz-osx-font-smoothing: grayscale;
16+
-webkit-font-smoothing: antialiased;
17+
box-sizing: border-box;
18+
}
19+
*, *:before, *:after
20+
{
21+
box-sizing: border-box;
22+
margin: 0;
23+
}
24+
.button--green
25+
{
26+
display: inline-block;
27+
border-radius: 4px;
28+
border: 1px solid #3b8070;
29+
color: #3b8070;
30+
text-decoration: none;
31+
padding: 10px 30px;
32+
}
33+
.button--green:hover
34+
{
35+
color: #fff;
36+
background-color: #3b8070;
37+
}
38+
.button--grey
39+
{
40+
display: inline-block;
41+
border-radius: 4px;
42+
border: 1px solid #35495e;
43+
color: #35495e;
44+
text-decoration: none;
45+
padding: 10px 30px;
46+
margin-left: 15px;
47+
}
48+
.button--grey:hover
49+
{
50+
color: #fff;
51+
background-color: #35495e;
52+
}
53+
</style>

examples/nuxt/middleware/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# MIDDLEWARE
2+
3+
This directory contains your Application Middleware.
4+
The middleware lets you define custom function to be ran before rendering a page or a group of pages (layouts).
5+
6+
More information about the usage of this directory in the documentation:
7+
https://nuxtjs.org/guide/routing#middleware
8+
9+
**This directory is not required, you can delete it if you don't want to use it.**

0 commit comments

Comments
 (0)