Chore: update index i18n (#4240)

* chore: update index i18n

* chore: update index i18n

* chore: update index i18n
This commit is contained in:
0song 2021-11-05 20:54:21 +08:00 committed by GitHub
parent db6efc9dc9
commit b0f8f81297
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 63 additions and 67 deletions

View File

@ -0,0 +1,22 @@
[
{
"name": "JNPF",
"img": "/images/jnpf_index.png",
"url": "https://www.jnpfsoft.com/index.html?from=elementUI",
"slogan": "JNPF low code development platform to develop simple!",
"className": "jnpf"
},
{
"name": "bit",
"img": "/images/bit.svg",
"url": "https://bit.dev/?from=element-ui",
"slogan": "Share Code"
},
{
"name": "renren.io",
"img": "/images/renren.png",
"url": "https://www.renren.io/?from=element-ui",
"slogan": "Rapid development platform",
"className": "renren"
}
]

View File

@ -8,12 +8,14 @@
"7": "Experience interaction details by strolling through component demos. Use encapsulated code to improve developing efficiency.",
"8": "Resource",
"9": "Download relevant design resources for shaping page prototype or visual draft, increasing design efficiency.",
"10": "Theme",
"11": "Online theme roller, visualize custom and manage site themes and component styles",
"12": "Theme customization is available!",
"13": "Click here",
"14": "Make your own theme",
"lang": "en-US",
"titleSize": "34",
"paraSize": "18"
"10": "Links",
"11": "GitHub",
"12": "Changelog",
"13": "Starter kit",
"14": "Online Theme Roller",
"15": "Gitter",
"16": "Feedback",
"17": "Contribution",
"18": "SegmentFault",
"19": "Community"
}

View File

@ -1,37 +1,18 @@
<script setup lang="ts">
import { ref, reactive, computed } from 'vue'
import { withBase } from 'vitepress'
import { useParallax, useThrottleFn, useEventListener } from '@vueuse/core'
import { useLang } from '../../composables/lang'
import homeLocale from '../../../i18n/pages/home.json'
import sponsorLocale from '../../../i18n/component/sponsors-home.json'
import type { CSSProperties } from 'vue'
const target = ref<HTMLElement | null>(null)
const parallax = reactive(useParallax(target))
const jumbotronRedOffset = ref(0)
const jumbotronRef = ref<HTMLElement | null>(null)
const sponsors = [
{
name: 'JNPF',
img: withBase('/images/jnpf_index.png'),
url: 'https://www.jnpfsoft.com/index.html?from=elementUI',
slogan: 'JNPF low code development platform to develop simple!',
className: 'jnpf',
},
{
name: 'bit',
img: withBase('/images/bit.svg'),
url: 'https://bit.dev/?from=element-ui',
slogan: 'Share Code',
},
{
name: 'renren.io',
img: withBase('/images/renren.png'),
url: 'https://www.renren.io/?from=element-ui',
slogan: 'Rapid development platform',
className: 'renren',
},
]
const lang = useLang()
const homeLang = computed(() => homeLocale[lang.value])
const sponsors = computed(() => sponsorLocale[lang.value])
const containerStyle: CSSProperties = {
display: 'flex',
@ -92,11 +73,8 @@ useEventListener(window, 'scroll', handleScroll)
<div ref="target" class="home-page">
<div class="banner">
<div class="banner-desc">
<h1>A Desktop UI Library</h1>
<p>
Element Plus, a Vue 3 based component library for developers,
designers and product managers
</p>
<h1>{{ homeLang['1'] }}</h1>
<p>{{ homeLang['2'] }}</p>
</div>
</div>
<div ref="jumbotronRef" class="jumbotron">
@ -134,34 +112,27 @@ useEventListener(window, 'scroll', handleScroll)
<li>
<div class="card">
<img src="/images/guide.png" alt="" />
<h3>Guide</h3>
<p>
Understand the design guidelines, helping designers build product
that's logically sound, reasonably structured and easy to use.
</p>
<a href="/en-US/guide/design.html"> View Detail </a>
<h3>{{ homeLang['3'] }}</h3>
<p>{{ homeLang['4'] }}</p>
<a :href="`/${lang}/guide/design.html`">{{ homeLang['5'] }}</a>
</div>
</li>
<li>
<div class="card">
<img src="/images/component.png" alt="" />
<h3>Component</h3>
<p>
Experience interaction details by strolling through component
demos. Use encapsulated code to improve developing efficiency.
</p>
<a href="/en-US/component/layout.html"> View Detail </a>
<h3>{{ homeLang['6'] }}</h3>
<p>{{ homeLang['7'] }}</p>
<a :href="`/${lang}/component/layout.html`">
{{ homeLang['5'] }}
</a>
</div>
</li>
<li>
<div class="card">
<img src="/images/resource.png" alt="" />
<h3>Resource</h3>
<p>
Download relevant design resources for shaping page prototype or
visual draft, increasing design efficiency.
</p>
<a href="/en-US/resource/index.html"> View Detail </a>
<h3>{{ homeLang['8'] }}</h3>
<p>{{ homeLang['9'] }}</p>
<a :href="`/${lang}/resource/index.html`"> {{ homeLang['5'] }} </a>
</div>
</li>
</ul>
@ -169,65 +140,66 @@ useEventListener(window, 'scroll', handleScroll)
</div>
<footer class="footer">
<div class="footer-main">
<h4>Links</h4>
<h4>{{ homeLang['10'] }}</h4>
<a
href="https://github.com/element-plus/element-plus"
class="footer-main-link"
target="_blank"
>
GitHub
{{ homeLang['11'] }}
</a>
<a
href="https://github.com/element-plus/element-plus/releases"
class="footer-main-link"
target="_blank"
>
Changelog
{{ homeLang['12'] }}
</a>
<a
href="https://github.com/element-plus/element-plus-starter"
class="footer-main-link"
target="_blank"
>
Starter kit
{{ homeLang['13'] }}
</a>
<a
href="/en-US/component/custom-theme"
:href="`/${lang}/guide/theming`"
class="footer-main-link"
target="_blank"
>
Online Theme Roller
{{ homeLang['14'] }}
</a>
</div>
<div class="footer-main">
<h4>Community</h4>
<h4>{{ homeLang['19'] }}</h4>
<a
href="https://gitter.im/element-en/Lobby"
class="footer-main-link"
target="_blank"
>Gitter</a
>
{{ homeLang['15'] }}
</a>
<a
href="https://github.com/element-plus/element-plus/issues"
class="footer-main-link"
target="_blank"
>
Feedback
{{ homeLang['16'] }}
</a>
<a
href="https://github.com/element-plus/element-plus/blob/dev/.github/CONTRIBUTING.en-US.md"
class="footer-main-link"
target="_blank"
>
Contribution
{{ homeLang['17'] }}
</a>
<a
href="https://segmentfault.com/t/element-plus"
class="footer-main-link"
target="_blank"
>
SegmentFault
{{ homeLang['18'] }}
</a>
</div>
</footer>