Skip to content

Commit 4988f75

Browse files
committed
Init
1 parent 06e3492 commit 4988f75

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+14707
-1919
lines changed

.eslintrc.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
node: true
6+
},
7+
parserOptions: {
8+
parser: 'babel-eslint'
9+
},
10+
extends: [
11+
'@nuxtjs',
12+
'prettier',
13+
'prettier/vue',
14+
'plugin:prettier/recommended',
15+
'plugin:nuxt/recommended'
16+
],
17+
plugins: [],
18+
// add your custom rules here
19+
rules: {}
20+
}

.gitignore

+82-26
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,90 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Node template
3+
# Logs
4+
/logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
29

3-
# dependencies
4-
/node_modules
5-
/.pnp
6-
.pnp.js
10+
# Runtime data
11+
pids
12+
*.pid
13+
*.seed
14+
*.pid.lock
715

8-
# testing
9-
/coverage
16+
# Directory for instrumented libs generated by jscoverage/JSCover
17+
lib-cov
1018

11-
# next.js
12-
/.next/
13-
/out/
19+
# Coverage directory used by tools like istanbul
20+
coverage
1421

15-
# production
16-
/build
22+
# nyc test coverage
23+
.nyc_output
1724

18-
# misc
19-
.DS_Store
20-
*.pem
25+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26+
.grunt
2127

22-
# debug
23-
npm-debug.log*
24-
yarn-debug.log*
25-
yarn-error.log*
28+
# Bower dependency directory (https://bower.io/)
29+
bower_components
30+
31+
# node-waf configuration
32+
.lock-wscript
33+
34+
# Compiled binary addons (https://nodejs.org/api/addons.html)
35+
build/Release
36+
37+
# Dependency directories
38+
node_modules/
39+
jspm_packages/
40+
41+
# TypeScript v1 declaration files
42+
typings/
43+
44+
# Optional npm cache directory
45+
.npm
46+
47+
# Optional eslint cache
48+
.eslintcache
2649

27-
# local env files
28-
.env.local
29-
.env.development.local
30-
.env.test.local
31-
.env.production.local
50+
# Optional REPL history
51+
.node_repl_history
52+
53+
# Output of 'npm pack'
54+
*.tgz
55+
56+
# Yarn Integrity file
57+
.yarn-integrity
58+
59+
# dotenv environment variables file
60+
.env
61+
62+
# parcel-bundler cache (https://parceljs.org/)
63+
.cache
64+
65+
# next.js build output
66+
.next
67+
68+
# nuxt.js build output
69+
.nuxt
70+
71+
# Nuxt generate
72+
dist
73+
74+
# vuepress build output
75+
.vuepress/dist
76+
77+
# Serverless directories
78+
.serverless
79+
80+
# IDE / Editor
81+
.idea
82+
83+
# Service worker
84+
sw.*
85+
86+
# macOS
87+
.DS_Store
3288

33-
# vercel
34-
.vercel
89+
# Vim swap files
90+
*.swp

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v12.13.0
1+
v12.13.0

.prettierrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"bracketSpacing": true
6+
}

.prettierrc.js

-5
This file was deleted.

README.md

+13-27
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,20 @@
1-
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
1+
# nuxtjs-tailwind-website
22

3-
## Getting Started
4-
5-
First, run the development server:
3+
## Build Setup
64

75
```bash
8-
npm run dev
9-
# or
10-
yarn dev
11-
```
12-
13-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
14-
15-
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
16-
17-
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
6+
# install dependencies
7+
$ yarn install
188

19-
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
9+
# serve with hot reload at localhost:3000
10+
$ yarn dev
2011

21-
## Learn More
12+
# build for production and launch server
13+
$ yarn build
14+
$ yarn start
2215

