Skip to content

Commit

Permalink
base page with gm
Browse files Browse the repository at this point in the history
  • Loading branch information
d-roak committed May 20, 2024
1 parent 46ea0dd commit 79e4112
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 0 deletions.
34 changes: 34 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Topology</title>
<link
rel="apple-touch-icon"
sizes="180x180"
href="assets/favicon/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="assets/favicon/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="assets/favicon/favicon-16x16.png"
/>
<link rel="manifest" href="./site.webmanifest" />
<link rel="stylesheet" href="./static/css/style.css" />
</head>

<body>
<div id="canvas"></div>

<script src="./static/bundle/script.js"></script>
</body>
</html>
9 changes: 9 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const render = () => {
const canvas = <HTMLSpanElement>document.getElementById("canvas");
const base = document.createElement("div");
canvas.appendChild(base);
base.className = "h-screen py-5 px-10";
base.innerHTML = `gm`;
};

render();
3 changes: 3 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
8 changes: 8 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./public/index.html", "./src/**/*.{html,js,ts}"],
theme: {
extend: {},
},
plugins: [],
};
24 changes: 24 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const path = require("path");

module.exports = {
mode: "production",
entry: path.resolve(__dirname, "./src/index.ts"),
module: {
rules: [
{
test: /\.ts?$/,
use: "ts-loader",
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [".ts", ".js"],
fallback: {},
},
output: {
filename: "script.js",
path: path.resolve(__dirname, "public", "static", "bundle"),
publicPath: "/static/bundle/",
},
};

0 comments on commit 79e4112

Please sign in to comment.