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
0fea11ab
Commit
0fea11ab
authored
Feb 20, 2018
by
Aymeric Bernard
Browse files
Options
Downloads
Patches
Plain Diff
CSS changes for font size
parent
5b51b961
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/display.js
+9
-3
9 additions, 3 deletions
front/display.js
front/index.html
+4
-1
4 additions, 1 deletion
front/index.html
front/socket.js
+2
-0
2 additions, 0 deletions
front/socket.js
front/style.css
+1
-1
1 addition, 1 deletion
front/style.css
with
16 additions
and
5 deletions
front/display.js
+
9
−
3
View file @
0fea11ab
...
@@ -12,13 +12,19 @@ const concatTextParts = textParts =>
...
@@ -12,13 +12,19 @@ const concatTextParts = textParts =>
const
jsonTextToHtml
=
data
=>
<
div
className
=
"
text-bloc
"
>
{
concatTextParts
(
data
.
text
)}
<
/div>
;
const
jsonTextToHtml
=
data
=>
<
div
className
=
"
text-bloc
"
>
{
concatTextParts
(
data
.
text
)}
<
/div>
;
const
jsonImageToHtml
=
data
=>
<
div
className
=
"
image-bloc
"
>
{
data
.
image
}
<
/div>
;
const
jsonImageToHtml
=
data
=>
<
div
className
=
"
image-bloc
"
>
<
img
src
=
"
https://people.via.ecp.fr/~bebert/chatenay.jpg
"
alt
-
src
=
{
data
.
image
}
style
=
"
height: 80px; margin-right: 10px; border: solid 1px #A0A0A0
"
/>
<
/div>
;
const
jsonImageTextToHtml
=
data
=>
(
const
jsonImageTextToHtml
=
data
=>
(
<
div
className
=
"
image-text-bloc
"
style
=
"
display: flex
"
>
<
div
className
=
"
image-text-bloc
"
style
=
"
display: flex
"
>
<
img
<
img
src
=
"
https://people.via.ecp.fr/~
stook/perso/ancien_public_html/stickerFlat.pn
g
"
src
=
"
https://people.via.ecp.fr/~
bebert/toddy.jp
g
"
style
=
"
height:
4
0px; margin-right: 10px
"
style
=
"
height:
8
0px; margin-right: 10px
; border: solid 1px #A0A0A0
"
/>
/>
<
div
style
=
"
width: 100%; display: flex; justify-content: space-between
"
>
<
div
style
=
"
width: 100%; display: flex; justify-content: space-between
"
>
{
concatTextParts
(
data
.
text
)}
{
concatTextParts
(
data
.
text
)}
...
...
This diff is collapsed.
Click to expand it.
front/index.html
+
4
−
1
View file @
0fea11ab
...
@@ -15,6 +15,9 @@
...
@@ -15,6 +15,9 @@
<div
id=
"panel_data"
></div>
<div
id=
"panel_data"
></div>
<style
type=
"text/css"
id=
"root"
>
</style>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.4/socket.io.slim.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.4/socket.io.slim.js"
></script>
<script
type=
"text/javascript"
src=
"./setup.js"
defer
></script>
<script
type=
"text/javascript"
src=
"./setup.js"
defer
></script>
<script
type=
"text/javascript"
src=
"./socket.js"
defer
></script>
<script
type=
"text/javascript"
src=
"./socket.js"
defer
></script>
...
...
This diff is collapsed.
Click to expand it.
front/socket.js
+
2
−
0
View file @
0fea11ab
...
@@ -18,11 +18,13 @@ socketIO.on('date', (data) => {
...
@@ -18,11 +18,13 @@ socketIO.on('date', (data) => {
socketIO
.
on
(
'
panel_data
'
,
(
data
)
=>
{
socketIO
.
on
(
'
panel_data
'
,
(
data
)
=>
{
console
.
log
(
data
);
console
.
log
(
data
);
// data.ttl = 500000;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
socketIO
.
emit
(
'
panel_data
'
);
socketIO
.
emit
(
'
panel_data
'
);
console
.
log
(
`Next call in
${
data
.
ttl
}
milliseconds.`
);
console
.
log
(
`Next call in
${
data
.
ttl
}
milliseconds.`
);
},
data
.
ttl
);
},
data
.
ttl
);
const
panelData
=
document
.
getElementById
(
'
panel_data
'
);
const
panelData
=
document
.
getElementById
(
'
panel_data
'
);
document
.
getElementById
(
'
root
'
).
innerHTML
=
'
html {--size: 80px;}
'
;
diffNodes
(
panelData
,
jsonToHtmlArray
(
data
));
diffNodes
(
panelData
,
jsonToHtmlArray
(
data
));
});
});
...
...
This diff is collapsed.
Click to expand it.
front/style.css
+
1
−
1
View file @
0fea11ab
.text-element
{
.text-element
{
font-size
:
40px
;
font-size
:
var
(
--size
)
;
}
}
.text-bloc
{
.text-bloc
{
...
...
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