Skip to content

Commit

Permalink
chore: add images
Browse files Browse the repository at this point in the history
  • Loading branch information
abtx committed Aug 23, 2023
1 parent 0c6f0ee commit aa0feb3
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/components/GlossarySearch/glossaryTerms.json
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@
{
"termTitle": "Chargeback",
"pageTitle": "Define: Chargeback in FinOps",
"imgUrl": "/img/glossary/chargeback.png",
"slug": "chargeback",
"definition": "A financial management tool where departments or teams are billed internally for their consumption or use of IT services and resources.",
"sections": [
Expand Down
11 changes: 9 additions & 2 deletions src/components/GlossaryTermPage/GlossaryTermPage.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,16 @@
margin-bottom: .5rem;
}

.glossary-term__def {
.glossary-term__aside-def {
display: flex;
gap: .25rem;
align-items: center;
font-size: smaller;
color: var(--faded-text);
position: absolute;
color: white;
bottom: .5rem;
left: 1rem;
opacity: .5;
font-weight: 100;
}

Expand Down
22 changes: 14 additions & 8 deletions src/components/GlossaryTermPage/GlossaryTermPageAside.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
import React from 'react';
import { GlossaryTermType } from '../GlossarySearch';
import OpenBookIcon from '../icons/OpenBookIcon';

const imgUrlPrefix = '/img/glossary/';

const GlossaryTermPageAside = ({ term }: { term: GlossaryTermType }) => (
<aside className="glossary-term__aside">
{term.imgUrl && (
<div>
<img className="glossary-term__aside--img" src={term.imgUrl} alt="" />
<div className="glossary-term__aside-img-container">
<img
className="glossary-term__aside-img"
src={term.imgUrl ? `${imgUrlPrefix}/${term.imgUrl}` : `${imgUrlPrefix}/generic.png`}
alt=""
/>
<div className="glossary-term__aside-def">
<OpenBookIcon />
<span>Definition</span>
</div>
)}
</div>
<div className="glossary-term__aside-content">
<h3 className="glossary-term__header">
{term.termTitle}
<span className="glossary-term__def">(definition)</span>
</h3>
<h3 className="glossary-term__header">{term.termTitle}</h3>
<span className="glossary-term__definition">{term.definition}</span>
</div>
</aside>
Expand Down
Binary file added static/img/glossary/aws.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed static/img/glossary/chargeback.png
Binary file not shown.
Binary file added static/img/glossary/generic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit aa0feb3

Please sign in to comment.