feat: initial commit

This commit is contained in:
Reinaldy Rafli 2021-06-21 11:59:24 +07:00
commit 846d8e4093
20 changed files with 9856 additions and 0 deletions

14
.editorconfig Normal file
View File

@ -0,0 +1,14 @@
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

19
.eslintrc.js Normal file
View File

@ -0,0 +1,19 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'plugin:vue/strongly-recommended',
'xo-space',
],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'vue',
],
rules: {
},
};

94
.gitignore vendored Normal file
View File

@ -0,0 +1,94 @@
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# 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
# Service worker
sw.*
# macOS
.DS_Store
# Vim swap files
*.swp
*.code-workspace
.routify

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
v14.17.0

View File

@ -0,0 +1,22 @@
<template>
<div class="text-xs opacity-75 hover:opacity-100">
<p>
Made with <svg
class="inline"
viewBox="0 0 1792 1792"
preserveAspectRatio="xMidYMid meet"
xmlns="http://www.w3.org/2000/svg"
style="height: 0.8rem;"
><path
d="M896 1664q-26 0-44-18l-624-602q-10-8-27.5-26T145 952.5 77 855 23.5 734 0 596q0-220 127-344t351-124q62 0 126.5 21.5t120 58T820 276t76 68q36-36 76-68t95.5-68.5 120-58T1314 128q224 0 351 124t127 344q0 221-229 450l-623 600q-18 18-44 18z"
fill="#e25555"
/></svg> in Indonesia.
</p>
<p>
Source code available on <a
class="hover:underline"
href="https://www.github.com/aldy505/code"
>Github.</a>
</p>
</div>
</template>

140
components/Repository.vue Normal file
View File

@ -0,0 +1,140 @@
<template>
<div class="flex flex-col py-4 px-2 lg:px-0 hover:opacity-100">
<div class="flex-1 text-sm hover:text-blue-300 font-bold">
<a :href="url">
<div class="flex flex-row items-center">
<div class="flex-initial">
<img
:src="image.folder"
class="text-white h-3 w-3 fill-current inline"
alt="Repository"
>
</div>
<div class="flex-initial px-4">
{{ name }}
</div>
</div>
</a>
</div>
<div class="flex-2 text-xs opacity-80 lg:w-2/3">
{{ description }}
</div>
<div class="flex-1">
<div class="flex flex-row items-center">
<div class="flex-1 text-xs">
<div class="flex flex-row items-center content-center">
<div class="flex-initial">
<svg
v-show="language"
class="h-2 w-2 inline"
viewBox="0 0 100 100"
>
<circle
cx="50"
cy="50"
r="40"
:fill="getLanguageColor()"
/>
</svg>
</div>
<div class="flex-initial px-2">
{{ language }}
</div>
</div>
</div>
<div
v-show="stars > 0"
class="flex-2 text-xs"
>
<div class="flex flex-row items-center content-center">
<div class="flex-initial">
<img
:src="image.star"
class="text-white font-bold h-3 w-3 fill-current -inset-y-1"
alt="Stargazers"
>
</div>
<div class="flex-initial px-2">
{{ stars }}
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'Repository',
props: {
url: {
type: String,
required: true,
default: '',
},
name: {
type: String,
required: true,
default: '',
},
stars: {
type: Number,
required: false,
default: null,
},
description: {
type: String,
required: false,
default: '',
},
language: {
type: String,
required: false,
default: '',
},
},
data() {
return {
image: {
folder: 'folder.svg',
star: 'star.svg',
},
languageColor: 'white',
};
},
methods: {
getLanguageColor() {
if (!this.language) {
return;
}
switch (this.language.toLowerCase()) {
case 'go':
return '#a1d5ed';
case 'julia':
return '#d35bde';
case 'javascript':
return '#e4f060';
case 'typescript':
return '#4e85de';
case 'vue':
return '#4ede85';
case 'shell':
return '#9dde4e';
case 'html':
return '#de704e';
default:
return '#bab7b6';
}
},
},
};
</script>

