diff --git a/docs/assets/screenshot.png b/docs/assets/screenshot.png index 36cc97ddc..5824a698f 100644 Binary files a/docs/assets/screenshot.png and b/docs/assets/screenshot.png differ diff --git a/frontend/components/About.js b/frontend/components/About.js index ad764f440..0d051352c 100644 --- a/frontend/components/About.js +++ b/frontend/components/About.js @@ -8,7 +8,7 @@ const About = props => props.siteInfo.about ? ( - {HEADER_ABOUT_SECTION} + {HEADER_ABOUT_SECTION} diff --git a/frontend/components/Article.js b/frontend/components/Article.js index 753850dc7..3ba907202 100644 --- a/frontend/components/Article.js +++ b/frontend/components/Article.js @@ -20,7 +20,10 @@ import PriceTag from "./PriceTag"; const useStyles = featuredImage => makeStyles(theme => ({ header: { - marginBottom: theme.spacing(2) + marginBottom: theme.spacing(1), + [theme.breakpoints.up("sm")]: { + marginBottom: theme.spacing(4) + } }, creatoravatarcontainer: { display: "flex", diff --git a/frontend/components/CourseItem.js b/frontend/components/CourseItem.js index 28d4a2e8e..b22880816 100644 --- a/frontend/components/CourseItem.js +++ b/frontend/components/CourseItem.js @@ -67,7 +67,9 @@ const CourseItem = props => { - {description} + + {description} + diff --git a/frontend/components/Hero.js b/frontend/components/Hero.js index 802dc8487..db5461fdf 100644 --- a/frontend/components/Hero.js +++ b/frontend/components/Hero.js @@ -37,7 +37,7 @@ const Hero = props => {
- {FEATURED_SECTION_HEADER} + {FEATURED_SECTION_HEADER} diff --git a/frontend/components/Masterlayout.js b/frontend/components/Masterlayout.js index 527a62e94..7e5f45ed8 100644 --- a/frontend/components/Masterlayout.js +++ b/frontend/components/Masterlayout.js @@ -25,12 +25,15 @@ const MasterLayout = props => { return ( <> - {props.siteinfo.logopath && ( + + {props.title} | {props.siteInfo.title} + + {props.siteInfo.logopath && ( @@ -48,12 +51,13 @@ const MasterLayout = props => { MasterLayout.propTypes = { children: PropTypes.object, networkAction: PropTypes.bool, - siteinfo: siteInfoProps + siteInfo: siteInfoProps.isRequired, + title: PropTypes.string.isRequired }; const mapStateToProps = state => ({ networkAction: state.networkAction, - siteinfo: state.siteinfo + siteInfo: state.siteinfo }); export default connect(mapStateToProps)(MasterLayout); diff --git a/frontend/pages/course/[id]/[slug].js b/frontend/pages/course/[id]/[slug].js index df8fd137d..e320eabb1 100644 --- a/frontend/pages/course/[id]/[slug].js +++ b/frontend/pages/course/[id]/[slug].js @@ -1,7 +1,11 @@ import { connect } from "react-redux"; import ResponsiveDrawer from "../../../components/ResponsiveDrawer.js"; import Head from "next/head"; -import { formulateCourseUrl, formulateMediaUrl } from "../../../lib/utils.js"; +import { + formulateCourseUrl, + formulateMediaUrl, + getPostDescriptionSnippet +} from "../../../lib/utils.js"; import { Lock } from "@material-ui/icons"; import { BACKEND, FRONTEND, MEDIA_BACKEND } from "../../../config/constants.js"; import { SIDEBAR_TEXT_COURSE_ABOUT } from "../../../config/strings.js"; @@ -41,14 +45,19 @@ const Course = props => { {!error && ( <> - {course.title} + + {course.title} | {props.siteInfo.title} + - {/* */} + {course.featuredImage && ( { }; const mapStateToProps = state => ({ - profile: state.profile + profile: state.profile, + siteInfo: state.siteinfo }); export default connect(mapStateToProps)(Course); diff --git a/frontend/pages/courses.js b/frontend/pages/courses.js index 9def7a202..391afc46e 100644 --- a/frontend/pages/courses.js +++ b/frontend/pages/courses.js @@ -8,10 +8,25 @@ import { BTN_LOAD_MORE, PAGE_HEADER_ALL_COURSES } from "../config/strings.js"; import MasterLayout from "../components/Masterlayout.js"; import ContainedBodyLayout from "../components/ContainedBodyLayout.js"; import { Typography, Button } from "@material-ui/core"; +import { makeStyles } from "@material-ui/styles"; + +const useStyles = makeStyles(theme => ({ + header: { + marginTop: theme.spacing(2), + marginBottom: theme.spacing(2), + [theme.breakpoints.up("sm")]: { + marginTop: theme.spacing(4) + } + }, + loadMoreBtn: { + marginBottom: theme.spacing(4) + } +})); const Courses = props => { const [courses, setCourses] = useState(props.courses); const [hasMorePages, setHasMorePages] = useState(true); + const classes = useStyles(); const getMoreCourses = async () => { if (hasMorePages) { @@ -26,15 +41,18 @@ const Courses = props => { }; return ( - + - {PAGE_HEADER_ALL_COURSES} + + {PAGE_HEADER_ALL_COURSES} + {courses.map(course => ( ))} diff --git a/frontend/pages/index.js b/frontend/pages/index.js index 22e02c572..c85283037 100644 --- a/frontend/pages/index.js +++ b/frontend/pages/index.js @@ -75,7 +75,9 @@ const Index = props => { }; return ( - + {hasContentToShow === true && ( <> @@ -93,7 +95,7 @@ const Index = props => { {posts.length > 0 && (
- + {HEADER_BLOG_POSTS_SECTION} {posts.map((x, index) => ( @@ -210,7 +212,8 @@ const getFeaturedCourses = async () => { const mapStateToProps = state => ({ auth: state.auth, - profile: state.profile + profile: state.profile, + siteinfo: state.siteinfo }); const mapDispatchToProps = dispatch => ({ diff --git a/frontend/pages/post/[id]/[slug].js b/frontend/pages/post/[id]/[slug].js index a5acde008..688c07ac3 100644 --- a/frontend/pages/post/[id]/[slug].js +++ b/frontend/pages/post/[id]/[slug].js @@ -11,15 +11,16 @@ import Head from "next/head"; import ContainedBodyLayout from "../../../components/ContainedBodyLayout.js"; import Article from "../../../components/Article.js"; import FetchBuilder from "../../../lib/fetch.js"; +import { siteInfoProps } from "../../../types.js"; -const useStyles = makeStyles({ +const useStyles = makeStyles(theme => ({ articleMarginAdjust: { - marginTop: "3.2em" + marginTop: theme.spacing(2) }, articleMarginBottomAdjust: { - marginBottom: "2em" + marginBottom: theme.spacing(2) } -}); +})); const Post = props => { const classes = useStyles(); @@ -28,11 +29,10 @@ const Post = props => { }; return ( - + {props.post && ( <> - {props.post.title} { return { post: response.post }; }; -export default connect()(Post); +Post.propTypes = { + siteInfo: siteInfoProps +}; + +const mapStateToProps = state => ({ + siteInfo: state.siteinfo +}); + +export default connect(mapStateToProps)(Post); diff --git a/frontend/public/default2.png b/frontend/public/default2.png deleted file mode 100644 index 5b26d6623..000000000 Binary files a/frontend/public/default2.png and /dev/null differ diff --git a/frontend/public/default4.png b/frontend/public/default4.png deleted file mode 100644 index 660c59281..000000000 Binary files a/frontend/public/default4.png and /dev/null differ