Skip to content

Commit 192a714

Browse files
Convert replit to repo, update to prefer single quotes.
0 parents  commit 192a714

File tree

9 files changed

+3766
-0
lines changed

9 files changed

+3766
-0
lines changed

.gitignore

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
.DS_Store
10+
11+
# Diagnostic reports (https://nodejs.org/api/report.html)
12+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
13+
14+
# Runtime data
15+
pids
16+
*.pid
17+
*.seed
18+
*.pid.lock
19+
20+
# Directory for instrumented libs generated by jscoverage/JSCover
21+
lib-cov
22+
23+
# Coverage directory used by tools like istanbul
24+
coverage
25+
*.lcov
26+
27+
# nyc test coverage
28+
.nyc_output
29+
30+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
31+
.grunt
32+
33+
# Bower dependency directory (https://bower.io/)
34+
bower_components
35+
36+
# node-waf configuration
37+
.lock-wscript
38+
39+
# Compiled binary addons (https://nodejs.org/api/addons.html)
40+
build/Release
41+
42+
# Dependency directories
43+
node_modules/
44+
jspm_packages/
45+
46+
# TypeScript v1 declaration files
47+
typings/
48+
49+
# TypeScript cache
50+
*.tsbuildinfo
51+
52+
# Optional npm cache directory
53+
.npm
54+
55+
# Optional eslint cache
56+
.eslintcache
57+
58+
# Microbundle cache
59+
.rpt2_cache/
60+
.rts2_cache_cjs/
61+
.rts2_cache_es/
62+
.rts2_cache_umd/
63+
64+
# Optional REPL history
65+
.node_repl_history
66+
67+
# Output of 'npm pack'
68+
*.tgz
69+
70+
# Yarn Integrity file
71+
.yarn-integrity
72+
73+
# dotenv environment variables file
74+
.env
75+
.env.test
76+
77+
# parcel-bundler cache (https://parceljs.org/)
78+
.cache
79+
80+
# Next.js build output
81+
.next
82+
83+
# Nuxt.js build / generate output
84+
.nuxt
85+
dist
86+
87+
# Gatsby files
88+
.cache/
89+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
90+
# https://nextjs.org/blog/next-9-1#public-directory-support
91+
# public
92+
93+
# vuepress build output
94+
.vuepress/dist
95+
96+
# Serverless directories
97+
.serverless/
98+
99+
# FuseBox cache
100+
.fusebox/
101+
102+
# DynamoDB Local files
103+
.dynamodb/
104+
105+
# TernJS port file
106+
.tern-port

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Chris M
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Adding onclick Handling Demo
2+
3+
This is an example repo for students to practice onclick event handling in JavaScript.
4+
5+
1. Before starting, run `npm install` or `npm i` to install dependencies.
6+
7+
2. Open up `index.html`, `src/index.js`, and `styles/style.css` to see the code.
8+
9+
3. Double click the `index.html` file in the root of the repo to open it in a browser.

eslint.config.mjs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import globals from "globals";
2+
import js from "@eslint/js";
3+
import stylistic from "@stylistic/eslint-plugin";
4+
5+
6+
export default [
7+
js.configs.recommended,
8+
{ ignores: ["*.config.*"] },
9+
{
10+
plugins: {
11+
'@stylistic': stylistic
12+
},
13+
languageOptions: {
14+
globals: {
15+
...globals.browser,
16+
...globals.node,
17+
},
18+
ecmaVersion: "latest",
19+
sourceType: "module",
20+
},
21+
22+
rules: {
23+
"@stylistic/max-len": [1, 120, 2, { "ignoreComments": true }],
24+
"no-unused-vars": "warn",
25+
"no-console": "off",
26+
"@stylistic/comma-dangle": ["warn", "only-multiline"],
27+
"@stylistic/semi": ["warn", "always"],
28+
"@stylistic/quotes": [2, "single",
29+
{
30+
allowTemplateLiterals: true,
31+
avoidEscape: true,
32+
},
33+
],
34+
"camelcase": ["error", {"properties": "always"}],
35+
"dot-notation": "warn",
36+
"@stylistic/space-before-function-paren": "off",
37+
"@stylistic/indent": ["warn", 2],
38+
"@stylistic/padded-blocks": "off",
39+
"@stylistic/no-trailing-spaces": "warn",
40+
"@stylistic/array-bracket-spacing": "warn",
41+
"@stylistic/no-multi-spaces": ["error", { "ignoreEOLComments": true }],
42+
"no-var": "error",
43+
},
44+
},
45+
];

index.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width">
6+
<title>Connecting HTML, CSS, and JS Demo</title>
7+
<link href="styles/style.css" rel="stylesheet" type="text/css" />
8+
</head>
9+
<body>
10+
<main>
11+
<h1>🦀 Welcome to my Crab Fan Site 🦀</h1>
12+
<p>Here is my website where I post interesting facts about crabs.</p>
13+
14+
<section>
15+
<h2>I Don't Know What Crabs Look Like</h2>
16+
<ol>
17+
<li>sometimes red</li>
18+
<li>Can be rly small or rly big</li>
19+
<li>Claaaws 🎅🧑‍🎄</li>
20+
<li>the Hard shell</li>
21+
<li>krabby was based off this one</li>
22+
</ol>
23+
</section>
24+
25+
<section>
26+
<button id="addCrabButton">Add Crab</button>
27+
</section>
28+
29+
<section id="crabContainer">
30+
31+
</section>
32+
</main>
33+
<script src="src/index.js"></script>
34+
</body>
35+
</html>

0 commit comments

Comments
 (0)