mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-07 14:18:47 +00:00
Custom JS and CSS (#1950)
* First commit for custom styles and JS * Adjusted classes * Added ids and classes for services and bookmarks * Apply suggestions from code review * Remove mime dependency * Update settings.json * Detect custom css / js changes, no refresh * Added preload to custom scripts and styles so they can load earlier * Added data attribute name for bookmarks too * Update [path].js * code style, revert some pointer changes --------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
parent
0741ef0427
commit
b39c79bea1
46 changed files with 176 additions and 99 deletions
|
@ -9,7 +9,7 @@ export default function Item({ bookmark }) {
|
|||
const { settings } = useContext(SettingsContext);
|
||||
|
||||
return (
|
||||
<li key={bookmark.name}>
|
||||
<li key={bookmark.name} id={bookmark.id} className="bookmark" data-name={bookmark.name}>
|
||||
<a
|
||||
href={bookmark.href}
|
||||
title={bookmark.name}
|
||||
|
@ -20,7 +20,7 @@ export default function Item({ bookmark }) {
|
|||
)}
|
||||
>
|
||||
<div className="flex">
|
||||
<div className="flex-shrink-0 flex items-center justify-center w-11 bg-theme-500/10 dark:bg-theme-900/50 text-theme-700 hover:text-theme-700 dark:text-theme-200 text-sm font-medium rounded-l-md">
|
||||
<div className="flex-shrink-0 flex items-center justify-center w-11 bg-theme-500/10 dark:bg-theme-900/50 text-theme-700 hover:text-theme-700 dark:text-theme-200 text-sm font-medium rounded-l-md bookmark-icon">
|
||||
{bookmark.icon &&
|
||||
<div className="flex-shrink-0 w-5 h-5">
|
||||
<ResolvedIcon icon={bookmark.icon} alt={bookmark.abbr} />
|
||||
|
@ -28,9 +28,9 @@ export default function Item({ bookmark }) {
|
|||
}
|
||||
{!bookmark.icon && bookmark.abbr}
|
||||
</div>
|
||||
<div className="flex-1 flex items-center justify-between rounded-r-md">
|
||||
<div className="flex-1 grow pl-3 py-2 text-xs">{bookmark.name}</div>
|
||||
<div className="px-2 py-2 truncate text-theme-500 dark:text-theme-300 text-xs">{hostname}</div>
|
||||
<div className="flex-1 flex items-center justify-between rounded-r-md bookmark-text">
|
||||
<div className="flex-1 grow pl-3 py-2 text-xs bookmark-name">{bookmark.name}</div>
|
||||
<div className="px-2 py-2 truncate text-theme-500 dark:text-theme-300 text-xs bookmark-hostname">{hostname}</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue