Skip to content

Commit

Permalink
Updated for new subdomain structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Haedrich committed May 13, 2024
1 parent 503f332 commit a58a161
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
origins = [
"https://ingredients.tech",
"https://dev.ingredients.tech",
"https://cdn-api.ingredients.tech",
"https://cdn.ingredients.tech",
"https://ingredients.work",
"https://dev.ingredients.work",
"https://cdn-api.ingredients.work"
"https://cdn.ingredients.work"
]

app.add_middleware(
Expand Down
10 changes: 5 additions & 5 deletions ui/src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
let year = new Date().getFullYear();
//let hostname = "ingredients.work";
let hostname = "ingredients.work";
/*
import { browser } from '$app/environment';
Expand All @@ -25,7 +25,7 @@
error = null;
try {
let response = await fetch(`/api/ingredients?url=${scanURL}&includeCategories=true`);
let response = await fetch(`https://api.${hostname}/ingredients?url=${scanURL}&includeCategories=true`);
let data = await response.json();
if (!response.ok) {
Expand Down Expand Up @@ -88,7 +88,7 @@
</svg>
Star on GitHub
</a>
<a href="/api" target="_blank" style="font-weight: 500;color: inherit;">
<a href="https://api.{ hostname }" target="_blank" style="font-weight: 500;color: inherit;">
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icon-tabler-arrow-right" style="margin-bottom: 2px;margin-right: 2px;">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<line x1="5" y1="12" x2="19" y2="12"></line>
Expand Down Expand Up @@ -142,15 +142,15 @@
<ul class="list-unstyled">
{#each ingredients[category] as ingredient}
<!-- List item -->
<li onclick="openDetailModal('{ ingredient.id }-modal')" class="pointer" style="margin-bottom: 4px;font-weight: 500;"><img class="img-fluid" alt={ ingredient.name } src="https://cdn-api.ingredients.work{ ingredient.icon }" width="24" height="24" style="height: 24px;padding: 3px;border-radius: 4px;margin-right: 8px;margin-bottom: 3px;border: 1px solid rgb(206,207,208) ;">{ ingredient.name }</li>
<li onclick="openDetailModal('{ ingredient.id }-modal')" class="pointer" style="margin-bottom: 4px;font-weight: 500;"><img class="img-fluid" alt={ ingredient.name } src="https://cdn.ingredients.work{ ingredient.icon }" width="24" height="24" style="height: 24px;padding: 3px;border-radius: 4px;margin-right: 8px;margin-bottom: 3px;border: 1px solid rgb(206,207,208) ;">{ ingredient.name }</li>

<!-- Detail modal -->
<div id="{ ingredient.id }-modal" class="modal fade" role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body" style="padding: 32px 42px;border-style: none;">
<h1 class="fs-5" style="font-weight: 600;margin-top: 6px;letter-spacing: -0.5px;color: rgb(33, 37, 41);margin-bottom: 10px;">
<img class="img-fluid" alt={ ingredient.name } src="https://cdn-api.ingredients.work{ ingredient.icon }" width="24" height="24" style="height: 26px;padding: 4px;border-radius: 4px;margin-right: 10px;margin-bottom: 4px;border: 1px solid rgb(206,207,208);width: 26px;" />
<img class="img-fluid" alt={ ingredient.name } src="https://cdn.ingredients.work{ ingredient.icon }" width="24" height="24" style="height: 26px;padding: 4px;border-radius: 4px;margin-right: 10px;margin-bottom: 4px;border: 1px solid rgb(206,207,208);width: 26px;" />
{ ingredient.name }
<button class="btn-close float-end" type="button" data-bs-dismiss="modal" aria-label="Close" style="font-size: 12px;margin-top: 6px;"></button>
</h1>
Expand Down

0 comments on commit a58a161

Please sign in to comment.