-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenwrt.html
140 lines (138 loc) · 5.62 KB
/
openwrt.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
---
layout: openwrts
title: Openwrt
---
<style>
.carousel-control-prev-icon,
.carousel-control-next-icon {
background-color: orange; /* Mengubah warna ikon menjadi oranye */
}
.card-img-top {
object-fit: contain; /* Memastikan foto sesuai ukuran tanpa mengubah rasio aspek */
width: 100%; /* Lebar penuh untuk responsif */
height: auto; /* Tinggi otomatis sesuai dengan lebar */
max-height: 200px; /* Maksimum tinggi gambar diatur sesuai kebutuhan */
}
.carousel-item .card,
.category-panel {
width: 100%; /* Lebar penuh untuk responsif */
max-width: 90%; /* Lebar maksimum kartu dan panel kategori dalam persentase */
margin: auto; /* Menjaga kartu dan panel tetap di tengah */
}
.carousel-control-prev,
.carousel-control-next {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 5%;
height: auto; /* Menjaga tinggi ikon sesuai konten */
}
.carousel-control-prev {
left: -2%; /* Posisikan lebih dekat ke kartu */
}
.carousel-control-next {
right: -2%; /* Posisikan lebih dekat ke kartu */
}
.category-panel {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
margin-top: 20px; /* Jarak tambahan antara tombol dan panel kategori */
text-align: center;
color: white;
font-weight: bold;
}
.category-panel:nth-child(odd) {
background-color: #ff5722; /* Warna panel ganjil */
}
.category-panel:nth-child(even) {
background-color: #4caf50; /* Warna panel genap */
}
.btn-category {
padding: 5px 10px; /* Menyesuaikan ukuran tombol */
font-size: 0.875rem; /* Mengurangi ukuran font tombol */
margin: 0; /* Menghapus jarak tombol */
}
.category-title {
flex-grow: 1;
text-align: left; /* Menyelaraskan teks kategori ke kiri */
}
@media (min-width: 768px) {
.card-img-top {
max-height: 300px; /* Sesuaikan tinggi maksimum saat mode desktop */
}
}
</style>
<div class="container">
<div class="row mb-4 mt-4">
<div class="col-12">
<h5>Kategori Openwrt</h5>
<div id="categoryListCarousel" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner text-center">
{% assign categories = site.data.devices | map: "category" | uniq %}
{% for category in categories %}
<div class="carousel-item {% if forloop.first %}active{% endif %}">
<div class="card">
<img class="card-img-top" src="/assets/images/banner.jpg" alt="{{ category | capitalize }}">
<div class="card-body">
<h5 class="card-title">{{ category | capitalize }}</h5>
<a href="/openwrt/{{ category }}" class="btn btn-primary">Lihat Kategori {{ category }}</a>
</div>
</div>
</div>
{% endfor %}
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#categoryListCarousel" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#categoryListCarousel" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</div>
</div>
<div class="row mt-4">
<div class="col-12">
<h5>Daftar Openwrt</h5>
<div class="row">
{% assign devices = site.data.devices | group_by: "category" %}
{% for category in devices %}
<div class="col-12">
<div class="category-panel">
<span class="category-title">{{ category.name | capitalize }}</span>
<a href="/openwrt/{{ category.name }}" class="btn btn-secondary btn-category">Lihat Openwrt {{ category.name | capitalize }} Selengkapnya</a>
</div>
<div id="productListCarousel-{{ forloop.index }}" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
{% for device in category.items limit: 6 %}
<div class="carousel-item {% if forloop.first %}active{% endif %}">
<div class="card mb-4 mx-auto"> <!-- Menjaga lebar yang sama dengan panel kategori -->
<img class="card-img-top" src="{{ device.image | default: '/assets/images/banner.jpg' }}" alt="{{ product.name }}">
<div class="card-body">
<h5 class="card-title">{{ device.name }}</h5>
<p class="card-text">Format: {{ device.format }}</p>
<p class="card-text">Size: {{ device.size }}</p>
<a href="{{ device.link }}" class="btn btn-primary" target="_blank">Download</a>
</div>
</div>
</div>
{% endfor %}
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#productListCarousel-{{ forloop.index }}" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#productListCarousel-{{ forloop.index }}" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>