Skip to content

Commit

Permalink
feat: add ripple directive example
Browse files Browse the repository at this point in the history
  • Loading branch information
kirklin committed Aug 10, 2023
1 parent 83cbc7d commit df97b8d
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 2 deletions.
9 changes: 8 additions & 1 deletion apps/admin/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"directives": {
"directives": "Directive Examples",
"permission": "Permission Directive",
"copy": "Copy Directive"
"copy": "Copy Directive",
"ripple": "Ripple Directive"
},
"iframe": {
"iframe": "Embedded Webpage",
Expand Down Expand Up @@ -110,6 +111,12 @@
"copySuccess": "Copy successful",
"copyError": "Copy failed"
},
"rippleDirective": {
"ripple": "Ripple",
"rippleDirective": "Ripple Directive Example",
"description1": "Ripples are state layers used to communicate the status of a component or interactive element.",
"description2": "A state layer is a semi-transparent covering on an element that indicates its state."
},
"permission": {
"permissionMode": {
"currentMode": "Current Permission Mode",
Expand Down
9 changes: 8 additions & 1 deletion apps/admin/src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"directives": {
"directives": "指令示例",
"permission": "权限指令",
"copy": "复制指令"
"copy": "复制指令",
"ripple": "涟漪指令"
},
"iframe": {
"iframe": "内嵌网页",
Expand Down Expand Up @@ -110,6 +111,12 @@
"copySuccess": "复制成功",
"copyError": "复制失败"
},
"rippleDirective": {
"ripple": "涟漪",
"rippleDirective": "涟漪指令示例",
"description1": "涟漪是用于传达组件或交互元素状态的状态图层。",
"description2": "状态图层是放置在元素上的半透明覆盖层,用于指示其状态。"
},
"permission": {
"permissionMode": {
"currentMode": "当前权限模式",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions apps/admin/src/pages/directives/ripple/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<script setup lang="ts">
import HeroImg from "./images/ripple/hero.gif";
defineOptions({
name: "Ripple",
});
const { t } = useI18n();
</script>

<template>
<div class="h-full flex flex-row space-x-2xl">
<NCard v-ripple class="bg-primary">
<div class="space-y-3xl text-white text-chinese">
<h1 class="text-7xl">
{{ t("page.rippleDirective.ripple") }}
</h1>
<p class="text-xl">
{{ t("page.rippleDirective.description1") }}
</p>
<p class="text-xl">
{{ t("page.rippleDirective.description2") }}
</p>
</div>
</NCard>
<img
:src="HeroImg"
class="rounded-2xl object-cover min-h-[56px]"
alt="Two containers that display a bounded and unbounded ripple on interaction."
title="A bounded and unbounded ripple."
>
</div>
</template>

<style scoped>
</style>
9 changes: 9 additions & 0 deletions apps/admin/src/router/routes/modules/directives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ const directive: RouteRecordRaw = {
icon: "i-mingcute-plugin-2-line",
},
children: [
{
path: "ripple",
name: "Ripple",
component: () => import("~/pages/directives/ripple/index.vue"),
meta: {
title: "routes.directives.ripple",
icon: "i-material-symbols-ripples",
},
},
{
path: "copy",
name: "Copy",
Expand Down

2 comments on commit df97b8d

@vercel
Copy link

@vercel vercel bot commented on df97b8d Aug 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

celeris-web-api – ./services/admin

celeris-web-api-git-master-kirklin.vercel.app
celeris-web-api.vercel.app
celeris-web-api-kirklin.vercel.app

@vercel
Copy link

@vercel vercel bot commented on df97b8d Aug 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

celeris-web – ./apps/admin

celeris-web.vercel.app
celeris-web-kirklin.vercel.app
celeris-web-git-master-kirklin.vercel.app

Please sign in to comment.