Skip to content

Commit f8ef9d3

Browse files
Merge pull request #19 from fi-naskoc/fix/schedule_images
fix: images on mobile
2 parents aba0401 + bf85fcd commit f8ef9d3

File tree

2 files changed

+23
-11
lines changed

2 files changed

+23
-11
lines changed

src/app/components/root/page-schedule/page-schedule.component.html

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@ <h2 id="harmonogram">Harmonogram</h2>
2323
Interaktivní harmonogram je k dispozici jako PDF <a href="https://fi.muni.cz/files/fi-graphics/naskoc-na-fi-2025-program.pdf"><b>zde na webu fakulty</b></a>. Kliknutím na časový slot se dostaneš přímo na zapisování daného workshopu v ISu – toto zapisování seminárních skupin běží od 3. 9. 17:00. Kliknutím na místnost workshopu se ti otevře detail místnosti s mapou v ISu.
2424
</p>
2525

26-
<img src="assets/img/schedule/Naskoc program 1.png">
27-
28-
<img src="assets/img/schedule/Naskoc program 2.png">
29-
30-
<img src="assets/img/schedule/Naskoc program 3.png">
31-
32-
<img src="assets/img/schedule/Naskoc program 4.png">
33-
34-
<img src="assets/img/schedule/Naskoc program 5.png">
26+
<div class="schedule-container">
27+
<img src="assets/img/schedule/Naskoc program 1.png" alt="Schedule part 1" class="schedule-image">
28+
<img src="assets/img/schedule/Naskoc program 2.png" alt="Schedule part 2" class="schedule-image">
29+
<img src="assets/img/schedule/Naskoc program 3.png" alt="Schedule part 3" class="schedule-image">
30+
<img src="assets/img/schedule/Naskoc program 4.png" alt="Schedule part 4" class="schedule-image">
31+
<img src="assets/img/schedule/Naskoc program 5.png" alt="Schedule part 5" class="schedule-image">
32+
</div>
3533

3634
</div>

src/app/components/root/page-schedule/page-schedule.component.scss

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,22 @@
3131
.schedule p {
3232
width: 60%;
3333
}
34-
.schedule ifram {
35-
width: 60%;
34+
.schedule-container {
35+
/* This ensures the container doesn't exceed the width of the viewport */
36+
max-width: 100%;
37+
/* This will help if you have a flex container parent */
38+
width: 100%;
39+
}
40+
41+
.schedule-image {
42+
/* This makes the image scale down if the container is smaller */
43+
max-width: 100%;
44+
/* This maintains the aspect ratio of the image */
45+
height: auto;
46+
/* This displays the image as a block element, which allows margin auto to work for centering if needed */
47+
display: block;
48+
/* Adds some space between the images */
49+
margin-bottom: 1rem; /* Adjust as needed */
3650
}
3751
}
3852

0 commit comments

Comments
 (0)