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

chore: migrate to nuxt-ui #2513

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,11 @@
"https://json.schemastore.org/github-workflow.json": "/.github/workflows/*.yml"
},
"testing.automaticallyOpenPeekView": "never",
"tailwindCSS.experimental.configFile": ".nuxt/tailwind.config.cjs"
"files.associations": {
"*.css": "tailwindcss"
},
"editor.quickSuggestions": {
"strings": true
},
"tailwindCSS.experimental.configFile": "tailwind.config.ts"
}
29 changes: 3 additions & 26 deletions app.config.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
import theme from '#tailwind-config/theme.mjs'

export default defineAppConfig({
naiveui: {
themeConfig: {
shared: {
common: {
fontFamily: theme.fontFamily.sans.join(', '),
lineHeight: theme.lineHeight.normal,
},
},
light: {
common: {
primaryColor: theme.colors.primary[500],
primaryColorHover: theme.colors.primary[600],
primaryColorPressed: theme.colors.primary[700],
primaryColorSuppl: theme.colors.primary[600],
},
},
dark: {
common: {
primaryColor: theme.colors.primary[500],
primaryColorHover: theme.colors.primary[400],
primaryColorPressed: theme.colors.primary[600],
},
},
},
ui: {
primary: 'primary',
gray: 'gray',
},
})
12 changes: 0 additions & 12 deletions app.vue

This file was deleted.

6 changes: 3 additions & 3 deletions components/DetailPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
<div
class="absolute top-10 -left-3.5 w-7 h-7 rounded-full bg-white border border-gray-300 md:shadow-sm flex items-center justify-center active:border-gray-300 transform text-gray-400 hover:scale-110 hover:border-gray-400 hover:text-gray-500"
>
<n-button
<UButton
quaternary
circle
@click="closePane"
>
<Icon name="ri:close-fill" />
</n-button>
<UIcon name="ri:close-fill" />
</UButton>
</div>
<slot>
<document-editor
Expand Down
2 changes: 1 addition & 1 deletion components/DocumentEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
variant="plaincaps"
>
<template #arrow="{ className }">
<Icon
<UIcon
name="ri:arrow-drop-down-line"
:class="className"
/>
Expand Down
20 changes: 10 additions & 10 deletions components/DocumentView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
class="font-semibold text-lg text-primary-800"
@click="displayDocumentDetails"
>
<Icon
<UIcon
v-if="typeIcon"
:name="typeIcon"
class="mr-1"
:title="typeDescription"
></Icon>
/>
<span>{{ document.title }}</span>
</button>
<!-- TOOD: Add citation display
Expand Down Expand Up @@ -69,14 +69,14 @@
variant="badge"
class="border border-gray-400"
>
<!-- TODO: Add icon of group <Icon name="dragon" class="mr-2" /> -->
<!-- TODO: Add icon of group <UIcon name="dragon" class="mr-2" /> -->
{{ keyword }}
</t-tag>
<!-- TODO: Add overflow
<n-button variant="linkplain" class="text-sm my-auto">
<UButton variant="linkplain" class="text-sm my-auto">
<span>View More (8+)</span>
<Icon name="ri:arrow-down-s-line" />
</n-button>
<UIcon name="ri:arrow-down-s-line" />
</UButton>
-->
</div>
<div v-if="'abstract' in document && document.abstract">
Expand All @@ -86,20 +86,20 @@
>
{{ document.abstract }}
</span>
<n-button
<UButton
text
class="text-sm my-auto"
@click="viewFullAbstract = !viewFullAbstract"
>
<template v-if="viewFullAbstract">
<span>View less</span>
<Icon name="ri:arrow-up-s-line" />
<UIcon name="ri:arrow-up-s-line" />
</template>
<template v-else>
<span>View full abstract</span>
<Icon name="ri:arrow-down-s-line" />
<UIcon name="ri:arrow-down-s-line" />
</template>
</n-button>
</UButton>
</div>
</div>
</template>
Expand Down
8 changes: 2 additions & 6 deletions components/LandingPageDownload.client.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@
JabRef is free and works across all your devices.
</h3>
<div class="text-center">
<n-button
type="primary"
size="large"
style="height: 3.2em"
>
<UButton size="lg">
<a
class="text-2xl"
:href="downloadUrl"
>Download JabRef</a
>
</n-button>
</UButton>
</div>

<div class="text-center pt-8 text-sm">
Expand Down
51 changes: 27 additions & 24 deletions components/LandingPageGetInvolved.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,25 @@
</p>
<p class="text-justify">
JabRef is developed and maintained by a multidisciplinary
<n-popover trigger="hover">
<template #trigger>
<n-button text>core team</n-button>
<UPopover
mode="hover"
popper="{ arrow: false}"
>
<UButton variant="link">core team</UButton>
<template #panel>
<div class="p-4">
<ul
v-for="member in maintainers"
:key="member"
class="list-disc"
>
<li class="text-sm">
{{ member }}
</li>
</ul>
</div>
</template>
<div class="px-4 py-1">
<ul
v-for="member in maintainers"
:key="member"
class="list-disc"
>
<li class="text-sm">
{{ member }}
</li>
</ul>
</div>
</n-popover>
</UPopover>
of PhD students, postdocs, and researchers in industry who work on
JabRef in their free time. Without the support of numerous volunteers,
none of this would have been possible. We welcome anyone who would
Expand All @@ -61,21 +64,21 @@
<div
class="lg:min-w-0 mx-auto flex flex-col flex-no-shrink flex-grow break-words text-center py-6 md:px-6 max-w-prose"
>
<n-button
<UButton
text
type="primary"
class="text-xl mx-auto text-primary-500"
>
<a
href="https://docs.jabref.org/faq/faqcontributing#i-am-not-a-programmer"
>
<Icon
<UIcon
name="ri:hearts-fill"
class="text-6xl"
/>
<h4 class="text-2xl mb-3 font-semibold">Contribute</h4>
</a>
</n-button>
</UButton>
<h5 class="pb-2 text-xl">Help us build JabRef</h5>
<p>
You do not need to be a developer to improve the documentation,
Expand All @@ -91,19 +94,19 @@
<div
class="lg:min-w-0 mx-auto flex flex-col flex-no-shrink flex-grow break-words text-center py-6 md:px-6 max-w-prose"
>
<n-button
<UButton
text
type="primary"
class="text-xl mx-auto text-primary-500"
>
<a href="https://github.com/JabRef/jabref/wiki/Donations">
<Icon
<UIcon
name="ri:gift-fill"
class="text-6xl"
/>
<h4 class="text-2xl mb-3 font-semibold">Donate</h4>
</a>
</n-button>
</UButton>
<h5 class="pb-2 text-xl">Support the development</h5>
<p>
Help us pay for project development and operating costs so that we
Expand All @@ -119,19 +122,19 @@
<div
class="lg:min-w-0 mx-auto flex flex-col flex-no-shrink flex-grow break-words text-center py-6 md:px-6 max-w-prose"
>
<n-button
<UButton
text
type="primary"
class="text-xl mx-auto text-primary-500"
>
<a href="https://github.com/JabRef/jabref">
<Icon
<UIcon
name="ri:code-s-slash-fill"
class="text-6xl"
/>
<h4 class="text-2xl mb-3 font-semibold">Develop</h4>
</a>
</n-button>
</UButton>
<h5 class="pb-2 text-xl">Make JabRef even better</h5>
<p>
JabRef is and always will be 100% free and open-source. Contribute
Expand Down
2 changes: 1 addition & 1 deletion components/LandingPageMore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
:href="item.href"
class="text-primary-500 hover:text-primary-600"
>
<Icon
<UIcon
:name="item.icon"
class="text-6xl"
/>
Expand Down
2 changes: 1 addition & 1 deletion components/ModalDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<div
class="flex items-center justify-end p-6 border-t border-solid border-slate-200 rounded-b"
>
<n-button @click="showModal = false"> Close </n-button>
<UButton @click="showModal = false"> Close </UButton>
</div>
</slot>
</div>
Expand Down
Loading
Loading