- Posts: 16
Question Where are the primary menu icons stored and can you replace them with your own?
- jessi
- Topic Author
- Offline
- New Member
Less
More
4 months 3 weeks ago #1
by jessi
Where are the primary menu icons stored and can you replace them with your own? was created by jessi
Is it possible to replace the primary menu icons using just the CSS & JSS part of the Control Panel? Any sample CSS/JS would be appreciated.
Please Log in or Create an account to join the conversation.
- Franz Frese
- Offline
- Elite Member
4 months 3 weeks ago - 4 months 3 weeks ago #2
by Franz Frese
Replied by Franz Frese on topic Where are the primary menu icons stored and can you replace them with your own?
you can. example:
.wt-theme-webtrees .menu-tree .nav-link:before {
content: url('/public/favicon.ico');
}
address the theme (here .wt-theme-webtrees) and the menu item (here .menu-tree) and set the image
if you have stored a favicon.ico in your public folder
or
you can use a png-file, ...
the "default" icons for theme webtrees are stored within the webtrees.min.css file
.wt-theme-webtrees .menu-tree .nav-link:before {
content: url('/public/favicon.ico');
}
address the theme (here .wt-theme-webtrees) and the menu item (here .menu-tree) and set the image
if you have stored a favicon.ico in your public folder
or
you can use a png-file, ...
the "default" icons for theme webtrees are stored within the webtrees.min.css file
Last edit: 4 months 3 weeks ago by Franz Frese.
Please Log in or Create an account to join the conversation.
- jessi
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
4 months 2 weeks ago #3
by jessi
Replied by jessi on topic Where are the primary menu icons stored and can you replace them with your own?
Thank you so much, Franz! Worked like a charm. I used png icons. Two small comments for others on you tip and one further question:
(1) Comment 1: Using the "clouds" theme I found the icons with a size of 35 px by 35 px fit in well.
(2) Comment 2: It is important that icon names take upper and lower-case lettering into consideration otherwise the system won't find the icon.
(3) Question: do the icons (or anything else) placed in the /public folder get overwritten when a new webtrees release happens?
(1) Comment 1: Using the "clouds" theme I found the icons with a size of 35 px by 35 px fit in well.
(2) Comment 2: It is important that icon names take upper and lower-case lettering into consideration otherwise the system won't find the icon.
(3) Question: do the icons (or anything else) placed in the /public folder get overwritten when a new webtrees release happens?
Please Log in or Create an account to join the conversation.
- Franz Frese
- Offline
- Elite Member
4 months 2 weeks ago #4
by Franz Frese
Replied by Franz Frese on topic Where are the primary menu icons stored and can you replace them with your own?
for 3) as far as I remember: gets overwritten. to be sure, create your own dir.
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
4 months 2 weeks ago #5
by fisharebest
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Replied by fisharebest on topic Where are the primary menu icons stored and can you replace them with your own?
> (3) Question: do the icons (or anything else) placed in the /public folder get overwritten when a new webtrees release happens?
The upgrade will write files to the public folder.
It is unlikely that webtrees will create new folders here. I can't rule it out, but it might be necessary.
So just choose a folder name that is unlikely to conflict with anything I might add.
For example, I might add folders with the names of other applications (e.g. ckeditor) or generic things (e.g. "cache", "share", etc.).
So, create a folder containing something else (such as your site name?) and it will be safe here.
The upgrade will write files to the public folder.
It is unlikely that webtrees will create new folders here. I can't rule it out, but it might be necessary.
So just choose a folder name that is unlikely to conflict with anything I might add.
For example, I might add folders with the names of other applications (e.g. ckeditor) or generic things (e.g. "cache", "share", etc.).
So, create a folder containing something else (such as your site name?) and it will be safe here.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- jessi
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
4 months 2 weeks ago #6
by jessi
Replied by jessi on topic Where are the primary menu icons stored and can you replace them with your own?
Thanks Franz and Greg - indeed, I will create a folder with my website name in /public and deposit the icons there to be on the safe side.
Please Log in or Create an account to join the conversation.