Repository navigation
Expand file tree
/
Copy pathdatasets.html
More file actions
149 lines (140 loc) · 7.49 KB
/
Copy pathdatasets.html
File metadata and controls
149 lines (140 loc) · 7.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
---
title: Datasets
layout: default
permalink: /datasets/
---
{% assign datasets_count = site.datasets | size %}
<div class="p-4 p-md-5 mb-5 bg-light rounded-3 shadow-sm border">
<div class="row align-items-center">
<div class="col-lg-8">
<h1 class="display-5 fw-bold text-dark mb-3">Datasets Catalogue</h1>
<p class="lead text-muted mb-0">Browse, filter, and discover open cultural datasets from institutions across Switzerland.</p>
</div>
<div class="col-lg-4 text-center text-lg-end mt-4 mt-lg-0">
<span class="badge bg-white text-dark border px-3 py-2 shadow-sm fs-6">
<i class="fa fa-database text-secondary me-2"></i>{{ datasets_count }} {% if datasets_count == 1 %}Dataset{% else %}Datasets{% endif %}
</span>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-4 col-md-5 mb-4">
<button class="btn btn-outline-danger d-block d-md-none w-100 mb-3 shadow-sm" type="button" data-bs-toggle="collapse" data-bs-target="#sidebar-collapse" aria-expanded="false" aria-controls="sidebar-collapse">
<i class="fa fa-filter me-2"></i>
<span class="show-text">Filter Datasets</span>
<span class="hide-text">Hide Filters</span>
</button>
<div class="collapse d-md-block" id="sidebar-collapse">
<div class="d-flex justify-content-between align-items-center d-md-none mb-3">
<h3 class="h5 fw-bold text-dark mb-0"><i class="fa fa-filter text-danger me-2"></i>Filters</h3>
<button type="button" class="btn-close" data-bs-toggle="collapse" data-bs-target="#sidebar-collapse" aria-label="Close"></button>
</div>
<div class="card border-0 bg-light shadow-sm rounded-3 mb-4">
<div class="card-body p-3">
<h3 class="h6 text-uppercase fw-bold text-muted mb-3">
<i class="fa fa-folder-open text-secondary me-2"></i>Categories
</h3>
<div class="list-group list-group-flush rounded-3 js-shown" data-component="categories-filter" data-show="500"></div>
<div class="list-group list-group-flush rounded-3 js-hidden">
{% for category in site.dataset_categories %}
{% assign count = site.datasets | where: "category", category.name | size %}
<a href="{{ site.baseurl }}{{ category.url }}" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center py-2">
<span class="text-truncate me-2">{{ category.name }}</span>
<span class="badge bg-primary rounded-pill">{{ count }}</span>
</a>
{% endfor %}
</div>
</div>
</div>
<div class="card border-0 bg-light shadow-sm rounded-3 mb-4">
<div class="card-body p-3">
<h3 class="h6 text-uppercase fw-bold text-muted mb-3">
<i class="fa fa-university text-secondary me-2"></i>Organizations
</h3>
<div class="list-group list-group-flush rounded-3 js-shown" data-component="organizations-filter" data-show="5"></div>
<div class="list-group list-group-flush rounded-3 js-hidden">
{% for organization in site.organizations %}
{% assign count = site.datasets | where: "organization", organization.title | size %}
<a href="{{ site.baseurl}}{{ organization.url }}" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center py-2">
<span class="text-truncate me-2">{{ organization.title }}</span>
<span class="badge bg-primary rounded-pill">{{ count }}</span>
</a>
{% endfor %}
</div>
</div>
</div>
<div class="card border-0 bg-light shadow-sm rounded-3 mb-4">
<div class="card-body p-3">
<h3 class="h6 text-uppercase fw-bold text-muted mb-3">
<i class="fa fa-cloud text-secondary me-2"></i>Data Host
</h3>
<div class="list-group list-group-flush rounded-3 js-shown" data-component="data-host-filter" data-show="500"></div>
</div>
</div>
<div class="card border-0 bg-light shadow-sm rounded-3 mb-4">
<div class="card-body p-3">
<h3 class="h6 text-uppercase fw-bold text-muted mb-3">
<i class="fa fa-tags text-secondary me-2"></i>Tags
</h3>
<div class="list-group list-group-flush rounded-3 js-shown" data-component="tag-filter" data-show="500"></div>
</div>
</div>
</div>
</div>
<div class="col-lg-8 col-md-7" data-component="datasets-list">
<div class="search-container mb-4">
<div class="input-group input-group-lg shadow-sm rounded-3 overflow-hidden border">
<span class="input-group-text bg-white border-0 text-muted ps-3">
<i class="fa fa-search"></i>
</span>
<input type="text" data-hook="search-query" placeholder="Search datasets by keyword, description..." class="form-control border-0 py-2 shadow-none" aria-label="Search datasets">
</div>
</div>
<div class="d-flex align-items-center justify-content-between mb-4 border-bottom pb-2">
<h2 class="h4 fw-bold text-dark mb-0">
<i class="fa fa-database text-secondary me-2"></i><span class="datasets-count" data-hook="datasets-count">{{ datasets_count }} {% if datasets_count == 1 %}dataset{% else %}datasets{% endif %}</span>
</h2>
</div>
<div data-hook="datasets-items">
{% for dataset in site.datasets %}
{% assign first_resource = dataset.resources | first %}
<div class="card dataset-card border-0 bg-light shadow-sm rounded-3 mb-3">
<div class="card-body p-4">
<h3 class="h5 fw-bold mb-2">
<a href="{% if first_resource.url %}{{ first_resource.url }}{% else %}{{ site.baseurl }}{{ dataset.url }}{% endif %}" {% if first_resource.url contains 'http' %}target="_blank" rel="noopener noreferrer"{% endif %} class="text-dark text-decoration-none dataset-title-link">
{{ dataset.title }}{% if first_resource.url contains 'http' %} <i class="fa fa-external-link text-muted ms-1" style="font-size: 0.75rem;"></i>{% endif %}
</a>
</h3>
{% if dataset.organization and dataset.organization != empty %}
<div class="dataset-organization text-secondary mb-2">
<i class="fa fa-university me-1 text-muted"></i>{{ dataset.organization }}
</div>
{% endif %}
<div class="dataset-meta d-flex flex-wrap align-items-center mb-2">
{% if dataset.category and dataset.category != empty %}
{% for cat in dataset.category %}
<span class="badge bg-white text-secondary border me-1 mb-2 shadow-sm"><i class="fa fa-tag me-1 text-muted"></i>{{ cat }}</span>
{% endfor %}
{% endif %}
{% if dataset.tag and dataset.tag != empty %}
{% for t in dataset.tag %}
<span class="badge bg-primary text-white border me-1 mb-2 shadow-sm"><i class="fa fa-tags me-1"></i>{{ t }}</span>
{% endfor %}
{% endif %}
{% if dataset.data_host and dataset.data_host != empty %}
{% for host in dataset.data_host %}
<span class="badge bg-white text-dark border me-1 mb-2 shadow-sm">{{ host }}</span>
{% endfor %}
{% endif %}
</div>
{% if dataset.notes and dataset.notes != empty %}
<div class="dataset-notes text-secondary mb-0 small">
{{ dataset.notes | markdownify }}
</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
</div>