Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
code
Hackathon De Groene Stad Databronnen
Commits
ed7fce51
Commit
ed7fce51
authored
Sep 05, 2020
by
alain
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more table styling
parent
127074d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
19 deletions
+35
-19
public/index.html
public/index.html
+1
-0
src/Table.js
src/Table.js
+2
-1
src/styles.scss
src/styles.scss
+32
-18
No files found.
public/index.html
View file @
ed7fce51
...
...
@@ -15,6 +15,7 @@
body
{
margin
:
0
;
font-size
:
18px
;
background-color
:
#E6E6E6
;
}
</style>
<noscript>
...
...
src/Table.js
View file @
ed7fce51
...
...
@@ -17,12 +17,13 @@ export default function Table(props) {
const
[
filter
,
setFilter
]
=
React
.
useState
(
filterInitial
);
const
[
activeFilter
,
setActiveFilter
]
=
React
.
useState
(
activeFilterInitial
);
const
{
items
,
requestSort
,
sortConfig
}
=
useSortableData
(
props
.
items
,
filter
);
const
{
items
,
requestSort
,
sortConfig
}
=
useSortableData
(
props
.
items
,
filter
,
{
key
:
"
url
"
,
direction
:
"
ascending
"
}
);
const
getSortState
=
(
name
)
=>
{
if
(
!
sortConfig
)
{
return
;
}
return
sortConfig
.
key
===
name
?
sortConfig
.
direction
:
''
;
};
...
...
src/styles.scss
View file @
ed7fce51
...
...
@@ -4,7 +4,7 @@ body {
#databronnen
{
font-family
:
"Maax"
,
Arial
,
Helvetica
,
sans-serif
;
padding
:
1
rem
;
padding
:
0
.5
rem
;
overflow
:
auto
;
width
:
100%
;
height
:
100%
;
...
...
@@ -19,29 +19,33 @@ body {
th
,
td
{
line-height
:
1
.25rem
;
vertical-align
:
top
;
font-size
:
0
.8rem
;
font-size
:
0
.75rem
;
background-color
:
#fff
;
&
:not
(
:last-child
)
{
border-right
:
1px
dashed
#ccc
;
}
&
.url
{
min-width
:
1
4
rem
;
max-width
:
1
4
rem
;
}
&
.titel
{
min-width
:
1
4
rem
;
max-width
:
1
4
rem
;
}
&
.omschrijving
{
min-width
:
1
4
rem
;
max-width
:
1
4
rem
;
}
&
.scope
{
min-width
:
6
rem
;
max-width
:
6
rem
;
}
&
.toegang
{
min-width
:
6
rem
;
max-width
:
6
rem
;
}
&
.type
{
min-width
:
6
rem
;
max-width
:
6
rem
;
}
&
.formaat
{
min-width
:
6
rem
;
max-width
:
6
rem
;
}
&
.thema
{
min-width
:
8
rem
;
max-width
:
8
rem
;
}
&
.subthema
{
min-width
:
8
rem
;
max-width
:
8
rem
;
}
&
.url
{
min-width
:
1
3
rem
;
max-width
:
1
3
rem
;
}
&
.titel
{
min-width
:
1
3
rem
;
max-width
:
1
3
rem
;
}
&
.omschrijving
{
min-width
:
1
5
rem
;
max-width
:
1
5
rem
;
}
&
.scope
{
min-width
:
7
rem
;
max-width
:
7
rem
;
}
&
.toegang
{
min-width
:
7
rem
;
max-width
:
7
rem
;
}
&
.type
{
min-width
:
7
rem
;
max-width
:
7
rem
;
}
&
.formaat
{
min-width
:
7
rem
;
max-width
:
7
rem
;
}
&
.thema
{
min-width
:
7
rem
;
max-width
:
7
rem
;
}
&
.subthema
{
min-width
:
7
rem
;
max-width
:
7
rem
;
}
}
thead
{
th
{
text-align
:
left
;
border-bottom
:
2px
solid
black
;
background-color
:
#00954a
;
color
:
#fff
;
font-weight
:
500
;
min-width
:
7em
;
padding
:
0
.25em
0
0
.15em
;
font-size
:
0
.8rem
;
>
div
{
display
:
flex
;
...
...
@@ -51,9 +55,11 @@ body {
span
{
padding
:
0
0
.25em
;
margin-right
:
1rem
;
vertical-align
:
middle
;
cursor
:
pointer
;
white-space
:
nowrap
;
flex-grow
:
1
;
}
svg
{
...
...
@@ -65,7 +71,7 @@ body {
path
{
pointer-events
:
auto
;
fill
:
#
ccc
;
fill
:
#
fff
;
}
}
...
...
@@ -88,10 +94,20 @@ body {
tbody
td
{
padding
:
0
.5em
;
border-bottom
:
1px
dashed
#ccc
;
font-size
:
0
.75rem
;
&
.url
{
word-break
:
break-all
;
a
{
display
:
block
;
max-height
:
4
.25rem
;
overflow
:
hidden
;
transition
:
max-height
200ms
ease
;
&
:hover
{
max-height
:
15rem
;
}
}
}
&
.titel
{
...
...
@@ -110,8 +126,6 @@ body {
}
}
}
}
input
{
...
...
@@ -122,8 +136,8 @@ body {
border
:
none
;
background-color
:
#eee
;
font-family
:
"Maax"
,
Arial
,
Helvetica
,
sans-serif
;
padding
:
0
.25rem
;
line-height
:
1rem
;
padding
:
0
.25rem
0
.25rem
0
;
line-height
:
1
.25
rem
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment