Skip to content

Commit

Permalink
Set html project clear, add modern normalize
Browse files Browse the repository at this point in the history
  • Loading branch information
rxx committed Mar 31, 2024
1 parent 6165626 commit 399f4c1
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 135 deletions.
2 changes: 1 addition & 1 deletion src/node/html/.replit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
run = "bash current/run.sh"
run = "(cd current && bash run.sh)"
entrypoint = "index.html"
hidden = [".config"]
modules = ["nodejs-20:v8-20230920-bd784b9", "web:v2-20230623-0b7a606"]
Expand Down
20 changes: 4 additions & 16 deletions src/node/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,16 @@

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,maximum-scale=1">
<title>Replit</title>
<link rel="stylesheet" href="modern-normalize.min.css">
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<main>
<h1 class="title">Welcome to HTML on Replit!</h1>

<section class="grid">
<a href="https://replit.com/learn" class='card'>
<h2>Learn &rarr;</h2>
<p>Find tutorials on Replit to learn more.</p>
</a>

<a href="https://docs.replit.com/category/deployments" class='card'>
<h2>Deploy &rarr;</h2>
<p>
After you are happy with this app, deploy it on Replit!
</p>
</a>
</section>
<h1>HTML Sandbox</h1>
<p>Simple paragraph</p>
</main>

<script type="module" src="script.js"></script>
Expand Down
9 changes: 9 additions & 0 deletions src/node/html/modern-normalize.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/node/html/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "my-project",
"private": true,
"type": "module",
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"vite": "^5.0.12"
"vite": "^5.2.6"
},
"engines": {
"node": "=20.x"
Expand Down
96 changes: 1 addition & 95 deletions src/node/html/style.css
Original file line number Diff line number Diff line change
@@ -1,97 +1,3 @@
html,
body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}

a {
color: inherit;
text-decoration: none;
}

* {
box-sizing: border-box;
}

main {
min-height: 100vh;
padding: 4rem 2rem;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

.title {
margin: 0;
line-height: 1.15;
font-size: 4rem;
}

.title,
.description {
text-align: center;
}

.description {
margin: 4rem 0;
line-height: 1.5;
font-size: 1.5rem;
}

.code {
background: #fafafa;
border-radius: 5px;
padding: 0.75rem;
font-size: 1.1rem;
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
Bitstream Vera Sans Mono, Courier New, monospace;
}

.grid {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
max-width: 800px;
}

.card {
margin: 1rem;
padding: 1.5rem;
text-align: left;
color: inherit;
text-decoration: none;
border: 1px solid #eaeaea;
border-radius: 10px;
transition: color 0.15s ease, border-color 0.15s ease;
max-width: 300px;
}

.card:hover,
.card:focus,
.card:active {
color: #0070f3;
border-color: #0070f3;
}

.card h2 {
margin: 0 0 1rem 0;
font-size: 1.5rem;
}

.card p {
margin: 0;
font-size: 1.25rem;
line-height: 1.5;
}

@media (max-width: 600px) {
.grid {
width: 100%;
flex-direction: column;
}
font-size: 1rem;
}
20 changes: 0 additions & 20 deletions src/node/html/tsconfig.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/node/html/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export default defineConfig({
plugins: [],
server: {
host: '0.0.0.0',
hmr: true, // Change this line to false disable auto-refreshing.
hmr: true,
}
})
1 change: 0 additions & 1 deletion src/node/react/run.sh

This file was deleted.

0 comments on commit 399f4c1

Please sign in to comment.