From 47fd6bfe18b705507dadd43d8ae3adbb16e67aa2 Mon Sep 17 00:00:00 2001 From: Carla Duarte Date: Mon, 25 Jan 2021 11:11:14 -0500 Subject: [PATCH] AA-512: underline links within iframes (#347) --- .../outline-tab/LmsHtmlFragment.css | 11 +++++++ .../outline-tab/LmsHtmlFragment.jsx | 29 +++++++++++++------ .../outline-tab/widgets/CourseHandouts.jsx | 1 + .../outline-tab/widgets/WelcomeMessage.jsx | 2 ++ 4 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 src/course-home/outline-tab/LmsHtmlFragment.css diff --git a/src/course-home/outline-tab/LmsHtmlFragment.css b/src/course-home/outline-tab/LmsHtmlFragment.css new file mode 100644 index 00000000..9f3869df --- /dev/null +++ b/src/course-home/outline-tab/LmsHtmlFragment.css @@ -0,0 +1,11 @@ +body a { + color: #00688D; +} + +body.inline-link a { + text-decoration: underline; +} + +body.small { + font-size: 0.875rem; +} diff --git a/src/course-home/outline-tab/LmsHtmlFragment.jsx b/src/course-home/outline-tab/LmsHtmlFragment.jsx index 5496ce3b..77625f36 100644 --- a/src/course-home/outline-tab/LmsHtmlFragment.jsx +++ b/src/course-home/outline-tab/LmsHtmlFragment.jsx @@ -3,16 +3,22 @@ import PropTypes from 'prop-types'; import { getConfig } from '@edx/frontend-platform'; -export default function LmsHtmlFragment({ html, title, ...rest }) { +export default function LmsHtmlFragment({ + className, + html, + title, + ...rest +}) { const wholePage = ` - - - - - - ${html} - -`; + + + + + + + ${html} + + `; const iframe = useRef(null); function handleLoad() { @@ -33,7 +39,12 @@ export default function LmsHtmlFragment({ html, title, ...rest }) { ); } +LmsHtmlFragment.defaultProps = { + className: '', +}; + LmsHtmlFragment.propTypes = { + className: PropTypes.string, html: PropTypes.string.isRequired, title: PropTypes.string.isRequired, }; diff --git a/src/course-home/outline-tab/widgets/CourseHandouts.jsx b/src/course-home/outline-tab/widgets/CourseHandouts.jsx index f952bc10..6364d53f 100644 --- a/src/course-home/outline-tab/widgets/CourseHandouts.jsx +++ b/src/course-home/outline-tab/widgets/CourseHandouts.jsx @@ -20,6 +20,7 @@ function CourseHandouts({ courseId, intl }) {

{intl.formatMessage(messages.handouts)}

diff --git a/src/course-home/outline-tab/widgets/WelcomeMessage.jsx b/src/course-home/outline-tab/widgets/WelcomeMessage.jsx index e5cd19cb..66003935 100644 --- a/src/course-home/outline-tab/widgets/WelcomeMessage.jsx +++ b/src/course-home/outline-tab/widgets/WelcomeMessage.jsx @@ -55,6 +55,7 @@ function WelcomeMessage({ courseId, intl }) { {showShortMessage ? ( ) : (