Skip to content

Commit 142ddd7

Browse files
committed
Modularization!!!!!!!!
1 parent bf94d3c commit 142ddd7

23 files changed

Lines changed: 8687 additions & 2256 deletions

.github/workflows/static.yml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
# Simple workflow for deploying static content to GitHub Pages
2-
name: Deploy static content to Pages
2+
name: Deploy browser build to GitHub Pages
33

44
on:
5-
# Runs on pushes targeting the default branch
65
push:
76
branches: ["main"]
8-
9-
# Allows you to run this workflow manually from the Actions tab
107
workflow_dispatch:
118

129
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1310
permissions:
14-
contents: read
15-
pages: write
16-
id-token: write
11+
contents: write
1712

1813
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1914
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
@@ -22,22 +17,29 @@ concurrency:
2217
cancel-in-progress: false
2318

2419
jobs:
25-
# Single deploy job since we're just deploying
2620
deploy:
27-
environment:
28-
name: github-pages
29-
url: ${{ steps.deployment.outputs.page_url }}
3021
runs-on: ubuntu-latest
3122
steps:
3223
- name: Checkout
3324
uses: actions/checkout@v4
34-
- name: Setup Pages
35-
uses: actions/configure-pages@v5
36-
- name: Upload artifact
37-
uses: actions/upload-pages-artifact@v3
25+
26+
- name: Use Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: "20"
30+
cache: "npm"
31+
cache-dependency-path: Build/package-lock.json
32+
33+
- name: Install dependencies
34+
working-directory: Build
35+
run: npm ci
36+
37+
- name: Build
38+
working-directory: Build
39+
run: npm run build
40+
41+
- name: Deploy browser build to GitHub Pages
42+
uses: peaceiris/actions-gh-pages@v4
3843
with:
39-
# Upload entire repository
40-
path: '.'
41-
- name: Deploy to GitHub Pages
42-
id: deployment
43-
uses: actions/deploy-pages@v4
44+
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
publish_dir: Build/dist

