Skip to content

Commit

Permalink
improve index and mobile sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed May 25, 2015
1 parent 0937302 commit 77fe36b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion themes/vue/layout/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
</script>

<div id="hero">
<a id="cn-link" href="http://cn.vuejs.org">中文版</a>
<div class="inner">
<ul id="nav">
<li><a href="/guide/" class="nav-link">Guide</a></li>
<li><a href="/api/" class="nav-link">API Reference</a></li>
<li><a href="/examples/" class="nav-link">Examples</a></li>
<li><a href="/blog/" class="nav-link">Blog</a></li>
<li><a href="http://cn.vuejs.org" class="nav-link">中文</a></li>
</ul>
<img id="logo" src="/images/logo.png">
<h1>Vue.js</h1>
Expand Down
9 changes: 8 additions & 1 deletion themes/vue/layout/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</script>
<%- css(isIndex ? 'css/index' : 'css/page') %>
<%- partial('partials/ga') %>
<script src="/js/vue.min.js"></script>
<script src="/js/vue.js"></script>
</head>
<body>
<div id="mobile-bar">
Expand All @@ -34,5 +34,12 @@
<% } else { %>
<%- body %>
<% } %>

<script src="https://cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
FastClick.attach(document.body);
}, false);
</script>
</body>
</html>
10 changes: 5 additions & 5 deletions themes/vue/source/css/page.styl
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,14 @@ $header-height = 40px
padding 60px 30px 20px
box-shadow 0 0 10px rgba(0,0,0,.2)
box-sizing border-box
transition transform .4s cubic-bezier(0.4, 0, 0, 1), -webkit-transform .4s cubic-bezier(0.4, 0, 0, 1)
transform translate(-110%,0)
-webkit-transform translate(-110%,0)
transition all .4s cubic-bezier(0.4, 0, 0, 1)
-webkit-transform translate(-280px, 0)
transform translate(-280px, 0)
.main-menu
display block
&.open
transform translate(0,0)
-webkit-transform translate(0,0)
-webkit-transform translate(0, 0)
transform translate(0, 0)
.content
&.with-sidebar
margin-left 0
Expand Down

0 comments on commit 77fe36b

Please sign in to comment.