jordonpeter01 commited on
Commit
1facfc8
·
1 Parent(s): 5151e75

Add 3 files

Browse files
Files changed (3) hide show
  1. app.js +15 -0
  2. index.html +1 -19
  3. style.css +13 -27
app.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { create } from "alpinejs";
2
+ import Alpine from "alpinejs";
3
+ import DaisyUI from "daisyui";
4
+ import PersisageUI from "persisageui";
5
+ import { debounce } from "lodash";
6
+ function handleClick() {
7
+ const inputValue = document.getElementById("input").value;
8
+ if (inputValue === "") {
9
+ document.getElementById("message").innerHTML = "Please enter the number of prompts you want!";
10
+ } else {
11
+ let outputValue = Math.floor(Math.random() * inputValue)
12
+ document.getElementById("message").innerHTML =
13
+ "You will have to do a " + selectedOption + " project for " + outputValue + " days.";
14
+ }
15
+ }
index.html CHANGED
@@ -1,19 +1 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
1
+ <html><head><link href="https://cdn.jsdelivr.net/npm/daisyui@3.1.6/dist/full.css" rel="stylesheet" type="text/css" /><script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script><script src="https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio"></script><script defer src="https://cdnjs.cloudflare.com/ajax/libs/three.js/0.156.1/three.min.js"></script><script type="module" src="main.js"></script><title>Prompt Generator</title></head><main><div class="prose"><h1>Prompt Generator</h1><p>This is a simple prompt generator application. Generate random prompts for your creative projects with just a few clicks.</p><h2>How to Use</h2><p>Simply click the "Generate Prompt" button to get a new prompt. You can also adjust the settings to narrow down the type of prompt you want. Have fun!</p><button type="button" class="btn mx-auto w-1/3 text-center font-bold" onClick="handleClick">Generate Prompt</button><div class="container mx-auto mt-4 px-4 text-center text-gray-700 bg-gray-400 rounded border"></div></div></main></html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
style.css CHANGED
@@ -1,28 +1,14 @@
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
4
- }
5
-
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
- }
10
-
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
- }
17
-
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
- }
25
-
26
- .card p:last-child {
27
- margin-bottom: 0;
28
- }
 
1
  body {
2
+ margin: 0;
3
+ padding: 0;
4
+ font-family: Arial, sans-serif;
5
+ background-color: #f4f4f4;
6
+ }
7
+ .prose h1 {
8
+ font-size: 36px;
9
+ font-weight: bold;
10
+ text-align: center;
11
+ }
12
+ .alert {
13
+ color: #f44336;
14
+ }