Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tv_panel
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hermod
tv_panel
Commits
b8946e82
Commit
b8946e82
authored
7 years ago
by
Aymeric Bernard
Browse files
Options
Downloads
Patches
Plain Diff
[Front] More responsive page
parent
a9f44745
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
front/src/Row.js
+1
-1
1 addition, 1 deletion
front/src/Row.js
front/src/index.js
+2
-1
2 additions, 1 deletion
front/src/index.js
front/src/style.css
+20
-12
20 additions, 12 deletions
front/src/style.css
server/dummyResponse.json
+20
-0
20 additions, 0 deletions
server/dummyResponse.json
with
43 additions
and
14 deletions
front/src/Row.js
+
1
−
1
View file @
b8946e82
...
@@ -22,7 +22,7 @@ const PureImageRow = ({ row }) => {
...
@@ -22,7 +22,7 @@ const PureImageRow = ({ row }) => {
const
TextAndImageRow
=
({
row
})
=>
(
const
TextAndImageRow
=
({
row
})
=>
(
<
div
className
=
"
bloc image-text-bloc
"
>
<
div
className
=
"
bloc image-text-bloc
"
>
<
img
src
=
{
row
.
image
}
alt
=
""
/>
<
img
className
=
"
row-icon
"
src
=
{
row
.
image
}
alt
=
""
/>
<
div
className
=
"
text-section
"
>
{
row
.
text
.
map
(
element
=>
<
TextElement
element
=
{
element
}
/>
)
}</
div
>
<
div
className
=
"
text-section
"
>
{
row
.
text
.
map
(
element
=>
<
TextElement
element
=
{
element
}
/>
)
}</
div
>
<
/div
>
<
/div
>
);
);
...
...
This diff is collapsed.
Click to expand it.
front/src/index.js
+
2
−
1
View file @
b8946e82
...
@@ -10,7 +10,8 @@ render(<App />, container, existingNode);
...
@@ -10,7 +10,8 @@ render(<App />, container, existingNode);
socketIO
.
on
(
'
config
'
,
(
data
)
=>
{
socketIO
.
on
(
'
config
'
,
(
data
)
=>
{
document
.
getElementById
(
'
root
'
).
innerHTML
=
`html
document
.
getElementById
(
'
root
'
).
innerHTML
=
`html
{
{
--fontSize:
${
data
.
fontSize
}
;
// --fontSize:
${
data
.
fontSize
}
;
--fontSize: 3em;
--rowHeight:
${
data
.
rowHeight
}
;
--rowHeight:
${
data
.
rowHeight
}
;
}`
;
}`
;
});
});
...
...
This diff is collapsed.
Click to expand it.
front/src/style.css
+
20
−
12
View file @
b8946e82
.mini
{
color
:
#dddddd
;
}
.mini
p
{
.mini
p
{
color
:
#dddddd
;
margin
:
0
;
margin
:
0
;
}
}
.text-element
{
font-size
:
var
(
--fontSize
);
margin-top
:
auto
;
margin-bottom
:
auto
;
}
.bloc
{
.bloc
{
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
...
@@ -44,19 +35,36 @@
...
@@ -44,19 +35,36 @@
display
:
flex
;
display
:
flex
;
}
}
.
im
age-text-bloc
img
{
im
g
.row-icon
{
height
:
100px
;
height
:
100px
;
margin-right
:
20px
;
margin-top
:
auto
;
margin-bottom
:
auto
;
margin-right
:
10px
;
}
}
.image-text-bloc
>
.text-section
{
.image-text-bloc
>
.text-section
{
width
:
100%
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.text-element
{
font-size
:
var
(
--fontSize
);
margin-top
:
auto
;
margin-bottom
:
auto
;
margin-left
:
10px
;
padding-top
:
10px
;
padding-bottom
:
10px
;
border
:
1px
solid
#ccc
;
}
.image-text-bloc
>
.text-section
>
.text-element
:last-child
{
.image-text-bloc
>
.text-section
>
.text-element
:last-child
{
white-space
:
nowrap
;
white-space
:
nowrap
;
flex-grow
:
1
;
flex-grow
:
1
;
text-align
:
right
;
text-align
:
right
;
}
}
.text-section
>
.text-element
:first-child
{
margin-left
:
0px
;
}
This diff is collapsed.
Click to expand it.
server/dummyResponse.json
+
20
−
0
View file @
b8946e82
...
@@ -10,6 +10,26 @@
...
@@ -10,6 +10,26 @@
{
"text"
:
"42"
,
"style"
:
{
"color"
:
"#BB8800"
,
"fontWeight"
:
"bold"
}
}
{
"text"
:
"42"
,
"style"
:
{
"color"
:
"#BB8800"
,
"fontWeight"
:
"bold"
}
}
]
]
},
},
{
"type"
:
1
,
"image"
:
"https://people.via.ecp.fr/~bebert/toddy.jpg"
,
"text"
:
[
{
"text"
:
"Texte un"
,
"style"
:
{
"color"
:
"#000000"
}
},
{
"text"
:
"Texte deux"
,
"style"
:
{
"color"
:
"#000000"
}
},
{
"text"
:
"Texte trois"
,
"style"
:
{
"color"
:
"#000000"
}
},
{
"text"
:
"42"
,
"style"
:
{
"color"
:
"#BB8800"
,
"fontWeight"
:
"bold"
}
}
]
},
{
"type"
:
1
,
"image"
:
"https://people.via.ecp.fr/~bebert/toddy.jpg"
,
"text"
:
[
{
"text"
:
"Texte un"
,
"style"
:
{
"color"
:
"#000000"
}
},
{
"text"
:
"Texte deux bien long"
,
"style"
:
{
"color"
:
"#000000"
}
},
{
"text"
:
"Texte trois"
,
"style"
:
{
"color"
:
"#000000"
}
},
{
"text"
:
"42"
,
"style"
:
{
"color"
:
"#BB8800"
,
"fontWeight"
:
"bold"
}
}
]
},
{
{
"type"
:
0
,
"type"
:
0
,
"text"
:
[
"text"
:
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment