mirror of https://github.com/node-red/node-red.git
Added font size adjustments based on title length in red.js, created wrapping and truncate of title in header.scss, changed name to something very long in theme.js
parent
44ecad1fa9
commit
932d58bf6c
|
|
@ -30,7 +30,7 @@ var defaultContext = {
|
|||
}
|
||||
},
|
||||
header: {
|
||||
title: "Node-RED",
|
||||
title: "Node-RED -- DEVELOPMENT BRANCH OF DEVELOPING STUFF WHERE THINGS GET DEVELOPED...YEAH THAT SOUNDS RIGHT",
|
||||
image: "red/images/node-red-icon.svg"
|
||||
},
|
||||
asset: {
|
||||
|
|
|
|||
|
|
@ -937,7 +937,15 @@ var RED = (function() {
|
|||
$('<img>',{src:theme.header.image}).appendTo(logo);
|
||||
}
|
||||
if (theme.header.title) {
|
||||
$('<span>').html(theme.header.title).appendTo(logo);
|
||||
const titleSpan = $('<span>').html(theme.header.title).appendTo(logo);
|
||||
const length = theme.header.title.length;
|
||||
if(length > 25){
|
||||
titleSpan.css('font-size', '11px');
|
||||
} else if (len > 15) {
|
||||
titleSpan.css('font-size', '12px');
|
||||
} else {
|
||||
titleSpan.css('font-size', '14px')
|
||||
}
|
||||
}
|
||||
}
|
||||
if (theme.themes) {
|
||||
|
|
|
|||
|
|
@ -44,13 +44,19 @@
|
|||
}
|
||||
span.red-ui-header-logo {
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
|
||||
display: inline-flex; /* keeps image and text side by side */
|
||||
align-items: center;
|
||||
white-space: normal;
|
||||
span {
|
||||
vertical-align: middle;
|
||||
font-size: 14px !important;
|
||||
&:not(:first-child) {
|
||||
margin-left: 8px;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2; /* max 2 lines */
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow:hidden;
|
||||
}
|
||||
}
|
||||
img {
|
||||
|
|
|
|||
Loading…
Reference in New Issue