Skip to content

Commit

Permalink
Merge pull request #98 from eco/edit-online
Browse files Browse the repository at this point in the history
Add "Improve this page" button to let users easily make quick changes.
  • Loading branch information
andralex committed Mar 23, 2012
2 parents 2493e19 + e50061e commit 24f7615
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 11 deletions.
72 changes: 62 additions & 10 deletions css/style.css
Expand Up @@ -409,30 +409,82 @@ div#translate

div#tools
{
margin: -1.5em;
margin-bottom: 0;
margin-right: 0;
display: inline;
float: right;
margin: 0;
margin-top: -10px;
margin-right: -12px;
text-align: right;
}

div#tools span
div#tools > a.button
{
padding-left: 0.5em;
font-size: 0.8em;
font-style: italic;
color: #666;
-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
box-shadow:inset 0px 1px 0px 0px #ffffff;
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');
background-color:#ededed;
border:1px solid #dcdcdc;
display:inline-block;
color:#777777;
font-family:arial;
font-size:10px;
font-weight:bold;
padding:0px 6px;
text-decoration:none;
text-shadow:1px 1px 0px #ffffff;
}

div#tools a
div#tools > a.button:hover
{
color: #666;
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #dfdfdf), color-stop(1, #ededed) );
background:-moz-linear-gradient( center top, #dfdfdf 5%, #ededed 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf', endColorstr='#ededed');
background-color:#dfdfdf;
}

div#tools > a.button:active
{
position: relative;
top: 1px;
}

div#tools img
{
vertical-align: middle;
}

a.tip {
position: relative;
}

a.tip span {
display: none;
position: absolute;
top: 25px;
left: -50px;
width: 200px;
padding: 8px !important;
z-index: 100;
background: #000;
color: #eee !important;
font-style: normal !important;
font-size: 10px;
text-align: justify;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;

/* undo inherited attributes */
text-shadow: none;
}

a:hover.tip span {
display: block;
}


div#content li
{
Expand Down
13 changes: 12 additions & 1 deletion doc.ddoc
Expand Up @@ -100,7 +100,18 @@ $(FOOTER)
PAGE_TOOLS=
<div id="tools">
<!--span id="lastupdate">Last update $(DATETIME)</span-->
<span id="wiki"><a href="http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/$(WIKI)">Comment on this page</a></span>
<a href="https://github.com/D-Programming-Language/d-programming-language.org/edit/master/$(SRCFILENAME)" class="tip button">
Improve this page
<span>
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
</span>
</a>
<a href="http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/$(WIKI)" class="button">
Page wiki
</a>
</div>

GOOGLE_TRANSLATE=
Expand Down
18 changes: 18 additions & 0 deletions std.ddoc
Expand Up @@ -100,6 +100,7 @@ function listanchors()
$(NAVIGATION_PHOBOS)
</div><!--/navigation-->
<div id="content">
$(PAGE_TOOLS)
<h1>$(TITLE)</h1>
<div id=quickindex class=quickindex></div>
$(BODY)
Expand All @@ -115,6 +116,23 @@ Page generated by $(LINK2 http://www.digitalmars.com/d/2.0/ddoc.html, Ddoc).
</body>
</html>

PAGE_TOOLS=
<div id="tools">
<!--span id="lastupdate">Last update $(DATETIME)</span-->
<a href="https://github.com/D-Programming-Language/phobos/edit/master/$(SRCFILENAME)" class="tip button">
Improve this page
<span>
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
</span>
</a>
<a href="http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/$(WIKI)" class="button">
Page wiki
</a>
</div>

GOOGLE_FOOTER=
<br><br>
<br><br>
Expand Down

0 comments on commit 24f7615

Please sign in to comment.