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
3d67488b
Unverified
Commit
3d67488b
authored
Sep 26, 2018
by
Linda
Committed by
GitHub
Sep 26, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2106 from LiFaytheGoblin/responsive-project-page/extension-buttons
Extension buttons are responsive
parents
fa049d79
51bb9053
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
12 deletions
+39
-12
src/views/preview/extension-chip.scss
src/views/preview/extension-chip.scss
+1
-0
src/views/preview/presentation.jsx
src/views/preview/presentation.jsx
+32
-12
src/views/preview/preview.scss
src/views/preview/preview.scss
+6
-0
No files found.
src/views/preview/extension-chip.scss
View file @
3d67488b
...
...
@@ -26,6 +26,7 @@
font-size
:
.875rem
;
justify-content
:
center
;
flex-flow
:
column
;
align-items
:
flex-start
;
}
.extension-status
{
...
...
src/views/preview/presentation.jsx
View file @
3d67488b
...
...
@@ -2,6 +2,7 @@ const FormattedDate = require('react-intl').FormattedDate;
const
injectIntl
=
require
(
'
react-intl
'
).
injectIntl
;
const
PropTypes
=
require
(
'
prop-types
'
);
const
intlShape
=
require
(
'
react-intl
'
).
intlShape
;
const
MediaQuery
=
require
(
'
react-responsive
'
).
default
;
const
React
=
require
(
'
react
'
);
const
Formsy
=
require
(
'
formsy-react
'
).
default
;
const
classNames
=
require
(
'
classnames
'
);
...
...
@@ -28,6 +29,8 @@ const ExtensionChip = require('./extension-chip.jsx');
const
projectShape
=
require
(
'
./projectshape.jsx
'
).
projectShape
;
require
(
'
./preview.scss
'
);
const
frameless
=
require
(
'
../../lib/frameless
'
);
// disable enter key submission on formsy input fields; otherwise formsy thinks
// we meant to trigger the "See inside" button. Instead, treat these keypresses
// as a blur, which will trigger a save.
...
...
@@ -155,6 +158,21 @@ const PreviewPresentation = ({
<
RemixCredit
projectInfo=
{
parentInfo
}
/>
<
RemixCredit
projectInfo=
{
originalInfo
}
/>
{
/* eslint-disable max-len */
}
<
MediaQuery
maxWidth=
{
frameless
.
tablet
-
1
}
>
<
FlexRow
className=
"preview-row"
>
<
FlexRow
className=
"extension-list"
>
{
extensions
&&
extensions
.
map
(
extension
=>
(
<
ExtensionChip
extensionL10n=
{
extension
.
l10nId
}
extensionName=
{
extension
.
name
}
hasStatus=
{
extension
.
hasStatus
}
iconURI=
{
extension
.
icon
&&
`/svgs/project/${extension.icon}`
}
key=
{
extension
.
name
||
extension
.
l10nId
}
/>
))
}
</
FlexRow
>
</
FlexRow
>
</
MediaQuery
>
<
FlexRow
className=
"description-block"
>
<
div
className=
"project-textlabel"
>
Instructions
...
...
@@ -309,19 +327,21 @@ const PreviewPresentation = ({
</
FlexRow
>
</
FlexRow
>
</
FlexRow
>
<
FlexRow
className=
"preview-row"
>
<
FlexRow
className=
"extension-list"
>
{
extensions
&&
extensions
.
map
(
extension
=>
(
<
ExtensionChip
extensionL10n=
{
extension
.
l10nId
}
extensionName=
{
extension
.
name
}
hasStatus=
{
extension
.
hasStatus
}
iconURI=
{
extension
.
icon
&&
`/svgs/project/${extension.icon}`
}
key=
{
extension
.
name
||
extension
.
l10nId
}
/>
))
}
<
MediaQuery
minWidth=
{
frameless
.
tablet
}
>
<
FlexRow
className=
"preview-row"
>
<
FlexRow
className=
"extension-list"
>
{
extensions
&&
extensions
.
map
(
extension
=>
(
<
ExtensionChip
extensionL10n=
{
extension
.
l10nId
}
extensionName=
{
extension
.
name
}
hasStatus=
{
extension
.
hasStatus
}
iconURI=
{
extension
.
icon
&&
`/svgs/project/${extension.icon}`
}
key=
{
extension
.
name
||
extension
.
l10nId
}
/>
))
}
</
FlexRow
>
</
FlexRow
>
</
FlexRow
>
</
MediaQuery
>
</
div
>
<
div
className=
"project-lower-container"
>
<
div
className=
"inner"
>
...
...
src/views/preview/preview.scss
View file @
3d67488b
...
...
@@ -515,6 +515,12 @@ $medium-and-small: "screen and (max-width : #{$tablet}-1)";
.extension-list
{
justify-content
:
flex-start
;
flex-direction
:
row
;
@media
#{
$medium-and-small
}
{
justify-content
:
center
;
}
}
.remix-list
,
...
...
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