Skip to content

Commit 4be3de4

Browse files
committed
add image overlay text
1 parent 443333a commit 4be3de4

2 files changed

Lines changed: 44 additions & 1 deletion

File tree

assets/sass/pages/_home.scss

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,47 @@
3737
}
3838

3939
.image {
40+
position: relative;
41+
4042
img {
4143
aspect-ratio: 1/1;
4244
object-fit: cover;
4345
width: 100%;
4446
height: auto;
4547
border-radius: 25px;
4648
}
49+
50+
.image-title {
51+
position: absolute;
52+
bottom: 20px;
53+
left: 20px;
54+
right: 20px;
55+
display: flex;
56+
flex-direction: row;
57+
justify-content: space-between;
58+
59+
span {
60+
align-self: flex-end;
61+
62+
p {
63+
vertical-align: bottom;
64+
color: #fff;
65+
padding: 10px;
66+
margin: 0;
67+
font-size: 24px;
68+
border-radius: 10px;
69+
background-color: rgba(0, 0, 0, 0.7);
70+
}
71+
}
72+
73+
img {
74+
height: 90px;
75+
width: 90px;
76+
padding: 10px;
77+
background-color: rgba(0, 0, 0, 0.7);
78+
border-radius: 10px;
79+
}
80+
}
4781
}
4882
}
4983

index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ <h1>The easiest way to program microcontrollers</h1>
2222
src="{{ "assets/images/learn/sketch_drawing_toy.jpg" |
2323
relative_url }}"
2424
/>
25+
<span class="image-title">
26+
<span>
27+
<p>Sketch Drawing Toy by Ruiz Brothers</p>
28+
</span>
29+
<img alt="Made with CircuitPython Logo"
30+
src="{{ "assets/images/made_with_circuitpython.svg" |
31+
relative_url }}"
32+
/>
33+
</span>
2534
</div>
2635
</div>
2736

@@ -144,7 +153,7 @@ <h2>CircuitPython libraries on single board computers</h2>
144153
</p>
145154
</div>
146155
<div class="get-started">
147-
<a href="{{ "downloads" | relative_url }}">Learn More</a>
156+
<a href="{{ "blinka" | relative_url }}">Learn More</a>
148157
</div>
149158
</div>
150159
</div>

0 commit comments

Comments
 (0)