Skip to content

Commit

Permalink
Add/style premium header
Browse files Browse the repository at this point in the history
  • Loading branch information
maxxcrawford committed Jun 11, 2021
1 parent 399ca86 commit e59485c
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 0 deletions.
21 changes: 21 additions & 0 deletions privaterelay/templates/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,25 @@
{% include "includes/messages.html" with messages=messages %}

<main id="profile-main" class="container bg-light dashboard-container container" data-api-token="{{ user_profile.api_token }}">
{% if user_profile.has_unlimited %}
<div class="mpp-dashbaord-header">
<div class="mpp-dashbaord-header-container inset">
<div class="mpp-dashbaord-header-title">
<div class="mpp-dashbaord-header-name">
<span>Welcome,</span> {{ request.user.email }}
</div>
<div class="mpp-dashbaord-header-action">
<button class="mpp-action-link"> <img src="/static/images/icon-check.svg" alt=""> Create your Email Domain</button>
</div>
</div>
<ul class="mpp-dashbaord-header-stats">
<li><span class="label">Email aliases used</span> <span>#</span> </li>
<li><span class="label">Emails Blocked</span> <span>#</span> </li>
<li><span class="label">Emails Forwarded</span> <span>#</span> </li>
</ul>
</div>
</div>
{% endif %}
<div class="main-list flx flx-col jst-cntr">
{% if messages %}
<div class="messages profile-messages hidden">
Expand All @@ -27,9 +46,11 @@
</div>
{% endif %}
<div class="alias-list">
{% if not user_profile.has_unlimited %}
<div class="dashboard-greeting">
<span class="dashboard-greeting-message">{% ftlmsg 'profile-label-welcome' email=request.user.email %}
</div>
{% endif %}
{% include "includes/banners.html" %}
<div class="flx flx-row dashboard-header inset">
<h2 class="section-headline dashboard-headline">{% ftlmsg 'profile-headline-manage-relay' %}</h2>
Expand Down
81 changes: 81 additions & 0 deletions static/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -1931,6 +1931,87 @@ ul.messages {
.home-messages path {
fill: #fff; }

.mpp-dashbaord-header {
background-color: white;
margin-bottom: 1rem; }

.mpp-dashbaord-header-name {
font-weight: 700; }
.mpp-dashbaord-header-name span {
font-weight: 400;
display: block; }

.mpp-dashbaord-header-container {
max-width: var(--dashboardMaxWith);
margin: auto;
padding: 2rem 1.5rem; }

.mpp-dashbaord-header-title {
margin-bottom: 2rem;
display: flex;
justify-content: space-between;
align-items: flex-end;
flex-wrap: wrap; }

.mpp-dashbaord-header-stats {
list-style: none;
margin: 0;
padding: 0;
display: flex;
width: 100%;
align-items: stretch;
flex-direction: row; }

.mpp-dashbaord-header-stats li {
padding: 0 0.25rem;
border-right: 1px solid #ECECEC;
width: 100%; }
.mpp-dashbaord-header-stats li span {
display: block;
text-align: center;
font-size: 2rem; }
.mpp-dashbaord-header-stats li .label {
font-size: 1rem;
display: block;
color: #666666;
line-height: 1rem; }
.mpp-dashbaord-header-stats li:last-child {
border-right: 0; }

.mpp-action-link {
color: var(--blue3);
appearance: none;
background: none;
border: none;
outline: none;
display: flex;
align-items: center; }
.mpp-action-link img {
margin-right: 0.25rem; }
.mpp-action-link:hover {
color: var(--blue4); }

@media screen and (min-width: 768px) {
.mpp-dashbaord-header-container {
display: flex;
align-items: flex-end;
justify-content: space-between; }
.mpp-dashbaord-header-title {
width: 25%;
flex-grow: 2;
margin-bottom: 0;
display: block; }
.mpp-dashbaord-header-stats {
width: auto;
flex-shrink: 2; }
.mpp-dashbaord-header-stats li {
padding: 0 1rem;
width: auto; }
.mpp-dashbaord-header-stats .label {
white-space: nowrap; }
.mpp-dashbaord-header-name {
margin-bottom: 1rem; } }

@font-face {
font-family: 'Inter';
font-style: normal;
Expand Down
3 changes: 3 additions & 0 deletions static/images/icon-check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions static/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

// Previous Styles
@import "partials/main";
@import "partials/dashboard";

@import 'includes/fonts/inter-ui';
@import 'includes/fonts/metropolis';
Expand Down
102 changes: 102 additions & 0 deletions static/scss/partials/dashboard.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
.mpp-dashbaord-header {
background-color: white;
margin-bottom: 1rem;
}

.mpp-dashbaord-header-name {
font-weight: 700;
span {
font-weight: 400;
display: block;
}
}

.mpp-dashbaord-header-container {
max-width: var(--dashboardMaxWith);
margin: auto;
padding: 2rem 1.5rem;
}

.mpp-dashbaord-header-title {
margin-bottom: 2rem;
display: flex;
justify-content: space-between;
align-items: flex-end;
flex-wrap: wrap;
}

.mpp-dashbaord-header-stats {
list-style: none;
margin: 0;
padding: 0;
display: flex;
width: 100%;
align-items: stretch;
flex-direction: row;
}

.mpp-dashbaord-header-stats li {
padding: 0 0.25rem;
border-right: 1px solid #ECECEC;
width: 100%;
span {
display: block;
text-align: center;
font-size: 2rem;
}
.label {
font-size: 1rem;
display: block;
color: #666666;
line-height: 1rem;
}
&:last-child {
border-right: 0;
}
}

.mpp-action-link {
color: var(--blue3);
appearance: none;
background: none;
border: none;
outline: none;
display: flex;
align-items: center;
img {
margin-right: 0.25rem;
}
&:hover {
color: var(--blue4);
}
}

@media screen and (min-width: 768px) {
.mpp-dashbaord-header-container {
display: flex;
align-items: flex-end;
justify-content: space-between;
}
.mpp-dashbaord-header-title {
width: 25%;
flex-grow: 2;
margin-bottom: 0;
display: block;
}
.mpp-dashbaord-header-stats {
width: auto;
flex-shrink: 2;
li {
padding: 0 1rem;
width: auto;
}
.label {
white-space: nowrap;
}
}
.mpp-dashbaord-header-name {
margin-bottom: 1rem;
}
}


0 comments on commit e59485c

Please sign in to comment.