.gitignore

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# Snowpack dependency directory (https://snowpack.dev/)
45+
web_modules/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Optional stylelint cache
57+
.stylelintcache
58+
59+
# Optional REPL history
60+
.node_repl_history
61+
62+
# Output of 'npm pack'
63+
*.tgz
64+
65+
# Yarn Integrity file
66+
.yarn-integrity
67+
68+
# dotenv environment variable files
69+
.env
70+
.env.*
71+
!.env.example
72+
73+
# parcel-bundler cache (https://parceljs.org/)
74+
.cache
75+
.parcel-cache
76+
77+
# Next.js build output
78+
.next
79+
out
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
dist
84+
85+
# Gatsby files
86+
.cache/
87+
# Comment in the public line in if your project uses Gatsby and not Next.js
88+
# https://nextjs.org/blog/next-9-1#public-directory-support
89+
# public
90+
91+
# vuepress build output
92+
.vuepress/dist
93+
94+
# vuepress v2.x temp and cache directory
95+
.temp
96+
.cache
97+
98+
# Sveltekit cache directory
99+
.svelte-kit/
100+
101+
# vitepress build output
102+
**/.vitepress/dist
103+
104+
# vitepress cache directory
105+
**/.vitepress/cache
106+
107+
# Docusaurus cache and generated files
108+
.docusaurus
109+
110+
# Serverless directories
111+
.serverless/
112+
113+
# FuseBox cache
114+
.fusebox/
115+
116+
# DynamoDB Local files
117+
.dynamodb/
118+
119+
# Firebase cache directory
120+
.firebase/
121+
122+
# TernJS port file
123+
.tern-port
124+
125+
# Stores VSCode versions used for testing VSCode extensions
126+
.vscode-test
127+
128+
# yarn v3
129+
.pnp.*
130+
.yarn/*
131+
!.yarn/patches
132+
!.yarn/plugins
133+
!.yarn/releases
134+
!.yarn/sdks
135+
!.yarn/versions
136+
137+
# Vite logs files
138+
vite.config.js.timestamp-*
139+
vite.config.ts.timestamp-*

Build/index.html

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>HTMLNotes</title>
7+
<link rel="stylesheet" href="./styles/styles.css" />
8+
<script src="https://cdn.jsdelivr.net/npm/eruda"></script>
9+
<script>eruda.init();</script>
10+
<script src="https://unpkg.com/tiny-markdown-editor@0.2.3/dist/tiny-mde.min.js"></script>
11+
</head>
12+
<body>
13+
<div class="app-container">
14+
<div class="sidebar">
15+
<button
16+
class="sidebar-toggle"
17+
aria-label="Toggle sidebar"
18+
>
19+
20+
</button>
21+
<div class="sidebar-title">
22+
<h1>HTMLNotes</h1>
23+
</div>
24+
<div class="new-note-container">
25+
<button
26+
class="btn add-note-btn"
27+
id="addNoteBtn"
28+
aria-label="Create a new note"
29+
aria-disabled="false"
30+
>
31+
New Note
32+
</button>
33+
</div>
34+
<div class="search-container">
35+
<input
36+
type="text"
37+
class="search-box"
38+
placeholder="Search notes..."
39+
id="searchInput"
40+
aria-label="Search notes"
41+
/>
42+
</div>
43+
<div class="controls" id="filterControls">
44+
<button
45+
class="btn active"
46+
data-filter="all"
47+
aria-label="Show all notes"
48+
>
49+
All Notes
50+
</button>
51+
<button
52+
class="btn"
53+
data-filter="recent"
54+
aria-label="Show recent notes"
55+
>
56+
Recent
57+
</button>
58+
</div>
59+
<div class="notes-list" id="notesList" role="list"></div>
60+
<div class="empty-state" id="sidebarEmptyState" style="display: none">
61+
<h3>No notes found</h3>
62+
<p>Create a new note or adjust your search/filters.</p>
63+
</div>
64+
</div>
65+
<div class="main-content" id="mainContent">
66+
<div class="editor-area" id="editorArea" style="display: none">
67+
<input
68+
type="text"
69+
id="noteTitle"
70+
placeholder="Note title..."
71+
aria-label="Note title"
72+
/>
73+
<div id="tinymde-editor"></div>
74+
<div id="tinymde_commandbar1"></div>
75+
<input
76+
type="text"
77+
id="noteTags"
78+
placeholder="Tags (comma separated)..."
79+
aria-label="Note tags"
80+
/>
81+
<div class="editor-buttons">
82+
<div class="export-dropdown">
83+
<button
84+
class="btn export-btn"
85+
id="exportNoteBtn"
86+
aria-haspopup="true"
87+
aria-expanded="false"
88+
aria-label="Export note"
89+
>
90+
Export Note <span></span>
91+
</button>
92+
<div class="export-dropdown-content" role="menu">
93+
<button id="exportJsonBtn" role="menuitem">
94+
Export as JSON
95+
</button>
96+
<button id="exportMarkdownBtn" role="menuitem">
97+
Export as Markdown
98+
</button>
99+
</div>
100+
</div>
101+
<div class="import-container">
102+
<button class="btn" id="importNoteBtn" aria-label="Import note">
103+
<i class="fas fa-file-import"></i> Import Note
104+
</button>
105+
<input type="file" id="importFileInput" accept=".json,.md,.txt" />
106+
</div>
107+
<button
108+
class="btn delete-note-btn"
109+
id="deleteNoteBtn"
110+
aria-label="Delete note"
111+
>
112+
Delete Note
113+
</button>
114+
</div>
115+
</div>
116+
<div class="empty-state" id="mainEmptyState">
117+
<h3>Select a Note or Create New</h3>
118+
<p>
119+
Choose a note from the sidebar or click "New Note" to get started.
120+
</p>
121+
</div>
122+
</div>
123+
</div>
124+
<div class="saving-indicator" id="savingIndicator">
125+
<div class="spinner"></div>
126+
<span>Saving...</span>
127+
</div>
128+
<div id="toastContainer" class="toast-container"></div>
129+
130+
<script type="module" src="./src/main.js"></script>
131+
</body>
132+
</html>

0 commit comments

Comments
 (0)