prithivMLmods commited on
Commit
0c25969
1 Parent(s): 8c2de79

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +24 -0
index.html CHANGED
@@ -4,6 +4,7 @@
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>Image Gallery</title>
 
7
  <style>
8
  .gallery {
9
  display: grid;
@@ -13,6 +14,7 @@
13
  }
14
 
15
  .gallery-item {
 
16
  overflow: hidden;
17
  border-radius: 10px;
18
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
@@ -30,6 +32,14 @@
30
  font-size: 14px;
31
  color: #666;
32
  }
 
 
 
 
 
 
 
 
33
  </style>
34
  </head>
35
  <body>
@@ -37,13 +47,27 @@
37
  <!-- Replace the src attribute with the actual image URLs -->
38
  <div class="gallery-item">
39
  <img src="assets/1.png" alt="Image 1">
 
40
  <p>Photo of a rainbow-haired, 19 years old, Asian girl</p>
41
  </div>
42
  <div class="gallery-item">
43
  <img src="7451277.jpeg" alt="Image 2">
 
44
  <p>A old granny with pink hair, 95 years old</p>
45
  </div>
46
  <!-- Add more gallery items as needed -->
47
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
48
  </body>
49
  </html>
 
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>Image Gallery</title>
7
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
8
  <style>
9
  .gallery {
10
  display: grid;
 
14
  }
15
 
16
  .gallery-item {
17
+ position: relative; /* For positioning the copy icon */
18
  overflow: hidden;
19
  border-radius: 10px;
20
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
 
32
  font-size: 14px;
33
  color: #666;
34
  }
35
+
36
+ .copy-icon {
37
+ position: absolute;
38
+ top: 10px;
39
+ right: 10px;
40
+ color: #666;
41
+ cursor: pointer;
42
+ }
43
  </style>
44
  </head>
45
  <body>
 
47
  <!-- Replace the src attribute with the actual image URLs -->
48
  <div class="gallery-item">
49
  <img src="assets/1.png" alt="Image 1">
50
+ <i class="fas fa-copy copy-icon" onclick="copyToClipboard('assets/1.png')"></i>
51
  <p>Photo of a rainbow-haired, 19 years old, Asian girl</p>
52
  </div>
53
  <div class="gallery-item">
54
  <img src="7451277.jpeg" alt="Image 2">
55
+ <i class="fas fa-copy copy-icon" onclick="copyToClipboard('7451277.jpeg')"></i>
56
  <p>A old granny with pink hair, 95 years old</p>
57
  </div>
58
  <!-- Add more gallery items as needed -->
59
  </div>
60
+
61
+ <script>
62
+ function copyToClipboard(text) {
63
+ var dummy = document.createElement("textarea");
64
+ document.body.appendChild(dummy);
65
+ dummy.value = text;
66
+ dummy.select();
67
+ document.execCommand("copy");
68
+ document.body.removeChild(dummy);
69
+ alert("Copied to clipboard: " + text);
70
+ }
71
+ </script>
72
  </body>
73
  </html>