Various Improvements:

- Metatags based on subblog and/or article
 - Drawer close button
 - RCC: media upload
 - RCC subpages: back button
This commit is contained in:
mmk2410 2015-11-22 00:59:07 +01:00
parent c910225e7d
commit c242062cd9
12 changed files with 216 additions and 26 deletions

View file

@ -97,7 +97,6 @@ body{
height: 100%;
top: 0;
left: -301px;
padding-top: 64px;
z-index: 40;
}
@ -113,6 +112,15 @@ body{
transition: background-color 125ms ease-in-out 0ms;
}
.nav-close {
cursor: pointer;
}
.nav-close-img{ /* the hamburger icon */
height: 35px;
padding: 12px;
}
.nav-item{ /* additional setting for clickable nav items */
cursor: pointer;
}
@ -229,6 +237,15 @@ body{
.nav{ /* always show navigation bar */
left: 0;
padding-top: 64px;
}
.nav-close-img {
display: none;
}
.nav-close {
display: none;
}
.nav-img{ /* always hide navigation bar icon*/

60
res/img/close-dark.svg Normal file
View file

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
fill="#000000"
height="48"
viewBox="0 0 24 24"
width="48"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="close-dark.svg">
<metadata
id="metadata12">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs10" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="3830"
inkscape:window-height="2074"
id="namedview8"
showgrid="false"
inkscape:zoom="13.906433"
inkscape:cx="-29.993443"
inkscape:cy="32.765779"
inkscape:window-x="0"
inkscape:window-y="81"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<path
d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
id="path4"
style="fill:#565656;fill-opacity:1" />
<path
d="M0 0h24v24H0z"
fill="none"
id="path6" />
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -40,7 +40,7 @@ var main = function () { // main function; called below
);
var navOpen = false; // nav hidden at begin
$('.nav-img, .overlay').click( // action on hamburger click
$('.nav-img, .overlay, .nav-close').click( // action on hamburger click
function () {
if (!(navOpen)) { // if nav is hidden
openNav(); // open the nav drawer

View file

@ -133,4 +133,20 @@ class ArticleGenerator
return $tags; // remove that array
}
/**
* A function to get an article title as a string
*
* @param string $directory The directory where the article files are stored
* @param string $articlefile The name of the article file
* @return string
*/
function getTitle($directory, $articlefile)
{
$article = file_get_contents($directory . $articlefile); // get the article
if (substr($article, 0, 6) == "%TITLE") { // detect and remove the title
$title = substr($article, 8, strpos($article, "\n") - 8); // get this title
return $title; // remove that array
}
}
}