Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
eb5aaae
add tailwind
jeffbaumes Oct 17, 2024
611380c
Add and support app buttons.
manthey Oct 11, 2024
b181334
Merge remote-tracking branch 'origin/app-button' into wip-style
jeffbaumes Oct 22, 2024
3e0157b
Merge branch 'master' into wip-style
manthey May 8, 2025
9fda2bc
Merge branch 'master' into wip-style
manthey May 23, 2025
a1e8dd3
Merge branch 'master' into wip-style
manthey Jun 5, 2025
9f5f036
Merge branch 'master' into wip-style
manthey Jun 24, 2025
c31508b
Merge branch 'master' into wip-style
manthey Jun 25, 2025
3ffe901
Merge branch 'master' into wip-style
manthey Sep 19, 2025
77deee0
Merge branch 'master' into wip-style
manthey Oct 6, 2025
0401676
Merge branch 'master' into wip-style
manthey Oct 10, 2025
2e75516
Merge branch 'master' into wip-style
manthey Oct 15, 2025
d2b2850
Merge branch 'master' into wip-style
manthey Nov 17, 2025
1411eaa
Merge branch 'master' into wip-style
manthey Nov 21, 2025
2cc4538
Merge branch 'master' into wip-style
manthey Nov 25, 2025
12f08dd
Merge branch 'master' into wip-style
manthey Dec 2, 2025
ea9d6ba
Merge branch 'master' into wip-style
manthey Dec 3, 2025
336e857
Merge branch 'master' into wip-style
manthey Dec 3, 2025
d37637b
Merge branch 'master' into wip-style
manthey Dec 5, 2025
6ecec87
Merge branch 'master' into wip-style
manthey Jan 12, 2026
f831291
Fix a style in the wip-style branch
manthey Jan 12, 2026
7aec9fa
Merge branch 'master' into wip-style
manthey Jun 30, 2026
c19c8ba
Merge branch 'master' into wip-style
manthey Jul 16, 2026
2b11eeb
Merge branch 'master' into wip-style
manthey Jul 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions histomicsui/web_client/views/itemList.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,32 @@ wrap(ItemListWidget, 'render', function (render) {
}

HuiSettings.getSettings().then((settings) => {
const brandName = (settings['histomicsui.brand_name'] || 'HistomicsUI');
const webrootPath = (settings['histomicsui.webroot_path'] || 'histomics');

ItemListWidget.registeredApplications.histomicsui = {
name: brandName,
// icon:
check: (modelType, model) => {
if (modelType !== 'item' || !model.get('largeImage')) {
return false;
}
const li = model.get('largeImage');
if (!li.fileId || li.expected === true) {
return false;
}
let priority = 0;
try {
if (model.get('meta') && model.get('meta').dicom && model.get('meta').dicom.Modality && model.get('meta').dicom.Modality !== 'SM') {
priority = 1;
}
} catch (e) {}
return {
url: `${webrootPath}#?image=${model.id}`,
priority: priority
};
}
};
if (this.accessLevel >= AccessType.WRITE) {
adjustView.call(this, settings);
}
Expand Down
230 changes: 230 additions & 0 deletions histomicsui/webroot.mako
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,236 @@
% for plugin in pluginCss:
<link rel="stylesheet" href="${staticPublicPath}/built/plugins/${plugin}/plugin.min.css">
% endfor
<link rel="stylesheet" href="${staticPublicPath}/built/extras/extra.css">
<!-- TODO: In Girder 5 install tailwind the right way -->
<script src="https://cdn.tailwindcss.com"></script>

<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: {
DEFAULT: 'hsl(var(--primary-h), var(--primary-s), var(--primary-l))',
hover: 'var(--primary-hover)',
content: 'var(--primary-content)',
},
secondary: {
DEFAULT: 'hsl(var(--secondary-h), var(--secondary-s), var(--secondary-l))',
hover: 'var(--secondary-hover)',
content: 'var(--secondary-content)',
},
accent: {
DEFAULT: 'hsl(var(--accent-h), var(--accent-s), var(--accent-l))',
hover: 'var(--accent-hover)',
content: 'var(--accent-content)',
},
},
zIndex: {
'100': '100',
},
},
},
plugins: [],
blocklist: ['collapse'], // disable because bootstrap uses it for something else
};
</script>

