-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate list and table widgets from Icinga DB Web (#183)
- Loading branch information
Showing
14 changed files
with
840 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
// Style | ||
|
||
.item-list { | ||
list-style-type: none; | ||
|
||
> .empty-state { | ||
.rounded-corners(); | ||
background-color: @empty-state-bg-in-lists; | ||
} | ||
} | ||
|
||
// Layout | ||
|
||
.item-list { | ||
margin: 0; | ||
padding: 0; | ||
|
||
.list-item { | ||
display: flex; | ||
|
||
.main { | ||
flex: 1 1 auto; | ||
padding: .5em 0; | ||
width: 0; | ||
margin-left: .5em; | ||
} | ||
|
||
.visual { | ||
display: flex; | ||
align-items: center; | ||
flex-direction: column; | ||
} | ||
|
||
.caption { | ||
height: 3em; | ||
text-overflow: ellipsis; | ||
overflow: hidden; | ||
|
||
.line-clamp(); | ||
|
||
img { | ||
max-height: 1em; | ||
} | ||
} | ||
|
||
header { | ||
display: flex; | ||
align-items: flex-start; | ||
justify-content: space-between; | ||
} | ||
|
||
footer { | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
} | ||
|
||
> .empty-state { | ||
margin: 0 1em; | ||
padding: 1em; | ||
text-align: center; | ||
} | ||
} | ||
|
||
.item-list.default-layout .list-item { | ||
.title { | ||
display: inline-flex; | ||
align-items: baseline; | ||
white-space: nowrap; | ||
min-width: 0; | ||
|
||
> * { | ||
margin: 0 .28125em; // 0 calculated width | ||
|
||
&:first-child { | ||
margin-left: 0; | ||
} | ||
|
||
&:last-child { | ||
margin-right: 0; | ||
} | ||
} | ||
|
||
.subject { | ||
.text-ellipsis(); | ||
} | ||
} | ||
} | ||
|
||
.controls .list-item:not(:last-child) { | ||
margin-bottom: .5em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
// Style | ||
|
||
ul.item-table { | ||
list-style-type: none; | ||
} | ||
|
||
div.item-table { | ||
> .empty-state { | ||
.rounded-corners(); | ||
background-color: @empty-state-bg-in-lists; | ||
} | ||
} | ||
|
||
.table-row { | ||
color: @default-text-color-light; | ||
|
||
.title { | ||
.subject { | ||
color: @default-text-color; | ||
} | ||
|
||
a { | ||
font-weight: bold; | ||
|
||
&:hover { | ||
color: @list-item-title-hover-color; | ||
text-decoration: none; | ||
} | ||
} | ||
} | ||
} | ||
|
||
@media print { | ||
.item-table li.page-break-follows:not(:last-of-type) { | ||
.col { | ||
border-bottom: none; | ||
} | ||
|
||
.visual { | ||
margin-bottom: 0; | ||
} | ||
} | ||
} | ||
|
||
// Layout | ||
|
||
.table-row { | ||
.title { | ||
display: flex; | ||
|
||
.visual { | ||
width: 2.5em; | ||
padding: .5em 0; | ||
margin-top: -.5em; | ||
margin-bottom: -.5em; | ||
} | ||
|
||
.content { | ||
flex: 1 1 auto; | ||
width: 0; | ||
|
||
> * { | ||
.text-ellipsis(); | ||
} | ||
} | ||
} | ||
|
||
.col { | ||
white-space: nowrap; | ||
} | ||
} | ||
|
||
ul.item-table { | ||
display: grid; | ||
|
||
> .table-row { | ||
.col:not(.title) { | ||
display: grid; | ||
align-items: center; | ||
} | ||
} | ||
} | ||
|
||
ul.item-table { | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
div.item-table { | ||
> .empty-state { | ||
margin: 0 1em; | ||
padding: 1em; | ||
text-align: center; | ||
} | ||
} | ||
|
||
div.table-row { | ||
display: flex; | ||
column-gap: 1em; | ||
|
||
.title { | ||
flex: 1 1 auto; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
// Style | ||
|
||
.list-item { | ||
color: @default-text-color-light; | ||
|
||
&:not(:first-child) > .main { | ||
border-top: 1px solid @list-item-separation-bg; | ||
} | ||
|
||
&:not(:first-child) .visual { | ||
margin-top: 1px; | ||
} | ||
|
||
.caption { | ||
i { | ||
opacity: 0.8; | ||
} | ||
|
||
a { | ||
color: @default-text-color; | ||
} | ||
} | ||
|
||
.title { | ||
.subject { | ||
color: @default-text-color; | ||
} | ||
|
||
a { | ||
color: @default-text-color; | ||
font-weight: bold; | ||
|
||
&:hover { | ||
color: @list-item-title-hover-color; | ||
text-decoration: none; | ||
} | ||
} | ||
} | ||
|
||
footer { | ||
padding-top: .5em; | ||
} | ||
} | ||
|
||
@media print { | ||
.list-item.page-break-follows + .list-item { | ||
.main { | ||
border-top: 1px solid transparent; | ||
} | ||
} | ||
} | ||
|
||
// Layout | ||
|
||
.list-item { | ||
.visual { | ||
padding: .5em 0; | ||
width: 2.5em; | ||
} | ||
|
||
.caption { | ||
p { | ||
display: inline-block; | ||
} | ||
} | ||
|
||
.title { | ||
margin-right: 1em; | ||
|
||
p { | ||
margin: 0; | ||
} | ||
} | ||
|
||
time { | ||
white-space: nowrap; | ||
} | ||
|
||
footer { | ||
> * { | ||
font-size: .857em; | ||
line-height: 1.5*.857em; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.