-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Modification of display method (#2)
* remove some unnecessary part * image stack * feat: modification of display method --------- Co-authored-by: mingwxu <[email protected]>
- Loading branch information
1 parent
682cf9c
commit d0e7b30
Showing
16 changed files
with
721 additions
and
1,071 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
<template> | ||
<section class="dataset-download"> | ||
<div> | ||
<h2 class="title">{{ title }}</h2> | ||
|
||
|
||
<div class="download-section"> | ||
<div v-for="(item, index) in datasets" :key="index" class="download-item"> | ||
<button class="download-button" @click="handleDownload"> | ||
{{ item.name }} | ||
</button> | ||
|
||
<span class="download-details">{{ item.details }}</span> | ||
</div> | ||
</div> | ||
|
||
<div v-if="updates" class="update-section"> | ||
<h3>🔥 Warning ({{ updates.date }})</h3> | ||
<p> | ||
{{ updates.notes }} | ||
<a :href="updates.links.license">Our license</a>. | ||
</p> | ||
<p> | ||
{{ updates.description }} | ||
<a :href="updates.links.details">Fill out the form</a>. | ||
</p> | ||
</div> | ||
|
||
</div> | ||
</section> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
interface Dataset { | ||
name: string; | ||
details: string; | ||
} | ||
interface Updates { | ||
date: string; | ||
description: string; | ||
links: { | ||
details: string; | ||
license: string; | ||
}; | ||
notes: string; | ||
} | ||
interface Props { | ||
title?: string; | ||
datasets?: Dataset[]; | ||
updates?: Updates; | ||
} | ||
const { props } = defineProps<{ props: Props }>(); | ||
const title = props.title || "Dataset Download"; | ||
const datasets = props.datasets || []; | ||
const updates = props.updates || null; | ||
const handleDownload = () => { | ||
window.location.href = 'https://forms.gle/moqec5Qod7mz9pfD6'; | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.dataset-download { | ||
text-align: center; /* Ensures entire section is centered */ | ||
.title { | ||
margin-bottom: 80px; | ||
// font-family: 'Caveat', cursive; | ||
// font-size: 2.5rem; | ||
margin: 5; | ||
} | ||
.update-section { | ||
margin-top: 30px; | ||
text-align: left; | ||
padding: 20px; | ||
background-color: #f9f9f9; | ||
border: 1px solid #ccc; | ||
border-radius: 5px; | ||
max-width: 1400px; | ||
h3 { | ||
color: #e63946; | ||
} | ||
a { | ||
color: #007BFF; | ||
text-decoration: none; | ||
font-size: 16px; | ||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
} | ||
.download-section { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
max-width: 1400px; | ||
} | ||
.download-item { | ||
margin-bottom: 15px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
max-width: 1200px; | ||
.download-button { | ||
font-size: 24px; | ||
padding: 10px 20px; | ||
margin-right: 10px; | ||
background-color: #333; | ||
color: #fff; | ||
border: none; | ||
cursor: pointer; | ||
&:hover { | ||
background-color: #555; | ||
} | ||
} | ||
.download-details { | ||
font-size: 24px; | ||
color: #333; | ||
} | ||
} | ||
} | ||
</style> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<template> | ||
<section class="image-stack"> | ||
<h2>{{ title }}</h2> | ||
<div> | ||
<img | ||
v-for="(image, index) in images" | ||
:key="index" | ||
:src="image" | ||
:alt="'Image ' + (index + 1)" | ||
/> | ||
</div> | ||
</section> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
interface Props { | ||
title?: string | ||
imageList?: string[] | ||
} | ||
const {props} = defineProps<{props: Props}>() | ||
// Provide default values for props | ||
const title = props.title || "Stacked Images" | ||
const images = props.imageList || [] | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&display=swap'); | ||
h2 { | ||
// font-family: 'Caveat', cursive; | ||
margin-top: 0px; /* 减小与视频网格的间距 */ | ||
margin-bottom: 0px; /* 减小与视频网格的间距 */ | ||
} | ||
.image-stack { | ||
div { | ||
max-width: 1400px; | ||
@apply w-full mt-2; | ||
} | ||
} | ||
img { | ||
margin: 2rem 0; | ||
} | ||
</style> |
Oops, something went wrong.