93
config/head.js Normal file
View File

@ -0,0 +1,93 @@
const config = {
title: 'Reinaldy Rafli - Code',
description: 'Reinaldy Rafli is a full stack web developer based in Indonesia.',
url: 'https://code.reinaldyrafli.com',
image: 'https://code.reinaldyrafli.com/social.jpg',
keywords: ['reinaldy rafli', 'full stack', 'web dev', 'web developer', 'vue', 'indonesia', 'jakartajs', 'github', 'open source'],
};
function prepareMeta() {
const meta = [];
meta.push(
{
name: 'og:title',
content: config.title,
},
{
name: 'twitter:title',
content: config.title,
},
);
meta.push(
{
name: 'description',
content: config.description,
},
{
name: 'og:description',
content: config.description,
},
{
name: 'twitter:description',
content: config.description,
},
);
meta.push({
name: 'og:url',
content: config.url,
});
meta.push(
{
name: 'og:image',
property: 'og:image',
content: config.image,
},
{
name: 'og:image:secure_url',
property: 'og:image:secure_url',
content: config.image,
},
{
name: 'twitter:image',
content: config.image,
},
);
meta.push({
name: 'keywords',
content: config.keywords.join(','),
});
return meta.map(item => {
if (item.name && !item.property) {
item.property = item.name;
}
if ((item.name || item.property) && !item.hid) {
item.hid = item.name || item.property;
}
return item;
});
}
export default {
title: 'Reinaldy Rafli - Code',
htmlAttrs: {
lang: 'en',
},
link: [
{rel: 'preconnect', href: 'https://fonts.gstatic.com'},
{rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap'},
{rel: 'icon', type: 'image/png', href: 'favicon.png'},
{rel: 'icon', type: 'image/svg', href: 'favicon.svg'},
],
meta: [
{charset: 'utf-8'},
{name: 'viewport', content: 'width=device-width, initial-scale=1'},
...prepareMeta(),
],
};

23
layouts/error.vue Normal file
View File

@ -0,0 +1,23 @@
<template>
<div class="bg-cool-gray-900 text-white min-h-screen min-w-full h-full w-full font-body">
<div class="container mx-auto px-10 md:px-20 lg:px-32">
<h1 class="text-3xl font-bold">
Oh no, something went wrong.
</h1>
</div>
</div>
</template>
<script>
export default {
created() {
this.$router.push('/');
},
props: {
error: {
type: Object,
default: null,
},
},
};
</script>

16
nuxt.config.js Normal file
View File

@ -0,0 +1,16 @@
import headConfig from './config/head.js';
export default {
target: 'static',
ssr: false,
buildModules: [
'nuxt-vite',
'nuxt-windicss',
'nuxt-animejs',
],
modules: [
'@nuxtjs/axios',
],
components: true,
head: headConfig,
};

31
package.json Normal file
View File

@ -0,0 +1,31 @@
{
"name": "code.reinaldyrafli.com",
"version": "1.0.0",
"description": "Website for code.reinaldyrafli.com",
"main": "index.js",
"scripts": {
"dev": "nuxt",
"generate": "nuxt generate",
"lint": "eslint --fix --ext .vue,.js --ignore-path .gitignore ."
},
"repository": {
"type": "git",
"url": "git+https://github.com/aldy505/code.git"
},
"author": "Reinaldy Rafli <aldy505@tutanota.com>",
"license": "GPL-3.0-or-later",
"bugs": {
"url": "https://github.com/aldy505/code/issues"
},
"homepage": "https://github.com/aldy505/code#readme",
"devDependencies": {
"@nuxtjs/axios": "^5.13.6",
"eslint": "^7.29.0",
"eslint-config-xo-space": "^0.28.0",
"eslint-plugin-vue": "^7.11.1",
"nuxt": "^2.15.7",
"nuxt-animejs": "^1.2.1",
"nuxt-vite": "^0.1.1",
"nuxt-windicss": "^1.0.3"
}
}

120
pages/index.vue Normal file
View File

@ -0,0 +1,120 @@
<template>
<div class="bg-cool-gray-900 text-white min-h-screen min-w-full h-full w-full font-body">
<div class="container mx-auto px-10 md:px-20 lg:px-32">
<div class="h-full lg:min-h-screen flex flex-col lg:flex-row items-center justify-content">
<div class="flex-1 pt-12 pb-4 md:pt-0 md:pb-0">
<div class="flex flex-row items-center">
<div class="flex-initial">
<h1 class="text-5xl md:text-8xl font-bold py-4">
Reinaldy Rafli
</h1>
</div>
<div class="flex-initial md:pl-4">
<img :src="image.me" alt="My Memoji" class="w-full md:w-2/3 h-auto md:py-4">
</div>
</div>
<p class="text-base py-2 md:w-2/3">
Not a CS student, don't work in IT industry, but most of the time I do web development. Always love to be working on a cool project 😉
</p>
<ul class="list-none text-base py-2">
<li>
<a
href="mailto:aldy505@tutanota.com"
class="opacity-75 hover:opacity-100 hover:underline-light-300 hover:text-blue-100"
>Email</a>
</li>
<li>
<a
href="https://www.github.com/aldy505"
class="opacity-75 hover:opacity-100 hover:underline-light-300 hover:text-blue-100"
>Github</a>
</li>
<li>
<a
href="https://t.me/aldy505"
class="opacity-75 hover:opacity-100 hover:underline-light-300 hover:text-blue-100"
>Telegram</a>
</li>
</ul>
<div class="text-sm py-2 hidden md:block">
<MadeWithLove />
</div>
</div>
<div class="flex-1 pl-0 lg:pl-12">
<div
class="repository"
v-show="repoRequest"
>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-1 place-content-center">
<div
class="line"
v-for="repo in repositories"
:key="repo.updated_at"
>
<Repository
:url="repo.html_url"
:name="repo.name"
:stars="repo.stargazers_count"
:language="repo.language"
:description="repo.description"
/>
</div>
<div class="line">
<p class="text-sm opacity-75 hover:opacity-100 hover:text-blue-100 hover:underline md:pb-0 pb-4">
<a href="https://www.github.com/aldy505">
Explore more on Github &mdash;&gt;
</a>
</p>
</div>
</div>
</div>
</div>
<div class="flex-initial md:hidden py-4">
<MadeWithLove />
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
repositories: [],
repoRequest: false,
image: {
me: 'me.png'
}
};
},
async mounted() {
try {
const response = await this.$axios.$get('https://api.github.com/users/aldy505/repos');
const randNumber = Math.random() * (response.length - 5);
this.repositories = response.sort().slice(randNumber, randNumber + 5);
this.repoRequest = true;
this.$anime({
targets: '.repository',
opacity: [
{value: 0, duration: 500, delay: 500},
{value: 100, duration: 2500}
],
translateY: [
{value: 1000, duration: 500, delay: 800},
{value: 0, duration: 2500}
],
delay: this.$anime.stagger(300, {start: 0, from: 'first', easing: 'spring'}),
});
} catch (error) {
this.repoRequest = false;
}
},
};
</script>

3
static/collection.svg Normal file
View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path style="fill: #ffffff;" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"/>
</svg>

After

Width:  |  Height:  |  Size: 354 B

BIN
static/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

1
static/favicon.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 65 KiB

6
static/folder.svg Normal file
View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 512 512">
<path
style="fill: #ffffff;"
d="M464 128H272l-54.63-54.63c-6-6-14.14-9.37-22.63-9.37H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm0 272H48V112h140.12l54.63 54.63c6 6 14.14 9.37 22.63 9.37H464v224z" />
</svg>

After

Width:  |  Height:  |  Size: 381 B

BIN
static/me.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
static/social.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

1
static/star.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="none" stroke="currentColor"><path style="fill: #ffffff;" d="M528.1 171.5L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z"/></svg>

After

Width:  |  Height:  |  Size: 505 B

146
windi.config.js Executable file
View File

@ -0,0 +1,146 @@
// @ts-check - enable TS check for js file
import {defineConfig} from 'windicss/helpers';
import aspectRatio from 'windicss/plugin/aspect-ratio';
export default defineConfig({
darkMode: 'media',
theme: {
fontFamily: {
display: ['Poppins', 'sans-serif'],
body: ['Poppins', 'sans-serif'],
},
extend: {
colors: {
brand: '#3009D5',
royalblue: {
50: '#f7fafb',
100: '#e4f0fd',
200: '#c7d8fb',
300: '#a0b4f5',
400: '#7f8ced',
500: '#6866e8',
600: '#564adc',
700: '#4137be',
800: '#2d2690',
900: '#19185b',
},
denim: {
50: '#f9fafb',
100: '#eef1fb',
200: '#dcd8f6',
300: '#bbb3ea',
400: '#9f88d9',
500: '#8463ca',
600: '#6b47b2',
700: '#50358d',
800: '#362461',
900: '#1e1639',
},
orchid: {
50: '#fbfbfb',
100: '#f7f1f6',
200: '#eed5ed',
300: '#dbabd5',
400: '#ce7db8',
500: '#b8589d',
600: '#9b3d7c',
700: '#752e5c',
800: '#501f3c',
900: '#2e1321',
},
blush: {
50: '#fcfcfb',
100: '#faf1ef',
200: '#f5d3de',
300: '#e8a7bb',
400: '#e17893',
500: '#d05370',
600: '#b53951',
700: '#8d2a3b',
800: '#631d27',
900: '#3a1215',
},
chestnut: {
50: '#fcfbfa',
100: '#faf1eb',
200: '#f4d6d3',
300: '#e5acaa',
400: '#db7d7d',
500: '#c65958',
600: '#aa3e3c',
700: '#822e2d',
800: '#5a201f',
900: '#361312',
},
sepia: {
50: '#fcfbf9',
100: '#f9f1e5',
200: '#f1d9c8',
300: '#deb199',
400: '#cb8469',
500: '#b16145',
600: '#93472e',
700: '#6f3523',
800: '#4c2419',
900: '#2e1610',
},
shadow: {
50: '#fafaf8',
100: '#f5f1e8',
200: '#e9ddcd',
300: '#ccb8a0',
400: '#a98e70',
500: '#8a6c4a',
600: '#6e5233',
700: '#533d28',
800: '#38291d',
900: '#221913',
},
gray: {
50: '#f9faf8',
100: '#f1f1f0',
200: '#dfdedf',
300: '#bcbbbb',
400: '#919291',
500: '#72706b',
600: '#5b554f',
700: '#453f3b',
800: '#2f2b2a',
900: '#1c1a1b',
},
steel: {
50: '#f7f9f9',
100: '#e8f1f8',
200: '#ccdff1',
300: '#9fbddc',
400: '#6e96c2',
500: '#5474a7',
600: '#44588b',
700: '#35426a',
800: '#252c49',
900: '#161b2e',
},
wisteria: {
50: '#f6f9fa',
100: '#e4f1fb',
200: '#c4def7',
300: '#96bcea',
400: '#6895d9',
500: '#5072c9',
600: '#4156b3',
700: '#33408f',
800: '#232b65',
900: '#141a3f',
},
},
flex: {
2: '2 2 0%',
3: '3 3 0%',
4: '4 4 0%',
},
},
},
plugins: [
aspectRatio,
],
});

9126
yarn.lock Normal file

File diff suppressed because it is too large Load Diff