Skip to content

Commit

Permalink
✨ init Open Preview website
Browse files Browse the repository at this point in the history
  • Loading branch information
roiLeo committed Sep 2, 2024
1 parent 7358ca0 commit b27019a
Show file tree
Hide file tree
Showing 16 changed files with 398 additions and 490 deletions.
3 changes: 0 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
"space-before-blocks": ["error", "always"],
"space-infix-ops": ["error", { "int32Hint": false }],

// Typescript
"@typescript-eslint/type-annotation-spacing": "error",

// Vuejs
"vue/multi-word-component-names": 0,
"vue/html-indent": ["error", 2],
Expand Down
13 changes: 13 additions & 0 deletions LICENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <[email protected]>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.
208 changes: 0 additions & 208 deletions components/AnimatedFish.vue

This file was deleted.

2 changes: 1 addition & 1 deletion components/ColorModeButton.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<ClientOnly>
<UButton :icon="isDark ? 'i-heroicons-moon-20-solid' : 'i-heroicons-sun-20-solid'" color="gray" variant="ghost" aria-label="Theme" @click="isDark = !isDark" />
<UButton :ui="{ rounded: 'rounded-full' }" :icon="isDark ? 'i-heroicons-moon-20-solid' : 'i-heroicons-sun-20-solid'" color="gray" variant="ghost" aria-label="Theme" @click="isDark = !isDark" />
<template #fallback>
<div class="h-8 w-8" />
</template>
Expand Down
2 changes: 1 addition & 1 deletion components/ColorPicker.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<UPopover mode="hover">
<template #default="{ open }">
<UButton color="gray" variant="ghost" square :class="[open && 'bg-gray-50 dark:bg-gray-800']" aria-label="Color picker">
<UButton :ui="{ rounded: 'rounded-full' }" color="gray" variant="ghost" square :class="[open && 'bg-gray-50 dark:bg-gray-800']" aria-label="Color picker">
<UIcon name="i-heroicons-swatch-20-solid" class="text-primary-500 dark:text-primary-400 h-5 w-5" />
</UButton>
</template>
Expand Down
7 changes: 5 additions & 2 deletions components/DefaultFooter.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<template>
<footer class="mt-auto border-t border-gray-200 dark:border-gray-800">
<UContainer class="space-between flex h-14 items-center">
<span class="text-sm text-gray-500"> © {{ new Date().getFullYear() }} roiLeo.</span>
<UButton class="ml-auto" color="gray" size="md" label="View on GitHub" icon="i-simple-icons-github" to="https://github.com/roiLeo/Nuxtplate" target="_blank" />
<NuxtLink to="http://www.wtfpl.net" target="_blank" external>
<img class="h-4 mr-2 bg-white rounded-full" src="/img/WTFPL.svg" />
</NuxtLink>
<span class="text-sm text-gray-500"> {{ new Date().getFullYear() }} roiLeo.</span>
<UButton class="ml-auto" color="gray" size="md" label="View on GitHub" icon="i-simple-icons-github" to="https://github.com/roiLeo/open-preview" target="_blank" />
</UContainer>
</footer>
</template>
8 changes: 4 additions & 4 deletions components/DefaultNavbar.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<header class="bg-background/75 border-b border-gray-200 dark:border-gray-800">
<UContainer class="flex h-14 items-center justify-between">
<NuxtLink to="/">Starter Nuxt</NuxtLink>
<header class="sticky top-0 inset-x-0 flex flex-wrap md:justify-start md:flex-nowrap z-50 w-full text-sm">
<nav class="mt-4 relative max-w-2xl w-full bg-white border border-gray-200 rounded-[2rem] mx-2 py-2.5 flex items-center justify-between px-4 mx-auto dark:bg-neutral-900 dark:border-neutral-700">
<NuxtLink class="font-bold" to="/">OpenPreview</NuxtLink>
<div class="flex">
<ColorPicker />
<ColorModeButton />
</div>
</UContainer>
</nav>
</header>
</template>
29 changes: 29 additions & 0 deletions components/InputSearchbar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<template>
<UFormGroup required class="flex-1">
<UInput
v-model="q"
name="q"
type="url"
placeholder="https://hmpg.net"
icon="i-heroicons-computer-desktop-20-solid"
autocomplete="off"
required
:ui="{ icon: { trailing: { pointer: '' } } }"
>
<template #trailing>
<UButton
v-show="q || q !== null"
color="gray"
variant="link"
icon="i-heroicons-x-mark-20-solid"
:padded="false"
@click="q = null"
/>
</template>
</UInput>
</UFormGroup>
</template>

<script setup lang="ts">
const q = defineModel({ type: String, default: null })
</script>
29 changes: 0 additions & 29 deletions components/SimpleCardLink.vue

This file was deleted.

10 changes: 1 addition & 9 deletions layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="flex min-h-screen flex-col">
<div class="px-4 sm:px-6 lg:px-8 max-w-2xl mx-auto relative gap-6 flex flex-col min-h-screen">
<DefaultNavbar />

<UContainer class="w-full">
Expand All @@ -9,11 +9,3 @@
<DefaultFooter />
</div>
</template>

<script setup lang="ts">
useHead({
bodyAttrs: {
class: 'bg-white dark:bg-gray-900'
}
})
</script>
16 changes: 14 additions & 2 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
export default defineNuxtConfig({
app: {
head: {
title: 'OpenPreview',
charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1',
bodyAttrs: { class: 'bg-white dark:bg-gray-900' }
}
},

modules: ['@nuxtjs/i18n', '@nuxt/ui'],
ui: { global: true },

colorMode: {
preference: 'dark',
classSuffix: ''
}
})
},

compatibilityDate: '2024-09-02'
})
Loading

0 comments on commit b27019a

Please sign in to comment.