From f0e51571ed79821ecf88b384ded756ddf3e08360 Mon Sep 17 00:00:00 2001 From: "Mahesh C. Regmi" <0xmahadev@gmail.com> Date: Fri, 31 Mar 2023 19:56:02 +0545 Subject: [PATCH] initial commit --- .gitignore | 148 +++ client/index.html | 16 + client/package.json | 28 + client/src/Navbar.tsx | 12 + client/src/app.tsx | 19 + client/src/createTemplate.tsx | 73 ++ client/src/homePage.tsx | 7 + client/src/index.tsx | 14 + client/src/sendMail.tsx | 131 ++ client/src/todo-list.test.tsx | 37 + client/tsconfig.json | 13 + client/vite.config.ts | 30 + client/yarn.lock | 2268 +++++++++++++++++++++++++++++++++ 13 files changed, 2796 insertions(+) create mode 100644 .gitignore create mode 100644 client/index.html create mode 100644 client/package.json create mode 100644 client/src/Navbar.tsx create mode 100644 client/src/app.tsx create mode 100644 client/src/createTemplate.tsx create mode 100644 client/src/homePage.tsx create mode 100644 client/src/index.tsx create mode 100644 client/src/sendMail.tsx create mode 100644 client/src/todo-list.test.tsx create mode 100644 client/tsconfig.json create mode 100644 client/vite.config.ts create mode 100644 client/yarn.lock diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..841aeae --- /dev/null +++ b/.gitignore @@ -0,0 +1,148 @@ +# Created by https://www.toptal.com/developers/gitignore/api/node +# Edit at https://www.toptal.com/developers/gitignore?templates=node + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-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/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# 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 variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# 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 + +# vuepress v2.x temp and cache directory +.temp + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +### Node Patch ### +# Serverless Webpack directories +.webpack/ + +# Optional stylelint cache + +# SvelteKit build / generate output +.svelte-kit + +# End of https://www.toptal.com/developers/gitignore/api/node + + +*.csv +.vite diff --git a/client/index.html b/client/index.html new file mode 100644 index 0000000..48c59fc --- /dev/null +++ b/client/index.html @@ -0,0 +1,16 @@ + + + + + + + + Solid App + + + +
+ + + + diff --git a/client/package.json b/client/package.json new file mode 100644 index 0000000..cf5414b --- /dev/null +++ b/client/package.json @@ -0,0 +1,28 @@ +{ + "name": "vite-template-solid", + "version": "0.0.0", + "description": "", + "type": "module", + "scripts": { + "start": "vite", + "dev": "vite", + "build": "vite build", + "serve": "vite preview", + "test": "vitest" + }, + "license": "MIT", + "devDependencies": { + "@solidjs/testing-library": "^0.6.0", + "@testing-library/jest-dom": "^5.16.5", + "@types/testing-library__jest-dom": "^5.14.5", + "jsdom": "^21.1.0", + "typescript": "^4.9.5", + "vite": "^4.1.1", + "vite-plugin-solid": "^2.5.0", + "vitest": "^0.28.4" + }, + "dependencies": { + "@solidjs/router": "^0.8.2", + "solid-js": "^1.6.10" + } +} diff --git a/client/src/Navbar.tsx b/client/src/Navbar.tsx new file mode 100644 index 0000000..e03cc6e --- /dev/null +++ b/client/src/Navbar.tsx @@ -0,0 +1,12 @@ +import { A } from "@solidjs/router"; + +export const Navbar = () => { + return ( + + ); +}; diff --git a/client/src/app.tsx b/client/src/app.tsx new file mode 100644 index 0000000..e2ec96a --- /dev/null +++ b/client/src/app.tsx @@ -0,0 +1,19 @@ +import { Router, Routes, Route } from "@solidjs/router"; +import { TemplateManagement } from "./createTemplate"; +import { HomePage } from "./homePage"; +import { Navbar } from "./Navbar"; +import { MailManagement } from "./sendMail"; + +export const App = () => { + return ( + + + + + + + + + + ); +}; diff --git a/client/src/createTemplate.tsx b/client/src/createTemplate.tsx new file mode 100644 index 0000000..ba96f07 --- /dev/null +++ b/client/src/createTemplate.tsx @@ -0,0 +1,73 @@ +import { createEffect, createSignal, For } from "solid-js"; + +export const TemplateManagement = () => { + const [htmlBody, setHtmlBody] = createSignal(""); + const [subject, setSubject] = createSignal(""); + const [templateName, setTemplateName] = createSignal(""); + + const [templates, setTemplates] = createSignal([]); + + const submitForm = (e: Event) => { + e.preventDefault(); + }; + + createEffect(() => { + setTemplates(["template1", "template2", "template3"]); + }, [templates]); + + return ( +
+

Template Management Page

+ +
+ +
+

Create Template

+
+ HTML Template:
+