Skip to content

Commit

Permalink
Add edit link to each page
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy351 committed May 7, 2014
1 parent 5fef5dd commit 33dd84a
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 11 deletions.
7 changes: 0 additions & 7 deletions themes/hexo3/layout/_partial/banner.ejs

This file was deleted.

8 changes: 7 additions & 1 deletion themes/hexo3/layout/api/layout.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
layout: layout
---
<article class="api">
<%- partial('_partial/banner', {banner_title: 'API Reference'}) %>
<header id="page-banner">
<div class="outer">
<div class="inner">
<h1 id="page-title">API Reference</h1>
</div>
</div>
</header>
<div class="outer">
<div id="mobile-menu-wrap"></div>
<div class="page-content"><%- body %></div>
Expand Down
9 changes: 8 additions & 1 deletion themes/hexo3/layout/page.ejs
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<article class="page">
<%- partial('_partial/banner', {banner_title: page.title}) %>
<header id="page-banner">
<div class="outer">
<div id="page-banner-inner" class="inner">
<h1 id="page-title"><%= page.title %></h1>
<a href="https://github.com/hexojs/site/blob/master/source/<%- page.path.replace(/\.html$/, '.md') %>" title="Improve this doc" id="page-edit-link"></a>
</div>
</div>
</header>
<div class="outer">
<div id="mobile-menu-wrap"></div>
<div class="page-content">
Expand Down
28 changes: 26 additions & 2 deletions themes/hexo3/source/css/_partial/page.styl
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,42 @@ note-info = hsl(200, 100%, 50%)
note-warn = hsl(0, 100%, 50%)

#page-banner
// background: url("images/shattered.png") #ddd
background-color: #ddd
image: "images/shattered.png"
padding: 40px 0
@media mq-mobile
padding: 30px 0

.page-title
#page-banner-inner
position: relative

#page-title
color: #555
font: 300 35px font-title
text-shadow: 1px 0 #eee

#page-edit-link
color: #aaa
text-shadow: 1px 0 #eee
width: 24px
height: @width
line-height: @width
text-align: center
text-decoration: none
transition: color 0.2s
position: absolute
top: 0
bottom: 0
right: 0
margin: auto
&:hover
color: #888
&:before
content: "\f040"
font: @width font-icon
@media mq-mobile
display: none

.page-content
column(9)
float: right
Expand Down

0 comments on commit 33dd84a

Please sign in to comment.