Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Modification of display method #2

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ declare module 'vue' {
AModal: typeof import('ant-design-vue/es')['Modal']
ASegmented: typeof import('ant-design-vue/es')['Segmented']
BibTeX: typeof import('./src/components/BibTeX.vue')['default']
DatasetDownload: typeof import('./src/components/DatasetDownload.vue')['default']
FrameworkSection: typeof import('./src/components/FrameworkSection.vue')['default']
HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
IconCommunity: typeof import('./src/components/icons/IconCommunity.vue')['default']
IconDocumentation: typeof import('./src/components/icons/IconDocumentation.vue')['default']
IconEcosystem: typeof import('./src/components/icons/IconEcosystem.vue')['default']
IconSupport: typeof import('./src/components/icons/IconSupport.vue')['default']
IconTooling: typeof import('./src/components/icons/IconTooling.vue')['default']
ImageStack: typeof import('./src/components/ImageStack.vue')['default']
Modal: typeof import('./src/components/Modal.vue')['default']
ModalContainer: typeof import('./src/components/ModalContainer.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
Expand All @@ -30,6 +32,7 @@ declare module 'vue' {
VideoCarousel: typeof import('./src/components/VideoCarousel.vue')['default']
VideoComparision: typeof import('./src/components/VideoComparision.vue')['default']
VideoGrid: typeof import('./src/components/VideoGrid.vue')['default']
VideoPanel: typeof import('./src/components/VideoPanel.vue')['default']
WelcomeItem: typeof import('./src/components/WelcomeItem.vue')['default']
WrappedSection: typeof import('./src/components/WrappedSection.vue')['default']
}
Expand Down
12 changes: 0 additions & 12 deletions src/assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,7 @@
--section-gap: 160px;
}

@media (prefers-color-scheme: dark) {
:root {
--color-background: var(--vt-c-black);
--color-background-soft: var(--vt-c-black-soft);
--color-background-mute: var(--vt-c-black-mute);

--color-border: var(--vt-c-divider-dark-2);
--color-border-hover: var(--vt-c-divider-dark-1);

--color-heading: var(--vt-c-text-dark-1);
--color-text: var(--vt-c-text-dark-2);
}
}

*,
*::before,
Expand Down
6 changes: 1 addition & 5 deletions src/assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
@apply text-surface;
@apply bg-white;
}
html.dark {
@apply text-neutral-50;
@apply bg-body-dark;
}
}
@tailwind components;
@tailwind utilities;
Expand Down Expand Up @@ -54,7 +50,7 @@ a,
.button {
@apply inline-block;
@apply px-3 py-1 rounded-lg cursor-pointer;
@apply bg-gray-800 text-gray-400;
@apply bg-gray-800 text-neutral-50;
@apply transition-all duration-300;
@apply select-none;

Expand Down
17 changes: 15 additions & 2 deletions src/components/AbstractSection.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<section class="abstract">
<div>
<h3>{{ title }}</h3>
<h2>{{ title }}</h2>
<div v-if="figure" class="figure">
<img :src="figure">
</div>
Expand Down Expand Up @@ -29,8 +29,15 @@ const video = (props.video || "").startsWith("assets") ? new URL(`../${props.vid

<style lang="scss" scoped>
.abstract {
h2 {
// font-family: 'Caveat', cursive;
// font-size: 2.5rem;
margin-top: 0px;
margin-bottom: 70px;
}
div {
max-width: 960px;
max-width: 1400px;
margin-top: 50px;
@apply w-full mt-2;
}

Expand All @@ -41,9 +48,15 @@ const video = (props.video || "").startsWith("assets") ? new URL(`../${props.vid
@apply mr-2;
}
}
.figure {
margin-top: 10px;
max-width: 1400px;
margin: 1rem 0;
}
}

.figure {
max-width: 1200px;
margin: 1rem 0;
}

Expand Down
4 changes: 4 additions & 0 deletions src/components/BibTeX.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ section {
@apply flex flex-col justify-center items-center;
}

pre {
@apply text-sm
}

.bibtex-code {
@apply border-gray-300 bg-gray-300/15 p-4 rounded-lg w-full overflow-auto;
max-width: 960px;
Expand Down
138 changes: 138 additions & 0 deletions src/components/DatasetDownload.vue
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>

51 changes: 51 additions & 0 deletions src/components/ImageStack.vue
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>
Loading
Loading