Merge pull request #17941 from edx/LEARNER-4864-cookie-policy-banner-component
LEARNER-4864: Add Cookie Policy Banner
This commit is contained in:
@@ -21,3 +21,6 @@
|
||||
//
|
||||
// Note: these should be replaced by Bootstrap theme variables
|
||||
@import 'lms/theme/variables-v1';
|
||||
|
||||
// Cookie Policy Banner
|
||||
@import '@edx/cookie-policy-banner/build/_cookie-policy-banner.scss';
|
||||
|
||||
@@ -31,3 +31,6 @@
|
||||
@import 'edx-pattern-library-shims/base/variables';
|
||||
@import 'edx-pattern-library-shims/breadcrumbs';
|
||||
@import 'edx-pattern-library-shims/buttons';
|
||||
|
||||
// Cookie Policy Banner
|
||||
@import '@edx/cookie-policy-banner/build/_cookie-policy-banner.scss';
|
||||
|
||||
@@ -16,3 +16,6 @@
|
||||
// Base
|
||||
@import 'base';
|
||||
@import 'variables';
|
||||
|
||||
// Cookie Policy Banner
|
||||
@import '@edx/cookie-policy-banner/build/_cookie-policy-banner.scss';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## mako
|
||||
|
||||
<%page expression_filter="h" args="online_help_token"/>
|
||||
<%page expression_filter="h" args="online_help_token, use_cookie_banner=False"/>
|
||||
|
||||
<%namespace name='static' file='../static_content.html'/>
|
||||
<%namespace file='../main.html' import="login_query"/>
|
||||
@@ -14,6 +14,9 @@ from openedx.core.djangolib.markup import HTML, Text
|
||||
# App that handles subdomain specific branding
|
||||
from branding import api as branding_api
|
||||
from openedx.core.djangoapps.lang_pref.api import header_language_selector_is_enabled, released_languages
|
||||
|
||||
# GDPR Flag
|
||||
from openedx.features.course_experience import ENABLE_GDPR_COMPAT_FLAG
|
||||
%>
|
||||
|
||||
## Provide a hook for themes to inject branding on top.
|
||||
@@ -29,6 +32,13 @@ from openedx.core.djangoapps.lang_pref.api import header_language_selector_is_en
|
||||
% endif
|
||||
|
||||
<header class="global-header ${'slim' if course else ''}">
|
||||
% if use_cookie_banner and ENABLE_GDPR_COMPAT_FLAG.is_enabled_without_course_context():
|
||||
${static.renderReact(
|
||||
component="CookiePolicyBanner",
|
||||
id="cookie-policy-banner",
|
||||
props={}
|
||||
)}
|
||||
% endif
|
||||
<div class="main-header">
|
||||
<%include file="navbar-logo-header.html" args="online_help_token=online_help_token"/>
|
||||
<div class="hamburger-menu" role="button" aria-label=${_("Options Menu")} aria-expanded="false" aria-controls="mobile-menu" tabindex="0">
|
||||
@@ -84,4 +94,4 @@ from openedx.core.djangoapps.lang_pref.api import header_language_selector_is_en
|
||||
</label>
|
||||
</form>
|
||||
% endif
|
||||
% endif
|
||||
% endif
|
||||
|
||||
Reference in New Issue
Block a user