Skip to content

Commit 39cc34e

Browse files
committed
feat: added clickable cards, removed buttons, cleanuo, changed mascot to a happy one
1 parent 33e693d commit 39cc34e

File tree

2 files changed

+66
-67
lines changed

2 files changed

+66
-67
lines changed

docs/index.md

Lines changed: 66 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { ref } from 'vue';
1919
const cards = [
2020
{
2121
id: 'btn1',
22-
title: 'do science',
22+
title: 'Do science',
2323
href: '/do-science/',
2424
image: '/img/hunt-cloud_bottle_250.png',
2525
imageAlt: 'Illustration of laboratory glass bottle with yellow shimmery substance.',
@@ -49,11 +49,10 @@ const bottomCards = ref([
4949
title: 'About HUNT Cloud',
5050
href: '/about/',
5151
description: 'HUNT Cloud is shaped by a small team of scientific instrument makers. Read more about the thinking and team behind HUNT Cloud.',
52-
buttonColor: 'black--text'
5352
},
5453
{
5554
id: 'mascot',
56-
image: '/img/hunt-cloud_bot_250_2.png',
55+
image: '/img/Robot_Happy.png',
5756
imageAlt: 'Illustration of small centien robot made of metal with shiny lightbulb on top of its head.',
5857
href: '/about/',
5958
isMascot: true
@@ -63,7 +62,6 @@ const bottomCards = ref([
6362
title: 'Scientific products',
6463
href: 'https://www.ntnu.edu/mh/huntcloud',
6564
description: 'Explore and evolve. See the main HUNT Cloud page for information on HUNT Cloud\'s scientific products and services.',
66-
buttonColor: 'black--text'
6765
}
6866
]);
6967

@@ -73,7 +71,7 @@ const cardStyle = {
7371
borderRadius: '20px',
7472
};
7573

76-
const imageHeight = '120px';
74+
const imageHeight = '180px';
7775

7876
</script>
7977

@@ -89,35 +87,29 @@ const imageHeight = '120px';
8987
<div
9088
v-for="card in cards"
9189
:key="card.id"
92-
class="hc-column-4"
90+
class="hc-column-4 clickable-card"
9391
:style="cardStyle"
9492
>
95-
<a :href="card.href">
93+
<a :href="card.href" class="card-link">
9694
<img
9795
:alt="card.imageAlt"
9896
:style="{ height: imageHeight, width: 'auto' }"
9997
:src="card.image"
10098
/>
99+
<h3>{{ card.title }}</h3>
100+
<p>{{ card.description }}</p>
101101
</a>
102-
<VuetifyButton
103-
:id="card.id"
104-
class="hc-btn"
105-
color="primary"
106-
:label="card.title"
107-
:href="card.href"
108-
block
109-
/>
110-
<p>{{ card.description }}</p>
111102
</div>
112103
</div>
113-
<div class="hc-row">
104+
<div class="hc-row bottom-row">
114105
<div
115106
v-for="card in bottomCards"
116107
:key="card.id"
117108
class="hc-column-4"
109+
:style="cardStyle"
118110
:class="{ 'mascot-container': card.isMascot }"
119111
>
120-
<template v-if="card.isMascot">
112+
<template v-if="card.isMascot">
121113
<a :href="card.href">
122114
<img
123115
:alt="card.imageAlt"
@@ -126,16 +118,13 @@ const imageHeight = '120px';
126118
/>
127119
</a>
128120
</template>
129-
<template v-else>
130-
<VuetifyButton
131-
:id="card.id"
132-
class="hc-btn"
133-
:color="card.buttonColor"
134-
:label="card.title"
135-
:href="card.href"
136-
block
137-
/>
138-
<p>{{ card.description }}</p>
121+
<template v-else>
122+
<a :href="card.href" class="card-link bottom-card-link">
123+
<div class="button-text-group">
124+
<h3>{{ card.title }}</h3>
125+
<p>{{ card.description }}</p>
126+
</div>
127+
</a>
139128
</template>
140129
</div>
141130
</div>
@@ -152,7 +141,6 @@ const imageHeight = '120px';
152141

153142
h1 {
154143
display: block;
155-
font-size: 2em;
156144
margin-block-start: 0.67em;
157145
margin-block-end: 0.67em;
158146
margin-inline-start: 0px;
@@ -196,15 +184,6 @@ h1 {
196184
box-shadow: inset 0px -3px 5px rgba(0, 0, 0, 0.1);
197185
}
198186

199-
.hc-btn {
200-
display: flex;
201-
justify-content: center;
202-
align-items: center;
203-
/* margin-left: 20px;
204-
margin-right: 20px;
205-
margin-top: 16px;
206-
width: 90%; */
207-
}
208187

209188
.hc-title {
210189
display: flex;
@@ -232,6 +211,10 @@ h1 {
232211

233212
}
234213

214+
.bottom-row {
215+
margin-top: 30px;
216+
}
217+
235218
.hc-column-4 {
236219
justify-self: start;
237220
display: grid;
@@ -241,17 +224,11 @@ h1 {
241224
padding-bottom: 12px;
242225
margin-left: 0px;
243226
margin-right: 0px;
244-
text-align: justify;
245-
text-align: left; /* left or justify */
227+
text-align: left;
246228
justify-content: center;
247229
align-items: center;
248230
}
249231

250-
.hc-column-4 a {
251-
justify-self: center;
252-
padding-bottom: 24px;
253-
}
254-
255232
.hc-column-4 p {
256233
justify-self: center;
257234
padding-left: 32px;
@@ -265,27 +242,56 @@ h1 {
265242
min-height: 100px;
266243
}
267244

268-
.hc-column-8 {
269-
justify-self: start;
245+
.card-link {
246+
text-decoration: none;
247+
color: inherit;
270248
display: grid;
271-
float: left;
272-
/* width: 100%; */
273-
min-height: 12px;
274-
padding-bottom: 12px;
275-
margin-left: 0px;
276-
margin-right: 0px;
277-
text-align: left; /* left or justify */
249+
width: 100%;
250+
height: 100%;
251+
justify-items: center;
252+
align-items: center;
278253
}
279254

280-
.hc-column-8 p {
255+
.card-link img {
281256
justify-self: center;
282-
padding-left: 32px;
283-
padding-right: 32px;
257+
padding-bottom: 24px;
258+
padding-top: 24px;
259+
}
260+
261+
.clickable-card {
262+
cursor: pointer;
263+
transition: transform 0.2s, box-shadow 0.2s;
264+
}
265+
266+
.clickable-card:hover {
267+
transform: translateY(-5px);
268+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
269+
}
270+
271+
.bottom-card-link {
272+
text-decoration: none;
273+
color: inherit;
274+
display: block;
275+
width: 100%;
276+
height: 100%;
277+
}
278+
279+
.bottom-row .hc-column-4:not(.mascot-container) {
280+
cursor: pointer;
281+
transition: transform 0.2s, box-shadow 0.2s;
282+
}
283+
284+
.bottom-row .hc-column-4:not(.mascot-container):hover {
285+
transform: translateY(-5px);
286+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
284287
}
285288

286-
.hc-column-8:has(p) {
287-
padding-left: 16px;
288-
padding-right: 16px;
289+
.card-link h3 {
290+
font-size: 1.3rem;
291+
font-weight: 600;
292+
margin: 10px 0;
293+
color: #004c7b;
294+
justify-self: center;
289295
}
290296

291297
@media (min-width: 720px) {
@@ -294,12 +300,6 @@ h1 {
294300
height: 300px;
295301
}
296302

297-
.hc-column-8 {
298-
width: 60%;
299-
margin-left: 0;
300-
margin-right: 0;
301-
}
302-
303303
.hc-column-4 {
304304
width: 33%;
305305
margin-left: 0;
@@ -328,5 +328,4 @@ h1 {
328328
}
329329
}
330330

331-
332331
</style>

docs/public/img/Robot_Happy.png

30.3 KB
Loading

0 commit comments

Comments
 (0)