Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions packages/landing/src/components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function Navbar() {
<a
href={urls.signUp()}
rel='external'
class='hidden items-center gap-2 rounded-lg bg-blue-600 px-4 py-2 text-white shadow-sm transition-colors hover:bg-blue-700 focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2 focus-visible:outline-none sm:inline-flex'
class='hidden items-center gap-2 rounded-lg border border-transparent bg-blue-600 px-4 py-2 text-white shadow-sm transition-colors hover:bg-blue-700 focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2 focus-visible:outline-none sm:inline-flex'
>
Sign Up
</a>
Expand All @@ -79,7 +79,7 @@ export default function Navbar() {
<a
href={urls.dashboard()}
rel='external'
class='hidden items-center gap-2 rounded-lg bg-blue-600 px-4 py-2 text-white shadow-sm transition-colors hover:bg-blue-700 focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2 focus-visible:outline-none sm:inline-flex'
class='hidden items-center gap-2 rounded-lg border border-transparent bg-blue-600 px-4 py-2 text-white shadow-sm transition-colors hover:bg-blue-700 focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2 focus-visible:outline-none sm:inline-flex'
>
My Dashboard
</a>
Expand Down Expand Up @@ -164,7 +164,7 @@ function MobileMenu(props) {
<a
href={urls.signUp()}
rel='external'
class='block w-full rounded-lg bg-blue-600 px-4 py-3 text-center font-medium text-white shadow-sm transition-colors hover:bg-blue-700'
class='block w-full rounded-lg border border-transparent bg-blue-600 px-4 py-3 text-center font-medium text-white shadow-sm transition-colors hover:bg-blue-700'
>
Sign Up
</a>
Expand All @@ -174,7 +174,7 @@ function MobileMenu(props) {
<a
href={urls.dashboard()}
rel='external'
class='block w-full rounded-lg bg-blue-600 px-4 py-3 text-center font-medium text-white shadow-sm transition-colors hover:bg-blue-700'
class='block w-full rounded-lg border border-transparent bg-blue-600 px-4 py-3 text-center font-medium text-white shadow-sm transition-colors hover:bg-blue-700'
>
My Dashboard
</a>
Expand Down
26 changes: 18 additions & 8 deletions packages/landing/src/components/SupportedTools.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export default function SupportedTools() {
status: 'available',
description: 'Systematic reviews of interventions',
},
{ name: 'Cochrane RoB 2', status: 'coming', description: 'Randomized trials' },
{ name: 'ROBINS-I', status: 'coming', description: 'Non-randomized studies' },
{ name: 'Cochrane RoB 2', status: 'coming', description: 'Randomized trials' },
// { name: 'GRADE', status: 'coming', description: 'Certainty of evidence' },
];

Expand All @@ -25,12 +25,16 @@ export default function SupportedTools() {
<For each={tools}>
{tool => {
const isAvailable = tool.status === 'available';
return (
<div
class={`rounded-xl border p-5 text-center ${
isAvailable ? 'border-blue-700/20 bg-blue-600/10' : 'border-gray-200 bg-gray-50'
}`}
>
const baseClasses = `rounded-xl border p-5 text-center ${
isAvailable ? 'border-blue-700/20 bg-blue-600/10' : 'border-gray-200 bg-gray-50'
}`;
const interactiveClasses =
isAvailable ?
'cursor-pointer transition-all hover:border-blue-700/40 hover:bg-blue-600/20 hover:shadow-md active:scale-[0.98]'
: '';

const content = (
<>
<p class={`mb-1 font-semibold ${isAvailable ? 'text-blue-700' : 'text-gray-500'}`}>
{tool.name}
</p>
Expand All @@ -42,8 +46,14 @@ export default function SupportedTools() {
>
{isAvailable ? 'Available' : 'Coming Soon'}
</span>
</div>
</>
);

return isAvailable ?
<a href='/resources' rel='external' class={`${baseClasses} ${interactiveClasses}`}>
{content}
</a>
: <div class={baseClasses}>{content}</div>;
}}
</For>
</div>
Expand Down
4 changes: 3 additions & 1 deletion packages/web/src/checklist-registry/types.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { LANDING_URL } from '@/config/api.js';

/**
* Checklist Type Constants and Metadata
*
Expand Down Expand Up @@ -26,7 +28,7 @@ export const CHECKLIST_METADATA = {
shortName: 'AMSTAR 2',
description: 'Quality assessment of systematic reviews',
version: '2017',
url: 'https://amstar.ca/Amstar_Checklist.php',
url: `${LANDING_URL}/resources`,
scoreLevels: ['High', 'Moderate', 'Low', 'Critically Low'],
scoreColors: {
High: { bg: 'bg-green-100', text: 'text-green-800' },
Expand Down
3 changes: 1 addition & 2 deletions packages/web/src/components/checklist-ui/ScoreTag.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Show, createMemo } from 'solid-js';
import { FaSolidCircleInfo } from 'solid-icons/fa';
import { AMSTAR2_URL } from '@/config/api.js';
import { Tooltip } from '@corates/ui';
import { getChecklistMetadata, DEFAULT_CHECKLIST_TYPE } from '@/checklist-registry';

Expand Down Expand Up @@ -29,7 +28,7 @@ function getScoreStyle(score, checklistType) {
*/
function getInfoUrl(checklistType) {
const metadata = getChecklistMetadata(checklistType);
return metadata.url || AMSTAR2_URL;
return metadata.url;
}

/**
Expand Down
1 change: 0 additions & 1 deletion packages/web/src/config/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ function getApiBase() {
export const API_BASE = getApiBase();
export const LANDING_URL = import.meta.env.VITE_PUBLIC_APP_URL;
export const BASEPATH = import.meta.env.VITE_BASEPATH;
export const AMSTAR2_URL = 'https://www.bmj.com/content/358/bmj.j4008';

/**
* Get WebSocket URL from API base
Expand Down