Skip to content

Commit

Permalink
Unglobalize node page styles (#858)
Browse files Browse the repository at this point in the history
### Related issues

- Closes #848 #856

### Summary

Removes global style changes done in the process of creating the new
node overview page.

### Checks

- [ ] All tests have passed (or issues created for failing tests)
  • Loading branch information
ptgolden authored Oct 22, 2024
1 parent 793cd1c commit d0e380c
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 26 deletions.
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

0 comments on commit d0e380c

Please sign in to comment.