Spaces:
Sleeping
Sleeping
alessandro trinca tornidor
commited on
Commit
•
c75f9b4
1
Parent(s):
8be838e
[feat] refactor UI: navbar, mobile navbar, some links
Browse files- static/src/AppLisa.vue +8 -2
- static/src/AppSamgis.vue +8 -1
- static/src/components/NavBar/MobileNavBar.vue +6 -2
- static/src/components/NavBar/NavBar.vue +6 -2
- static/src/components/PageFooter.vue +10 -8
- static/src/components/PageLayout.vue +23 -4
- static/src/components/PageLisaMap.vue +4 -3
- static/src/components/PagePredictionMap.vue +5 -4
static/src/AppLisa.vue
CHANGED
@@ -1,5 +1,12 @@
|
|
1 |
<template>
|
2 |
-
<PageLayout
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
<div>
|
4 |
<div id="map-container-md-lisa">
|
5 |
<PageLisaMap :mapName="mapName"
|
@@ -21,5 +28,4 @@ import PageLayout from '@/components/PageLayout.vue'
|
|
21 |
|
22 |
const mapName = ref('lisa-map')
|
23 |
const description = ref("This page displays predictions made with LISA VLM.")
|
24 |
-
console.log("lisa")
|
25 |
</script>
|
|
|
1 |
<template>
|
2 |
+
<PageLayout
|
3 |
+
aboutThisDescription="LISA adapted to SamGIS"
|
4 |
+
aboutThisUrl="https://trinca.tornidor.com/projects/lisa-adapted-for-samgis"
|
5 |
+
currentPageUrl="https://aletrn-samgis-lisa-on-cuda.hf.space"
|
6 |
+
pageTitle="LISA+SamGIS"
|
7 |
+
switchTabDescription="SamGIS demo"
|
8 |
+
switchTabUrl="/samgis"
|
9 |
+
>
|
10 |
<div>
|
11 |
<div id="map-container-md-lisa">
|
12 |
<PageLisaMap :mapName="mapName"
|
|
|
28 |
|
29 |
const mapName = ref('lisa-map')
|
30 |
const description = ref("This page displays predictions made with LISA VLM.")
|
|
|
31 |
</script>
|
static/src/AppSamgis.vue
CHANGED
@@ -1,5 +1,12 @@
|
|
1 |
<template>
|
2 |
-
<PageLayout
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
<div>
|
4 |
<div id="map-container-md-main">
|
5 |
<PredictionMap
|
|
|
1 |
<template>
|
2 |
+
<PageLayout
|
3 |
+
aboutThisDescription="SamGIS - Segment Anything for GIS"
|
4 |
+
aboutThisUrl="https://trinca.tornidor.com/projects/samgis-segment-anything-applied-to-GIS"
|
5 |
+
currentPageUrl="https://aletrn-samgis-lisa-on-cuda.hf.space/samgis"
|
6 |
+
pageTitle="SamGIS demo"
|
7 |
+
switchTabDescription="LISA+SamGIS demo"
|
8 |
+
switchTabUrl="/"
|
9 |
+
>
|
10 |
<div>
|
11 |
<div id="map-container-md-main">
|
12 |
<PredictionMap
|
static/src/components/NavBar/MobileNavBar.vue
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
<template>
|
2 |
<div class="bg-gray-200 items-center h-8">
|
3 |
-
<TabComponent description="
|
4 |
-
<TabComponent description="blog" href="https://trinca.tornidor.com/" />
|
5 |
<TabComponent description="docs" href="https://docs.trinca.tornidor.com/" />
|
6 |
</div>
|
7 |
</template>
|
@@ -9,4 +8,9 @@
|
|
9 |
<script setup lang="ts">
|
10 |
|
11 |
import TabComponent from '@/components/NavBar/TabComponent.vue'
|
|
|
|
|
|
|
|
|
|
|
12 |
</script>
|
|
|
1 |
<template>
|
2 |
<div class="bg-gray-200 items-center h-8">
|
3 |
+
<TabComponent :description="switchTabDescription" :href="switchTabUrl" />
|
|
|
4 |
<TabComponent description="docs" href="https://docs.trinca.tornidor.com/" />
|
5 |
</div>
|
6 |
</template>
|
|
|
8 |
<script setup lang="ts">
|
9 |
|
10 |
import TabComponent from '@/components/NavBar/TabComponent.vue'
|
11 |
+
|
12 |
+
const props = defineProps<{
|
13 |
+
switchTabDescription: string,
|
14 |
+
switchTabUrl: string,
|
15 |
+
}>()
|
16 |
</script>
|
static/src/components/NavBar/NavBar.vue
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
<template>
|
2 |
<div class="fixed top-2 right-5 mr-2 items-center">
|
3 |
-
<TabComponent description="
|
4 |
-
<TabComponent description="blog" href="https://trinca.tornidor.com/" />
|
5 |
<TabComponent description="docs" href="https://docs.ml-trinca.tornidor.com/" />
|
6 |
</div>
|
7 |
</template>
|
@@ -9,4 +8,9 @@
|
|
9 |
<script setup lang="ts">
|
10 |
|
11 |
import TabComponent from '@/components/NavBar/TabComponent.vue'
|
|
|
|
|
|
|
|
|
|
|
12 |
</script>
|
|
|
1 |
<template>
|
2 |
<div class="fixed top-2 right-5 mr-2 items-center">
|
3 |
+
<TabComponent :description="switchTabDescription" :href="switchTabUrl" />
|
|
|
4 |
<TabComponent description="docs" href="https://docs.ml-trinca.tornidor.com/" />
|
5 |
</div>
|
6 |
</template>
|
|
|
8 |
<script setup lang="ts">
|
9 |
|
10 |
import TabComponent from '@/components/NavBar/TabComponent.vue'
|
11 |
+
|
12 |
+
const props = defineProps<{
|
13 |
+
switchTabDescription: string,
|
14 |
+
switchTabUrl: string,
|
15 |
+
}>()
|
16 |
</script>
|
static/src/components/PageFooter.vue
CHANGED
@@ -4,14 +4,10 @@
|
|
4 |
<div class="relative flex items-center bg-gray-200 h-6">
|
5 |
<div class="pl-1 w-full">
|
6 |
<p class="">
|
7 |
-
<span>Trouble on scrolling
|
8 |
-
|
9 |
-
|
10 |
-
<
|
11 |
-
<PageFooterHyperlink path="https://github.com/vietanhdev/samexporter/">SAM Exporter</PageFooterHyperlink>
|
12 |
-
and inspired by
|
13 |
-
<PageFooterHyperlink path="https://samgeo.gishub.org/">Segment Geospatial</PageFooterHyperlink>
|
14 |
-
</span>
|
15 |
</p>
|
16 |
</div>
|
17 |
<div class="pr-2">
|
@@ -30,4 +26,10 @@ import {ref} from 'vue'
|
|
30 |
import PageFooterHyperlink from "@/components/PageFooterHyperlink.vue";
|
31 |
|
32 |
const showFooterRef = ref(true)
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
</script>
|
|
|
4 |
<div class="relative flex items-center bg-gray-200 h-6">
|
5 |
<div class="pl-1 w-full">
|
6 |
<p class="">
|
7 |
+
<span>Trouble on scrolling? Open the
|
8 |
+
<PageFooterHyperlink :path="currentPageUrl">direct URL space</PageFooterHyperlink> as a new tab. </span>
|
9 |
+
<span>Curious? Read my <PageFooterHyperlink path="https://trinca.tornidor.com">blog</PageFooterHyperlink> and
|
10 |
+
<PageFooterHyperlink :path="aboutThisUrl">{{aboutThisDescription}}</PageFooterHyperlink>.</span>
|
|
|
|
|
|
|
|
|
11 |
</p>
|
12 |
</div>
|
13 |
<div class="pr-2">
|
|
|
26 |
import PageFooterHyperlink from "@/components/PageFooterHyperlink.vue";
|
27 |
|
28 |
const showFooterRef = ref(true)
|
29 |
+
|
30 |
+
const props = defineProps<{
|
31 |
+
currentPageUrl: string,
|
32 |
+
aboutThisUrl: string,
|
33 |
+
aboutThisDescription: string
|
34 |
+
}>()
|
35 |
</script>
|
static/src/components/PageLayout.vue
CHANGED
@@ -1,8 +1,18 @@
|
|
1 |
<template>
|
2 |
<div class="relative min-h-screen lg:flex">
|
3 |
<!-- Menubar -->
|
4 |
-
<NavBar
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
<main id="content" class="flex-1 z-1 lg:ml-0 mr-4 overflow-y-auto md:pl-1 lg:h-screen">
|
8 |
<header class="hidden items-center justify-between h-10 ml-2 landscape:md:flex portrait:sd:flex portrait:md:h-12 bg-gray-200 border-b">
|
@@ -14,7 +24,11 @@
|
|
14 |
</div>
|
15 |
|
16 |
<div class="bottom-0 w-full text-black">
|
17 |
-
<Footer
|
|
|
|
|
|
|
|
|
18 |
</div>
|
19 |
</main>
|
20 |
</div>
|
@@ -27,6 +41,11 @@ import NavBar from '@/components/NavBar/NavBar.vue'
|
|
27 |
import MobileNavBar from '@/components/NavBar/MobileNavBar.vue'
|
28 |
|
29 |
const props = defineProps<{
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
31 |
}>()
|
32 |
</script>
|
|
|
1 |
<template>
|
2 |
<div class="relative min-h-screen lg:flex">
|
3 |
<!-- Menubar -->
|
4 |
+
<NavBar
|
5 |
+
class="hidden portrait:sd:hidden portrait:md:flex landscape:flex"
|
6 |
+
style="z-index: 9999;"
|
7 |
+
:switchTabDescription="switchTabDescription"
|
8 |
+
:switchTabUrl="switchTabUrl"
|
9 |
+
/>
|
10 |
+
<MobileNavBar
|
11 |
+
class="flex portrait:sd:flex portrait:md:hidden landscape:hidden"
|
12 |
+
style="z-index: 9999;"
|
13 |
+
:switchTabDescription="switchTabDescription"
|
14 |
+
:switchTabUrl="switchTabUrl"
|
15 |
+
/>
|
16 |
|
17 |
<main id="content" class="flex-1 z-1 lg:ml-0 mr-4 overflow-y-auto md:pl-1 lg:h-screen">
|
18 |
<header class="hidden items-center justify-between h-10 ml-2 landscape:md:flex portrait:sd:flex portrait:md:h-12 bg-gray-200 border-b">
|
|
|
24 |
</div>
|
25 |
|
26 |
<div class="bottom-0 w-full text-black">
|
27 |
+
<Footer
|
28 |
+
:currentPageUrl="currentPageUrl"
|
29 |
+
:aboutThisDescription="aboutThisDescription"
|
30 |
+
:aboutThisUrl="aboutThisUrl"
|
31 |
+
></Footer>
|
32 |
</div>
|
33 |
</main>
|
34 |
</div>
|
|
|
41 |
import MobileNavBar from '@/components/NavBar/MobileNavBar.vue'
|
42 |
|
43 |
const props = defineProps<{
|
44 |
+
aboutThisDescription: string,
|
45 |
+
aboutThisUrl: string,
|
46 |
+
currentPageUrl: string,
|
47 |
+
pageTitle: string,
|
48 |
+
switchTabDescription: string,
|
49 |
+
switchTabUrl: string
|
50 |
}>()
|
51 |
</script>
|
static/src/components/PageLisaMap.vue
CHANGED
@@ -6,16 +6,17 @@
|
|
6 |
<div class="lg:border-r lg:col-span-3">
|
7 |
<div id="id-map-cont" class="">
|
8 |
<div class="flex">
|
|
|
9 |
<span class="ml-2">
|
10 |
<input type="checkbox" id="checkboxMapNavigationLocked" v-model="mapNavigationLocked" />
|
11 |
<span class="ml-2">
|
12 |
-
<label class="text-red-600" for="checkboxMapNavigationLocked" v-if="mapNavigationLocked">locked map
|
13 |
-
<label class="text-blue-600" for="checkboxMapNavigationLocked" v-else>map
|
14 |
</span>
|
15 |
</span>
|
16 |
<details id="detail-prompt-examples-array" :open="detailIsOpenRef" class="ml-2">
|
17 |
|
18 |
-
<summary><i>prompt examples
|
19 |
<div class="grid grid-cols-1 md:grid-cols-3" id="prompt-examples-array">
|
20 |
<div class="text-xs font-extralight flex bg-green-200">
|
21 |
<textarea
|
|
|
6 |
<div class="lg:border-r lg:col-span-3">
|
7 |
<div id="id-map-cont" class="">
|
8 |
<div class="flex">
|
9 |
+
<span class="flex portrait:hidden bg-slate-200">LISA+SamGIS demo</span>
|
10 |
<span class="ml-2">
|
11 |
<input type="checkbox" id="checkboxMapNavigationLocked" v-model="mapNavigationLocked" />
|
12 |
<span class="ml-2">
|
13 |
+
<label class="text-red-600" for="checkboxMapNavigationLocked" v-if="mapNavigationLocked">locked map!</label>
|
14 |
+
<label class="text-blue-600" for="checkboxMapNavigationLocked" v-else>map unlocked</label>
|
15 |
</span>
|
16 |
</span>
|
17 |
<details id="detail-prompt-examples-array" :open="detailIsOpenRef" class="ml-2">
|
18 |
|
19 |
+
<summary><i>prompt examples</i></summary>
|
20 |
<div class="grid grid-cols-1 md:grid-cols-3" id="prompt-examples-array">
|
21 |
<div class="text-xs font-extralight flex bg-green-200">
|
22 |
<textarea
|
static/src/components/PagePredictionMap.vue
CHANGED
@@ -6,10 +6,11 @@
|
|
6 |
<div class="lg:border-r lg:col-span-3">
|
7 |
<div id="id-map-cont" class="">
|
8 |
<p class="hidden lg:block">{{ description }}</p>
|
9 |
-
<div class="w-full md:pt-1 md:pb-1 lg:hidden portrait:xl:hidden">
|
|
|
10 |
<ButtonMapSendArrayRequest
|
11 |
id="id-button-submit"
|
12 |
-
class="h-8 text-sm font-extralight min-w-[180px] max-w-[180px]"
|
13 |
:current-base-map-name="currentBaseMapNameRef"
|
14 |
:map="map"
|
15 |
:prompts-array="promptsArrayRef"
|
@@ -20,8 +21,8 @@
|
|
20 |
<span class="ml-2 lg:hidden">
|
21 |
<input type="checkbox" id="checkboxMapNavigationLocked" v-model="mapNavigationLocked" />
|
22 |
<span class="ml-2">
|
23 |
-
<label class="text-red-600" for="checkboxMapNavigationLocked" v-if="mapNavigationLocked">locked map
|
24 |
-
<label class="text-blue-600" for="checkboxMapNavigationLocked" v-else>map
|
25 |
</span>
|
26 |
</span>
|
27 |
</div>
|
|
|
6 |
<div class="lg:border-r lg:col-span-3">
|
7 |
<div id="id-map-cont" class="">
|
8 |
<p class="hidden lg:block">{{ description }}</p>
|
9 |
+
<div class="flex w-full md:pt-1 md:pb-1 lg:hidden portrait:xl:hidden">
|
10 |
+
<span class="flex portrait:hidden bg-slate-200 pl-2 pr-2">SamGIS demo</span>
|
11 |
<ButtonMapSendArrayRequest
|
12 |
id="id-button-submit"
|
13 |
+
class="h-8 text-sm font-extralight min-w-[180px] max-w-[180px] ml-2 mr-2"
|
14 |
:current-base-map-name="currentBaseMapNameRef"
|
15 |
:map="map"
|
16 |
:prompts-array="promptsArrayRef"
|
|
|
21 |
<span class="ml-2 lg:hidden">
|
22 |
<input type="checkbox" id="checkboxMapNavigationLocked" v-model="mapNavigationLocked" />
|
23 |
<span class="ml-2">
|
24 |
+
<label class="text-red-600" for="checkboxMapNavigationLocked" v-if="mapNavigationLocked">locked map!</label>
|
25 |
+
<label class="text-blue-600" for="checkboxMapNavigationLocked" v-else>map unlocked</label>
|
26 |
</span>
|
27 |
</span>
|
28 |
</div>
|