diff --git a/src/assets/fonts/CreativeCommons/cc.eot b/src/assets/fonts/CreativeCommons/cc.eot new file mode 100644 index 0000000000..3c652cc929 Binary files /dev/null and b/src/assets/fonts/CreativeCommons/cc.eot differ diff --git a/src/assets/fonts/CreativeCommons/cc.svg b/src/assets/fonts/CreativeCommons/cc.svg new file mode 100644 index 0000000000..5539ab8b0f --- /dev/null +++ b/src/assets/fonts/CreativeCommons/cc.svg @@ -0,0 +1,22 @@ + + + +Copyright (C) 2014 by original authors @ fontello.com + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/fonts/CreativeCommons/cc.ttf b/src/assets/fonts/CreativeCommons/cc.ttf new file mode 100644 index 0000000000..3bde4e7c92 Binary files /dev/null and b/src/assets/fonts/CreativeCommons/cc.ttf differ diff --git a/src/assets/fonts/CreativeCommons/cc.woff b/src/assets/fonts/CreativeCommons/cc.woff new file mode 100644 index 0000000000..bc6dd7a828 Binary files /dev/null and b/src/assets/fonts/CreativeCommons/cc.woff differ diff --git a/src/assets/fonts/Montserrat/Montserrat.eot b/src/assets/fonts/Montserrat/Montserrat.eot new file mode 100644 index 0000000000..64912c701d Binary files /dev/null and b/src/assets/fonts/Montserrat/Montserrat.eot differ diff --git a/src/assets/fonts/Montserrat/Montserrat.ttf b/src/assets/fonts/Montserrat/Montserrat.ttf new file mode 100644 index 0000000000..5b4b5afe6e Binary files /dev/null and b/src/assets/fonts/Montserrat/Montserrat.ttf differ diff --git a/src/assets/fonts/Montserrat/Montserrat.woff b/src/assets/fonts/Montserrat/Montserrat.woff new file mode 100644 index 0000000000..0048c9fe05 Binary files /dev/null and b/src/assets/fonts/Montserrat/Montserrat.woff differ diff --git a/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Black.ttf b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Black.ttf new file mode 100644 index 0000000000..bcb1e764a5 Binary files /dev/null and b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Black.ttf differ diff --git a/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Bold.ttf b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Bold.ttf new file mode 100644 index 0000000000..96ab5c0343 Binary files /dev/null and b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Bold.ttf differ diff --git a/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-ExtraBold.ttf b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-ExtraBold.ttf new file mode 100644 index 0000000000..9659c403e4 Binary files /dev/null and b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-ExtraBold.ttf differ diff --git a/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-ExtraLight.ttf b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-ExtraLight.ttf new file mode 100644 index 0000000000..22bf4935b6 Binary files /dev/null and b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-ExtraLight.ttf differ diff --git a/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Light.ttf b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Light.ttf new file mode 100644 index 0000000000..3cb4af1ad9 Binary files /dev/null and b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Light.ttf differ diff --git a/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Medium.ttf b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Medium.ttf new file mode 100644 index 0000000000..b6fd90f954 Binary files /dev/null and b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Medium.ttf differ diff --git a/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Regular.ttf b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Regular.ttf new file mode 100644 index 0000000000..404d593d1b Binary files /dev/null and b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Regular.ttf differ diff --git a/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Regular.woff b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Regular.woff new file mode 100644 index 0000000000..be49dcfa3c Binary files /dev/null and b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Regular.woff differ diff --git a/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Regular.woff2 b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Regular.woff2 new file mode 100644 index 0000000000..52149d79b9 Binary files /dev/null and b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Regular.woff2 differ diff --git a/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-SemiBold.ttf b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-SemiBold.ttf new file mode 100644 index 0000000000..ba4496bd83 Binary files /dev/null and b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-SemiBold.ttf differ diff --git a/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Thin.ttf b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Thin.ttf new file mode 100644 index 0000000000..ee66ca7004 Binary files /dev/null and b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-Thin.ttf differ diff --git a/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-VariableFont_wght.ttf b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-VariableFont_wght.ttf new file mode 100644 index 0000000000..451ca364d1 Binary files /dev/null and b/src/assets/fonts/NotoKufiArabic/NotoKufiArabic-VariableFont_wght.ttf differ diff --git a/src/assets/fonts/OpenSans/OpenSans-Bold-webfont.ttf b/src/assets/fonts/OpenSans/OpenSans-Bold-webfont.ttf new file mode 100755 index 0000000000..e71279d238 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-Bold-webfont.ttf differ diff --git a/src/assets/fonts/OpenSans/OpenSans-Bold-webfont.woff b/src/assets/fonts/OpenSans/OpenSans-Bold-webfont.woff new file mode 100755 index 0000000000..21288dfc65 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-Bold-webfont.woff differ diff --git a/src/assets/fonts/OpenSans/OpenSans-Bold-webfont.woff2 b/src/assets/fonts/OpenSans/OpenSans-Bold-webfont.woff2 new file mode 100755 index 0000000000..c80b2d2afb Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-Bold-webfont.woff2 differ diff --git a/src/assets/fonts/OpenSans/OpenSans-BoldItalic-webfont.ttf b/src/assets/fonts/OpenSans/OpenSans-BoldItalic-webfont.ttf new file mode 100755 index 0000000000..0796612ed7 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-BoldItalic-webfont.ttf differ diff --git a/src/assets/fonts/OpenSans/OpenSans-BoldItalic-webfont.woff b/src/assets/fonts/OpenSans/OpenSans-BoldItalic-webfont.woff new file mode 100755 index 0000000000..f8a6914002 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-BoldItalic-webfont.woff differ diff --git a/src/assets/fonts/OpenSans/OpenSans-BoldItalic-webfont.woff2 b/src/assets/fonts/OpenSans/OpenSans-BoldItalic-webfont.woff2 new file mode 100755 index 0000000000..60d8de4f64 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-BoldItalic-webfont.woff2 differ diff --git a/src/assets/fonts/OpenSans/OpenSans-Italic-webfont.ttf b/src/assets/fonts/OpenSans/OpenSans-Italic-webfont.ttf new file mode 100755 index 0000000000..88a72b3eb9 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-Italic-webfont.ttf differ diff --git a/src/assets/fonts/OpenSans/OpenSans-Italic-webfont.woff b/src/assets/fonts/OpenSans/OpenSans-Italic-webfont.woff new file mode 100755 index 0000000000..0fc3e44536 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-Italic-webfont.woff differ diff --git a/src/assets/fonts/OpenSans/OpenSans-Italic-webfont.woff2 b/src/assets/fonts/OpenSans/OpenSans-Italic-webfont.woff2 new file mode 100755 index 0000000000..440b74c391 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-Italic-webfont.woff2 differ diff --git a/src/assets/fonts/OpenSans/OpenSans-Light-webfont.ttf b/src/assets/fonts/OpenSans/OpenSans-Light-webfont.ttf new file mode 100755 index 0000000000..d4fb721755 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-Light-webfont.ttf differ diff --git a/src/assets/fonts/OpenSans/OpenSans-Light-webfont.woff b/src/assets/fonts/OpenSans/OpenSans-Light-webfont.woff new file mode 100755 index 0000000000..8dd610ceea Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-Light-webfont.woff differ diff --git a/src/assets/fonts/OpenSans/OpenSans-Light-webfont.woff2 b/src/assets/fonts/OpenSans/OpenSans-Light-webfont.woff2 new file mode 100755 index 0000000000..d0b43e0adf Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-Light-webfont.woff2 differ diff --git a/src/assets/fonts/OpenSans/OpenSans-LightItalic-webfont.ttf b/src/assets/fonts/OpenSans/OpenSans-LightItalic-webfont.ttf new file mode 100755 index 0000000000..913b0f5371 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-LightItalic-webfont.ttf differ diff --git a/src/assets/fonts/OpenSans/OpenSans-LightItalic-webfont.woff b/src/assets/fonts/OpenSans/OpenSans-LightItalic-webfont.woff new file mode 100755 index 0000000000..f0204140da Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-LightItalic-webfont.woff differ diff --git a/src/assets/fonts/OpenSans/OpenSans-LightItalic-webfont.woff2 b/src/assets/fonts/OpenSans/OpenSans-LightItalic-webfont.woff2 new file mode 100755 index 0000000000..21a92a7e8d Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-LightItalic-webfont.woff2 differ diff --git a/src/assets/fonts/OpenSans/OpenSans-Regular-webfont.ttf b/src/assets/fonts/OpenSans/OpenSans-Regular-webfont.ttf new file mode 100755 index 0000000000..1638039b37 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-Regular-webfont.ttf differ diff --git a/src/assets/fonts/OpenSans/OpenSans-Regular-webfont.woff b/src/assets/fonts/OpenSans/OpenSans-Regular-webfont.woff new file mode 100755 index 0000000000..0ad69fb5d4 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-Regular-webfont.woff differ diff --git a/src/assets/fonts/OpenSans/OpenSans-Regular-webfont.woff2 b/src/assets/fonts/OpenSans/OpenSans-Regular-webfont.woff2 new file mode 100755 index 0000000000..f778f9c845 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-Regular-webfont.woff2 differ diff --git a/src/assets/fonts/OpenSans/OpenSans-Semibold-webfont.ttf b/src/assets/fonts/OpenSans/OpenSans-Semibold-webfont.ttf new file mode 100755 index 0000000000..0e5dfbe884 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-Semibold-webfont.ttf differ diff --git a/src/assets/fonts/OpenSans/OpenSans-Semibold-webfont.woff b/src/assets/fonts/OpenSans/OpenSans-Semibold-webfont.woff new file mode 100755 index 0000000000..22544e6a96 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-Semibold-webfont.woff differ diff --git a/src/assets/fonts/OpenSans/OpenSans-Semibold-webfont.woff2 b/src/assets/fonts/OpenSans/OpenSans-Semibold-webfont.woff2 new file mode 100755 index 0000000000..852f7106ce Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-Semibold-webfont.woff2 differ diff --git a/src/assets/fonts/OpenSans/OpenSans-SemiboldItalic-webfont.ttf b/src/assets/fonts/OpenSans/OpenSans-SemiboldItalic-webfont.ttf new file mode 100755 index 0000000000..96240a6e21 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-SemiboldItalic-webfont.ttf differ diff --git a/src/assets/fonts/OpenSans/OpenSans-SemiboldItalic-webfont.woff b/src/assets/fonts/OpenSans/OpenSans-SemiboldItalic-webfont.woff new file mode 100755 index 0000000000..8956812edc Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-SemiboldItalic-webfont.woff differ diff --git a/src/assets/fonts/OpenSans/OpenSans-SemiboldItalic-webfont.woff2 b/src/assets/fonts/OpenSans/OpenSans-SemiboldItalic-webfont.woff2 new file mode 100755 index 0000000000..b0c2a26b40 Binary files /dev/null and b/src/assets/fonts/OpenSans/OpenSans-SemiboldItalic-webfont.woff2 differ diff --git a/src/assets/fonts/SourceSansPro/SourceSansPro.eot b/src/assets/fonts/SourceSansPro/SourceSansPro.eot new file mode 100644 index 0000000000..119a012fd8 Binary files /dev/null and b/src/assets/fonts/SourceSansPro/SourceSansPro.eot differ diff --git a/src/assets/fonts/SourceSansPro/SourceSansPro.ttf b/src/assets/fonts/SourceSansPro/SourceSansPro.ttf new file mode 100644 index 0000000000..7b6fa55f57 Binary files /dev/null and b/src/assets/fonts/SourceSansPro/SourceSansPro.ttf differ diff --git a/src/assets/fonts/SourceSansPro/SourceSansPro.woff2 b/src/assets/fonts/SourceSansPro/SourceSansPro.woff2 new file mode 100644 index 0000000000..95d6bac344 Binary files /dev/null and b/src/assets/fonts/SourceSansPro/SourceSansPro.woff2 differ diff --git a/src/assets/fonts/TrebuchetMS/TrebuchetMS.eot b/src/assets/fonts/TrebuchetMS/TrebuchetMS.eot new file mode 100644 index 0000000000..a2012b15e8 Binary files /dev/null and b/src/assets/fonts/TrebuchetMS/TrebuchetMS.eot differ diff --git a/src/assets/fonts/TrebuchetMS/TrebuchetMS.ttf b/src/assets/fonts/TrebuchetMS/TrebuchetMS.ttf new file mode 100644 index 0000000000..730bd3daf2 Binary files /dev/null and b/src/assets/fonts/TrebuchetMS/TrebuchetMS.ttf differ diff --git a/src/assets/fonts/TrebuchetMS/TrebuchetMS.woff b/src/assets/fonts/TrebuchetMS/TrebuchetMS.woff new file mode 100644 index 0000000000..d44e82b05e Binary files /dev/null and b/src/assets/fonts/TrebuchetMS/TrebuchetMS.woff differ diff --git a/src/assets/styles/custom-fonts.scss b/src/assets/styles/custom-fonts.scss new file mode 100644 index 0000000000..db86ce2411 --- /dev/null +++ b/src/assets/styles/custom-fonts.scss @@ -0,0 +1,99 @@ +$font-family-sans-serif: "Helvetica Neue", Helvetica, "Open Sans", Arial, sans-serif; + +$font-family-open-sans: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + +$font-family-trebuchet: 'TrebuchetMS', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + +$font-family-montserrat: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + +$font-family-source-sans-pro: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + +$font-family-noto-kufi-arabic: 'Noto Kufi Arabic', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + + +@font-face { + font-family: 'Open Sans'; + src: + url('../fonts/OpenSans/OpenSans-Regular-webfont.woff2') format('woff2'), + url('../fonts/OpenSans/OpenSans-Regular-webfont.woff') format('woff'), + url('../fonts/OpenSans/OpenSans-Regular-webfont.ttf') format('truetype'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: 'TrebuchetMS'; + src: + url('../fonts/TrebuchetMS/TrebuchetMS.eot') format('embedded-opentype'), + url('../fonts/TrebuchetMS/TrebuchetMS.woff') format('woff'), + url('../fonts/TrebuchetMS/TrebuchetMS.ttf') format('truetype'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: 'Montserrat'; + src: + url('../fonts/Montserrat/Montserrat.eot') format('embedded-opentype'), + url('../fonts/Montserrat/Montserrat.woff') format('woff'), + url('../fonts/Montserrat/Montserrat.ttf') format('truetype'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: 'Source Sans Pro'; + src: + url('../fonts/SourceSansPro/SourceSansPro.eot') format('embedded-opentype'), + url('../fonts/SourceSansPro/SourceSansPro.woff2') format('woff2'), + url('../fonts/SourceSansPro/SourceSansPro.ttf') format('truetype'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: 'Noto Kufi Arabic'; + src: + url('../fonts/NotoKufiArabic/NotoKufiArabic-Regular.woff2') format('woff2'), + url('../fonts/NotoKufiArabic/NotoKufiArabic-Regular.woff') format('woff'), + url('../fonts/NotoKufiArabic/NotoKufiArabic-Regular.ttf') format('truetype'); + font-weight: 400; + font-style: normal; + } + + +#main-content, #course-content { + &.font-open-sans { + font-family: $font-family-open-sans !important; + &, h1, h2, h3, h4, h5, h6, p, label, select { + font-family: $font-family-open-sans !important; + } + } + &.font-trebuchet { + font-family: $font-family-trebuchet !important; + &, h1, h2, h3, h4, h5, h6, p, label, select { + font-family: $font-family-trebuchet !important; + }; + &, .h1, .h2, .h3, .h4, .h5, .h6, .p, .label, .select { + font-family: $font-family-trebuchet !important; + } + } + &.font-montserrat { + font-family: $font-family-montserrat !important; + &, h1, h2, h3, h4, h5, h6, p, label, select { + font-family: $font-family-montserrat !important; + } + } + &.font-source-sans-pro { + font-family: $font-family-source-sans-pro !important; + &, h1, h2, h3, h4, h5, h6, p, label, select { + font-family: $font-family-source-sans-pro !important; + } + } + &.font-noto-kufi-arabic { + font-family: $font-family-noto-kufi-arabic !important; + &, h1, h2, h3, h4, h5, h6, p, label, select { + font-family: $font-family-noto-kufi-arabic !important; + } +} +} \ No newline at end of file diff --git a/src/course-outline/CourseOutline.jsx b/src/course-outline/CourseOutline.jsx index 2a5e33b09e..d3ceae4f68 100644 --- a/src/course-outline/CourseOutline.jsx +++ b/src/course-outline/CourseOutline.jsx @@ -21,7 +21,9 @@ import { SortableContext, verticalListSortingStrategy, } from '@dnd-kit/sortable'; -import { useLocation } from 'react-router-dom'; +import { useLocation, useParams } from 'react-router-dom'; +import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth'; +import { getConfig } from '@edx/frontend-platform'; import { CourseAuthoringOutlineSidebarSlot } from '../plugin-slots/CourseAuthoringOutlineSidebarSlot'; import { LoadingSpinner } from '../generic/Loading'; @@ -121,6 +123,16 @@ const CourseOutline = ({ courseId }) => { errors, } = useCourseOutline({ courseId }); + const { courseId: courseIdFromUrl } = useParams(); + const [courseFont, setCourseFont] = useState(''); + + useEffect(() => { + const url = `${getConfig().LMS_BASE_URL}/wikimedia_general/api/v0/wiki_metadata/${courseIdFromUrl}`; + getAuthenticatedHttpClient().get(url).then(({ data }) => { + setCourseFont(data.course_font); + }); + }, [courseIdFromUrl]); + // Use `setToastMessage` to show the toast. const [toastMessage, setToastMessage] = useState(/** @type{null|string} */ (null)); @@ -259,7 +271,7 @@ const CourseOutline = ({ courseId }) => { {getPageHeadTitle(courseName, intl.formatMessage(messages.headingTitle))} -
+
div > div.highlight) {