Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# MACBOOK Default File
.DS_Store

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# 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
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://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/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

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

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# others
node_modules
yarn.lock

10 changes: 10 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"printWidth": 100,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"semi": false,
"useTabs": false,
"endOfLine": "lf"
}
19 changes: 19 additions & 0 deletions 1-Colors/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="content-script-type" content="text/javascript">
<title>Random Color Change</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/src/css/style.css">
</head>

<body>

<main id="app"></main>
<script type="module" src="/src/main.js"></script>

</body>

</html>
29 changes: 29 additions & 0 deletions 1-Colors/src/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
html,
body {
width: 100%;
height: 100vh;
overflow: hidden;
}

#app {
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}

.color-btn {
background-color: transparent;
border: 3.5px solid;
border-radius: 8px;
color: gray;
outline: none;
width: 80px;
height: 30px;
font-size: 15px;
}

.color-btn:hover {
background-color: #e6e6e6;
}
17 changes: 17 additions & 0 deletions 1-Colors/src/js/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export default function App({ $target }) {
const $background = document.getElementById('app')
const $button = document.createElement('button')
$button.className = 'color-btn'
$button.innerText = 'Click me'
$target.appendChild($button)

$button.addEventListener('click', () => {
onColorChange()
})

function onColorChange() {
const colors = ['#FC5C7D', '#6A82FB', '#38ef7d', '#fffbd5', 'eee8aa', '#ffdab9', '#fffaf0']
let num = Math.floor(Math.random() * colors.length)
$background.style.backgroundColor = colors[num]
}
}
7 changes: 7 additions & 0 deletions 1-Colors/src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import App from './js/App.js'

const $app = document.querySelector('#app')

new App({
$target: $app,
})
20 changes: 20 additions & 0 deletions 2-Hex_Color/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="content-script-type" content="text/javascript">
<title>Hex Colors gradient</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/src/css/style.css">
</head>

<body>

<main id="app"></main>
<script type="module" src="/src/main.js"></script>

</body>

</html>

129 changes: 129 additions & 0 deletions 2-Hex_Color/src/css/reset.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}
body {
line-height: 1;
}
ol,
ul {
list-style: none;
}
blockquote,
q {
quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
input:focus {
outline: none;
}
a {
color: inherit;
text-decoration: none;
}
Loading