projects
/
mdref
/
mdref
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
2fca266
)
footer
author
Michael Wallner
<mike@php.net>
Fri, 22 Nov 2013 12:55:33 +0000
(13:55 +0100)
committer
Michael Wallner
<mike@php.net>
Fri, 22 Nov 2013 12:55:33 +0000
(13:55 +0100)
index.css
patch
|
blob
|
history
index.php
patch
|
blob
|
history
diff --git
a/index.css
b/index.css
index 0f33468f9d5a4f88c1eb8bf18110aaab3227172b..a48ac00cbe108890578606ee1001f2ed4bf40cd4 100644
(file)
--- a/
index.css
+++ b/
index.css
@@
-146,7
+146,17
@@
li h3 a:hover {
footer {
font-size: smaller;
text-align: center;
footer {
font-size: smaller;
text-align: center;
- word-spacing: 1em;
clear: both;
margin-top: 8em;
}
clear: both;
margin-top: 8em;
}
+
+footer ul {
+ margin: 0;
+ padding: 0;
+}
+
+footer li {
+ list-style-type: none;
+ display: inline-block;
+ margin: 0 1em;
+}
diff --git
a/index.php
b/index.php
index 5c4b909b5057fe201b23b09978d73c0a785222dd..5124243fd8f262da1d65191bf4596829e0dcf8ea 100644
(file)
--- a/
index.php
+++ b/
index.php
@@
-88,6
+88,16
@@
function urlpath($dir, $file) {
return (strlen($dir) ? $dir . "/" : "") . basename($file, ".md");
}
return (strlen($dir) ? $dir . "/" : "") . basename($file, ".md");
}
+function email($email) {
+ if (preg_match("/^([^<]+) <([^>]+)>/", $email, $matches)) {
+ list(, $name, $mail) = $matches;
+ return sprintf('<a href="mailto:%s">%s</a>',
+ htmlspecialchars($mail),
+ htmlspecialchars($name));
+ }
+ var_dump(sscanf($email, "%s <%s>"));
+}
+
function ls($dir) {
$dir = rtrim(is_dir($dir) ? $dir : dirname($dir) ."/". basename($dir, ".md"), "/");
printf("<ul>\n");
function ls($dir) {
$dir = rtrim(is_dir($dir) ? $dir : dirname($dir) ."/". basename($dir, ".md"), "/");
printf("<ul>\n");
@@
-206,7
+216,7
@@
ob_start($s);
</div>
<?php if ($p === "./") : ?>
<h1>Quick Markdown Documentation Browser</h1>
</div>
<?php if ($p === "./") : ?>
<h1>Quick Markdown Documentation Browser</h1>
- <p>
v<?php readfile("VERSION")?
></p>
+ <p>
<a href="https://github.com/m6w6/mdref">mdref-v<?php readfile("VERSION")?></a
></p>
<pre><?php
ob_start(function($s) {
return htmlspecialchars($s);
<pre><?php
ob_start(function($s) {
return htmlspecialchars($s);
@@
-221,12
+231,10
@@
ob_start($s);
<div id="disqus_thread"></div>
<footer>
<div id="disqus_thread"></div>
<footer>
- <a href="VERSION">Version</a>
- <a href="AUTHORS">Authors</a>
- <a href="LICENSE">License</a>
- <?php if ($p !== "./") : ?>
- <a href="https://github.com/m6w6/mdref/edit/master/<?=trim($p,"/")?>.md">Edit</a>
- <?php endif; ?>
+ <ul>
+ <li><a href="https://github.com/m6w6/mdref">mdref-v<?php readfile("VERSION")?></a></li>
+ <li><a href="LICENSE">© <?= implode("-", array_unique([2013,idate("Y")]))?></a></li>
+ </ul>
</footer>
<script src="index.js"></script>
<?php if ($_SERVER["SERVER_NAME"] != "localhost") : ?>
</footer>
<script src="index.js"></script>
<?php if ($_SERVER["SERVER_NAME"] != "localhost") : ?>