Skip to content

Commit 3e4f934

Browse files
committed
feat: card'ify term and section
Signed-off-by: Khusika Dhamar Gusti <[email protected]>
1 parent 029ad91 commit 3e4f934

File tree

5 files changed

+39
-21
lines changed

5 files changed

+39
-21
lines changed

assets/css/_core/_media.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
width: 60%;
1818
}
1919

20+
.archive-compact {
21+
width: 50% !important;
22+
}
23+
2024
#header-desktop .header-wrapper {
2125
padding: 0 1rem;
2226
}
@@ -49,6 +53,10 @@
4953
width: 56%;
5054
}
5155

56+
.archive-compact {
57+
width: 52% !important;
58+
}
59+
5260
.home[data-home=posts] {
5361
.summary{
5462
min-height: 23rem;
@@ -61,6 +69,10 @@
6169
width: 52%;
6270
}
6371

72+
.archive-compact {
73+
width: 70% !important;
74+
}
75+
6476
.single-card {
6577
padding: 1rem 2rem;
6678
}
@@ -118,6 +130,11 @@
118130
}
119131

120132
@media only screen and (max-width: 680px) {
133+
134+
.archive-compact {
135+
width: 100% !important;
136+
}
137+
121138
.wrapper {
122139
main {
123140
.container {

assets/css/_page/_archive.scss

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@
5353
color: inherit;
5454
text-decoration: none;
5555
transition: transform 0.2s ease-in-out;
56+
padding: 0.5rem;
57+
@include border-radius(4px);
58+
background: $global-background-card-color;
59+
@include box-shadow(0 2px 4px -1px rgba(0, 0, 0, 0.2));
60+
[theme=dark] & {
61+
background: $global-background-card-color-dark;
62+
}
5663
&:hover {
5764
transform: scale(1.02);
5865
.item-title {
@@ -96,7 +103,7 @@
96103
.item-with-image {
97104
display: flex;
98105
align-items: center;
99-
margin-left: 1.5rem;
106+
margin-left: 0;
100107
}
101108

102109
.item-image {
@@ -106,12 +113,7 @@
106113
height: 68px;
107114
overflow: hidden;
108115
@include border-radius(4px);
109-
background: $global-background-card-color;
110-
@include box-shadow(0 2px 10px rgba(0, 0, 0, 0.1));
111-
[theme=dark] & {
112-
background: $global-background-card-color-dark;
113-
@include box-shadow(0 2px 10px rgba(0, 0, 0, 0.4));
114-
}
116+
115117
img {
116118
width: 100%;
117119
height: 100%;
@@ -128,14 +130,12 @@
128130
width: 68px;
129131
height: 68px;
130132
@include border-radius(4px);
131-
background: $global-background-card-color;
133+
background-color: $global-background-color;
132134
font-size: 2rem;
133135
color: #495057;
134-
@include box-shadow(0 2px 10px rgba(0, 0, 0, 0.1));
135136
[theme=dark] & {
136-
background: $global-background-card-color-dark;
137+
background-color: $global-background-color-dark;
137138
color: #adb5bd;
138-
@include box-shadow(0 2px 10px rgba(0, 0, 0, 0.4));
139139
}
140140
}
141141

@@ -149,14 +149,15 @@
149149
.timeline {
150150
position: relative;
151151
overflow: hidden;
152+
padding-left: 2rem;
152153
&::before {
153154
content: '';
154155
display: inline-block;
155156
position: absolute;
156157
top: 0;
157-
left: 5px;
158+
left: 4.5px;
158159
background: $global-font-secondary-color;
159-
width: 2px;
160+
width: 3px;
160161
height: 100%;
161162
z-index: 1;
162163
[theme=dark] & {
@@ -176,9 +177,9 @@
176177
transform: translateY(-50%);
177178
border: 2px solid $global-background-color;
178179
@include border-radius(50%);
179-
left: 1px;
180-
width: 10px;
181-
height: 10px;
180+
left: 0;
181+
width: 12px;
182+
height: 12px;
182183
z-index: 2;
183184
transition: transform 0.2s ease-in-out;
184185
[theme=dark] & {
@@ -191,7 +192,7 @@
191192
transform: scale(1.02);
192193
}
193194
&::before {
194-
transform: translateY(-50%) scale(1.5);
195+
transform: translateY(-50%) scale(1.25);
195196
}
196197
}
197198
}

assets/css/_page/_home.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@
143143
padding: 30% 0 0;
144144
position: relative;
145145
margin: 0 auto;
146-
background-color: #f2f2f2;
146+
background-color: $global-background-color;
147147
@include border-radius(.5rem .5rem 0 0);
148148
[theme=dark] & {
149-
background-color: #292a2d;
149+
background-color: $global-background-color-dark;
150150
}
151151
a {
152152
position: absolute;

layouts/section.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{- end -}}
44

55
{{- define "content" -}}
6-
<div class="page archive">
6+
<div class="page archive archive-compact">
77
{{- /* Title */ -}}
88
<h2 class="single-title animated fadeInDown faster">
99
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" -}}

layouts/term.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{- end -}}
44

55
{{- define "content" -}}
6-
<div class="page archive">
6+
<div class="page archive archive-compact">
77
{{- /* Title */ -}}
88
<h2 class="single-title animated fadeInDown faster">
99
{{- $taxonomy := .Data.Singular -}}

0 commit comments

Comments
 (0)