Handle file not found in project

This commit is contained in:
Alexis Sellier
2021-06-11 11:18:46 +02:00
parent b4fcc99ba6
commit 36f115f502
+22 -2
View File
@@ -73,6 +73,20 @@
.source-tree {
overflow-x: auto;
}
.error-message {
text-align: center;
padding-bottom: 2rem;
border-radius: 0.25rem;
}
.error-message header {
padding: 1rem 0;
font-weight: bold;
}
.error-message .icon {
font-size: 1.5rem;
margin-bottom: 1rem;
}
</style>
<main>
@@ -100,8 +114,14 @@
{:else}
<!-- Project has no README -->
{/if}
{:catch}
<!-- TODO: Handle error -->
{:catch err}
<div class="error error-message">
<header>
<div class="icon">🍂</div>
<div><code>{path}</code></div>
</header>
This file could not be loaded.
</div>
{/await}
</div>
{/if}