-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5999c51
commit 24d0c65
Showing
10 changed files
with
794 additions
and
616 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
export function generateModuleHTMLComponent ( | ||
title: string, | ||
description: string, | ||
documentationLink: string, | ||
demo: string, | ||
actions: string | ||
): {html: string} { | ||
const html = `<div class="layout"> | ||
<div class="group"> | ||
<h1 class="heading"> | ||
${title} | ||
</h1> | ||
<p class="description"> | ||
${description} | ||
</p> | ||
</div> | ||
<div class="group"> | ||
${demo} | ||
<div class="actions"> | ||
<WelcomeButtonLink href="${documentationLink}" :blank="true"> | ||
Documentation | ||
</WelcomeButtonLink> | ||
${actions} | ||
</div> | ||
</div> | ||
</div>` | ||
return { | ||
html, | ||
} | ||
} | ||
|
||
export function generateModuleHTMLSnippet (componentName: string) { | ||
const html = ` <div class="card"> | ||
<${componentName} /> | ||
</div>` | ||
return { | ||
html, | ||
} | ||
} | ||
|
||
export const buttonLink = `<script setup lang="ts"> | ||
defineProps({ | ||
blank: { | ||
type: Boolean, | ||
required: false, | ||
default: false | ||
}, | ||
href: { | ||
type: String, | ||
default: '' | ||
}, | ||
}) | ||
</script> | ||
<template> | ||
<NuxtLink class="ButtonLink" :to="href" :target="blank ? '_blank' : undefined"> | ||
<slot /> | ||
</NuxtLink> | ||
</template> | ||
<style scoped> | ||
.ButtonLink { | ||
position: relative; | ||
padding: 5px 15px; | ||
color: white; | ||
background-image: linear-gradient(160deg, #059669, #059669); | ||
border-radius: 0.3rem; | ||
cursor: pointer; | ||
user-select: none; | ||
transition: box-shadow 0.6s; | ||
} | ||
.ButtonLink:hover { | ||
box-shadow: 0 0 60px 2px #059669, 0.5rem 0.5rem 30px #059669; | ||
} | ||
.ButtonLink:after { | ||
content: ''; | ||
position: absolute; | ||
top: 2px; | ||
right: 2px; | ||
bottom: 2px; | ||
left: 2px; | ||
border-radius: 0.75rem; | ||
pointer-events: none; | ||
} | ||
</style> | ||
` |
Oops, something went wrong.