Skip to content

Commit

Permalink
fix: Added baseUrl to the image import and link button styling
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccaeve committed Sep 20, 2024
1 parent d80f0c3 commit d4bf629
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 44 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
{ accessStyles: true, baseUrl }
),
onRamps: true,
baseUrl
});
</script>
</body>
Expand Down
4 changes: 2 additions & 2 deletions src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ export function publicationsSelect({ target, routes }) {
);
}

export function onRampsResourceCatalog({ target, catalogSources, onRamps }) {
export function onRampsResourceCatalog({ target, catalogSources, onRamps, baseUrl }) {
const store = configureStore({
reducer: {
resourceCatalog: onRampsCatalogSlice,
},
});
ReactDOM.createRoot(target).render(
<Provider store={store}>
<OnRampsResourceCatalog catalogSources={catalogSources} onRamps={onRamps} />
<OnRampsResourceCatalog catalogSources={catalogSources} onRamps={onRamps} baseUrl={baseUrl} />
</Provider>
);
}
Expand Down
53 changes: 53 additions & 0 deletions src/onramps-resource-catalog/AccessHeader.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import React from 'react';
import styles from "./ResourceCatalog.module.scss";

const AccessHeader = ({ baseUrl }) => {
return (
<>
<div className="row">
<div className="col d-flex">
<img alt="Access Logo" style={{ height: "75px" }} src={`${baseUrl}/access_logo.png`} />
</div>
</div>
<div className="row">
<div className="col">
<h3 className="border-bottom">The ACCESS On-Ramps Program</h3>
</div>
</div>
<div className="row">
<div className="col">
<p>
Need more advanced computing and storage options for your work?
The On-Ramps program offers your institution cost-free entry to the nation's
cyberinfrastructure resources. Simply select a resource from the catalog below to
get started. On-Ramps expands your cyberinfrastructure with many powerful resource options.
</p>
<p>
<a href="https://allocations.access-ci.org" target="_blank">Learn more on our About On-Ramps page</a>
</p>
<h4 className="border-bottom">About ACCESS</h4>
<p>
ACCESS is a program established and funded by the National Science Foundation to
help researchers and educators, with or without supporting grants,
to utilize the nation's advanced computing systems and services — at no cost.
</p>
<p>
<a
href="https://access-ci.org"
target="_blank"
className="btn btn-info me-2 fw-bold"
>Learn more about ACCESS <i className='bi bi-box-arrow-up-right'></i></a>
<a
href="https://allocations.access-ci.org/get-your-first-project"
target="_blank"
className={`btn btn-secondary fw-bold ${styles.btnSecondary}`}
>Get Your First Project <i className='bi bi-box-arrow-up-right'></i></a>
</p>
</div>
</div>

</>
)
}

export default AccessHeader;
8 changes: 5 additions & 3 deletions src/onramps-resource-catalog/ResourceCatalog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ import {
selectHasErrors,
selectResourcesLoaded,
} from "./helpers/catalogSlice";
import { accessText } from "./helpers/accessText";

import ResourceList from "./ResourceList";
import LoadingSpinner from "../shared/LoadingSpinner";
import AccessHeader from "./AccessHeader";
import styles from "./ResourceCatalog.module.scss";

const ResourceCatalog = ({
catalogSources = [],
onRamps = false
onRamps = false,
baseUrl
}) => {
const dispatch = useDispatch();
const resourcesLoaded = useSelector(selectResourcesLoaded);
Expand Down Expand Up @@ -66,7 +68,7 @@ const ResourceCatalog = ({

return (
<div className={`container mt-3 ${styles.access}`}>
{ onRamps ? accessText : ''}
{ onRamps ? <AccessHeader baseUrl={baseUrl} /> : ''}
{ renderCatalogDescriptions() }
<div className="row">
<div className="col">
Expand Down
11 changes: 11 additions & 0 deletions src/onramps-resource-catalog/ResourceCatalog.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,15 @@ $warning: #ef7537;
color: #069;
padding: 0;
cursor: pointer;
}

.btnSecondary {
color: #000 !important;
background-color: #fec42d !important;
border-color: #fec42d !important;
}

.btnSecondary:hover{
background-color: #fecd4d !important;
border-color: #feca42 !important;
}
39 changes: 0 additions & 39 deletions src/onramps-resource-catalog/helpers/accessText.jsx

This file was deleted.

0 comments on commit d4bf629

Please sign in to comment.