Skip to content

Commit 0b3b181

Browse files
author
cakePhone
committed
Bunch of style changes
1 parent 3d9efd7 commit 0b3b181

6 files changed

Lines changed: 135 additions & 71 deletions

File tree

Lines changed: 4 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<a href="{{ post.url }}">
2-
<article class="card">
1+
<article>
2+
<a class="post-card" href="{{ post.url }}">
33
{% if post.data.image %}
44
<img src="{{ post.data.image }}" alt="{{ post.data.title }} thumbnail" class="post-image" loading="lazy" style="width: 100%; height: auto; border-radius: 0.5rem;">
55
{% endif %}
@@ -14,48 +14,5 @@
1414
<span class="post-date">{{ post.data.date | date: "%B %d, %Y" }}</span>
1515
</p>
1616
</div>
17-
</article>
18-
</a>
19-
20-
<style>
21-
article {
22-
display: flex;
23-
flex-direction: row;
24-
25-
gap: 1rem;
26-
27-
border-radius: 1rem;
28-
29-
padding: .5rem;
30-
}
31-
32-
article * {
33-
margin: 0;
34-
}
35-
36-
a:hover {
37-
text-decoration: none;
38-
cursor: pointer;
39-
}
40-
41-
h2 {
42-
font-size: 1rem;
43-
color: var(--primary-600)
44-
}
45-
46-
.post-image {
47-
border-radius: 0.5rem;
48-
max-width: 100px;
49-
max-height: 100px;
50-
aspect-ratio: 1 / 1;
51-
object-fit: cover;
52-
}
53-
54-
.description {
55-
font-size: 0.9rem;
56-
}
57-
58-
.post-meta {
59-
font-size: 0.9rem;
60-
}
61-
</style>
17+
</a>
18+
</article>

assets/css/global.css

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,11 @@ h6 {
116116
a {
117117
color: var(--primary-400);
118118
text-decoration: transparent;
119+
transition: color 0.1s ease-in-out;
119120
}
120121

121122
a:hover {
122-
color: var(--primary-200);
123+
color: var(--primary-400);
123124
text-decoration: underline;
124125
}
125126

@@ -128,15 +129,20 @@ a {
128129
line-height: 1.5;
129130
}
130131

132+
hr {
133+
width: 100%;
134+
}
135+
131136
.card {
132137
padding: 0.5rem;
133138

134-
border: 0.25rem dotted var(--primary-400);
135139
border-radius: 1rem;
136140

137141
color: var(--fg-900);
138142

139143
background-color: var(--fg-50);
144+
145+
border: 2px solid var(--primary-400);
140146
}
141147

142148
@media (max-width: 786px) {
@@ -172,7 +178,7 @@ a {
172178

173179
.card {
174180
background-color: var(--fg-300);
175-
border: 0.25rem dotted var(--primary-800);
181+
border-color: var(--primary-800);
176182
color: var(--primary-900);
177183
}
178184

assets/css/index.css

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
header {
22
display: flex;
33
align-items: center;
4+
justify-content: center;
45
flex-direction: row;
56
gap: 5rem;
67

78
height: 100vh;
8-
width: fit-content;
9+
width: max(fit-content, 70%);
910

1011
margin-inline: auto;
1112
}
@@ -25,28 +26,26 @@ header {
2526

2627
#left-header nav {
2728
display: flex;
28-
gap: 1rem;
29+
justify-content: space-between;
2930
flex-wrap: wrap;
31+
gap: 1rem 0;
32+
padding-left: 0.45rem;
3033
}
3134

3235
#left-header a {
3336
position: relative;
3437

3538
display: block;
3639

37-
padding: .1rem .75rem;
40+
padding: 0.1rem 0.75rem;
3841
}
3942

4043
#right-header {
41-
display: flex;
42-
align-items: center;
43-
justify-content: center;
44+
display: grid;
4445

45-
flex-direction: column;
46-
47-
gap: .5rem;
46+
gap: 0.5rem;
4847

49-
max-width: 12rem;
48+
width: 10rem;
5049

5150
position: relative;
5251

@@ -56,8 +55,8 @@ header {
5655
#right-header * {
5756
margin: 0;
5857
padding: 0;
59-
6058
text-align: center;
59+
width: 100%;
6160
}
6261

6362
#right-header h2 {
@@ -77,22 +76,23 @@ header {
7776
}
7877

7978
#right-header img {
80-
height: 7rem;
81-
width: 7rem;
79+
aspect-ratio: 1;
80+
margin-inline: auto;
81+
width: 80%;
8282

8383
border-radius: 50%;
8484

85-
box-shadow: 0 .1rem .5rem rgba(0, 0, 0, 0.7);
85+
box-shadow: 0 0.1rem 0.5rem rgba(0, 0, 0, 0.7);
8686

8787
object-fit: cover;
8888
}
8989

9090
#bubble-container {
9191
position: absolute;
9292

93-
--bubble-1: #EF3E36;
94-
--bubble-2: #2E282A;
95-
--bubble-3: #17BEBB;
93+
--bubble-1: #ef3e36;
94+
--bubble-2: #2e282a;
95+
--bubble-3: #17bebb;
9696

9797
height: 100vh;
9898
width: 100vw;
@@ -145,9 +145,9 @@ header {
145145
}
146146

147147
#bubble-container {
148-
--bubble-1: #FF5714;
149-
--bubble-2: #6EEB83;
150-
--bubble-3: #1BE7FF;
148+
--bubble-1: #ff5714;
149+
--bubble-2: #6eeb83;
150+
--bubble-3: #1be7ff;
151151

152152
filter: blur(40px);
153153
}

assets/css/post_card.css

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
.post-card {
2+
display: flex;
3+
flex-direction: row;
4+
5+
overflow: hidden;
6+
7+
transition: transform 0.3s ease-out;
8+
9+
gap: 1rem;
10+
11+
padding: 0.5rem 0;
12+
13+
position: relative;
14+
15+
&:hover {
16+
text-decoration: none;
17+
cursor: pointer;
18+
transform: translateX(0.5rem);
19+
20+
&::before {
21+
opacity: 0;
22+
animation: flowGradient 2s linear infinite;
23+
}
24+
}
25+
26+
* {
27+
margin: 0;
28+
}
29+
30+
h2 {
31+
font-size: 1rem;
32+
color: var(--primary-600);
33+
}
34+
35+
p {
36+
font-size: 0.9rem;
37+
color: var(--on-bg-dark);
38+
}
39+
40+
img {
41+
border-radius: 0.5rem;
42+
max-width: 100px;
43+
max-height: 100px;
44+
aspect-ratio: 1 / 1;
45+
object-fit: cover;
46+
}
47+
48+
.post-meta {
49+
opacity: 0.7;
50+
}
51+
}
52+
53+
@keyframes flowGradient {
54+
0% {
55+
left: -100%;
56+
opacity: 0;
57+
}
58+
50% {
59+
opacity: 1;
60+
}
61+
100% {
62+
left: 100%;
63+
opacity: 0;
64+
}
65+
}
66+
67+
@media (prefers-color-scheme: dark) {
68+
.post-card {
69+
p {
70+
color: var(--on-bg-light);
71+
}
72+
73+
&::before {
74+
background: linear-gradient(
75+
90deg,
76+
transparent 0%,
77+
transparent 10%,
78+
rgba(255, 182, 193, 0.3) 25%,
79+
rgba(221, 160, 221, 0.3) 40%,
80+
rgba(173, 216, 230, 0.3) 60%,
81+
rgba(255, 218, 185, 0.3) 75%,
82+
transparent 90%,
83+
transparent 100%
84+
);
85+
mask: radial-gradient(
86+
ellipse at center,
87+
black 40%,
88+
transparent 80%
89+
);
90+
-webkit-mask: radial-gradient(
91+
ellipse at center,
92+
black 40%,
93+
transparent 80%
94+
);
95+
}
96+
}
97+
}

blog/index.liquid

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ eleventyImport:
1515

1616
<link href="/assets/css/global.css" rel="stylesheet">
1717
<link rel="stylesheet" href="/assets/css/general-read.css">
18+
<link rel="stylesheet" href="/assets/css/post_card.css">
1819

1920
<style>
2021
.posts {
@@ -31,6 +32,9 @@ eleventyImport:
3132
<div class="posts">
3233
{% for post in collections.posts reversed %}
3334
{% include 'components/post_card.liquid', post: post %}
35+
{% unless forloop.last %}
36+
<hr class="divider"/>
37+
{% endunless %}
3438
{% endfor %}
3539
</div>
3640
{% include 'layouts/footer.liquid' %}

index.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<a class="card" href="/assets/files/cv.pdf" target="_blank">CV</a>
3535
</nav>
3636
</div>
37-
<div id="right-header" class="card">
37+
<div id="right-header">
3838
<img src="assets/img/profile.jpg" alt="Profile Picture" id="profile-picture">
3939
<div id="profile-info">
4040
<h2>Miguel Santos</h2>

0 commit comments

Comments
 (0)