Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an "Edit this page" button to docs pages #134

Merged
merged 3 commits into from
Nov 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions _includes/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="edit-page-btn">
<a href="https://github.com/thelounge/thelounge.github.io/edit/master/{{ page.path }}">
Edit this page
</a>
</div>

<h1>{{ page.title }}</h1>

{{ content }}
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ <h1>Search results</h1>
<div id="accessible-search-summary" aria-live="assertive" class="sr-only"></div>
</div>


<div id="content">
{{ content }}
</div>

<footer id="footer">
<div class="container">
<div class="row">
Expand Down
18 changes: 7 additions & 11 deletions _layouts/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@
layout: default
---

<div id="docs">
<div id="main" class="container">
<div class="row">
<aside id="sidebar" class="col-sm-3">
{% include menu.html %}
</aside>
<div class="col-sm-9 content">
<h1>{{ page.title }}</h1>

{{ content }}
</div>
<div id="main" class="container">
<div class="row">
<aside class="col-sm-3">
{% include menu.html %}
</aside>
<div class="col-sm-9">
{% include page.html %}
</div>
</div>
</div>
7 changes: 7 additions & 0 deletions _layouts/fullwidth.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: default
---

<div id="main" class="container">
{% include page.html %}
</div>
41 changes: 18 additions & 23 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ body {
margin-bottom: 100px;
}
a {
color: inherit;
color: #84ce88;
font-weight: bold;
}
a:hover,
a:focus {
color: inherit;
text-decoration: none;
color: #84ce88;
outline: 0;
}
h2 {
Expand All @@ -65,15 +65,6 @@ h2 {
p {
line-height: 1.5;
}
li a,
p a {
color: #84ce88;
font-weight: bold;
}
li a:hover,
p a:hover {
color: #77ca7b;
}
li {
line-height: 1.5;
margin: 6px 0;
Expand Down Expand Up @@ -282,19 +273,13 @@ img {
#features .feature {
padding-bottom: 20px;
}
#docs {
padding-top: 40px;
}
#main h1:first-child,
#main p {
margin-top: 0;
}
#main h1,
#main h2,
#main h3 {
margin: 1.3em 0 .5em;
}
#main h1 {
margin-top: 0;
font-size: 2.5em;
}
#main h2 {
Expand All @@ -304,15 +289,16 @@ img {
#main h3 {
margin-bottom: 13px;
}
#menu,
#main .content {
#main {
margin-bottom: 60px;
}
#menu {
margin-top: 35px;
line-height: 2;
}
#menu a,
#menu strong {
#menu a {
color: inherit;
font-weight: normal;
display: block;
}
#menu a:hover,
Expand Down Expand Up @@ -409,6 +395,7 @@ img {

h2 a.link-anchor,
h3 a.link-anchor {
color: inherit;
opacity: 0;
transition: opacity .2s;
}
Expand Down Expand Up @@ -477,6 +464,14 @@ a.link-anchor {
font-weight: bold;
}

/* "Edit on GitHub" button */

.edit-page-btn {
text-align: right;
margin-top: 15px;
font-size: .9em;
}

/* Rouge syntax highlighting - Igorpro theme */
.highlight table td { padding: 5px; }
.highlight table pre { margin: 0; }
Expand Down