Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Moecube Store
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Moecube Store
Commits
920e9978
Commit
920e9978
authored
Mar 07, 2017
by
2breakegg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导航条
parent
756dacc7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
28 deletions
+84
-28
src/App.css
src/App.css
+48
-0
src/App.js
src/App.js
+7
-1
src/Nav.js
src/Nav.js
+29
-27
No files found.
src/App.css
View file @
920e9978
...
...
@@ -92,3 +92,51 @@
padding-bottom
:
0px
;
}
.square
{
padding-right
:
20px
;
float
:
right
;
cursor
:
pointer
;
font-size
:
22px
;
color
:
#aaa
;
}
.square
:hover
{
color
:
#fff
;
}
.caidan
{
z-index
:
1
;
width
:
100%
;
position
:
fixed
;
top
:
64px
;
}
.caidan
li
{
line-height
:
40px
;
height
:
40px
;
padding
:
0
20px
;
color
:
white
;
background
:
#404040
;
border-top
:
#777
solid
1px
;
font-size
:
14px
;
}
.caidan
li
:hover
{
background
:
#777
;
}
.chidden
{
animation
:
downotup
0.5s
;
-webkit-animation
:
downotup
0.5s
;
transform
:
translate
(
0
,
-1000px
)
}
.cshow
{
animation
:
uptodown
0.5s
;
-webkit-animation
:
uptodown
0.5s
;
transform
:
translate
(
0
,
0px
)
}
@keyframes
uptodown
{
from
{
transform
:
translate
(
0
,
-1000px
)}
to
{
transform
:
translate
(
0
,
0px
)}
}
@keyframes
downotup
{
from
{
transform
:
translate
(
0
,
0px
)}
to
{
transform
:
translate
(
0
,
-1000px
)}
}
\ No newline at end of file
src/App.js
View file @
920e9978
...
...
@@ -98,9 +98,15 @@ export default class App extends Component {
return
(
<
Layout
>
<
Header
style
=
{{
position
:
'
fixed
'
,
zIndex
:
'
9
'
,
width
:
'
100%
'
}}
>
{
!
isMobile
?
(
<
Header
style
=
{{
width
:
'
100%
'
}}
>
<
Nav_Mobile
isMobile
=
{
isMobile
}
/
>
<
/Header>
)
:
(
<
Header
style
=
{{
width
:
'
100%
'
,
padding
:
0
}}
>
<
Nav_Mobile
isMobile
=
{
isMobile
}
/
>
<
/Header
>
)}
<
Content
className
=
"
App-Content1
"
>
{
!
isMobile
?
...
...
src/Nav.js
View file @
920e9978
import
React
from
'
react
'
import
{
Menu
,
Icon
,
Dropdown
}
from
'
antd
'
import
{
FormattedMessage
}
from
'
react-intl
'
// const SubMenu = Menu.SubMenu;
// const MenuItemGroup = Menu.ItemGroup;
export
default
class
Nav_Mobile
extends
React
.
Component
{
handleClick
=
(
e
)
=>
{
console
.
log
(
'
click
'
,
e
);
constructor
(
props
){
super
(
props
);
this
.
state
=
{
classCaidan
:
false
,
};
}
caidan
=
()
=>
{
this
.
setState
({
classCaidan
:
!
this
.
state
.
classCaidan
});
}
render
()
{
const
menu
=
(
<
Menu
style
=
{{
width
:
'
100%
'
}}
>
<
Menu
.
Item
key
=
"
0
"
>
<
a
href
=
"
#
"
>
1
st
menu
item
<
/a
>
<
/Menu.Item
>
<
Menu
.
Item
key
=
"
1
"
>
<
a
href
=
"
#
"
>
2
nd
menu
item
<
/a
>
<
/Menu.Item
>
<
Menu
.
Divider
/>
<
Menu
.
Item
key
=
"
3
"
>
3
d
menu
item
<
/Menu.Item
>
<
/Menu
>
)
var
classCaidan
=
this
.
state
.
classCaidan
;
if
(
!
this
.
props
.
isMobile
){
return
(
<
div
>
...
...
@@ -48,19 +41,28 @@ export default class Nav_Mobile extends React.Component{
);
}
else
{
return
(
<
div
>
<
div
className
=
"
App-Logo
"
>
<
img
alt
=
"
img
"
src
=
{
require
(
"
../public/logo.png
"
)}
style
=
{{
width
:
'
45px
'
,
margin
:
'
10px
'
}}
/
>
<
span
>
MoeCube
<
/span>
<
div
>
<
div
style
=
{{
position
:
'
fixed
'
,
zIndex
:
10
,
width
:
'
100%
'
,
background
:
'
#404040
'
}}
>
<
div
className
=
"
App-Logo
"
>
<
img
alt
=
"
img
"
src
=
{
require
(
"
../public/logo.png
"
)}
style
=
{{
width
:
'
45px
'
,
margin
:
'
10px
'
}}
/
>
<
span
>
MoeCube
<
/span>
<
/div
>
<
div
className
=
"
square
"
onClick
=
{
this
.
caidan
}
>
<
Icon
type
=
"
down-circle-o
"
/>
<
/div
>
<
/div
>
<
Dropdown
overlay
=
{
menu
}
trigger
=
{[
'
click
'
]}
>
<
a
className
=
"
ant-dropdown-link
"
href
=
"
#
"
>
Click
me
<
Icon
type
=
"
down
"
/>
<
ul
className
=
{
classCaidan
?
"
caidan cshow
"
:
"
caidan chidden
"
}
>
<
a
href
=
"
#
"
>
<
li
>
<
FormattedMessage
id
=
{
"
Home
"
}
/>
<
/li>
<
/a
>
<
/Dropdown
>
<
a
href
=
"
https://ygobbs.com/
"
>
<
li
>
<
FormattedMessage
id
=
{
"
BBS
"
}
/
>
<
/li
>
<
/a
>
<
/ul
>
<
/div
>
)
}
...
...
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