diff --git a/app/assets/sass/_variables.scss b/app/assets/sass/_variables.scss
index 9053952..b6ba7c4 100644
--- a/app/assets/sass/_variables.scss
+++ b/app/assets/sass/_variables.scss
@@ -127,6 +127,24 @@ $button-gitlab-bg: $gitlab-color;
$button-linkedin-color: white;
$button-linkedin-bg: $linkedin-color;
+// ----------------------------------
+// List group
+// ----------------------------------
+
+$list-group-item-color: $text-color;
+$list-group-item-background: transparent;
+$list-group-item-border-color: $gray-light;
+
+$list-group-hover-background: $gray-lightest;
+$list-group-item-active-background: $brand-color;
+
+// ----------------------------------
+// List group
+// ----------------------------------
+
+$card-border-color: $gray-light;
+$card-header-background: $gray-lightest;
+
// ----------------------------------
// Shadows
// ----------------------------------
@@ -199,14 +217,5 @@ $callback-list-arrow-color: $callback-list-border-color;
// Request list
// ----------------------------------
-$request-item-color: $text-color;
$request-item-secondary-color: $text-secondary-color;
-$request-item-background: transparent;
-$request-item-border-color: $gray-light;
-
-$request-item-active-color: $request-item-color;
-$request-item-active-background: $gray-lightest;
-$request-item-active-border-color: $request-item-border-color;
-$request-item-hover-background: $request-item-active-background;
-
$request-detail-background: lighten($brand-color, 45%);
diff --git a/app/assets/sass/application.scss b/app/assets/sass/application.scss
index 4bb2f13..a1f7d81 100644
--- a/app/assets/sass/application.scss
+++ b/app/assets/sass/application.scss
@@ -30,11 +30,13 @@
@import "components/icon";
@import "components/button";
@import "components/badge";
+@import "components/card";
@import "components/section";
@import "components/spacer";
@import "components/pagination";
@import "components/blankslate";
-@import "components/request-item";
+@import "components/list-group";
+@import "components/request-list";
@import "components/callback-list";
// Views
diff --git a/app/assets/sass/components/_card.scss b/app/assets/sass/components/_card.scss
new file mode 100644
index 0000000..7abf9e8
--- /dev/null
+++ b/app/assets/sass/components/_card.scss
@@ -0,0 +1,74 @@
+
+
+// ----------------------------------
+// Base style.
+// ----------------------------------
+
+
+.card {
+ border: 1px solid $card-border-color;
+
+ &-header,
+ &-body {
+ display: block;
+ padding: .5em 1em;
+ }
+
+ // Contextual colors
+ // ----------------------------------
+
+ &-header-default {
+ background-color: $card-header-background;
+ }
+
+ // Add border between header and body if they follow eachother.
+ &-header + &-body {
+ border-top: 1px solid $card-border-color;
+ }
+}
+
+// Header link
+// ----------------------------------
+
+a.card-header,
+.card-header-link {
+ cursor: pointer;
+ color: $list-group-item-color;
+
+ &:hover,
+ &:active,
+ &:focus {
+ text-decoration: none;
+ }
+
+ &:hover {
+ background: $card-header-background;
+ }
+}
+
+
+// ----------------------------------
+// Layouts
+// ----------------------------------
+
+
+// Accordion
+// ----------------------------------
+
+.card-accordion {
+
+ .card {
+
+ &-header {
+ border-bottom: 0;
+ }
+
+ &-body {
+ border-top: 1px solid $card-border-color;
+ }
+ }
+
+ .card:not(:first-of-type) {
+ border-top: 0;
+ }
+}
diff --git a/app/assets/sass/components/_list-group.scss b/app/assets/sass/components/_list-group.scss
new file mode 100644
index 0000000..cba5c02
--- /dev/null
+++ b/app/assets/sass/components/_list-group.scss
@@ -0,0 +1,47 @@
+
+.list-group {
+
+ padding-left: 0; // for
, reset left padding.
+ margin-bottom: 0; // for , reset bottom margin.
+
+ border: 1px solid $list-group-item-border-color;
+
+ &-item {
+
+ display: block;
+ padding: .5em 1em;
+
+ color: $list-group-item-color;
+ background-color: $list-group-item-background;
+
+ // Set buttom border for all but the last child.
+ &:not(:last-child) {
+ border-bottom: 1px solid $list-group-item-border-color;
+ }
+
+ &-active {
+ background-color: $list-group-item-active-background;
+ }
+ }
+}
+
+// Links
+// ----------------------------------
+
+.list-group-item-link,
+a.list-group-item {
+
+ color: $list-group-item-color;
+ cursor: pointer;
+
+ &:hover,
+ &:active,
+ &:focus {
+ text-decoration: none;
+ }
+
+ &:hover,
+ &:focus {
+ background: $list-group-hover-background;
+ }
+}
diff --git a/app/assets/sass/components/_request-item.scss b/app/assets/sass/components/_request-list.scss
similarity index 52%
rename from app/assets/sass/components/_request-item.scss
rename to app/assets/sass/components/_request-list.scss
index 4649e75..a9e75c4 100644
--- a/app/assets/sass/components/_request-item.scss
+++ b/app/assets/sass/components/_request-list.scss
@@ -1,39 +1,14 @@
.request-list {
-
+ @extend .card-accordion;
&-item {
+ @extend .card;
// Header Section
// --------------
&-header {
- display: block;
- padding: .5em 1em;
-
- color: $request-item-active-color;
- background-color: $request-item-active-background;
- border: 1px solid $request-item-active-border-color;
-
- &:hover,
- &:active,
- &:focus {
- color: $request-item-active-color;
- text-decoration: none;
- }
-
- &.collapsed {
- background-color: $request-item-background;
-
- &:hover {
- background-color: $request-item-hover-background;
- }
-
- &:hover,
- &:active,
- &:focus {
- color: $request-item-color;
- }
- }
+ @extend .card-header, .card-header-link;
&-row {
display: block;
@@ -80,10 +55,8 @@
// Detail section
// --------------
&-detail {
-
+ @extend .card-body;
background-color: $request-detail-background;
- border: 1px solid $request-item-border-color;
- padding: 1em;
&-headers {
@extend .table, .table-bordered;
@@ -104,23 +77,5 @@
margin-bottom: 1em;
}
}
-
- // Border overrides
- // ----------------
-
- // Remove bottom border from header for all but last request-item.
- &:not(:last-child) &-header {
- border-bottom: 0;
- }
-
- // Remove top border from detail element for last request-item.
- &:last-child &-detail {
- border-top: 0;
- }
-
- // Remove bottom border from detail element for all but last request-item.
- &:not(:last-child) &-detail {
- border-bottom: 0;
- }
}
}
diff --git a/app/views/callback/show.volt b/app/views/callback/show.volt
index 3e30bcd..7114fe6 100644
--- a/app/views/callback/show.volt
+++ b/app/views/callback/show.volt
@@ -5,14 +5,14 @@
Created at: {{ item.created_at }}
-
+
{% for index, req in page.items %}
-
-