From 26c3def27725731e62bc02582cd184978005168d Mon Sep 17 00:00:00 2001 From: Robert Long Date: Fri, 22 Nov 2019 09:54:12 -0800 Subject: [PATCH 1/8] Scene remixing page WIP --- src/ui/projects/ProjectGridItem.js | 4 +- src/ui/projects/TemplatesPage.js | 112 +++++++++++++++++++++-------- 2 files changed, 84 insertions(+), 32 deletions(-) diff --git a/src/ui/projects/ProjectGridItem.js b/src/ui/projects/ProjectGridItem.js index c8d4e883..50c08aa9 100644 --- a/src/ui/projects/ProjectGridItem.js +++ b/src/ui/projects/ProjectGridItem.js @@ -16,7 +16,7 @@ const StyledProjectGridItem = styled(Link)` flex-direction: column; height: 220px; border-radius: 6px; - background-color: ${props => props.theme.panel2}; + background-color: ${props => props.theme.toolbar}; text-decoration: none; border: 1px solid transparent; @@ -71,8 +71,6 @@ const Thumbnail = styled.div` background-size: cover; background-position: 50%; background-repeat: no-repeat; - border-top-left-radius: inherit; - border-top-right-radius: inherit; background-image: url(${props => props.src}); `; diff --git a/src/ui/projects/TemplatesPage.js b/src/ui/projects/TemplatesPage.js index c2b56b7b..9428d87a 100644 --- a/src/ui/projects/TemplatesPage.js +++ b/src/ui/projects/TemplatesPage.js @@ -1,4 +1,4 @@ -import React, { Component } from "react"; +import React, { useCallback } from "react"; import PropTypes from "prop-types"; import NavBar from "../navigation/NavBar"; import ProjectGrid from "./ProjectGrid"; @@ -6,35 +6,89 @@ import Footer from "../navigation/Footer"; import templates from "./templates"; import PrimaryLink from "../inputs/PrimaryLink"; import { ProjectsSection, ProjectsContainer, ProjectsHeader } from "./ProjectsPage"; +import styled from "styled-components"; +import { Row } from "../layout/Flex"; +import { Button } from "../inputs/Button"; +import StringInput from "../inputs/StringInput"; -export default class TemplatesPage extends Component { - static propTypes = { - history: PropTypes.object.isRequired - }; +const ProjectGridContainer = styled.div` + background-color: ${props => props.theme.panel2}; + border-radius: 3px; +`; - onSelectTemplate = template => { - const search = new URLSearchParams(); - search.set("template", template.url); - this.props.history.push(`/projects/new?${search}`); - }; +const ProjectGridContent = styled.div` + padding: 20px; +`; - render() { - return ( - <> - -
- - - -

Templates

- Back to projects -
- -
-
-
-