Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
bd1319ed
Commit
bd1319ed
authored
Nov 29, 2015
by
morant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add interactive design studio, and make studios show arts projects.
Also many design changes.
parent
9f0d3662
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
780 additions
and
31 deletions
+780
-31
src/components/carousel/carousel.jsx
src/components/carousel/carousel.jsx
+2
-0
src/views/microworlds_art/microworlds_art.jsx
src/views/microworlds_art/microworlds_art.jsx
+51
-23
src/views/microworlds_art/microworlds_art.scss
src/views/microworlds_art/microworlds_art.scss
+26
-8
src/views/microworlds_art/microworlds_art_projects.json
src/views/microworlds_art/microworlds_art_projects.json
+701
-0
static/images/design-studio-image.png
static/images/design-studio-image.png
+0
-0
static/images/forum-image.png
static/images/forum-image.png
+0
-0
No files found.
src/components/carousel/carousel.jsx
View file @
bd1319ed
...
...
@@ -51,6 +51,8 @@ var Carousel = React.createClass({
href
=
'
/
'
+
item
.
type
+
'
/
'
+
item
.
id
+
'
/
'
;
}
href
=
"
//scratch.mit.edu
"
+
href
;
return
(
<
Thumbnail
key=
{
item
.
id
}
showLoves=
{
this
.
props
.
showLoves
}
...
...
src/views/microworlds_art/microworlds_art.jsx
View file @
bd1319ed
...
...
@@ -43,18 +43,26 @@ var Microworld = React.createClass({
videoOpen2
:
false
,
videoOpen3
:
false
,
featuredGlobal
:
{},
featuredLocal
:
{},
};
},
componentDidMount
:
function
()
{
this
.
getFeaturedGlobal
();
this
.
getFeaturedLocal
();
},
getFeaturedGlobal
:
function
()
{
this
.
api
({
uri
:
'
/proxy/featured
'
},
function
(
err
,
body
)
{
if
(
!
err
)
this
.
setState
({
featuredGlobal
:
body
});
if
(
!
err
)
{
this
.
setState
({
featuredGlobal
:
body
});
}
}.
bind
(
this
));
},
getFeaturedLocal
:
function
()
{
var
art_projects
=
require
(
"
./microworlds_art_projects
"
);
this
.
setState
({
featuredLocal
:
art_projects
});
},
renderVideos
:
function
(
frameProps
)
{
return
(
<
div
className=
"videos-section section"
>
...
...
@@ -104,8 +112,11 @@ var Microworld = React.createClass({
<
div
className=
"editor section"
>
<
h1
>
Start Creating!
</
h1
>
{
/*<iframe src="//scratch.mit.edu/projects/embed-editor/86999051/?isMicroworld=true"
frameborder="0"> </iframe>*/
}
<
img
src=
"/images/scratch-og.png"
href=
"//scratch.mit.edu/projects/88148127/#editor"
style=
{
{
width
:
"
10%
"
}
}
></
img
>
frameborder="0"> </iframe>
*/
}
<
a
href=
"//scratch.mit.edu/projects/88148127/#editor"
>
<
img
src=
"/images/scratch-og.png"
style=
{
{
width
:
"
6%
"
,
position
:
"
absolute
"
,
left
:
"
75%
"
}
}
></
img
>
</
a
>
<
iframe
src=
"//scratch.mit.edu/projects/embed-editor/88148127/?isMicroworld=true"
frameborder=
"0"
>
</
iframe
>
{
this
.
renderTips
()
}
...
...
@@ -219,26 +230,30 @@ var Microworld = React.createClass({
);
},
renderProjectIdeasBox
:
function
()
{
var
rows
=
[
renderStarterProject
:
function
()
{
return
(
<
div
className=
"project-ideas"
>
<
Box
title=
"More Starter Projects"
key=
"design_studio"
>
<
Carousel
items=
{
this
.
state
.
featuredGlobal
.
scratch_design_studio
}
/>
</
Box
>,
<
Carousel
items=
{
this
.
state
.
featuredLocal
.
scratch_starter_projects
}
/>
</
Box
>
</
div
>
)
},
renderProjectIdeasBox
:
function
()
{
var
rows
=
[
<
Box
title=
"Featured Community Projects"
key=
"community_featured_projects"
>
<
Carousel
items=
{
this
.
state
.
featured
Glob
al
.
community_featured_projects
}
/>
<
Carousel
items=
{
this
.
state
.
featured
Loc
al
.
community_featured_projects
}
/>
</
Box
>,
<
Box
title=
"All Community Projects"
key=
"community_all_projects"
>
<
Carousel
items=
{
this
.
state
.
featured
Global
.
community_featured_studio
s
}
/>
<
Carousel
items=
{
this
.
state
.
featured
Local
.
community_newest_project
s
}
/>
</
Box
>,
];
console
.
log
(
this
.
state
.
featuredGlobal
);
return
(
<
div
className=
"project-ideas"
>
{
rows
}
...
...
@@ -248,15 +263,28 @@ var Microworld = React.createClass({
renderForum
:
function
()
{
return
(
<
div
className=
"forum"
>
<
h1
>
Forum
</
h1
>
<
h1
>
Chat with other art lovers!
</
h1
>
<
img
src=
"/images/forum-image.png"
/>
</
div
>
)
},
renderDesignStudio
:
function
()
{
return
(
<
div
className=
"side-by-side section"
>
<
h1
>
Join our Design Challenge!
</
h1
>
<
div
className=
"design-studio"
>
<
img
src=
"/images/design-studio-image.png"
/>
<
iframe
src=
"https://scratch.mit.edu/projects/89144801/#fullscreen"
frameborder=
"0"
>
</
iframe
>
</
div
>
<
div
className=
"design-studio-projects"
>
<
Box
title=
"Examples"
key=
"scratch_desgin_studio"
moreTitle=
"Visit the studio"
moreHref=
{
'
/studios/
'
+
'
1728540
'
+
'
/
'
}
>
<
Carousel
settings=
{
{
slidesToShow
:
2
,
slidesToScroll
:
2
}
}
items=
{
this
.
state
.
featuredLocal
.
scratch_design_studio1
}
/>
<
Carousel
settings=
{
{
slidesToShow
:
2
,
slidesToScroll
:
2
}
}
items=
{
this
.
state
.
featuredLocal
.
scratch_design_studio2
}
/>
</
Box
>
</
div
>
</
div
>
)
},
...
...
@@ -273,8 +301,8 @@ var Microworld = React.createClass({
return
(
<
div
>
<
div
className=
"top-banner section"
>
<
h1
>
Art and Creating
</
h1
>
<
p
>
Watch
a video
about how to create with technology.
<
br
></
br
>
<
h1
>
Make Some Art
</
h1
>
<
p
>
Watch
videos
about how to create with technology.
<
br
></
br
>
Then, create your own art project.
<
br
></
br
>
Check out projects by others for inspiration,
<
br
></
br
>
communicate in the forum and join the challenges!
...
...
@@ -285,12 +313,12 @@ var Microworld = React.createClass({
<
div
className=
"content"
>
{
this
.
renderEditorWindow
()
}
<
h1
>
Check out ideas for more projects
</
h1
>
{
this
.
renderStarterProject
()
}
{
this
.
renderDesignStudio
()
}
<
h1
>
Get inspiration from other projects
</
h1
>
{
this
.
renderProjectIdeasBox
()
}
<
div
className=
"side-by-side section"
>
{
this
.
renderForum
()
}
{
this
.
renderDesignStudio
()
}
</
div
>
</
div
>
</
div
>
...
...
src/views/microworlds_art/microworlds_art.scss
View file @
bd1319ed
...
...
@@ -18,6 +18,14 @@ $base-bg: $ui-white;
line-height
:
2em
;
}
h1
{
margin
:
0
auto
;
padding
:
5px
0
;
max-width
:
500px
;
text-align
:
center
;
color
:
$type-gray
;
}
.top-banner
,
.videos-section
,
.section
{
padding
:
30px
0
;
width
:
100%
;
...
...
@@ -75,7 +83,7 @@ $base-bg: $ui-white;
background-color
:
$type-gray
;
width
:
70px
;
height
:
50px
;
top
:
6
9
%
;
top
:
6
0
%
;
&
,
&
:after
{
...
...
@@ -131,20 +139,30 @@ $base-bg: $ui-white;
margin-left
:
auto
;
margin-right
:
auto
;
width
:
900px
;
height
:
520px
;
img
{
width
:
4
5
0px
;
.box
{
width
:
4
0
0px
;
}
.forum
,
.design-studio
{
width
:
50%
;
.design-studio-projects
,
.design-studio
{
width
:
400px
;
height
:
500px
;
display
:
inline-block
;
}
.
forum
{
float
:
lef
t
;
.
design-studio-projects
{
float
:
righ
t
;
}
.design-studio
{
float
:
right
;
float
:
left
;
iframe
{
margin-top
:
60px
;
width
:
960px
;
-webkit-transform
:
scale
(
0
.5
);
-webkit-transform-origin
:
top
left
;
-moz-transform
:
scale
(
0
.5
);
}
}
...
...
src/views/microworlds_art/microworlds_art_projects.json
0 → 100644
View file @
bd1319ed
This diff is collapsed.
Click to expand it.
static/images/design-studio-image.png
deleted
100644 → 0
View file @
9f0d3662
509 KB
static/images/forum-image.png
100644 → 100755
View replaced file @
9f0d3662
View file @
bd1319ed
200 KB
|
W:
|
H:
93.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment