Skip to content

Commit

Permalink
Merge pull request #626 from fractal-analytics-platform/home-update
Browse files Browse the repository at this point in the history
Added logo and other minor changes
  • Loading branch information
zonia3000 authored Nov 4, 2024
2 parents 1a42138 + b7ae5ba commit b4b2504
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
*Note: Numbers like (\#123) point to closed Pull Requests on the fractal-web repository.*

# Unreleased

* Added fractal logo (\#626);
* Removed usage of pip extras when installing fractal-server for testing (\#626);
* Removed usage of verbose query parameter in task collection (\#626);

# 1.9.0

* Alignment with fractal-server 2.7 (\#583, \#601, \#605, \#612, \#616, \#620):
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default defineConfig({

webServer: [
{
command: './tests/start-test-server.sh 2.7.0',
command: './tests/start-test-server.sh 2.7.1',
port: 8000,
waitForPort: true,
stdout: 'pipe',
Expand Down
Binary file added src/lib/assets/fractal-logo-medium.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 added src/lib/assets/fractal-logo-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/lib/components/v2/tasks/TaskCollection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
* @returns {Promise<import('$lib/types').TasksCollectionsState|undefined>}
*/
async function getTaskCollection(taskCollectionId) {
const response = await fetch(`/api/v2/task/collect/${taskCollectionId}?verbose=True`, {
const response = await fetch(`/api/v2/task/collect/${taskCollectionId}`, {
method: 'GET',
credentials: 'include'
});
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/v2/tasks/TaskCollectionLogsModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
logs = '';
const response = await fetch(`/api/v2/task/collect/${taskCollectionId}?verbose=True`, {
const response = await fetch(`/api/v2/task/collect/${taskCollectionId}`, {
method: 'GET',
credentials: 'include'
});
Expand Down
13 changes: 12 additions & 1 deletion src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script>
import logoSmall from '$lib/assets/fractal-logo-small.png';
import { browser } from '$app/environment';
import { afterNavigate, invalidateAll } from '$app/navigation';
import { page } from '$app/stores';
Expand Down Expand Up @@ -118,7 +119,9 @@
<div class="container d-flex flex-wrap">
<ul class="nav me-auto">
<li class="nav-item">
<a href="/" class="nav-link" class:active={selectedSection === 'home'}> Home </a>
<a href="/" class="nav-link" id="home-link" class:active={selectedSection === 'home'}>
<img alt="Fractal logo" src={logoSmall} />
</a>
</li>
{#if userLoggedIn}
<li class="nav-item">
Expand Down Expand Up @@ -280,6 +283,14 @@
</main>
<style>
#home-link img {
height: 24px;
}
#home-link:hover img {
transform: rotate(-7deg) scale(1.2);
}
nav.legacy {
background-color: #e4e4e4 !important;
border-bottom-color: #888 !important;
Expand Down
23 changes: 21 additions & 2 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
<script>
import { env } from '$env/dynamic/public';
import { page } from '$app/stores';
import logoMedium from '$lib/assets/fractal-logo-medium.png';
$: userLoggedIn = !!$page.data.userInfo;
</script>

<img alt="Fractal logo" src={logoMedium} class="float-end" id="fractal-logo-home" />

<h1 class="fw-light">Welcome to Fractal web client.</h1>

<div>
<p>
Welcome to the web client of Fractal, a framework to process high-content imaging data at scale
and prepare it for interactive visualization.
Fractal is a framework developed at the
<a href="https://www.biovisioncenter.uzh.ch/en.html">BioVisionCenter</a>
to process bioimaging data at scale in the OME-Zarr format and prepare the images for interactive
visualization.
</p>
<p>
To access Fractal features, you should first log-in as a registered user. Navigate to the
Expand Down Expand Up @@ -67,3 +72,17 @@
</li>
</ul>
</div>

<style>
#fractal-logo-home {
margin-top: 20px;
margin-left: 30px;
height: 220px;
}
@media (max-width: 768px) {
#fractal-logo-home {
height: 140px;
}
}
</style>
Binary file modified static/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 4 additions & 7 deletions tests/start-test-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,17 @@ if [ ! -d "$fractal_server_test_path" ]; then
cp "$(pwd)/lib/fractal-server/config_local.json" "$fractal_server_test_path"
cp "$(pwd)/tests/.fractal_server.env" "$fractal_server_test_path"

if [ "$SKIP_OAUTH_TEST" != "true" ]; then
echo "\nOAUTH_DEXIDP_CLIENT_ID=client_test_web_id" >> "${fractal_server_test_path}/.fractal_server.env"
echo "OAUTH_DEXIDP_CLIENT_SECRET=client_test_web_secret" >> "${fractal_server_test_path}/.fractal_server.env"
echo "OAUTH_DEXIDP_REDIRECT_URL=http://localhost:5173/auth/login/oauth2/" >> "${fractal_server_test_path}/.fractal_server.env"
echo "OAUTH_DEXIDP_OIDC_CONFIGURATION_ENDPOINT=http://127.0.0.1:5556/dex/.well-known/openid-configuration" >> "${fractal_server_test_path}/.fractal_server.env"
fi
echo "\nOAUTH_DEXIDP_CLIENT_ID=client_test_web_id" >> "${fractal_server_test_path}/.fractal_server.env"
echo "OAUTH_DEXIDP_CLIENT_SECRET=client_test_web_secret" >> "${fractal_server_test_path}/.fractal_server.env"
echo "OAUTH_DEXIDP_REDIRECT_URL=http://localhost:5173/auth/login/oauth2/" >> "${fractal_server_test_path}/.fractal_server.env"
echo "OAUTH_DEXIDP_OIDC_CONFIGURATION_ENDPOINT=http://127.0.0.1:5556/dex/.well-known/openid-configuration" >> "${fractal_server_test_path}/.fractal_server.env"

cd "$fractal_server_test_path"

# Virtualenv, dependencies and db
python3 -m venv myenv
. myenv/bin/activate
pip install "fractal-server==$1"
pip install fractal-server[postgres-psycopg-binary]
fractalctl set-db
else
cd "$fractal_server_test_path"
Expand Down

0 comments on commit b4b2504

Please sign in to comment.