Skip to content

Commit

Permalink
Style mobile menu for premium theme
Browse files Browse the repository at this point in the history
  • Loading branch information
maxxcrawford committed Aug 4, 2021
1 parent 75198d1 commit 96c8e25
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 25 deletions.
5 changes: 3 additions & 2 deletions privaterelay/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
<meta name="twitter:description" content="{% ftlmsg 'meta-description' %}">
<meta name="twitter:image" content="{{request.scheme}}://{{request.META.HTTP_HOST}}{% static 'images/share-relay.jpg' %}">
</head>

<body class="{% if user_profile.has_unlimited %}is-premium{% endif %}" data-fxa-settings-url="{{ settings.FXA_SETTINGS_URL }}" data-site-origin="{{ settings.SITE_ORIGIN }}" data-google-analytics-id="{{ settings.GOOGLE_ANALYTICS_ID }}" data-debug="{{ settings.DEBUG }}">
<body class="{% with request.user.profile_set.first as user_profile %}{% if user_profile.has_unlimited %}is-premium{% endif %}{% endwith %}" data-fxa-settings-url="{{ settings.FXA_SETTINGS_URL }}" data-site-origin="{{ settings.SITE_ORIGIN }}" data-google-analytics-id="{{ settings.GOOGLE_ANALYTICS_ID }}" data-debug="{{ settings.DEBUG }}">
<firefox-private-relay-addon data-addon-installed="false"></firefox-private-relay-addon>

{% include "includes/modal.html" %}
{% include "includes/header.html" %}
{% block content %}
Expand Down
Binary file added static/images/bento-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions static/images/bento-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions static/images/bento.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/images/fx-private-relay-logotype-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
139 changes: 116 additions & 23 deletions static/scss/partials/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ header {
.header-link {
border-radius: 4px;
padding: 4px 6px;
color: $color-white !important;
color: $color-white;
margin-left: 1em;
}

Expand Down Expand Up @@ -116,7 +116,6 @@ header {
.mobile-menu {
position: relative;
z-index: 1;
overflow: hidden;
min-height: 0;
background: #2F2F54;
transition: all .4s ease;
Expand Down Expand Up @@ -225,24 +224,118 @@ header {
background: rgba(0, 0, 0, .1);
}


.is-premium {
header {
background: $color-white;
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.06);
border-bottom: 0;
}

.fx-private-relay-logotype {
background-image: url("/static/images/fx-private-relay-logotype-dark.svg");
}
.header-top {
padding: 0 $spacing-xl;
align-items: center;
}
.header-link {
color: $color-grey-40;
padding: $spacing-lg 0;
position: relative;
display: block;
border-radius: 0;
&::after {
position: absolute;
bottom: 0;
margin: 0;
height: 4px;
}
}
.active-header-link {
color: $color-grey-30;
}
.header-link:hover,
.header-link:active,
.header-link:focus {
background-color: transparent;
}
.logo-wrapper {
height: 40px;
}
.fx-bento-button {
background-image: url("/static/images/bento.svg");
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
&:hover {
background-image: url("/static/images/bento-white.svg");
background-color: $color-grey-40;
}
}

.fx-bento-open .fx-bento-button {
background-image: url("/static/images/bento-white.svg");
background-color: $color-grey-40;
}

firefox-apps.fx-bento-open,
firefox-apps:hover {
background: none;
box-shadow: 0 0 0 4px $color-grey-40;
}

.mobile-menu, .mobile-menu-toggle, .mobile-menu-links, .mobile-menu-link {
background-color: $color-grey-05;
color: $color-purple;
}

.mobile-menu.menu-open .mobile-menu-toggle, .mobile-menu-links {
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.06);
}

.mobile-menu-link {
border-bottom: 1px solid $color-grey-10;
}

.mobile-menu-link:hover {
background-color: $color-grey-10;
}

.mobile-menu-label::after {
background-image: url(/static/images/arrowhead.svg);
}

@media screen and (max-width: 550px) {
.header-top {
padding: $spacing-lg $spacing-xl;
}
}



}


@media screen and (max-width: 750px) {
.fx-private-relay-logotype {
min-width: 150px;
}
min-width: 150px;
}

.sign-in {
padding-left: 1em;
padding-right: 1em;
}
.sign-in {
padding-left: 1em;
padding-right: 1em;
}
}


@media screen and (max-width: 600px) {
header {
border-bottom: none;
}
.fx-private-relay-logotype {
background-position: center 68%;
}
.fx-private-relay-logotype {
background-position: center 68%;
}
}

@media screen and (max-width: 550px) {
Expand All @@ -255,21 +348,21 @@ header {
}

.fix-header {
animation: none !important;
animation: none;
}

.active-header-link::before {
content: "";
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--fxGradient);
margin-right: 8px;
vertical-align: middle;
background-size: 400%;
background-position: bottom right;
}
content: "";
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--fxGradient);
margin-right: 8px;
vertical-align: middle;
background-size: 400%;
background-position: bottom right;
}

}

Expand Down

0 comments on commit 96c8e25

Please sign in to comment.