当前位置:网站首页>[thingsboard] how to replace the homepage logo
[thingsboard] how to replace the homepage logo
2022-07-05 04:12:00 【Rabbit Xiaoyun】
Reference tutorial :https://my.oschina.net/sukf/blog/3108354
One 、 Design a new... According to the following dimensions LOGO
a. logo.png ----- 128x128,
b. thingsboard.ico ----- 320x320
c. logo_title_white.svg ----- 1536x318 SVG 32-bit
( After the personal test of this proportion, it is found that there is a problem , Later changed to 153*36, But exist logo The case of offset , Additional modifications are required scss The contents of the document , There are supplementary notes at the end of the article )
d. logo_white.svg ----- 320x320 SVG 32-bit
Replace them with the following paths
a. thingsboard-2.4\img\logo.png
b. thingsboard-2.4\ui\src\thingsboard.ico
c. thingsboard-2.4\ui\src\svg\logo_title_white.svg
d. thingsboard-2.4\ui\src\svg\logo_white.svg
Two 、 Modify the content
1. Modify the file separately thingsboard-2.4\ui\webpack.config.prod.js and webpack.config.dev.js Two documents
Search for HtmlWebpackPlugin Find the location in the figure below
for example :
The original title :Thingsboard >>> Change it to >>> new title :XXX
2. Modify file thingsboard-2.4\ui\src\app\app.run.js
Search element keywords pageTitle Find the location in the figure below 
for example :
The original title :Thingsboard >>> Change it to >>> new title :XXXX
3. rename thingsboard.ico ( The original file name can also be used to save trouble Just overwrite the picture file )
original file name :thingsboard.ico >>> Change it to >>> New file name :hsiot.ico
1) Rename file thingsboard.ico >>> hsiot.ico
thingsboard-2.4\ui\src\thingsboard.ico
2) Modify file content thingsboard.ico >>> hsiot.ico
3、 ... and 、 REPACK
mvn clean package
( It's a slow process , If you want to try again and again , Can be replaced by UI Hot compilation , For details, refer to the article on hot compilation configuration
https://blog.csdn.net/liuli283/article/details/93479955)
Supplementary information :
1. Step 6 of the original tutorial replaces thingsboard.jar
thingsboard\lib\thingsboard.jar( I didn't understand this step , Not doing it will not affect the effect , You can ignore )
2. Because it is found that logo_title_white.svg Press 1536x318 The scale cannot be displayed normally , Change it to 153*36, But exist logo The case of offset , Therefore, the style modification is attached scss Steps for .
(1) Global search tb-logo-title
Find these three files ( You can just modify ui\src\app\layout\home.scss But you need to recompile and clean up the cache, otherwise there may be problems , It's best to manually modify three files directly ):
(2) Modify as needed logo Offset style .( If the following reference css The display effect of the code does not meet the actual needs , It can be found in the browser F12, Pre adjust the style to get the right css Modify the code again )
I successfully adjusted the offset code as follows ( On the left is before modification and on the right is after modification ):
md-icon.tb-logo-title{
width:600px;
height:40px;
margin-left:-180px;
}
Finally recommend svg Online editing web pages :
http://tools.jb51.net/static/api/svg/index.html( The most standardized , Best compatibility )
https://www.zhangxinxu.com/sp/svg/
边栏推荐
- A應用喚醒B應該快速方法
- User behavior collection platform
- [PHP features - variable coverage] improper use, improper configuration and code logic vulnerability of the function
- Why can't all browsers on my computer open web pages
- The order of LDS links
- [untitled]
- 在线SQL转Excel(xls/xlsx)工具
- 【看完就懂系列】一文6000字教你从0到1实现接口自动化
- 【刷题】BFS题目精选
- Threejs clicks the scene object to obtain object information, and threejs uses raycaster to pick up object information
猜你喜欢

Is there a sudden failure on the line? How to make emergency diagnosis, troubleshooting and recovery
![[brush questions] BFS topic selection](/img/24/7ec68ef60f94f7b366054824223709.png)
[brush questions] BFS topic selection

Threejs Internet of things, 3D visualization of farms (II)

【FineBI】使用FineBI制作自定义地图过程

3. Package the bottom navigation tabbar

What is the reason why the webrtc protocol video cannot be played on the easycvr platform?

Threejs rendering obj+mtl model source code, 3D factory model

EasyCVR平台出现WebRTC协议视频播放不了是什么原因?

Threejs factory model 3DMAX model obj+mtl format, source file download

Use of vscode software
随机推荐
【虚幻引擎UE】运行和启动的区别,常见问题分析
如何优雅的获取每个分组的前几条数据
Threejs Internet of things, 3D visualization of farms (II)
[wp][introduction] brush weak type questions
How to remove installed elpa package
About the recent experience of writing questions
MacBook installation postgresql+postgis
Ctfshow 2022 Spring Festival welcome (detailed commentary)
kubernetes集群之调度系统
How to solve the problem that easycvr changes the recording storage path and does not generate recording files?
[phantom engine UE] package error appears! Solutions to findpin errors
Pyqt pyside custom telescopic menu bar sharing (including tutorial)
IronXL for . NET 2022.6
The development of mobile IM based on TCP still needs to keep the heartbeat alive
【虚幻引擎UE】实现背景模糊下近景旋转操作物体的方法及踩坑记录
长度为n的入栈顺序的可能出栈顺序种数
Summary of scene design
Interview related high-frequency algorithm test site 3
About the project error reporting solution of mpaas Pb access mode adapting to 64 bit CPU architecture
DFS and BFS concepts of trees and graphs