Skip to content

Commit

Permalink
feat: On-Ramps Resource Catalog now ready for sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccaeve committed Sep 18, 2024
2 parents 4b0ee76 + 29257f1 commit 3e8f0f4
Show file tree
Hide file tree
Showing 23 changed files with 10,736 additions and 2,336 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ This component provides a user interface to browse available Resources and their
| `allowedFilters` | A list of filters you want users to see. Ex: `["GPU Compute"]` | **False** |
| `excludedCategories` | A list of filter **categories** that you want hidden from users. Ex: `["Specialized Support", "Specialized Hardware"]` | **False** |
| `excludedFilters` | A list of filters that you want hidden from users. Ex: `["ACCESS Allocated", "ACCESS OnDemand"]` | **False** |
| `excludedResources` | A list of Resources that you want hidden from users. Ex: `["ACCESS Credits"]` | **False** |
| `target` | The DOM element where the component will be rendered. | **True** |

Note: Avoid combining `allowedCategories` and `excludedCategories`, or `allowedFilters` and `excludedFilters`. If an invalid combination is found, it will default to what is specified in the `allowed*` options
Expand Down Expand Up @@ -64,8 +65,10 @@ In order for the Bootstrap styles to be applied, the component target element ne

```html
<div class="bootstrap">
<div class="bootstrap-variables bootstrap-fonts">
<div id="resource-catalog-react"></div>
<div class="bootstrap-variables">
<div class="bootstrap-fonts">
<div id="resource-catalog-react"></div>
</div>
</div>
</div>
```
Expand Down
26 changes: 18 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,32 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>XRAS User Interface Components</title>

</head>
<body>
<div id="resource-catalog-react"></div>
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN"
crossorigin="anonymous"
href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css"
/>
</head>
<body>
<div class="container">
<div id="projects-react"></div>
</div>
<script type="module">
<<<<<<< HEAD
import { projectsBrowser } from "/src/main.jsx";
projectsBrowser({
apiUrl: "http://localhost:3009/current-projects.json",
target: document.getElementById("projects-react")
=======
import {
resourceCatalog,
shadowTarget,
} from "http://localhost:3000/xras-ui.js";
resourceCatalog({
target: shadowTarget(
document.getElementById("resource-catalog-react"),
{ accessStyles: true }
),
onRamps: true,
>>>>>>> resourceCatalogUpdates
});
</script>
</body>
Expand Down
Loading

0 comments on commit 3e8f0f4

Please sign in to comment.