Skip to content

Commit 729685c

Browse files
authored
Add hardware_item layout for hardware details
1 parent b34bb1c commit 729685c

1 file changed

Lines changed: 161 additions & 0 deletions

File tree

‎_layouts/hardware_item.html‎

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
---
2+
layout: default
3+
---
4+
5+
<style>
6+
.hw-detail-container {
7+
max-width: 1000px;
8+
margin: 0 auto;
9+
padding-bottom: 80px;
10+
}
11+
.hw-back-link {
12+
font-family: 'JetBrains Mono', monospace;
13+
font-size: 0.85rem;
14+
color: var(--accent-blue);
15+
text-decoration: none;
16+
display: inline-block;
17+
margin-bottom: 25px;
18+
transition: 0.2s;
19+
}
20+
.hw-back-link:hover {
21+
transform: translateX(-4px);
22+
}
23+
.hw-header-card {
24+
background: var(--card-bg);
25+
border: 1px solid var(--border);
26+
border-radius: 12px;
27+
padding: 40px;
28+
backdrop-filter: blur(10px);
29+
margin-bottom: 30px;
30+
position: relative;
31+
overflow: hidden;
32+
}
33+
.hw-header-card::before {
34+
content: '';
35+
position: absolute;
36+
top: 0; left: 0; width: 4px; height: 100%;
37+
background: var(--accent-contrast);
38+
}
39+
.hw-title {
40+
font-size: 2.2rem;
41+
font-weight: 900;
42+
color: #fff;
43+
margin: 0 0 10px 0;
44+
letter-spacing: -0.5px;
45+
}
46+
.hw-role {
47+
font-family: 'JetBrains Mono', monospace;
48+
font-size: 0.9rem;
49+
color: var(--accent-blue);
50+
text-transform: uppercase;
51+
font-weight: 700;
52+
margin-bottom: 25px;
53+
}
54+
.hw-specs-grid {
55+
display: grid;
56+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
57+
gap: 15px;
58+
border-top: 1px dashed rgba(255, 255, 255, 0.1);
59+
padding-top: 20px;
60+
margin-top: 20px;
61+
}
62+
.hw-spec-item label {
63+
display: block;
64+
font-family: 'JetBrains Mono', monospace;
65+
font-size: 0.75rem;
66+
color: var(--text-muted);
67+
text-transform: uppercase;
68+
margin-bottom: 4px;
69+
}
70+
.hw-spec-item span {
71+
font-family: 'JetBrains Mono', monospace;
72+
font-size: 0.95rem;
73+
color: #fff;
74+
font-weight: 700;
75+
}
76+
.hw-content {
77+
background: var(--card-bg);
78+
border: 1px solid var(--border);
79+
border-radius: 12px;
80+
padding: 40px;
81+
backdrop-filter: blur(10px);
82+
color: var(--text-main);
83+
font-family: 'Inter', sans-serif;
84+
line-height: 1.8;
85+
}
86+
.hw-content h3 {
87+
font-family: 'JetBrains Mono', monospace;
88+
color: var(--accent-contrast);
89+
font-size: 1.2rem;
90+
margin-top: 30px;
91+
margin-bottom: 15px;
92+
}
93+
.hw-content h3:first-child {
94+
margin-top: 0;
95+
}
96+
.hw-image-box {
97+
width: 100%;
98+
max-height: 400px;
99+
border-radius: 8px;
100+
overflow: hidden;
101+
margin-bottom: 30px;
102+
border: 1px solid var(--border);
103+
background: rgba(0,0,0,0.5);
104+
display: flex;
105+
align-items: center;
106+
justify-content: center;
107+
}
108+
.hw-image-box img {
109+
width: 100%;
110+
height: auto;
111+
max-height: 400px;
112+
object-fit: contain;
113+
}
114+
</style>
115+
116+
<div class="hw-detail-container">
117+
<a href="/hardware/" class="hw-back-link">&larr; // POWRÓT DO SPISU SPRZĘTU</a>
118+
119+
<div class="hw-header-card">
120+
<span class="section-tag">{{ page.category | default: "HARDWARE_NODE" }}</span>
121+
<h1 class="hw-title">{{ page.title }}</h1>
122+
<div class="hw-role">// Rola w Homelab: {{ page.role }}</div>
123+
124+
<div class="hw-specs-grid">
125+
{% if page.model %}
126+
<div class="hw-spec-item">
127+
<label>Model / Spec</label>
128+
<span>{{ page.model }}</span>
129+
</div>
130+
{% endif %}
131+
{% if page.cpu %}
132+
<div class="hw-spec-item">
133+
<label>CPU</label>
134+
<span>{{ page.cpu }}</span>
135+
</div>
136+
{% endif %}
137+
{% if page.ram %}
138+
<div class="hw-spec-item">
139+
<label>RAM / Storage</label>
140+
<span>{{ page.ram }}</span>
141+
</div>
142+
{% endif %}
143+
{% if page.ports %}
144+
<div class="hw-spec-item">
145+
<label>Porty / Interfejsy</label>
146+
<span>{{ page.ports }}</span>
147+
</div>
148+
{% endif %}
149+
</div>
150+
</div>
151+
152+
{% if page.image %}
153+
<div class="hw-image-box">
154+
<img src="{{ page.image | relative_url }}" alt="{{ page.title }}">
155+
</div>
156+
{% endif %}
157+
158+
<div class="hw-content">
159+
{{ content }}
160+
</div>
161+
</div>

0 commit comments

Comments
 (0)