Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ycc-website
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Website
ycc-website
Commits
49b9a556
Commit
49b9a556
authored
Jun 23, 2022
by
wenglk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change logo
parent
7615f3f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
107 additions
and
66 deletions
+107
-66
chain33.png
src/assets/images/chain33.png
+0
-0
menu.vue
src/components/mobile/menu.vue
+12
-12
Header.vue
src/layout/MainPage/Header.vue
+95
-54
No files found.
src/assets/images/chain33.png
0 → 100644
View file @
49b9a556
4.17 KB
src/components/mobile/menu.vue
View file @
49b9a556
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
:visible=
"isShow"
:visible=
"isShow"
>
>
<div
class=
"logo mb-3.5 px-6"
>
<div
class=
"logo mb-3.5 px-6"
>
<img
src=
"@/assets/images/
ycclogo
.png"
width=
"140"
alt=
"yuanlian"
/>
<img
src=
"@/assets/images/
chain33
.png"
width=
"140"
alt=
"yuanlian"
/>
</div>
</div>
<ul
class=
"menulist"
>
<ul
class=
"menulist"
>
<li
<li
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
:class=
"
{ 'menu-active': $route.path === '/home' }"
:class=
"
{ 'menu-active': $route.path === '/home' }"
@click="goPage('/')"
@click="goPage('/')"
>
>
{{
$t
(
'lang.home'
)
}}
{{
$t
(
"lang.home"
)
}}
</li>
</li>
<li
class=
"px-6 text-base text-title-color"
>
<li
class=
"px-6 text-base text-title-color"
>
<a
<a
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
"
"
target=
"_blank"
target=
"_blank"
>
>
{{
$t
(
'lang.book'
)
}}
{{
$t
(
"lang.book"
)
}}
</a>
</a>
</li>
</li>
<li
<li
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
}"
}"
@click="goPage('/newsList')"
@click="goPage('/newsList')"
>
>
{{
$t
(
'lang.news'
)
}}
{{
$t
(
"lang.news"
)
}}
</li>
</li>
<li
<li
class=
"px-6 text-base text-title-color"
class=
"px-6 text-base text-title-color"
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
}"
}"
@click="goPage('/blockChainBrowser')"
@click="goPage('/blockChainBrowser')"
>
>
{{
$t
(
'lang.blockChainBrowser'
)
}}
{{
$t
(
"lang.blockChainBrowser"
)
}}
</li>
</li>
</ul>
</ul>
</Drawer>
</Drawer>
...
@@ -61,8 +61,8 @@
...
@@ -61,8 +61,8 @@
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
import
Vue
from
"vue"
;
import
{
Drawer
}
from
'ant-design-vue'
import
{
Drawer
}
from
"ant-design-vue"
;
export
default
Vue
.
extend
({
export
default
Vue
.
extend
({
components
:
{
components
:
{
Drawer
,
Drawer
,
...
@@ -71,19 +71,19 @@ export default Vue.extend({
...
@@ -71,19 +71,19 @@ export default Vue.extend({
isShow
:
Boolean
,
isShow
:
Boolean
,
iconType
:
{
iconType
:
{
type
:
String
,
type
:
String
,
default
:
'zh-CN'
,
default
:
"zh-CN"
,
},
},
},
},
methods
:
{
methods
:
{
onClose
()
{
onClose
()
{
this
.
$emit
(
'close'
,
true
)
this
.
$emit
(
"close"
,
true
);
},
},
goPage
(
p
:
string
)
{
goPage
(
p
:
string
)
{
this
.
$router
.
push
({
path
:
p
,
query
:
{
lang
:
this
.
$route
.
query
.
lang
}
})
this
.
$router
.
push
({
path
:
p
,
query
:
{
lang
:
this
.
$route
.
query
.
lang
}
})
;
this
.
onClose
()
this
.
onClose
()
;
},
},
},
},
})
})
;
</
script
>
</
script
>
<
style
>
<
style
>
...
...
src/layout/MainPage/Header.vue
View file @
49b9a556
<
template
>
<
template
>
<div
<div
class=
"fixed top-0 w-full flex justify-center ease-in duration-200"
class=
"fixed top-0 w-full flex justify-center ease-in duration-200"
style=
"z-index: 3000
;
"
style=
"z-index: 3000"
:class=
"
{
:class=
"
{
'bg-white': $route.path === '/newsList' || !isTop,
'bg-white': $route.path === '/newsList' || !isTop,
'min-w-1200': !isMobile,
'min-w-1200': !isMobile,
...
@@ -9,10 +9,20 @@
...
@@ -9,10 +9,20 @@
>
>
<div
<div
v-if=
"!isMobile"
v-if=
"!isMobile"
class=
"min-w-1200 h-16 text-footer-color md:w-bodySet flex justify-between items-center ease-in duration-500"
class=
"
min-w-1200
h-16
text-footer-color
md:w-bodySet
flex
justify-between
items-center
ease-in
duration-500
"
>
>
<div
class=
"flex items-center"
>
<div
class=
"flex items-center"
>
<img
src=
"@/assets/images/
ycclogo
.png"
alt=
"logo"
width=
"164"
/>
<img
src=
"@/assets/images/
chain33
.png"
alt=
"logo"
width=
"164"
/>
<ul
class=
"header_menu flex leading-normal text-sm ml-16"
>
<ul
class=
"header_menu flex leading-normal text-sm ml-16"
>
<router-link
<router-link
:to=
"
{ path: '/home', query: { lang: $route.query.lang } }"
:to=
"
{ path: '/home', query: { lang: $route.query.lang } }"
...
@@ -24,10 +34,21 @@
...
@@ -24,10 +34,21 @@
' text-text-color': $route.path !== '/home',
' text-text-color': $route.path !== '/home',
}"
}"
>
>
{{
$t
(
'lang.home'
)
}}
{{
$t
(
"lang.home"
)
}}
<span
<span
v-show=
"$route.path === '/home'"
v-show=
"$route.path === '/home'"
class=
"absolute block w-7 h-1 bg-footer-color rounded-2xl left-1/2 -bottom-2 transform -translate-x-1/2"
class=
"
absolute
block
w-7
h-1
bg-footer-color
rounded-2xl
left-1/2
-bottom-2
transform
-translate-x-1/2
"
></span>
></span>
</router-link>
</router-link>
<li
<li
...
@@ -46,7 +67,7 @@
...
@@ -46,7 +67,7 @@
"
"
target=
"_blank"
target=
"_blank"
>
>
{{
$t
(
'lang.book'
)
}}
{{
$t
(
"lang.book"
)
}}
</a>
</a>
</li>
</li>
<router-link
<router-link
...
@@ -59,12 +80,23 @@
...
@@ -59,12 +80,23 @@
}"
}"
class="pl-5 pr-5 cursor-pointer relative"
class="pl-5 pr-5 cursor-pointer relative"
>
>
{{
$t
(
'lang.news'
)
}}
{{
$t
(
"lang.news"
)
}}
<span
<span
v-show=
"
v-show=
"
$route.path === '/newsList' || $route.path === '/newsDetails'
$route.path === '/newsList' || $route.path === '/newsDetails'
"
"
class=
"absolute block w-7 h-1 bg-footer-color rounded-2xl left-1/2 -bottom-2 transform -translate-x-1/2"
class=
"
absolute
block
w-7
h-1
bg-footer-color
rounded-2xl
left-1/2
-bottom-2
transform
-translate-x-1/2
"
></span>
></span>
</router-link>
</router-link>
<router-link
<router-link
...
@@ -93,7 +125,7 @@
...
@@ -93,7 +125,7 @@
),
),
}"
}"
>
>
{{
$t
(
'lang.blockChainBrowser'
)
}}
{{
$t
(
"lang.blockChainBrowser"
)
}}
<span
<span
v-show=
"
v-show=
"
$route.path === '/blockChainBrowser' ||
$route.path === '/blockChainBrowser' ||
...
@@ -103,7 +135,18 @@
...
@@ -103,7 +135,18 @@
$route.path === '/tradeList' ||
$route.path === '/tradeList' ||
$route.path === '/address'
$route.path === '/address'
"
"
class=
"absolute block w-7 h-1 bg-footer-color rounded-2xl left-1/2 -bottom-2 transform -translate-x-1/2"
class=
"
absolute
block
w-7
h-1
bg-footer-color
rounded-2xl
left-1/2
-bottom-2
transform
-translate-x-1/2
"
:class=
"
{
:class=
"
{
' bg-white': $route.path === '/blockChainBrowser'
&&
isTop,
' bg-white': $route.path === '/blockChainBrowser'
&&
isTop,
}"
}"
...
@@ -117,7 +160,7 @@
...
@@ -117,7 +160,7 @@
:class=
"
{ 'text-white': isTop }"
:class=
"
{ 'text-white': isTop }"
:style="{ color: $route.path === '/home' ? '' : '#2545CB' }"
:style="{ color: $route.path === '/home' ? '' : '#2545CB' }"
>
>
{{
$t
(
'lang.email'
)
}}
: business@yuan.org
{{
$t
(
"lang.email"
)
}}
: business@yuan.org
</p>
</p>
<div
class=
"relative"
>
<div
class=
"relative"
>
<div
<div
...
@@ -126,7 +169,7 @@
...
@@ -126,7 +169,7 @@
@
click=
"showIcon = !showIcon"
@
click=
"showIcon = !showIcon"
>
>
<img
class=
"mr-2"
src=
"@/assets/images/header/ZH.png"
alt=
"中文"
/>
<img
class=
"mr-2"
src=
"@/assets/images/header/ZH.png"
alt=
"中文"
/>
<p
class=
"text-sm"
>
{{
$t
(
'lang.zh'
)
}}
</p>
<p
class=
"text-sm"
>
{{
$t
(
"lang.zh"
)
}}
</p>
<img
<img
class=
"ml-1"
class=
"ml-1"
width=
"10"
width=
"10"
...
@@ -140,7 +183,7 @@
...
@@ -140,7 +183,7 @@
@
click=
"showIcon = !showIcon"
@
click=
"showIcon = !showIcon"
>
>
<img
class=
"mr-2"
src=
"@/assets/images/header/EN.png"
alt=
"英文"
/>
<img
class=
"mr-2"
src=
"@/assets/images/header/EN.png"
alt=
"英文"
/>
<p
class=
"text-sm"
>
{{
$t
(
'lang.en'
)
}}
</p>
<p
class=
"text-sm"
>
{{
$t
(
"lang.en"
)
}}
</p>
<img
<img
class=
"ml-1"
class=
"ml-1"
width=
"10"
width=
"10"
...
@@ -153,7 +196,7 @@
...
@@ -153,7 +196,7 @@
@
hidden=
"showIcon = false"
@
hidden=
"showIcon = false"
@
selectIcon=
"
@
selectIcon=
"
(v) =>
{
(v) =>
{
iconType = v
iconType = v
;
}
}
"
"
>
</icon-select>
>
</icon-select>
...
@@ -163,13 +206,13 @@
...
@@ -163,13 +206,13 @@
<div
<div
v-else
v-else
class=
"w-full flex justify-between items-center bg-white"
class=
"w-full flex justify-between items-center bg-white"
style=
"height: 44px
;
"
style=
"height: 44px"
:style=
"
{
:style=
"
{
'border-bottom': $route.path !== '/home' ? '1px solid #F2F2F2' : 'none',
'border-bottom': $route.path !== '/home' ? '1px solid #F2F2F2' : 'none',
}"
}"
>
>
<div
class=
"logo mx-3.5"
>
<div
class=
"logo mx-3.5"
>
<img
src=
"@/assets/images/
ycclogo
.png"
alt=
"logo"
width=
"140"
/>
<img
src=
"@/assets/images/
chain33
.png"
alt=
"logo"
width=
"140"
/>
</div>
</div>
<div
class=
"flex justify-between items-center"
>
<div
class=
"flex justify-between items-center"
>
<div
class=
"relative"
>
<div
class=
"relative"
>
...
@@ -179,7 +222,7 @@
...
@@ -179,7 +222,7 @@
@
click=
"showIcon = !showIcon"
@
click=
"showIcon = !showIcon"
>
>
<img
class=
"mr-1"
src=
"@/assets/images/header/ZH.png"
alt=
"中文"
/>
<img
class=
"mr-1"
src=
"@/assets/images/header/ZH.png"
alt=
"中文"
/>
<p
class=
"text-xs text-footer-color"
>
{{
$t
(
'lang.zh'
)
}}
</p>
<p
class=
"text-xs text-footer-color"
>
{{
$t
(
"lang.zh"
)
}}
</p>
<img
<img
class=
"mr-1"
class=
"mr-1"
width=
"10"
width=
"10"
...
@@ -193,7 +236,7 @@
...
@@ -193,7 +236,7 @@
@
click=
"showIcon = !showIcon"
@
click=
"showIcon = !showIcon"
>
>
<img
class=
"mr-1"
src=
"@/assets/images/header/EN.png"
alt=
"英文"
/>
<img
class=
"mr-1"
src=
"@/assets/images/header/EN.png"
alt=
"英文"
/>
<p
class=
"text-xs text-footer-color"
>
{{
$t
(
'lang.en'
)
}}
</p>
<p
class=
"text-xs text-footer-color"
>
{{
$t
(
"lang.en"
)
}}
</p>
<img
<img
class=
"mr-1"
class=
"mr-1"
width=
"10"
width=
"10"
...
@@ -206,14 +249,14 @@
...
@@ -206,14 +249,14 @@
@
hidden=
"showIcon = false"
@
hidden=
"showIcon = false"
@
selectIcon=
"
@
selectIcon=
"
(v) =>
{
(v) =>
{
iconType = v
iconType = v
;
}
}
"
"
>
</icon-select>
>
</icon-select>
</div>
</div>
<div
<div
class=
"mr-5 w-6 h-6"
class=
"mr-5 w-6 h-6"
@
click=
"
;(showMenu = !showMenu), (showIcon = false)
"
@
click=
"
(showMenu = !showMenu), (showIcon = false);
"
>
>
<img
<img
class=
"w-full h-full"
class=
"w-full h-full"
...
@@ -228,11 +271,11 @@
...
@@ -228,11 +271,11 @@
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
import
Vue
from
"vue"
;
import
IconSelect
from
'@/components/iconSelect.vue'
import
IconSelect
from
"@/components/iconSelect.vue"
;
import
Menu
from
'@/components/mobile/menu.vue'
import
Menu
from
"@/components/mobile/menu.vue"
;
import
{
checkIsMobile
}
from
'@/utils/utils'
import
{
checkIsMobile
}
from
"@/utils/utils"
;
import
moment
from
'moment'
import
moment
from
"moment"
;
export
default
Vue
.
extend
({
export
default
Vue
.
extend
({
components
:
{
components
:
{
IconSelect
,
IconSelect
,
...
@@ -242,52 +285,50 @@ export default Vue.extend({
...
@@ -242,52 +285,50 @@ export default Vue.extend({
return
{
return
{
isTop
:
true
,
isTop
:
true
,
showIcon
:
false
,
showIcon
:
false
,
iconType
:
'zh-CN'
,
iconType
:
"zh-CN"
,
showMenu
:
false
,
showMenu
:
false
,
}
}
;
},
},
methods
:
{
methods
:
{
closeMenu
(
v
:
boolean
)
{
closeMenu
(
v
:
boolean
)
{
this
.
showMenu
=
!
v
this
.
showMenu
=
!
v
;
},
},
},
},
computed
:
{
computed
:
{
isMobile
()
{
isMobile
()
{
return
checkIsMobile
()
return
checkIsMobile
()
;
},
},
},
},
mounted
()
{
mounted
()
{
const
scrollY
=
window
.
scrollY
const
scrollY
=
window
.
scrollY
;
const
type
=
this
.
$route
.
query
as
any
const
type
=
this
.
$route
.
query
as
any
;
this
.
iconType
=
this
.
iconType
=
type
.
lang
||
window
.
sessionStorage
.
getItem
(
'language'
)
||
'zh-CN'
type
.
lang
||
window
.
sessionStorage
.
getItem
(
"language"
)
||
"zh-CN"
;
window
.
sessionStorage
.
setItem
(
window
.
sessionStorage
.
setItem
(
'language'
,
"language"
,
window
.
sessionStorage
.
getItem
(
'language'
)
||
this
.
iconType
,
window
.
sessionStorage
.
getItem
(
"language"
)
||
this
.
iconType
)
);
this
.
$i18n
.
locale
=
this
.
iconType
===
'zh-CN'
?
'zh'
:
'en'
this
.
$i18n
.
locale
=
this
.
iconType
===
"zh-CN"
?
"zh"
:
"en"
;
this
.
isTop
=
scrollY
<
70
?
true
:
false
this
.
isTop
=
scrollY
<
70
?
true
:
false
;
window
.
addEventListener
(
'scroll'
,
()
=>
{
window
.
addEventListener
(
"scroll"
,
()
=>
{
const
scrollY
=
window
.
scrollY
const
scrollY
=
window
.
scrollY
;
this
.
isTop
=
scrollY
<
70
?
true
:
false
this
.
isTop
=
scrollY
<
70
?
true
:
false
;
})
});
moment
.
locale
(
this
.
iconType
===
'zh-CN'
?
'zh-cn'
:
'en'
)
moment
.
locale
(
this
.
iconType
===
"zh-CN"
?
"zh-cn"
:
"en"
);
document
.
title
=
`
${
this
.
$t
(
'lang.YUANLIAN'
)}
YCC——
${
this
.
$t
(
document
.
title
=
`
${
this
.
$t
(
"lang.YUANLIAN"
)}
YCC——
${
this
.
$t
(
"lang.title"
)}
`
;
'lang.title'
,
)}
`
},
},
watch
:
{
watch
:
{
$route
(
n
,
o
)
{
$route
(
n
,
o
)
{
const
scrollY
=
window
.
scrollY
const
scrollY
=
window
.
scrollY
;
this
.
iconType
=
this
.
iconType
=
window
.
sessionStorage
.
getItem
(
'language'
)
||
n
.
query
.
lang
||
'zh-CN'
window
.
sessionStorage
.
getItem
(
"language"
)
||
n
.
query
.
lang
||
"zh-CN"
;
moment
.
locale
(
this
.
iconType
===
'zh-CN'
?
'zh-cn'
:
'en'
)
moment
.
locale
(
this
.
iconType
===
"zh-CN"
?
"zh-cn"
:
"en"
);
this
.
isTop
=
scrollY
<
70
?
true
:
false
this
.
isTop
=
scrollY
<
70
?
true
:
false
;
window
.
addEventListener
(
'scroll'
,
()
=>
{
window
.
addEventListener
(
"scroll"
,
()
=>
{
const
scrollY
=
window
.
scrollY
const
scrollY
=
window
.
scrollY
;
this
.
isTop
=
scrollY
<
70
?
true
:
false
this
.
isTop
=
scrollY
<
70
?
true
:
false
;
})
})
;
},
},
},
},
})
})
;
</
script
>
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment