Skip to content
Snippets Groups Projects
Unverified Commit 769ca45f authored by Jae Bradley's avatar Jae Bradley Committed by GitHub
Browse files

Merge pull request #17941 from edx/LEARNER-4864-cookie-policy-banner-component

LEARNER-4864: Add Cookie Policy Banner
parents 139ac68a fab388ad
No related merge requests found
import React from 'react';
import CookieBanner from '@edx/cookie-policy-banner';
const CookiePolicyBanner = () => <CookieBanner />;
export default CookiePolicyBanner;
...@@ -21,3 +21,6 @@ ...@@ -21,3 +21,6 @@
// //
// Note: these should be replaced by Bootstrap theme variables // Note: these should be replaced by Bootstrap theme variables
@import 'lms/theme/variables-v1'; @import 'lms/theme/variables-v1';
// Cookie Policy Banner
@import '@edx/cookie-policy-banner/build/_cookie-policy-banner.scss';
...@@ -31,3 +31,6 @@ ...@@ -31,3 +31,6 @@
@import 'edx-pattern-library-shims/base/variables'; @import 'edx-pattern-library-shims/base/variables';
@import 'edx-pattern-library-shims/breadcrumbs'; @import 'edx-pattern-library-shims/breadcrumbs';
@import 'edx-pattern-library-shims/buttons'; @import 'edx-pattern-library-shims/buttons';
// Cookie Policy Banner
@import '@edx/cookie-policy-banner/build/_cookie-policy-banner.scss';
...@@ -16,3 +16,6 @@ ...@@ -16,3 +16,6 @@
// Base // Base
@import 'base'; @import 'base';
@import 'variables'; @import 'variables';
// Cookie Policy Banner
@import '@edx/cookie-policy-banner/build/_cookie-policy-banner.scss';
## mako ## 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 name='static' file='../static_content.html'/>
<%namespace file='../main.html' import="login_query"/> <%namespace file='../main.html' import="login_query"/>
...@@ -14,6 +14,9 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -14,6 +14,9 @@ from openedx.core.djangolib.markup import HTML, Text
# App that handles subdomain specific branding # App that handles subdomain specific branding
from branding import api as branding_api from branding import api as branding_api
from openedx.core.djangoapps.lang_pref.api import header_language_selector_is_enabled, released_languages 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. ## 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 ...@@ -29,6 +32,13 @@ from openedx.core.djangoapps.lang_pref.api import header_language_selector_is_en
% endif % endif
<header class="global-header ${'slim' if course else ''}"> <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"> <div class="main-header">
<%include file="navbar-logo-header.html" args="online_help_token=online_help_token"/> <%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"> <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 ...@@ -84,4 +94,4 @@ from openedx.core.djangoapps.lang_pref.api import header_language_selector_is_en
</label> </label>
</form> </form>
% endif % endif
% endif % endif
\ No newline at end of file
This diff is collapsed.
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"name": "edx", "name": "edx",
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"@edx/cookie-policy-banner": "^1.1.3",
"@edx/edx-bootstrap": "0.4.3", "@edx/edx-bootstrap": "0.4.3",
"@edx/paragon": "2.5.6", "@edx/paragon": "2.5.6",
"@edx/studio-frontend": "1.7.2", "@edx/studio-frontend": "1.7.2",
...@@ -25,7 +26,6 @@ ...@@ -25,7 +26,6 @@
"exports-loader": "0.6.4", "exports-loader": "0.6.4",
"extract-text-webpack-plugin": "2.1.2", "extract-text-webpack-plugin": "2.1.2",
"file-loader": "1.1.6", "file-loader": "1.1.6",
"svg-inline-loader": "0.8.0",
"font-awesome": "4.7.0", "font-awesome": "4.7.0",
"hls.js": "0.7.2", "hls.js": "0.7.2",
"imports-loader": "0.7.1", "imports-loader": "0.7.1",
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
"sass-loader": "6.0.6", "sass-loader": "6.0.6",
"string-replace-webpack-plugin": "0.1.3", "string-replace-webpack-plugin": "0.1.3",
"style-loader": "0.18.2", "style-loader": "0.18.2",
"svg-inline-loader": "0.8.0",
"uglify-js": "2.7.0", "uglify-js": "2.7.0",
"underscore": "1.8.3", "underscore": "1.8.3",
"underscore.string": "3.3.4", "underscore.string": "3.3.4",
......
...@@ -3,5 +3,5 @@ set -e ...@@ -3,5 +3,5 @@ set -e
export LOWER_PYLINT_THRESHOLD=1000 export LOWER_PYLINT_THRESHOLD=1000
export UPPER_PYLINT_THRESHOLD=5900 export UPPER_PYLINT_THRESHOLD=5900
export ESLINT_THRESHOLD=5585 export ESLINT_THRESHOLD=5586
export STYLELINT_THRESHOLD=973 export STYLELINT_THRESHOLD=973
## mako ## mako
<%page expression_filter="h" args="online_help_token"/> <%page expression_filter="h" args="online_help_token, use_cookie_banner=True"/>
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%include file="${static.get_template_path(relative_path='header/header.html')}" args="online_help_token=online_help_token, use_cookie_banner=use_cookie_banner" />
<%include file="${static.get_template_path(relative_path='header/header.html')}" args="online_help_token=online_help_token" />
...@@ -51,6 +51,8 @@ module.exports = { ...@@ -51,6 +51,8 @@ module.exports = {
LatestUpdate: './openedx/features/course_experience/static/course_experience/js/LatestUpdate.js', LatestUpdate: './openedx/features/course_experience/static/course_experience/js/LatestUpdate.js',
WelcomeMessage: './openedx/features/course_experience/static/course_experience/js/WelcomeMessage.js', WelcomeMessage: './openedx/features/course_experience/static/course_experience/js/WelcomeMessage.js',
CookiePolicyBanner: './common/static/js/src/CookiePolicyBanner.jsx',
// Common // Common
ReactRenderer: './common/static/js/src/ReactRenderer.jsx' ReactRenderer: './common/static/js/src/ReactRenderer.jsx'
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment