Skip to content

Commit

Permalink
Merge pull request #3 from kaitj/maint/bug-fixes
Browse files Browse the repository at this point in the history
Fix bugs on proceedings page
  • Loading branch information
nx10 authored May 3, 2024
2 parents 142707c + 0119237 commit 1001842
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/ToolListviewCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
>
<div class="aspect-square object-cover h-32 p-4">
{#if docsUrl}
<a href={`https://www.${docsUrl.href}/`} target="_blank" rel="noopener noreferrer">
<a href={`https://www.${docsUrl.href}`} target="_blank" rel="noopener noreferrer">
<img
src={`${base}/tool_icons/${tool.image}`}
alt={`The icon of the ${tool.name} neuroimaging tool`}
Expand All @@ -46,7 +46,7 @@
{#if tool?.urls?.length > 0}
<div class="truncate pb-2">
<a
href={`https://${tool.urls[0].href}/`}
href={`${tool.urls[0].href}/`}
target="_blank"
rel="noopener noreferrer"
class="underline text-sky-500 hover:text-sky-700 decoration-sky-500 hover:decoration-sky-700"
Expand Down
7 changes: 3 additions & 4 deletions src/lib/data/back_migrate_tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { join } from 'path';
const PATH_DIR_ENTRIES_INPUT = 'src/lib/data/entries';
const PATH_DIR_ENTRIES_OUTPUT = 'src/lib/data/evaluatedTools';


const OUTPUT_SKELETON = {
"name": null,
"description": null,
Expand All @@ -23,8 +22,7 @@ const EVALUATION_SKELETON = {
"date": null,
"evaluatorEmail": "[email protected]",
"checklist": {}
}

};

/**
* Read all json files from the input directory
Expand Down Expand Up @@ -83,6 +81,7 @@ function backMigrate(entry) {
entry_backmigrated.description = `This tool was migrated from the old format. Please update it.`;
entry_backmigrated.urls = entry.urls.map(x => ({ "text": x.url_type, href: x.url }));
entry_backmigrated.slug = makeUrlSafeName(entry.name);
entry_backmigrated.evaluations = entry.evaluations ? entry.evaluations : [];

const evaluation = { ...EVALUATION_SKELETON };
// set date as today in the format YYYY-MM-DD
Expand All @@ -103,4 +102,4 @@ for (const entry of await readDirectoryData(PATH_DIR_ENTRIES_INPUT)) {
const outputPath = join(PATH_DIR_ENTRIES_OUTPUT, `${id}.json`);
await promises.writeFile(outputPath, JSON.stringify(entry_backmigrated, null, 2));
console.log(`Generated ${outputPath} successfully.`);
}
}
2 changes: 1 addition & 1 deletion src/routes/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
{#each data?.urls as url (url)}
<li class="mb-2">
<a
href={`https://${url.href}/`}
href={`${url.href}`}
target="_blank"
rel="noopener noreferrer"
class="underline decoration-transparent transition duration-300 ease-in-out hover:decoration-inherit"
Expand Down

0 comments on commit 1001842

Please sign in to comment.