Skip to content

Commit

Permalink
Drop down navbar styling
Browse files Browse the repository at this point in the history
relates issue #56
  • Loading branch information
thejoefriel committed Sep 20, 2018
1 parent ff8db16 commit 48657b5
Show file tree
Hide file tree
Showing 9 changed files with 118 additions and 46 deletions.
1 change: 1 addition & 0 deletions private/sass/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ $green1: #00ba9f;
// secondary colour - purple
$navy1: #404973;
// shades of this colour:
$navy2: #303652;

// accent colour - orange
$orange1: #ff9b71;
Expand Down
90 changes: 60 additions & 30 deletions private/sass/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
@import "fonts";
@import "sizes";

nav{
nav {
position: fixed;
top:0;
top: 0;
right: 0;
min-width: 70%;
height: $large;
Expand All @@ -19,23 +19,23 @@ nav{
}

// XP and XP-BAR STYLING
#xp-section{
display:flex;
align-items:center;
justify-content: space-around;
min-width: 60%;
#xp-section {
display: flex;
align-items: center;
justify-content: space-around;
min-width: 60%;
}
#xp-section > h3{
#xp-section > h3 {
margin: 0 $small;
font-weight: 500;
}
#xp-bar{
#xp-bar {
margin: $small;
}
#xp-bar[value] {
/* Reset the default appearance */
-webkit-appearance: none;
appearance: none;
-webkit-appearance: none;
appearance: none;

width: 25vw;
height: $small;
Expand All @@ -47,30 +47,33 @@ appearance: none;
}
#xp-bar[value]::-webkit-progress-value {
background-color: $green1;
background-image:
-webkit-linear-gradient(-45deg,
transparent 33%, rgba(0, 0, 0, .1) 33%,
rgba(0,0, 0, .1) 66%, transparent 66%);
background-image: -webkit-linear-gradient(
-45deg,
transparent 33%,
rgba(0, 0, 0, 0.1) 33%,
rgba(0, 0, 0, 0.1) 66%,
transparent 66%
);
border-radius: 2px;
}

// LEVEL TEXT STYLING
nav > h4{
nav > h4 {
font-size: $medium;
margin: 0;
}
.level{
.level {
margin-left: $small;
margin-right: $small;
}

// AVATAR-PIC and BUTTON STYLING
#avatar-section{
// AVATAR-PIC and BUTTON STYLING
#avatar-section {
position: fixed;
right: 0;
top: $large;
}
#profile-pic{
#profile-pic {
height: 4rem;
border: $navy1 $small solid;
border-radius: 100%;
Expand All @@ -84,8 +87,7 @@ nav > h4{
border-radius: 50%;
background: $navy1;
cursor: pointer;
transition: background 250ms ease-in-out,
transform 150ms ease;
transition: background 250ms ease-in-out, transform 0.5s ease;
-webkit-appearance: none;
-moz-appearance: none;
}
Expand All @@ -94,24 +96,52 @@ nav > h4{
box-shadow: 0 0 20px $green1;
}
.menu-button:active {
transform: scale(0.99);
transform: scale(0.99) rotate(180deg);
box-shadow: 0 0 20px $orange1;
}

// DROPDOWN MENU STYLING
.popout-menu {
position: absolute;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1;
height: $godzilla;
width: 100vw;
transform: translateY(-100%);
background-color: $navy1;
transform: translate(100%, -100%);
background-color: $navy2;
transition: all 0.5s ease-in;
box-shadow: 1px 0 3px grey;
width: 100%;
border-bottom-left-radius: 10px;
}

.popout-menu--visible {
transform: translateY(0);
}
transform: translate(0, 0);
}

.nav-stats {
padding-top: 40px;
padding-left: $small;
color: $white;
display: flex;
align-items: left;
flex-direction: column;
justify-content: center;
width: 100%;
}

.quick-stats-info {
margin-right: $medium;
margin-bottom: $small;
}

#stats-button {
cursor: pointer;
background-color: $orange1;
color: white;
font-family: $main-text;
border-radius: $small;
font-weight: 600;
font-size: $medium;
width: 50%;
}
2 changes: 1 addition & 1 deletion public/css/footer.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 36 additions & 8 deletions public/css/navbar.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/css/navbar.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/css/selected-page.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/css/style-guide.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/css/style.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions src/views/partials/navbar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,21 @@
</div>
</nav>
<menu class="popout-menu">
<h4>Current Level: <span class="myLevel"></span></h4>
<h4>Points to Next Level: <span class="pointsLeft"></span></h4>
<button name="View-Stats" id="stats-button" onclick="window.location.href='/stats/'">View My Stats</button>
{{!-- <div id="xp-section">
<h4>Earned Points: <span id="pointsDisp" class="getPoints"></span></h4>
<progress max="50" value="40" id="xp-bar"></progress>
</div>
<h4 class="level"></h4>
<div id="avatar-section">
</div> --}}
<div class="nav-stats">
<div class="quick-stats-info">
<h4>Current Level: <span class="myLevel"></span></h4>
<h4>Points to Next Level: <span class="pointsLeft"></span></h4>
</div>
<button name="View-Stats" id="stats-button" onclick="window.location.href='/stats/'">
View My Stats
</button>
</div>
</menu>
</header>

0 comments on commit 48657b5

Please sign in to comment.