Skip to content

Commit d1fb171

Browse files
committed
created project
0 parents  commit d1fb171

File tree

3 files changed

+105
-0
lines changed

3 files changed

+105
-0
lines changed

index.html

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/1.8.11/tailwind.min.css"
9+
integrity="sha512-KO1h5ynYuqsFuEicc7DmOQc+S9m2xiCKYlC3zcZCSEw0RGDsxcMnppRaMZnb0DdzTDPaW22ID/gAGCZ9i+RT/w=="
10+
crossorigin="anonymous" referrerpolicy="no-referrer" />
11+
<link rel="stylesheet" href="style.css">
12+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
13+
integrity="sha512-1PKOgIY59xJ8Co8+NE6FZ+LOAZKjy+KY8iq0G4B3CyeY6wYHN3yt9PW0XpSriVlkMXe40PTKnXrLnZ9+fkDaog=="
14+
crossorigin="anonymous" />
15+
<title>Random Image Feed</title>
16+
</head>
17+
18+
<body>
19+
<h1 class="animated_rainbow_1">Random Image Feed</h1>
20+
<div class="container"></div>
21+
22+
23+
<script src="script.js"></script>
24+
</body>
25+
26+
</html>

script.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const container = document.querySelector('.container')
2+
const unsplashURL = 'https://source.unsplash.com/random/'
3+
const rows = 10
4+
5+
for (let i = 0; i < rows * 3; i++) {
6+
const img = document.createElement('img')
7+
img.src = `${unsplashURL}${getRandomSize()}`
8+
container.appendChild(img)
9+
}
10+
11+
function getRandomSize() {
12+
return `${getRandomNr()}x${getRandomNr()}`
13+
}
14+
15+
function getRandomNr() {
16+
return Math.floor(Math.random() * 10) + 300
17+
}

style.css

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/* @import url("https://fonts.gooogleapis.com/css2?family=+Roboto:wght@400;700&display=swap"); */
2+
@import url("https://fonts.gooogleapis.com/css2?family=Poppins&display=swap");
3+
4+
* {
5+
box-sizing: border-box;
6+
}
7+
8+
body {
9+
background-color: #f4f4f4;
10+
font-family: "Poppins", sans-serif;
11+
display: flex;
12+
flex-direction: column;
13+
align-items: center;
14+
justify-content: center;
15+
min-height: 100vh;
16+
margin: 0;
17+
}
18+
19+
.title {
20+
margin: 10px 0 0;
21+
text-align: center;
22+
}
23+
24+
/* h1 {
25+
font-size: 45px;
26+
font-weight: 700;
27+
background: linear-gradient(to right, #bcbcbc 25%,#ffcd02 25%, #ffcd02 50%, #e84f47 50%, #e84f47 75%, #65c1ac 75%);
28+
} */
29+
30+
.container {
31+
display: flex;
32+
align-items: center;
33+
justify-content: center;
34+
flex-wrap: wrap;
35+
max-width: 10000px;
36+
}
37+
38+
39+
.container img {
40+
object-fit: cover;
41+
margin: 10px;
42+
height: 300px;
43+
width: 300px;
44+
max-width: 100%;
45+
}
46+
47+
.animated_rainbow_1 {
48+
font-size: 70px;
49+
font-variant: small-caps;
50+
text-transform: uppercase;
51+
font-family: Arial Black, Gadget, sans-serif;
52+
background-image: -webkit-linear-gradient(left, #f00, #ff2b00, #f50, #ff8000, #fa0, #ffd500, #ff0, #d4ff00, #af0, #80ff00, #5f0, #2bff00, #0f0, #00ff2a, #0f5, #00ff80, #0fa, #00ffd5, #0ff, #00d5ff, #0af, #0080ff, #05f, #002aff, #00f, #2b00ff, #50f, #8000ff, #a0f, #d400ff, #f0f, #ff00d4, #f0a, #ff0080, #f05, #ff002b, #f00);
53+
-webkit-animation: animatedBackground_a 5s linear infinite alternate;
54+
-webkit-background-clip: text;
55+
-webkit-text-fill-color: #0000;
56+
background-clip: text;
57+
}
58+
59+
@keyframes animatedBackground_a {
60+
0% { background-position: 0 0 }
61+
100% { background-position: -500px 0 }
62+
}

0 commit comments

Comments
 (0)