Skip to content

Commit

Permalink
Merge pull request #110 from georgetown-cset/detail-layout-and-content
Browse files Browse the repository at this point in the history
Add intro blurb and adjust detail page layout
  • Loading branch information
brianlove authored Sep 25, 2023
2 parents b9607ec + b1f9b72 commit 2d7e71f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 9 deletions.
2 changes: 1 addition & 1 deletion web/gui-v2/src/components/DetailView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const styles = {
}
.description {
padding-right: 20px; /* TODO: CHECK FOR RESPONSIVENESS */
padding-right: 0;
width: 100%;
* + .metadata-table {
Expand Down
44 changes: 36 additions & 8 deletions web/gui-v2/src/components/DetailViewIntro.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,36 @@
import React from 'react';
import { css } from '@emotion/react';

import { Table } from '@eto/eto-ui-components';
import { Table, breakpoints } from '@eto/eto-ui-components';

const styles = {
wrapper: css`
display: flex;
justify-content: space-between;
detailIntroWrapper: css`
display: grid;
gap: 1rem;
grid-template-columns: 1fr;
width: 100%;
${breakpoints.tablet_small} {
grid-template-columns: 1fr 300px;
}
`,
descriptionBlurbs: css`
small {
color: var(--grey);
font-size: 75%;
a {
color: var(--bright-blue);
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
`,
descriptionBlurbs: css``,
metadataTable: css`
margin-top: 0;
margin: 0 auto;
width: 300px;
td {
Expand Down Expand Up @@ -40,9 +59,18 @@ const DetailViewIntro = ({
];

return (
<div css={styles.wrapper}>
<div css={styles.detailIntroWrapper}>
<div css={styles.descriptionBlurbs}>
Description blurbs about the company go here....
{data?.wikipedia_description ?
<>
<div>{data.wikipedia_description}</div>
<small>
<a href={data.wikipedia_link}>Wikipedia</a>, retrieved {data.description_retrieval_date}
</small>
</>
:
<div>No description available</div>
}
</div>
<Table
className="metadata-table"
Expand Down

0 comments on commit 2d7e71f

Please sign in to comment.