Skip to content

Commit 78695c7

Browse files
authored
Docs page improvements - start page (#196)
2 parents 1a3fdd2 + f0a39be commit 78695c7

File tree

2 files changed

+145
-99
lines changed

2 files changed

+145
-99
lines changed

docs/index.md

Lines changed: 145 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,58 @@ footerHtml: false
1414

1515
<script setup>
1616

17+
const cards = [
18+
{
19+
id: 'card1',
20+
title: 'Do science',
21+
href: '/do-science/',
22+
image: '/img/hunt-cloud_bottle_250.png',
23+
imageAlt: 'Illustration of laboratory glass bottle with yellow shimmery substance.',
24+
description: 'Scientists are explorers. This section is aimed at those who use data to discover knowledge for a better world in HUNT Cloud.'
25+
},
26+
{
27+
id: 'card2',
28+
title: 'Administer science',
29+
href: '/administer-science/',
30+
image: '/img/hunt-cloud_key_250.png',
31+
imageAlt: 'Illustration of decorative hand-made golden key with purple gem stones.',
32+
description: 'Scientific administrators are keymakers. This section is aimed at administrators that enables scientific explorations.'
33+
},
34+
{
35+
id: 'card3',
36+
title: 'Govern science',
37+
href: '/govern-science/',
38+
image: '/img/hunt-cloud_compass_250.png',
39+
imageAlt: 'Illustration of sundial compass in brass.',
40+
description: 'Trust enables science. This section is aimed at data controllers and scientific centers that guides the development of HUNT Cloud.'
41+
}
42+
];
43+
44+
const bottomCards = [
45+
{
46+
id: 'card4',
47+
title: 'About HUNT Cloud',
48+
href: '/about/',
49+
description: 'HUNT Cloud is shaped by a small team of scientific instrument makers. Read more about the thinking and team behind HUNT Cloud.',
50+
},
51+
{
52+
id: 'mascot',
53+
image: '/img/Robot_Happy.png',
54+
imageAlt: 'Illustration of small centien robot made of metal with shiny lightbulb on top of its head.',
55+
href: '/about/',
56+
isMascot: true
57+
},
58+
{
59+
id: 'card5',
60+
title: 'Scientific products',
61+
href: 'https://www.ntnu.edu/mh/huntcloud',
62+
description: 'Explore and evolve. See the main HUNT Cloud page for information on HUNT Cloud\'s scientific products and services.',
63+
}
64+
];
65+
66+
67+
const imageHeight = '180px';
68+
1769
</script>
1870

1971
<div class="hc-container mb-8">
@@ -25,49 +77,51 @@ footerHtml: false
2577
<h1>Welcome to the HUNT Cloud documentation</h1>
2678
</div>
2779
<div class="hc-row">
28-
<div class="hc-column-4">
29-
<a href="/do-science/"><img alt="Illustration of laboratory glass bottle with yellow shimmery substance." height="150" src="/img/hunt-cloud_bottle_250.png" /></a>
30-
<VuetifyButton id="btn1" class="hc-btn" color="black--text" label="Do science" href="/do-science/" block />
31-
<p>
32-
Scientists are explorers. This section is aimed at those who use data to discover knowledge for a better world in HUNT Cloud.
33-
</p>
34-
</div>
35-
<div class="hc-column-4">
36-
<a href="/administer-science/"><img alt="Illustration of decorative hand-made golden key with purple gem stones." height="150" src="/img/hunt-cloud_key_250.png" /></a>
37-
<VuetifyButton id="btn2" class="hc-btn" color="black--text" label="Administer science" href="/administer-science/" block />
38-
<p>
39-
Scientific administrators are keymakers. This section is aimed at administrators that enables scientific explorations.
40-
</p>
41-
</div>
42-
<div class="hc-column-4">
43-
<a href="/govern-science/"><img alt="Illustration of sundial compass in brass." height="150" src="/img/hunt-cloud_compass_250.png" /></a>
44-
<VuetifyButton id="btn3" class="hc-btn" color="black--text" label="Govern science" href="/govern-science/" block />
45-
<p>
46-
Trust enables science. This section is aimed at data controllers and scientific centers that guides the development of HUNT Cloud.
47-
</p>
48-
</div>
49-
</div>
50-
<div class="hc-row">
51-
<div class="hc-column-4">
52-
<VuetifyButton id="btn3" class="hc-btn" color="black--text" label="About HUNT Cloud" href="/about/" block />
53-
<p>
54-
HUNT Cloud is shaped by a small team of scientific instrument makers. Read more about the thinking and team behind HUNT Cloud.
55-
</p>
56-
</div>
57-
<div class="hc-column-4">
58-
<a href="/about/"><img alt="Illustration of small centien robot made of metal with shiny lightbulb on top of its head." height="200" src="/img/hunt-cloud_bot_250_2.png" /></a>
59-
</div>
60-
<div class="hc-column-4">
61-
<VuetifyButton id="btn3" class="hc-btn" color="black--text" label="Scientific products" href="https://www.ntnu.edu/mh/huntcloud" block />
62-
<p>
63-
Explore and evolve. See the main HUNT Cloud page for information on HUNT Cloud's scientific products and services.
64-
</p>
65-
</div>
80+
<div
81+
v-for="card in cards"
82+
:key="card.id"
83+
class="hc-column-4 clickable-card card-styled card-hover-effect"
84+
>
85+
<a :href="card.href" class="card-link">
86+
<img
87+
:alt="card.imageAlt"
88+
:style="{ height: imageHeight, width: 'auto' }"
89+
:src="card.image"
90+
/>
91+
<h3>{{ card.title }}</h3>
92+
<p>{{ card.description }}</p>
93+
</a>
94+
</div>
95+
</div>
96+
<div class="hc-row bottom-row">
97+
<div
98+
v-for="card in bottomCards"
99+
:key="card.id"
100+
:class="['hc-column-4', { 'mascot-container': card.isMascot, 'card-styled': !card.isMascot }]"
101+
>
102+
<template v-if="card.isMascot">
103+
<a :href="card.href">
104+
<img
105+
:alt="card.imageAlt"
106+
height="200"
107+
:src="card.image"
108+
/>
109+
</a>
110+
</template>
111+
<template v-else>
112+
<a :href="card.href" class="card-link">
113+
<div class="button-text-group">
114+
<h3>{{ card.title }}</h3>
115+
<p>{{ card.description }}</p>
116+
</div>
117+
</a>
118+
</template>
119+
</div>
66120
</div>
67-
<div class="hc-row">
68-
<center>
69-
<i>These pages contain the official user documentation for HUNT Cloud. <br>HUNT Cloud is a scientific infrastructure for data explorations at <a href="https://www.ntnu.edu/">NTNU</a>, Norway.<br><a href="/govern-science/privacy-statement">Privacy statement</a>.</i><br>
70-
</center>
121+
<div class="hc-row footer">
122+
<center>
123+
<i>These pages contain the official user documentation for HUNT Cloud. <br>HUNT Cloud is a scientific infrastructure for data explorations at <a href="https://www.ntnu.edu/">NTNU</a>, Norway.<br><a href="/govern-science/privacy-statement">Privacy statement</a>.</i><br>
124+
</center>
71125
</div>
72126
</div>
73127
</div>
@@ -77,25 +131,20 @@ footerHtml: false
77131

78132
h1 {
79133
display: block;
80-
font-size: 2em;
81134
margin-block-start: 0.67em;
82135
margin-block-end: 0.67em;
83136
margin-inline-start: 0px;
84137
margin-inline-end: 0px;
85138
font-weight: bold;
86139
unicode-bidi: isolate;
140+
font-size: 2.2rem;
87141
}
88142

89143
h1, h2, h3, h4, h5, h6 {
90144
font-weight: 600;
91145
line-height: 1.25;
92146
}
93147

94-
h1 {
95-
font-size: 2.2rem;
96-
}
97-
98-
99148
.theme-default-content {
100149
max-width: none !important;
101150
padding: 0 !important;
@@ -121,16 +170,6 @@ h1 {
121170
box-shadow: inset 0px -3px 5px rgba(0, 0, 0, 0.1);
122171
}
123172

124-
.hc-btn {
125-
display: flex;
126-
justify-content: center;
127-
align-items: center;
128-
margin-left: 20px;
129-
margin-right: 20px;
130-
margin-top: 16px;
131-
/* width: 90%; */
132-
}
133-
134173
.hc-title {
135174
display: flex;
136175
justify-content: center;
@@ -152,8 +191,17 @@ h1 {
152191

153192
.hc-row {
154193
justify-content: center;
155-
align-items: start;
156-
vertical-align: top;
194+
display: flex;
195+
flex-direction: column;
196+
gap: 15px;
197+
}
198+
199+
.footer {
200+
margin-top: 30px;
201+
}
202+
203+
.bottom-row {
204+
margin-top: 15px;
157205
}
158206

159207
.hc-column-4 {
@@ -165,70 +213,69 @@ h1 {
165213
padding-bottom: 12px;
166214
margin-left: 0px;
167215
margin-right: 0px;
168-
text-align: justify;
169-
text-align: left; /* left or justify */
216+
text-align: left;
170217
justify-content: center;
171218
align-items: center;
172219
}
173220

174-
.hc-column-4 a {
175-
justify-self: center;
176-
padding-bottom: 24px;
177-
}
178-
179221
.hc-column-4 p {
180222
justify-self: center;
181223
padding-left: 32px;
182224
padding-right: 32px;
183225
}
184226

185-
.hc-column-4:has(div.mascot) {
186-
display: flex;
187-
margin-left: 0;
188-
margin-right: 0;
189-
min-height: 100px;
227+
.card-link {
228+
color: inherit;
229+
/* display: block; */
230+
width: 100%;
231+
height: 100%;
232+
justify-items: center;
233+
align-items: center;
190234
}
191235

192-
div .mascot {
193-
flex: 100%;
194-
min-height: 250px;
236+
.card-link img {
237+
justify-self: center;
238+
padding-bottom: 24px;
239+
padding-top: 24px;
195240
}
196241

197-
.hc-column-8 {
198-
justify-self: start;
199-
display: grid;
200-
float: left;
201-
/* width: 100%; */
202-
min-height: 12px;
203-
padding-bottom: 12px;
204-
margin-left: 0px;
205-
margin-right: 0px;
206-
text-align: left; /* left or justify */
242+
.card-link h3 {
243+
font-size: 1.3rem;
244+
font-weight: 600;
245+
margin: 10px 0;
246+
color: #000000;
247+
justify-self: center;
207248
}
208249

209-
.hc-column-8 p {
210-
justify-self: center;
211-
padding-left: 32px;
212-
padding-right: 32px;
250+
.card-styled {
251+
padding: 25px;
252+
background: #f1eef0ff;
253+
border-radius: 20px;
213254
}
214255

215-
.hc-column-8:has(p) {
216-
padding-left: 16px;
217-
padding-right: 16px;
256+
.clickable-card,
257+
.bottom-row .hc-column-4:not(.mascot-container) {
258+
cursor: pointer;
259+
transition: transform 0.2s, box-shadow 0.2s;
260+
}
261+
262+
.clickable-card:hover,
263+
.bottom-row .hc-column-4:not(.mascot-container):hover {
264+
transform: translateY(-5px);
265+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
218266
}
219267

220268
@media (min-width: 720px) {
269+
270+
.hc-row {
271+
flex-direction: row;
272+
}
273+
221274
.hc-header-img {
222275
background-image: url("https://assets.hdc.ntnu.no/assets/static/banner_960.jpg");
223276
height: 300px;
224277
}
225278

226-
.hc-column-8 {
227-
width: 60%;
228-
margin-left: 0;
229-
margin-right: 0;
230-
}
231-
232279
.hc-column-4 {
233280
width: 33%;
234281
margin-left: 0;
@@ -257,5 +304,4 @@ div .mascot {
257304
}
258305
}
259306

260-
261307
</style>

docs/public/img/Robot_Happy.png

30.3 KB
Loading

0 commit comments

Comments
 (0)