panel styling cleanup

This commit is contained in:
Henry Jameson 2018-08-28 16:14:32 +03:00
parent c3b27ab4c2
commit 330288b4cd
4 changed files with 23 additions and 73 deletions

View file

@ -48,7 +48,7 @@ a {
color: var(--link, $fallback--link); color: var(--link, $fallback--link);
} }
button{ button {
user-select: none; user-select: none;
color: $fallback--fg; color: $fallback--fg;
color: var(--fg, $fallback--fg); color: var(--fg, $fallback--fg);
@ -282,15 +282,25 @@ main-router {
} }
.panel-heading { .panel-heading {
display: flex;
border-radius: $fallback--panelRadius $fallback--panelRadius 0 0; border-radius: $fallback--panelRadius $fallback--panelRadius 0 0;
border-radius: var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius) 0 0; border-radius: var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius) 0 0;
background-size: cover; background-size: cover;
padding: 0.6em 1.0em; padding: .6em .6em;
text-align: left; text-align: left;
font-size: 1.3em; font-size: 1.3em;
line-height: 24px; line-height: 24px;
background-color: $fallback--btn; background-color: $fallback--btn;
background-color: var(--btn, $fallback--btn); background-color: var(--btn, $fallback--btn);
align-items: baseline;
.title {
flex: 1 0 auto;
}
button {
height: 100%;
}
} }
.panel-heading.stub { .panel-heading.stub {
@ -460,4 +470,3 @@ nav {
border-radius: $fallback--inputRadius; border-radius: $fallback--inputRadius;
border-radius: var(--inputRadius, $fallback--inputRadius); border-radius: var(--inputRadius, $fallback--inputRadius);
} }

View file

@ -4,58 +4,25 @@
// a bit of a hack to allow scrolling below notifications // a bit of a hack to allow scrolling below notifications
padding-bottom: 15em; padding-bottom: 15em;
.title {
display: inline-block;
}
.panel {
background: $fallback--bg;
background: var(--bg, $fallback--bg)
}
.panel-body {
border-color: $fallback--border;
border-color: var(--border, $fallback--border)
}
.panel-heading {
// force the text to stay centered, while keeping
// the button in the right side of the panel heading
position: relative;
background: $fallback--btn;
background: var(--btn, $fallback--btn);
color: $fallback--fg;
color: var(--fg, $fallback--fg);
display: flex;
align-items: baseline;
.read-button {
position: absolute;
right: 0.7em;
height: 1.8em;
line-height: 100%;
}
}
.unseen-count { .unseen-count {
display: inline-block; display: inline-block;
background-color: $fallback--cRed; background-color: $fallback--cRed;
background-color: var(--cRed, $fallback--cRed); background-color: var(--cRed, $fallback--cRed);
text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.5); text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.5);
min-width: 1.3em; border-radius: 99px;
border-radius: 1.3em; min-width: 1.5em;
margin: 0 0.2em 0 -0.4em; max-width: 1.5em;
min-height: 1.5em;
max-height: 1.5em;
color: white; color: white;
font-size: 0.9em; font-size: 0.9em;
text-align: center; text-align: center;
line-height: 1.3em;
} }
.loadmore-error { .loadmore-error {
position: absolute; position: absolute;
right: 0.6em; right: 0.6em;
font-size: 14px;
min-width: 6em; min-width: 6em;
font-family: sans-serif;
text-align: center; text-align: center;
padding: 0 0.25em 0 0.25em; padding: 0 0.25em 0 0.25em;
margin: 0; margin: 0;
@ -73,7 +40,8 @@
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
border-bottom: 1px solid; border-bottom: 1px solid;
border-bottom-color: inherit; border-color: $fallback--border;
border-color: var(--border, $fallback--border);
.broken-favorite { .broken-favorite {
border-radius: $fallback--tooltipRadius; border-radius: $fallback--tooltipRadius;

View file

@ -2,8 +2,10 @@
<div class="notifications"> <div class="notifications">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<span class="unseen-count" v-if="unseenCount">{{unseenCount}}</span> <div class="title">
<div class="title"> {{$t('notifications.notifications')}}</div> {{$t('notifications.notifications')}}
<span class="unseen-count" v-if="unseenCount">{{unseenCount}}</span>
</div>
<div @click.prevent class="loadmore-error alert error" v-if="error"> <div @click.prevent class="loadmore-error alert error" v-if="error">
{{$t('timeline.error_fetching')}} {{$t('timeline.error_fetching')}}
</div> </div>

View file

@ -57,36 +57,8 @@
@import '../../_variables.scss'; @import '../../_variables.scss';
.timeline { .timeline {
.timeline-heading {
position: relative;
display: flex;
}
.title {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 70%;
}
.loadmore-button {
position: absolute;
right: 0.6em;
font-size: 14px;
min-width: 6em;
height: 1.8em;
line-height: 100%;
}
.loadmore-text { .loadmore-text {
position: absolute;
right: 0.6em;
font-size: 14px; font-size: 14px;
min-width: 6em;
font-family: sans-serif;
text-align: center;
padding: 0 0.5em 0 0.5em;
opacity: 0.8; opacity: 0.8;
background-color: transparent; background-color: transparent;
color: $fallback--faint; color: $fallback--faint;
@ -98,7 +70,6 @@
right: 0.6em; right: 0.6em;
font-size: 14px; font-size: 14px;
min-width: 6em; min-width: 6em;
font-family: sans-serif;
text-align: center; text-align: center;
padding: 0 0.25em 0 0.25em; padding: 0 0.25em 0 0.25em;
margin: 0; margin: 0;