Skip to content

Commit b47367c

Browse files
author
LinuxJava7
committed
rename tiles to cards and use more variables
1 parent f567098 commit b47367c

File tree

2 files changed

+40
-41
lines changed

2 files changed

+40
-41
lines changed

index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ <h1>LinuxJava7</h1>
9797
</div>
9898
<div class="container">
9999
<h2>Projects and Contributions</h2>
100-
<div class="tiles">
101-
<div class="tile">
100+
<div class="cards">
101+
<div class="card">
102102
<a href="https://buildtheearth.net" target="_blank" rel="noopener noreferrer">
103103
<img alt="BuildTheEarth.net - Recreating Earth in Minecraft" src="https://cdn.buildtheearth.net/uploads/879c4af49ee880f348c95e9fd7bdb11dd526fda08ce6dd9c1bfaee3b91a7368e">
104104
</a>
@@ -114,7 +114,7 @@ <h4>Support Staff Member (From August 2020 to September 2023)</h4>
114114
<p>Volunteered as a support staff member, helping users with technical issues.</p>
115115
</div>
116116
</div>
117-
<div class="tile">
117+
<div class="card">
118118
<a href="https://github.com/Avdan-OS" target="_blank" rel="noopener noreferrer">
119119
<img alt="AvdanOS - Linux Desktop Environment Project" src="https://raw.githubusercontent.com/Avdan-OS/Website/dev/src/public/assets/marketing/header.png">
120120
</a>
@@ -132,8 +132,8 @@ <h4>UI Designer (From 2022 to 2023)</h4>
132132
</div>
133133
<div class="container">
134134
<h2>Other Interests</h2>
135-
<div class="tiles">
136-
<div class="tile" id="devs">
135+
<div class="cards">
136+
<div class="card" id="devs">
137137
<img alt="GNOME Developer Platform" src="https://www.gnome.org/img/download.webp">
138138
<div class="description">
139139
<h3>GNOME</h3>

style.css

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
@import 'catppuccin.css';
2-
32
@import 'colors.css';
43

54
/* Root Variables - Light Mode (Default) */
65
:root {
76
/* Layout Variables */
8-
--pagewidth: 50rem;
9-
--grid-gap: 3rem;
10-
--pagegridwidth: calc(var(--pagewidth) + (6 * var(--grid-gap)));
11-
--narrowwidth: 60%;
7+
--content-width: 50rem;
8+
--spacing: 3rem;
9+
--content-max-width: var(--content-width);
10+
--narrow-width: 60%;
1211
--defaultsize: 18px;
1312
--slickease: cubic-bezier(.17, .89, .32, 1.28);
1413
--max-width: 1200px;
@@ -149,31 +148,30 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
149148
max-width: var(--max-width);
150149
margin-left: auto;
151150
margin-right: auto;
152-
padding: 0 var(--grid-gap);
151+
padding: 0 var(--spacing);
153152
}
154153

155154
.container > * {
156155
width: 100%;
157-
max-width: var(--pagewidth);
156+
max-width: var(--content-width);
158157
}
159158

160-
/* Tiles */
161-
.tiles {
159+
/* Cards */
160+
.cards {
162161
display: flex;
163162
flex-wrap: wrap;
164-
column-gap: 20px;
165-
row-gap: 20px;
166-
padding: 20px;
163+
gap: var(--spacing);
164+
padding: var(--spacing);
167165
justify-content: center;
168166
align-content: center;
169167
transition: all 300ms var(--slickease);
170168
}
171169

172-
.tiles:has(> :only-child) {
170+
.cards:has(> :only-child) {
173171
grid-template-columns: 1fr;
174172
}
175173

176-
.tile {
174+
.card {
177175
display: flex;
178176
flex-direction: column;
179177
text-decoration: none;
@@ -190,7 +188,7 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
190188
min-width: 350px;
191189
}
192190

193-
.tile img {
191+
.card img {
194192
height: 270px;
195193
object-fit: cover;
196194
object-position: bottom center;
@@ -199,7 +197,7 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
199197
width: 100%;
200198
}
201199

202-
.tile .description {
200+
.card .description {
203201
display: flex;
204202
flex-direction: column;
205203
gap: 0;
@@ -208,7 +206,7 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
208206
flex: 1;
209207
}
210208

211-
.tile h4 {
209+
.card h4 {
212210
font-weight: 800;
213211
margin: 0;
214212
padding: 0;
@@ -217,7 +215,7 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
217215
gap: 0.5rem;
218216
}
219217

220-
.tile h3 {
218+
.card h3 {
221219
font-weight: 800;
222220
margin: 0;
223221
padding: 0;
@@ -227,13 +225,13 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
227225
overflow-wrap: anywhere;
228226
}
229227

230-
.tile h3 img {
228+
.card h3 img {
231229
width: 1em;
232230
height: 1em;
233231
border-radius: 0.375rem;
234232
}
235233

236-
.tile p {
234+
.card p {
237235
opacity: 0.8;
238236
margin: 0;
239237
padding: 0;
@@ -245,26 +243,26 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
245243
margin-bottom: 18px;
246244
}
247245

248-
.tile p+p {
246+
.card p+p {
249247
margin-top: 9px;
250248
}
251249

252-
.tile a {
250+
.card a {
253251
justify-self: start;
254252
width: 100%;
255253
color: var(--blue-4);
256254
}
257255

258-
.tile a:not(.btn) {
256+
.card a:not(.btn) {
259257
text-decoration: none;
260258
}
261259

262-
.tile a:not(.btn):hover {
260+
.card a:not(.btn):hover {
263261
text-decoration: underline;
264262
}
265263

266-
/* Button styles for tiles */
267-
.tile .btn {
264+
/* Button styles for cards */
265+
.card .btn {
268266
max-width: 12rem;
269267
font-size: 80%;
270268
border-radius: var(--btnsqr);
@@ -288,12 +286,12 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
288286
white-space: nowrap;
289287
}
290288

291-
.tile .btn:hover {
289+
.card .btn:hover {
292290
box-shadow: 0 0 0 2px var(--accent-bg-color);
293291
text-decoration: none;
294292
}
295293

296-
.tile .btn svg {
294+
.card .btn svg {
297295
margin-right: 6px;
298296
vertical-align: middle;
299297
display: inline-block;
@@ -484,8 +482,8 @@ footer {
484482

485483
@media only screen and (max-width: 720px) {
486484
:root {
487-
--narrowwidth: 100%;
488-
--grid-gap: 1rem;
485+
--narrow-width: 100%;
486+
--spacing: 1rem;
489487
--defaultsize: 16px;
490488
}
491489

@@ -502,22 +500,23 @@ footer {
502500
}
503501

504502
.container {
505-
padding: 0 var(--grid-gap);
503+
padding: 0 var(--spacing);
506504
}
507505

508-
.tiles {
509-
padding: 10px;
506+
.cards {
507+
padding: var(--spacing);
508+
gap: var(--spacing);
510509
}
511510

512-
.tile {
511+
.card {
513512
min-width: 100%;
514513
}
515514

516-
.tile .description {
515+
.card .description {
517516
padding: 1rem;
518517
}
519518

520-
.tile .btn {
519+
.card .btn {
521520
margin: 0.5rem 0 0;
522521
display: block;
523522
max-width: 100%;

0 commit comments

Comments
 (0)