Skip to content

Commit a781852

Browse files
authored
Merge pull request #293 from OP-TED/feature/M2O3-182
glossary style updates
2 parents a8f4c92 + 20e400d commit a781852

2 files changed

Lines changed: 46 additions & 12 deletions

File tree

src/html-model-glossary/fragments/header.xsl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
<meta name="author" content="Publications Office of the European Union"/>
2222
<meta name="viewport" content="width=device-width, initial-scale=1"/>
2323

24+
<!-- Google Fonts - Roboto -->
25+
<link rel="preconnect" href="https://fonts.googleapis.com"/>
26+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/>
27+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&amp;display=swap" rel="stylesheet"/>
28+
2429
<!-- Bootstrap 5 CSS -->
2530
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous"/>
2631

src/static/css/glossary.css

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
body {
1313
background-color: var(--epo-gray-light);
14-
font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
14+
font-family: Roboto, sans-serif;
1515
color: var(--epo-text);
1616
font-size: 1rem;
1717
}
@@ -20,6 +20,7 @@ h1, h2, h3 {
2020
color: var(--epo-main);
2121
margin-top: 2rem;
2222
margin-bottom: 1rem;
23+
font-family: Roboto, sans-serif;
2324
}
2425

2526
h1 {
@@ -137,7 +138,7 @@ table.display {
137138
margin-top: 20px;
138139
margin-left: auto;
139140
margin-right: auto;
140-
width: 100% !important;
141+
width: 115%;
141142
border: 1px solid var(--epo-gray-border) !important;
142143
border-radius: 6px;
143144
overflow: hidden;
@@ -150,17 +151,16 @@ table.display th {
150151
background-color: var(--epo-main);
151152
color: #fbfbfb;
152153
border-bottom: 1px solid var(--epo-gray-border) !important;
153-
154-
border-right: none !important;
155-
}
156-
157-
table.display th {
158-
border-color: var(--epo-gray-border) !important;
159-
border-bottom: 1px solid var(--epo-gray-border) !important;
160154
border-right: none !important;
161155
word-wrap: break-word;
162156
overflow-wrap: break-word;
163157
word-break: break-word;
158+
text-align: left !important;
159+
}
160+
161+
/* Override Bootstrap text-center class on table headers */
162+
table.display thead.text-center th {
163+
text-align: left !important;
164164
}
165165

166166
table.display td {
@@ -171,6 +171,7 @@ table.display td {
171171
overflow-wrap: break-word;
172172
word-break: break-all;
173173
hyphens: auto;
174+
text-align: left !important;
174175
}
175176

176177
/* Enforce width on definition columns */
@@ -198,6 +199,28 @@ table.display td:nth-child(3) {
198199
width: 35% !important;
199200
}
200201

202+
/* For 3rd table (Predicates) - Column widths: 20% (Predicate name), 50% (Definition), 30% (Domain/Range) */
203+
/* Using DataTables ID for higher specificity to override inline styles */
204+
#DataTables_Table_2 th:nth-child(1),
205+
#DataTables_Table_2 td:nth-child(1) {
206+
width: 20% !important;
207+
max-width: none !important;
208+
min-width: 0 !important;
209+
}
210+
211+
#DataTables_Table_2 th:nth-child(2),
212+
#DataTables_Table_2 td:nth-child(2) {
213+
width: 50% !important;
214+
max-width: none !important;
215+
min-width: 0 !important;
216+
}
217+
218+
#DataTables_Table_2 th:nth-child(3),
219+
#DataTables_Table_2 td:nth-child(3) {
220+
width: 30% !important;
221+
max-width: none !important;
222+
min-width: 0 !important;
223+
}
201224

202225
/* Disable DataTables box-shadow on striped rows */
203226
table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1) > * {
@@ -224,15 +247,21 @@ table.display tr:hover td {
224247
.dataTables_wrapper .dataTables_filter {
225248
position: relative;
226249
cursor: text;
250+
display: flex;
251+
justify-content: flex-end;
252+
width: 115%;
253+
margin-left: auto;
254+
margin-right: auto;
227255
}
228256

229257
.dataTables_wrapper .dataTables_filter label {
230258
cursor: text;
231-
width: 50%;
259+
width: 65%;
232260
display: flex;
233261
align-items: center;
234262
gap: 0.5rem;
235-
margin-left: auto;
263+
margin: 0;
264+
justify-content: flex-end;
236265
}
237266

238267
.dataTables_wrapper .dataTables_filter input[type="search"] {
@@ -241,7 +270,7 @@ table.display tr:hover td {
241270
appearance: searchfield;
242271
flex: 1;
243272
cursor: text;
244-
max-width: 60%;
273+
max-width: 75%;
245274
border-color: var(--epo-gray-border);
246275
transition: border-color 0.2s, box-shadow 0.2s;
247276
font-size: 0.9rem;

0 commit comments

Comments
 (0)