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
d7848ed4
Commit
d7848ed4
authored
Mar 3, 2018
by
Benjamin Koltes
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix/display' into 'master'
fix: wrap text See merge request hermod/tv_panel!6
parents
a0eab502
cc95ab4b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
front/display.js
+10
-8
10 additions, 8 deletions
front/display.js
front/style.css
+16
-12
16 additions, 12 deletions
front/style.css
server/config.js
+6
-6
6 additions, 6 deletions
server/config.js
with
32 additions
and
26 deletions
front/display.js
+
10
−
8
View file @
d7848ed4
...
...
@@ -13,7 +13,8 @@ const concatTextParts = textParts =>
const
jsonTextToHtml
=
data
=>
<
div
className
=
"
bloc text-bloc
"
>
{
concatTextParts
(
data
.
text
)}
<
/div>
;
const
jsonImageToHtml
=
(
data
)
=>
{
const
style
=
'
heightFactor
'
in
data
?
`height: calc(
${
data
.
heightFactor
}
* var(--rowHeight))`
:
''
;
const
style
=
'
heightFactor
'
in
data
?
`height: calc(
${
data
.
heightFactor
}
* var(--rowHeight))`
:
''
;
return
(
<
div
className
=
"
bloc image-bloc
"
style
=
{
style
}
>
<
img
src
=
{
data
.
image
}
/
>
...
...
@@ -24,9 +25,7 @@ const jsonImageToHtml = (data) => {
const
jsonImageTextToHtml
=
data
=>
(
<
div
className
=
"
bloc image-text-bloc
"
>
<
img
src
=
{
data
.
image
}
/
>
<
div
className
=
"
text-section
"
>
{
concatTextParts
(
data
.
text
)}
<
/div
>
<
div
className
=
"
text-section
"
>
{
concatTextParts
(
data
.
text
)}
<
/div
>
<
/div
>
);
...
...
@@ -55,8 +54,11 @@ export default (data) => {
});
const
foot
=
(
<
div
className
=
"
mini
"
>
<
p
>
Last
data
:
{
(
new
Date
(
Date
.
now
())).
toLocaleString
()
};
TTL
:
{
data
.
ttl
/
1000
}
s
<
/p
>
<
p
>
Last
data
:
{
new
Date
(
Date
.
now
()).
toLocaleString
()};
TTL
:
{
data
.
ttl
/
1000
}
s
<
/p
>
<
p
>
Hermod
version
{
data
.
version
},
2018
<
/p
>
<
/div>
)
;
<
/div
>
);
return
[
<
hr
className
=
"
mini
"
/>
,
head
,
<
hr
style
=
"
color: #DDDDDD
"
/>
,
foot
];
};
This diff is collapsed.
Click to expand it.
front/style.css
+
16
−
12
View file @
d7848ed4
.mini
{
color
:
#
DDDDDD
;
color
:
#
dddddd
;
}
.mini
p
{
...
...
@@ -8,16 +8,16 @@
.text-element
{
font-size
:
var
(
--fontSize
);
margin
:
auto
;
}
.bloc
{
height
:
100px
;
margin-bottom
:
10px
;
}
.text-bloc
{
border
:
1px
solid
black
;
background-color
:
#
E2FFE
0
;
background-color
:
#
e2ffe
0
;
padding
:
10px
;
display
:
flex
;
justify-content
:
space-between
;
...
...
@@ -25,33 +25,37 @@
.image-bloc
{
border
:
1px
solid
black
;
background-color
:
#
FFDDDD
;
background-color
:
#
ffdddd
;
}
.image-bloc
img
{
height
:
100
%
;
height
:
100
px
;
margin-left
:
auto
;
margin-right
:
auto
;
display
:
block
;
}
.image-text-bloc
{
border
:
1px
solid
black
;
background-color
:
#
FFFFDD
;
background-color
:
#
ffffdd
;
padding
:
10px
;
display
:
flex
;
}
.image-text-bloc
img
{
height
:
100
%
;
height
:
100
px
;
margin-right
:
20px
;
/* border: solid 1px #A0A0A0; */
/* margin-left: -1px; */
/* margin-top: -1px; */
}
.image-text-bloc
.text-section
{
.image-text-bloc
>
.text-section
{
width
:
100%
;
display
:
flex
;
justify-content
:
space-between
;
}
.image-text-bloc
>
.text-section
>
.text-element
:first-child
{
flex-grow
:
1
;
}
.image-text-bloc
>
.text-section
>
.text-element
:last-child
{
white-space
:
nowrap
;
}
This diff is collapsed.
Click to expand it.
server/config.js
+
6
−
6
View file @
d7848ed4
const
fs
=
require
(
"
fs
"
);
const
path
=
require
(
"
path
"
);
const
fs
=
require
(
'
fs
'
);
const
path
=
require
(
'
path
'
);
module
.
exports
=
{
port
:
5000
,
uuid
:
"
10
"
,
fontSize
:
"
80px
"
,
rowHeight
:
"
100px
"
,
cert
:
fs
.
readFileSync
(
path
.
resolve
(
__dirname
,
"
../key.pem
"
))
uuid
:
'
10
'
,
fontSize
:
'
4vh
'
,
rowHeight
:
'
100px
'
,
cert
:
fs
.
readFileSync
(
path
.
resolve
(
__dirname
,
'
../key.pem
'
))
,
};
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