Remove oldddddd member-notice.jsx and its related code (#4371)

This commit is contained in:
Mavis Ou 2020-03-19 12:13:38 -07:00 коммит произвёл GitHub
Родитель 1b07468ea1
Коммит 6c0aa5454f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 6 добавлений и 73 удалений

Просмотреть файл

@ -15,8 +15,6 @@
<body id="view-404">
<div class="takeover"></div>
<div class="wrapper">
<div id="member-notice">
</div>
<div class="sticky-top">
<div class="wrapper-join-us">
<div class="container">

Просмотреть файл

@ -52,12 +52,14 @@
{% wagtailuserbar 'bottom-left' %}
{% endif %}
{% block page_top_content %}{% endblock %}
{% if page.live == False %}
<div id="wagtail-draft-warning">
This is a draft page, and is only visible to users who are logged in to the CMS admin.
</div>
{% endif %}
{% block body_wrapped %}
<div class="wrapper">
<div id="member-notice">{% if page.status == 1 %}<div><strong>Draft preview.</strong> You must save as Published to make it public.</div>{% endif %}
</div>
<div class="sticky-top">
{% block primary_nav %}
{% include "partials/primary_nav.html" with background="simple-background" %}

Просмотреть файл

@ -2,14 +2,6 @@
{% load wagtailcore_tags mini_site_tags wagtailmetadata_tags %}
{% block page_top_content %}
{% if page.live == False %}
<div class="wagtail-draft-warning">
This is a draft page, and is only visible to users who are logged in to the CMS admin.
</div>
{% endif %}
{% endblock %}
{% block content %}
{% block minisite_title_mb %}{% endblock %}

Просмотреть файл

@ -1,44 +0,0 @@
#member-notice {
background: $gray-05;
& > div {
padding: 0.75em 1.5rem;
line-height: 1.2;
}
.wrapper {
transition: height 400ms ease-in-out;
flex-grow: 1;
}
.pane {
opacity: 1;
transition: opacity 300ms ease-in;
&.pane-hidden {
opacity: 0;
position: absolute;
z-index: -999999;
}
}
.btn {
background: none;
font-size: 35px;
font-weight: 900;
color: $gray-40;
padding: 0;
line-height: 1;
&:active,
&:focus,
&:hover {
box-shadow: none;
color: $black;
}
&.btn-expanded {
transform: rotate(45deg);
}
}
}

Просмотреть файл

@ -8,7 +8,6 @@ import * as Sentry from "@sentry/browser";
import JoinUs from "./components/join/join.jsx";
import Petition from "./components/petition/petition.jsx";
import MemberNotice from "./components/member-notice/member-notice.jsx";
import MultipageNavMobile from "./components/multipage-nav-mobile/multipage-nav-mobile.jsx";
import News from "./components/news/news.jsx";
import PulseProjectList from "./components/pulse-project-list/pulse-project-list.jsx";
@ -30,8 +29,6 @@ if (
axe(React, ReactDOM, 1000);
}
const SHOW_MEMBER_NOTICE = false;
// To be populated via XHR and querySelector
let env, networkSiteURL, csrfToken;
@ -274,17 +271,6 @@ let main = {
// Embed various React components based on the existence of containers within the current page
injectReactComponents() {
if (SHOW_MEMBER_NOTICE && document.getElementById(`member-notice`)) {
apps.push(
new Promise(resolve => {
ReactDOM.render(
<MemberNotice whenLoaded={() => resolve()} />,
document.getElementById(`member-notice`)
);
})
);
}
// Embed additional instances of the Join Us box that don't need an API exposed (eg: Homepage)
document.querySelectorAll(`.join-us:not(.on-nav)`).forEach(element => {
var props = element.dataset;

Просмотреть файл

@ -22,7 +22,6 @@ $bp-xl: #{map-get($grid-breakpoints, xl)}; // >= 1200px
@import "../js/components/join/join";
@import "../js/components/loading-indicator/loading-indicator";
@import "../js/components/member-notice/member-notice";
@import "../js/components/multipage-nav-mobile/multipage-nav-mobile";
@import "../js/components/pulse-project-list/pulse-project-list";
@import "../js/components/fellow-list/directory-filter-bar";

Просмотреть файл

@ -92,7 +92,7 @@
line-height: inherit;
}
body div.wagtail-draft-warning {
#wagtail-draft-warning {
background: $light-red;
text-align: center;
font-weight: bold;