Skip to content

Commit

Permalink
🚧 WIP Nuxt rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
NuroDev committed Oct 14, 2020
1 parent 49a599d commit da6f737
Show file tree
Hide file tree
Showing 40 changed files with 7,726 additions and 3,837 deletions.
15 changes: 15 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
extends: [
'@nuxtjs/eslint-config-typescript',
'prettier',
'prettier/vue',
'plugin:prettier/recommended',
'plugin:nuxt/recommended',
],
plugins: ['prettier'],
};
100 changes: 90 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,96 @@
.DS_Store
node_modules/
public/**/*

# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# Nuxt generate
dist

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless

# IDE / Editor
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln

# Service worker
sw.*

# macOS
.DS_Store

# Vim swap files
*.swp

# Caching
cache/

# Vercel
.vercel
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.nuxt/
dist/
public/
sw.*
12 changes: 12 additions & 0 deletions .vercelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.github/
.nuxt/
cache/
dist/
node_modules/

.eslintrc.js
.prettierignore
.prettierrc.json
*.log
README.md
sw.*
13 changes: 13 additions & 0 deletions api/get_portfolio_repos.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { NowRequest, NowResponse } from '@vercel/node';
import fetch from 'node-fetch';

export default async function (_req: NowRequest, res: NowResponse) {
// Get all repositoryż
const response = await fetch('https://api.github.com/users/nurodev/repos');
let repos = await response.json();

// Remove the profile README repo
repos = repos.filter((repo) => !'NuroDev/NuroDev'.includes(repo.full_name));

res.send(JSON.stringify(repos));
}
6 changes: 6 additions & 0 deletions api/hello_world.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { NowRequest, NowResponse } from '@vercel/node';

export default function (req: NowRequest, res: NowResponse) {
const { name = 'World' } = req.query;
res.send(`Hello ${name}!`);
}
35 changes: 35 additions & 0 deletions components/Logo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<template>
<svg
class="NuxtLogo"
width="245"
height="180"
viewBox="0 0 452 342"
xmlns="http://www.w3.org/2000/svg"
>
<path
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"
fill="#00C58E"
/>
<path
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"
fill="#108775"
/>
<path
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"
fill="#2F495E"
/>
</svg>
</template>

<style>
.NuxtLogo {
animation: 1s appear;
margin: auto;
}
@keyframes appear {
0% {
opacity: 0;
}
}
</style>
18 changes: 18 additions & 0 deletions content/hello.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Getting started
description: 'Empower your NuxtJS application with @nuxt/content module: write in a content/ directory and fetch your Markdown, JSON, YAML and CSV files through a MongoDB like API, acting as a Git-based Headless CMS.'
---

Empower your NuxtJS application with `@nuxtjs/content` module: write in a `content/` directory and fetch your Markdown, JSON, YAML and CSV files through a MongoDB like API, acting as a **Git-based Headless CMS**.

## Writing content

Learn how to write your `content/`, supporting Markdown, YAML, CSV and JSON: https://content.nuxtjs.org/writing.

## Fetching content

Learn how to fetch your content with `$content`: https://content.nuxtjs.org/fetching.

## Displaying content

Learn how to display your Markdown content with the `<nuxt-content>` component directly in your template: https://content.nuxtjs.org/displaying.
24 changes: 24 additions & 0 deletions layouts/default.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<template>
<Nuxt />
</template>

<style>
html {
@apply antialiased box-border text-base;
font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
'Helvetica Neue', Arial, sans-serif;
word-spacing: 1px;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
*,
*::before,
*::after {
@apply box-border m-0;
}
.dark body {
@apply bg-gray-800 text-white;
}
</style>
38 changes: 38 additions & 0 deletions layouts/error.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<template>
<div
class="h-screen w-screen flex items-center bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-white"
>
<div class="container flex flex-col md:flex-row items-center justify-center px-5">
<div class="max-w-xl">
<p class="my-4 text-6xl md:text-3xl font-bold leading-normal">
Sorry we couldn't find this page.
</p>
<p class="mb-8 text-2xl text-gray-500 dark:text-gray-600">
But dont worry, you can find plenty of other things on our homepage.
</p>

<NuxtLink to="/">
<button
type="button"
class="inline-flex items-center justify-center px-5 py-3 border border-transparent text-base leading-6 font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:shadow-outline transition duration-150 ease-in-out"
>
<ArrowLeftIcon class="h-6 w-6 mr-4" />
Go Back Home
</button>
</NuxtLink>
</div>
</div>
</div>
</template>

<script lang="ts">
import Vue from 'vue';
import { ArrowLeftIcon } from 'vue-feather-icons';
export default Vue.extend({
components: {
ArrowLeftIcon,
},
});
</script>
Loading

0 comments on commit da6f737

Please sign in to comment.