Doubleupai commited on
Commit
bbfd396
·
verified ·
1 Parent(s): 2ce2536

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +103 -19
index.html CHANGED
@@ -1,19 +1,103 @@
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
+ <!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>Case Converter</title>
7
+ <style>
8
+ body {
9
+ font-family: Arial, sans-serif;
10
+ background-color: #f4f4f4;
11
+ margin: 0;
12
+ padding: 0;
13
+ display: flex;
14
+ justify-content: center;
15
+ align-items: center;
16
+ height: 100vh;
17
+ }
18
+ .container {
19
+ background-color: #fff;
20
+ border-radius: 8px;
21
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
22
+ width: 80%;
23
+ max-width: 600px;
24
+ padding: 20px;
25
+ text-align: center;
26
+ }
27
+ .container h1 {
28
+ color: #333;
29
+ margin-bottom: 20px;
30
+ }
31
+ .input-group {
32
+ margin-bottom: 20px;
33
+ }
34
+ .input-group textarea {
35
+ width: 100%;
36
+ height: 150px;
37
+ padding: 10px;
38
+ border: 1px solid #ccc;
39
+ border-radius: 4px;
40
+ resize: none;
41
+ }
42
+ .buttons {
43
+ display: flex;
44
+ justify-content: center;
45
+ gap: 10px;
46
+ }
47
+ .buttons button {
48
+ padding: 10px 20px;
49
+ background-color: #007BFF;
50
+ color: #fff;
51
+ border: none;
52
+ border-radius: 4px;
53
+ cursor: pointer;
54
+ transition: background-color 0.3s ease;
55
+ }
56
+ .buttons button:hover {
57
+ background-color: #0056b3;
58
+ }
59
+ </style>
60
+ </head>
61
+ <body>
62
+
63
+ <div class="container">
64
+ <h1>Case Converter</h1>
65
+ <div class="input-group">
66
+ <textarea id="input-text" placeholder="Enter text here..."></textarea>
67
+ </div>
68
+ <div class="buttons">
69
+ <button onclick="convertToUppercase()">Uppercase</button>
70
+ <button onclick="convertToLowercase()">Lowercase</button>
71
+ <button onclick="convertToTitleCase()">Title Case</button>
72
+ <button onclick="convertToSentenceCase()">Sentence Case</button>
73
+ </div>
74
+ </div>
75
+
76
+ <script>
77
+ function convertToUppercase() {
78
+ const inputText = document.getElementById('input-text').value;
79
+ document.getElementById('input-text').value = inputText.toUpperCase();
80
+ }
81
+
82
+ function convertToLowercase() {
83
+ const inputText = document.getElementById('input-text').value;
84
+ document.getElementById('input-text').value = inputText.toLowerCase();
85
+ }
86
+
87
+ function convertToTitleCase() {
88
+ const inputText = document.getElementById('input-text').value;
89
+ const words = inputText.split(' ');
90
+ const titleCaseWords = words.map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase());
91
+ document.getElementById('input-text').value = titleCaseWords.join(' ');
92
+ }
93
+
94
+ function convertToSentenceCase() {
95
+ const inputText = document.getElementById('input-text').value;
96
+ const sentences = inputText.split('. ');
97
+ const sentenceCaseSentences = sentences.map(sentence => sentence.charAt(0).toUpperCase() + sentence.slice(1).toLowerCase());
98
+ document.getElementById('input-text').value = sentenceCaseSentences.join('. ');
99
+ }
100
+ </script>
101
+
102
+ </body>
103
+ </html>