Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unglobalize node page styles #858

Merged
merged 2 commits into from
Oct 22, 2024
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
17 changes: 2 additions & 15 deletions frontend/src/components/AppSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,30 +55,17 @@ defineSlots<Slots>();
padding: 30px 20px;
}

&.node {
margin: 10px 20px 10px $toc-width + 20px !important;
}
&.inset {
padding: 30px 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

&.left {
margin: 10px 20px;
}

&.medium {
&.center {
padding: 30px max(20px, calc((100% - $section) / 2));
}
&.left {
padding: 5px 15px;
}
padding: 30px max(20px, calc((100% - $section) / 2));
}

&.big {
padding: 30px 20px;
//padding: 30px max(20px, calc((100% - $section-big) / 2));
padding: 30px max(20px, calc((100% - $section-big) / 2));
}

&.normal {
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/global/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ h1 {
font-weight: 600;
font-size: 1.5rem;
letter-spacing: 1px;
text-align: left;
/** text-transform: uppercase; */
}

Expand All @@ -47,7 +46,6 @@ h2 {
padding: 10px 0;
font-weight: 500;
font-size: 1.3rem;
text-align: left;
}

h3 {
Expand All @@ -57,7 +55,6 @@ h3 {
padding: 10px 0;
font-weight: 500;
font-size: 1.1rem;
text-align: left;
}

/** elements */
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/pages/node/PageNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<template>
<!-- status -->
<template v-if="isLoading || isError">
<AppSection design="fill" class="bare node">
<AppSection width="full" design="fill" class="bare node">
<AppHeading class="heading">
{{ $route.params.id }}
</AppHeading>
Expand Down Expand Up @@ -128,4 +128,9 @@ onMounted(runGetNode);
.heading {
font-size: 1.2rem;
}

/** make room for the table of contents **/
.section {
margin: 10px 20px 10px $toc-width + 20px !important;
}
</style>
6 changes: 5 additions & 1 deletion frontend/src/pages/node/SectionAssociations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- show an AppSection for each category in categoryOptions -->
<div v-for="category in categoryOptions" :key="category.id">
<!-- Association table -->
<AppSection alignment="left" class="inset node">
<AppSection alignment="left" width="full" class="inset">
<AppHeading :level="3">{{ category.label }}</AppHeading>
<span v-if="!categoryOptions.length"
>No associations with &nbsp;<AppNodeBadge :node="node" />
Expand Down Expand Up @@ -117,4 +117,8 @@ watch(
.arrow {
color: $gray;
}
/** make room for the table of contents **/
.section {
margin: 10px 20px 10px $toc-width + 20px !important;
}
</style>
2 changes: 1 addition & 1 deletion frontend/src/pages/node/SectionBreadcrumbs.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<AppSection alignment="left" class="node">
<AppSection width="full" alignment="left">
<AppHeading icon="location-dot">Breadcrumbs</AppHeading>

<template v-if="breadcrumbs.length">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/node/SectionExtra.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-->

<template>
<AppSection alignment="left" class="node inset">
<AppSection width="full" alignment="left" class="inset">
<AppHeading icon="clipboard-list">Extra Info</AppHeading>

<AppDetails>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/pages/node/SectionHierarchy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
<template>
<AppSection
v-if="node.category !== 'biolink:Gene'"
width="full"
alignment="left"
class="node inset"
class="inset"
>
<AppHeading icon="sitemap">Hierarchy</AppHeading>

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/node/SectionOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-->

<template>
<AppSection design="bare" alignment="left" class="node">
<AppSection design="bare" width="full" alignment="left">
<AppDetails>
<!-- symbol (gene specific) -->
<AppDetail
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/node/SectionTitle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-->

<template>
<AppSection design="bare" alignment="left" class="section node">
<AppSection design="bare" width="full" alignment="left" class="section">
<AppFlex direction="col">
<AppFlex align-h="right">
<span>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/pages/node/SectionVisualization.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
v-if="
node.category === 'biolink:Disease' || node.category === 'biolink:Gene'
"
class="inset node"
width="full"
class="inset"
alignment="left"
>
<AppHeading icon="chart-bar">HistoPheno</AppHeading>
Expand Down