1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 17:10:10 +00:00

improve tab appearance

This commit is contained in:
Harvey Tindall 2020-09-18 21:57:36 +01:00
parent d4b94bc9d9
commit 6b81358cd2
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
11 changed files with 49 additions and 38 deletions

View File

@ -8,10 +8,10 @@ const tabs = {
tabs.accountsEl.classList.add('unfocused'); tabs.accountsEl.classList.add('unfocused');
tabs.invitesEl.classList.remove('unfocused'); tabs.invitesEl.classList.remove('unfocused');
} }
if (tabs.invitesTabButton.classList.contains("text-muted")) { if (tabs.accountsTabButton.classList.contains("active")) {
tabs.invitesTabButton.classList.remove("text-muted"); tabs.accountsTabButton.classList.remove("active");
tabs.accountsTabButton.classList.add("text-muted");
} }
tabs.invitesTabButton.classList.add("active");
}, },
accounts: function() { accounts: function() {
populateUsers(); populateUsers();
@ -19,9 +19,9 @@ const tabs = {
tabs.invitesEl.classList.add('unfocused'); tabs.invitesEl.classList.add('unfocused');
tabs.accountsEl.classList.remove('unfocused'); tabs.accountsEl.classList.remove('unfocused');
} }
if (tabs.accountsTabButton.classList.contains("text-muted")) { if (tabs.invitesTabButton.classList.contains("active")) {
tabs.accountsTabButton.classList.remove("text-muted"); tabs.invitesTabButton.classList.remove("active");
tabs.invitesTabButton.classList.add("text-muted"); tabs.accountsTabButton.classList.add("active");
} }
} }
}; };

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -303,7 +303,14 @@
</div> </div>
</div> </div>
<div class="pageContainer"> <div class="pageContainer">
<h1><a id="invitesTabButton" class="text-button">invites </a><a id="accountsTabButton" class="text-button text-muted">accounts</a></h1> <ul class="nav nav-pills" style="margin-bottom: 2rem;">
<li class="nav-item">
<h2><a id="invitesTabButton" class="nl nav-link active">Invites</a></h2>
</li>
<li class="nav-item">
<h2><a id="accountsTabButton" class="nl nav-link">Accounts</a></h2>
</li>
</ul>
<div class="btn-group" role="group" id="headerButtons"> <div class="btn-group" role="group" id="headerButtons">
<button type="button" class="btn btn-primary" id="openSettings"> <button type="button" class="btn btn-primary" id="openSettings">
Settings <i class="fa fa-cog"></i> Settings <i class="fa fa-cog"></i>

View File

@ -73,31 +73,43 @@ body.modal-open {
overflow: hidden; overflow: hidden;
} }
@mixin scut-link-unstyled { @mixin white-text {
&, &:visited, &:hover, &:active { &, &:visited, &:hover, &:active {
font-style: inherit; font-style: inherit;
color: inherit; color: inherit;
background-color: transparent;
font-size: inherit; font-size: inherit;
text-decoration: none; text-decoration: none;
font-variant: inherit; font-variant: inherit;
font-weight: inherit; font-weight: inherit;
line-height: inherit; line-height: inherit;
font-family: inherit; font-family: inherit;
margin-right: 1rem;
} }
} }
%scut-link-unstyled { %white-text {
@include scut-link-unstyled; @include white-text;
}
%link-unstyled {
@include white-text;
background-color: transparent;
margin-right: 0.5rem;
} }
.text-button { .text-button {
@extend %scut-link-unstyled; @extend %link-unstyled;
} }
.text-button:hover { .text-button:hover {
@extend %scut-link-unstyled; @extend %link-unstyled;
}
.nl {
@extend %link-unstyled;
}
.nl:hover {
@extend %white-text;
} }
.unfocused { .unfocused {

View File

@ -138,4 +138,8 @@ $list-group-action-active-bg: $jf-blue-focus;
background-color: $success; background-color: $success;
} }
.nav-link:hover {
background-color: $jf-blue-hover;
}
@import "../base.scss"; @import "../base.scss";

View File

@ -12,4 +12,8 @@
color: $text-muted; color: $text-muted;
} }
.nav-link:hover {
background-color: $list-group-hover-bg;
}
@import "../base.scss"; @import "../base.scss";

View File

@ -138,4 +138,8 @@ $list-group-action-active-bg: $jf-blue-focus;
background-color: $success; background-color: $success;
} }
.nav-link:hover {
background-color: $jf-blue-hover;
}
@import "../base.scss"; @import "../base.scss";

View File

@ -12,4 +12,8 @@
color: $text-muted; color: $text-muted;
} }
.nav-link:hover {
background-color: $list-group-hover-bg;
}
@import "../base.scss"; @import "../base.scss";