-
- {this.props.project.name} {this.props.project.owner ? `by ${this.props.project.owner.username}` : ''}
-
-
+
+ {this.props.project.name}
+
+
+
@@ -37,6 +61,7 @@ class FullView extends React.Component {
}
FullView.propTypes = {
+ theme: PropTypes.string.isRequired,
params: PropTypes.shape({
project_id: PropTypes.string
}).isRequired,
@@ -72,6 +97,7 @@ FullView.propTypes = {
function mapStateToProps(state) {
return {
user: state.user,
+ theme: state.preferences.theme,
htmlFile: getHTMLFile(state.files),
jsFiles: getJSFiles(state.files),
cssFiles: getCSSFiles(state.files),
diff --git a/client/routes.jsx b/client/routes.jsx
index 1f06d8b4..baa89884 100644
--- a/client/routes.jsx
+++ b/client/routes.jsx
@@ -33,6 +33,7 @@ const routes = store => (
component={NewPasswordView}
/>
+
diff --git a/client/styles/abstracts/_variables.scss b/client/styles/abstracts/_variables.scss
index 8c8eb6fb..103016da 100644
--- a/client/styles/abstracts/_variables.scss
+++ b/client/styles/abstracts/_variables.scss
@@ -30,6 +30,7 @@ $themes: (
toolbar-button-background-color: #f4f4f4,
button-background-hover-color: $p5js-pink,
button-background-active-color: #f10046,
+ button-nav-inactive-color: #a0a0a0,
button-hover-color: $white,
button-active-color: $white,
modal-background-color: #f4f4f4,
@@ -77,6 +78,7 @@ $themes: (
toolbar-button-background-color: #424242,
button-background-hover-color: $p5js-pink,
button-background-active-color: #f10046,
+ button-nav-inactive-color: #a0a0a0,
button-hover-color: $white,
button-active-color: $white,
modal-background-color: #444,
@@ -122,6 +124,7 @@ $themes: (
toolbar-button-background-color: #C1C1C1,
button-background-hover-color: $yellow,
button-background-active-color: #f10046,
+ button-nav-inactive-color: #a0a0a0,
button-hover-color: #333333,
button-active-color: #333333,
modal-background-color: #444,
@@ -171,4 +174,4 @@ $form-button-active-color: $white;
$form-navigation-options-color: #999999;
$about-play-background-color: rgba(255, 255, 255, 0.7);
-$about-button-border-color: rgba(151, 151, 151, 0.7);
\ No newline at end of file
+$about-button-border-color: rgba(151, 151, 151, 0.7);
diff --git a/client/styles/components/_copyable-input.scss b/client/styles/components/_copyable-input.scss
index 35b36db7..fa1ab9bb 100644
--- a/client/styles/components/_copyable-input.scss
+++ b/client/styles/components/_copyable-input.scss
@@ -24,6 +24,11 @@
}
}
+.copyable-input__label-container {
+ display: flex;
+ justify-content: space-between;
+}
+
.copyable-input {
padding-bottom: #{30 / $base-font-size}rem;
display: flex;
@@ -50,4 +55,4 @@
color: getThemifyVariable('button-background-hover-color');
border-top-color: getThemifyVariable('button-background-hover-color');
}
-}
\ No newline at end of file
+}
diff --git a/client/styles/components/_nav.scss b/client/styles/components/_nav.scss
index 5cf32462..4497d8e9 100644
--- a/client/styles/components/_nav.scss
+++ b/client/styles/components/_nav.scss
@@ -1,5 +1,4 @@
.nav {
- width: calc(100% - #{10 / $base-font-size}rem);
height: #{42 / $base-font-size}rem;
display: flex;
flex-direction: row;
@@ -225,4 +224,3 @@
}
}
}
-
diff --git a/client/styles/components/_preview-frame.scss b/client/styles/components/_preview-frame.scss
index 0b7e6610..d3cdc904 100644
--- a/client/styles/components/_preview-frame.scss
+++ b/client/styles/components/_preview-frame.scss
@@ -46,4 +46,4 @@
.preview-frame__content {
position: relative;
flex: 1 1 0;
-}
\ No newline at end of file
+}
diff --git a/client/styles/components/_preview-nav.scss b/client/styles/components/_preview-nav.scss
new file mode 100644
index 00000000..14d9bdd3
--- /dev/null
+++ b/client/styles/components/_preview-nav.scss
@@ -0,0 +1,14 @@
+.preview-nav__editor-svg {
+ & svg {
+ width: #{22 / $base-font-size}rem;
+ height: #{22 / $base-font-size}rem;
+ @include themify() {
+ fill: getThemifyVariable('button-nav-inactive-color');
+ }
+ &:hover {
+ @include themify() {
+ fill: getThemifyVariable('button-background-hover-color');
+ }
+ }
+ }
+}
diff --git a/client/styles/layout/_fullscreen.scss b/client/styles/layout/_fullscreen.scss
index 1f387b1f..7d76601c 100644
--- a/client/styles/layout/_fullscreen.scss
+++ b/client/styles/layout/_fullscreen.scss
@@ -3,15 +3,7 @@
width: 100%;
height: 100%;
flex-flow: column;
+ @include themify() {
+ background-color: getThemifyVariable('background-color');
+ }
}
-
-.fullscreen-preview__title {
- width: 100%;
-}
-
-.fullscreen-preview__frame-wrapper {
- width: 100%;
- flex: 1 0 0%;
- position: relative;
-}
-
diff --git a/client/styles/main.scss b/client/styles/main.scss
index 01069b3e..db6630a5 100644
--- a/client/styles/main.scss
+++ b/client/styles/main.scss
@@ -16,6 +16,7 @@
@import 'components/p5-contrast-codemirror-theme';
@import 'components/editor';
@import 'components/nav';
+@import 'components/preview-nav';
@import 'components/toolbar';
@import 'components/preferences';
@import 'components/reset-password';
diff --git a/server/routes/embed.routes.js b/server/routes/embed.routes.js
index bea7e573..637097e1 100644
--- a/server/routes/embed.routes.js
+++ b/server/routes/embed.routes.js
@@ -3,7 +3,7 @@ import * as EmbedController from '../controllers/embed.controller';
const router = new Router();
+router.get('/:username/embed/:project_id', EmbedController.serveProject);
router.get('/embed/:project_id', EmbedController.serveProject);
-router.get('/full/:project_id', EmbedController.serveProject);
export default router;
diff --git a/server/routes/server.routes.js b/server/routes/server.routes.js
index 28bcee63..adade10d 100644
--- a/server/routes/server.routes.js
+++ b/server/routes/server.routes.js
@@ -32,10 +32,17 @@ router.get('/:username/sketches/:project_id', (req, res) => {
));
});
+router.get('/:username/full/:project_id', (req, res) => {
+ projectForUserExists(req.params.username, req.params.project_id, exists => (
+ exists ? res.send(renderIndex()) : get404Sketch(html => res.send(html))
+ ));
+});
-// router.get('/full/:project_id', (req, res) => {
-// res.send(renderIndex());
-// });
+router.get('/full/:project_id', (req, res) => {
+ projectExists(req.params.project_id, exists => (
+ exists ? res.send(renderIndex()) : get404Sketch(html => res.send(html))
+ ));
+});
router.get('/login', (req, res) => {
if (req.user) {