<style type="text/tailwindcss">
@layer base {
:root {
/* User-defined hex values */
--primary: ${bannerColor};
--secondary: ${bannerColor};
--accent: ${bannerColor};
}

body {
@apply bg-zinc-100;
}

/* Typography Styles */
h1,
h2,
h3,
h4,
h5,
h6 {
@apply font-bold;
}

h1 {
@apply text-4xl;
}

h2 {
@apply text-3xl;
}

h3 {
@apply text-2xl;
}

h4 {
@apply text-xl;
}

h5 {
@apply text-lg;
}

h6 {
@apply text-base;
}
}

@layer components {

/*
Define button styles:
1. Sizes
2. Colors
3. Types
*/

.htk-btn {
@apply duration-200 ease-in-out inline-flex items-center justify-center px-3 py-[6px] rounded-md text-base tracking-wider transition-all gap-2 h-9;
}

.htk-btn i {
@apply leading-[0];
}

/* 1. Sizes */

.htk-btn.htk-btn-lg {
@apply px-4 text-lg h-11;
}

.htk-btn.htk-btn-sm {
@apply px-[10px] text-sm h-[30px] gap-1;
}

.htk-btn.htk-btn-xs {
@apply px-[7px] rounded text-xs h-[22px] gap-1;
}

/* 2. Colors */

.htk-btn.htk-btn-primary {
@apply bg-primary text-primary-content;
}

.htk-btn.htk-btn-primary:hover {
@apply bg-primary-hover;
}

.htk-btn.htk-btn-secondary {
@apply bg-secondary text-secondary-content;
}

.htk-btn.htk-btn-secondary:hover {
@apply bg-secondary-hover;
}

.htk-btn.htk-btn-accent {
@apply bg-accent text-accent-content;
}

.htk-btn.htk-btn-accent:hover {
@apply bg-accent-hover;
}

/* 3. Types
a. Ghost
b. Icon Only
c. Disabled
*/

/* a. Ghost */

.htk-btn.htk-btn-ghost {
@apply bg-neutral-800 bg-opacity-0;
}

.htk-btn.htk-btn-ghost:hover {
@apply bg-opacity-10;
}

/* Primary Color */

.htk-btn.htk-btn-primary.htk-btn-ghost {
background-color: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0);
@apply text-primary;
}
.htk-btn.htk-btn-primary.htk-btn-ghost:hover {
background-color: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.1);
}

/* Secondary Color */

.htk-btn.htk-btn-secondary.htk-btn-ghost {
background-color: hsla(var(--secondary-h), var(--secondary-s), var(--secondary-l), 0);
@apply text-secondary;
}
.htk-btn.htk-btn-secondary.htk-btn-ghost:hover {
background-color: hsla(var(--secondary-h), var(--secondary-s), var(--secondary-l), 0.1);
}

/* Accent Color */

.htk-btn.htk-btn-accent.htk-btn-ghost {
background-color: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0);
@apply text-accent;
}
.htk-btn.htk-btn-accent.htk-btn-ghost:hover {
background-color: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.1);
}

/* b. Icon Only */

.htk-btn.htk-btn-icon {
/* "tracking-[0]" ensures icons are always centered when using icon fonts */
@apply rounded-full !leading-none text-xl w-9 aspect-square tracking-[0];
}

/* Large */

.htk-btn.htk-btn-icon.htk-btn-lg {
@apply text-2xl w-11;
}

/* Small */

.htk-btn.htk-btn-icon.htk-btn-sm {
@apply text-lg w-[30px];
}

/* X-Small */

.htk-btn.htk-btn-icon.htk-btn-xs {
@apply text-sm w-[22px];
}

/* c. Disabled */
.htk-btn.htk-btn-disabled {
@apply bg-neutral-200 border border-neutral-300 text-neutral-400 !cursor-not-allowed;
}

/* Use this instead of Tailwind's hidden until we remove bootstrap */
/* Required for now to account for the fact that bootstrap has !important on .hidden */
.htk-hidden {
display: none;
}
}
.h-annotation {
[class*=" icon-"]:before, [class^=icon-]:before {
margin-right: 0;
}
}
</style>


</head>
<body>
<div id="g-global-info-apiroot" class="hide">${apiRoot}</div>
Expand Down