23-
To learn more about Next.js, take a look at the following resources:
24-
25-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
26-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
27-
28-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
29-
30-
## Deploy on Vercel
31-
32-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
16+
# generate static project
17+
$ yarn generate
18+
```
3319

34-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
20+
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).

assets/css/tailwind.css

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/* tailwindcss */
2+
@import 'tailwindcss/base';
3+
@import 'tailwindcss/components';
4+
@import 'tailwindcss/utilities';
5+
6+
html {
7+
font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI',
8+
Roboto, 'Helvetica Neue', Arial, sans-serif;
9+
font-size: 16px;
10+
word-spacing: 1px;
11+
-ms-text-size-adjust: 100%;
12+
-webkit-text-size-adjust: 100%;
13+
-moz-osx-font-smoothing: grayscale;
14+
-webkit-font-smoothing: antialiased;
15+
box-sizing: border-box;
16+
}
17+
18+
*,
19+
*::before,
20+
*::after {
21+
box-sizing: border-box;
22+
margin: 0;
23+
}
24+
25+
body {
26+
background-color: #fff;
27+
color: #343a40;
28+
}
29+
30+
.wrapper {
31+
padding-top: -64px;
32+
}
33+
34+
.headlineHero {
35+
background-image: url('https://images.unsplash.com/photo-1517927033932-b3d18e61fb3a?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1440&q=80');
36+
background-repeat: no-repeat;
37+
background-position: top center;
38+
background-size: cover;
39+
@apply min-h-screen flex justify-center items-center text-center mx-auto text-white;
40+
}
41+
42+
.btn {
43+
@apply rounded-full text-sm font-medium capitalize focus:to-gray-700 px-5;
44+
}
45+
46+
.btn-xs {
47+
@apply rounded-full text-xs font-medium capitalize focus:to-gray-700 px-2;
48+
}

components/ColorMode.vue

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<template>
2+
<div>
3+
<select v-model="$colorMode.preference" class="color-mode">
4+
<option value="system">System</option>
5+
<option value="light">Light</option>
6+
<option value="dark">Dark</option>
7+
<!-- <option value="sepia">Sepia</option> -->
8+
</select>
9+
</div>
10+
</template>

components/Logo.vue

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<template>
2+
<svg
3+
class="NuxtLogo"
4+
width="245"
5+
height="180"
6+
viewBox="0 0 452 342"
7+
xmlns="http://www.w3.org/2000/svg"
8+
>
9+
<path
10+
d="M139 330l-1-2c-2-4-2-8-1-13H29L189 31l67 121 22-16-67-121c-1-2-9-14-22-14-6 0-15 2-22 15L5 303c-1 3-8 16-2 27 4 6 10 12 24 12h136c-14 0-21-6-24-12z"
11+
fill="#00C58E"
12+
/>
13+
<path
14+
d="M447 304L317 70c-2-2-9-15-22-15-6 0-15 3-22 15l-17 28v54l39-67 129 230h-49a23 23 0 0 1-2 14l-1 1c-6 11-21 12-23 12h76c3 0 17-1 24-12 3-5 5-14-2-26z"
15+
fill="#108775"
16+
/>
17+
<path
18+
d="M376 330v-1l1-2c1-4 2-8 1-12l-4-12-102-178-15-27h-1l-15 27-102 178-4 12a24 24 0 0 0 2 15c4 6 10 12 24 12h190c3 0 18-1 25-12zM256 152l93 163H163l93-163z"
19+
fill="#2F495E"
20+
/>
21+
</svg>
22+
</template>
23+
24+
<style>
25+
.NuxtLogo {
26+
animation: 1s appear;
27+
margin: auto;
28+
}
29+
30+
@keyframes appear {
31+
0% {
32+
opacity: 0;
33+
}
34+
}
35+
</style>

components/cards/Article.vue

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<template>
2+
<div v-if="items && items.length > 0" class="lg:container mx-auto my-12">
3+
<div class="row">
4+
<Nuxt-Link
5+
v-for="(item, index) in items"
6+
:key="item.slug"
7+
:to="localePath({ name: 'article-slug', params: { slug: item.slug } })"
8+
class="col-12 mb-4 shadow-lg hover:shadow-xl"
9+
>
10+
<figure class="md:flex bg-gray-100 p-8 md:p-0" :rel="`card-${index}`">
11+
<img
12+
class="
13+
w-32
14+
h-32
15+
md:w-48 md:h-auto md:rounded-none
16+
rounded-full
17+
mx-auto
18+
bg-gray-200
19+
"
20+
:src="`${item.img}`"
21+
alt=""
22+
width="384"
23+
height="512"
24+
/>
25+
<div class="pt-6 md:p-8 text-center md:text-left space-y-4">
26+
<blockquote>
27+
<p class="text-lg font-semibold">
28+
{{ item.description }}
29+
</p>
30+
</blockquote>
31+
<figcaption class="font-medium">
32+
<div class="text-cyan-600">{{ item.author.name }}</div>
33+
<div class="text-gray-500">Posted: {{ item.createdAt }}</div>
34+
</figcaption>
35+
</div>
36+
</figure>
37+
</Nuxt-Link>
38+
</div>
39+
</div>
40+
</template>
41+
42+
<script>
43+
export default {
44+
props: {
45+
items: { type: Array, required: true, default: () => [] }
46+
}
47+
}
48+
</script>

components/cards/ArticleHeadline.vue

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<template>
2+
<div v-if="item" class="lg:container mx-auto my-12">
3+
<div class="row">
4+
<Nuxt-Link
5+
:to="localePath({ name: 'article-slug', params: { slug: item.slug } })"
6+
class="col-12 mb-4 shadow-lg hover:shadow-xl"
7+
>
8+
<figure class="md:flex bg-gray-100 p-8 md:p-0">
9+
<img
10+
class="
11+
w-32
12+
h-32
13+
md:w-48 md:h-auto md:rounded-none
14+
rounded-full
15+
mx-auto
16+
bg-gray-200
17+
order-2
18+
"
19+
:src="`${item.img}`"
20+
alt=""
21+
width="384"
22+
height="512"
23+
/>
24+
<div class="pt-6 md:p-8 text-center md:text-left space-y-4 order-1">
25+
<blockquote>
26+
<p class="text-lg font-semibold">
27+
{{ item.description }}
28+
</p>
29+
</blockquote>
30+
<figcaption class="font-medium">
31+
<div class="text-cyan-600">
32+
{{ item.author && item.author.name }}
33+
</div>
34+
<div class="text-gray-500">Posted: {{ item.createdAt }}</div>
35+
</figcaption>
36+
</div>
37+
</figure>
38+
</Nuxt-Link>
39+
</div>
40+
</div>
41+
</template>
42+
43+
<script>
44+
export default {
45+
props: {
46+
item: { type: Object, required: true, default: () => {} }
47+
}
48+
}
49+
</script>

0 commit comments

Comments
 (0)