~lastrosade/jsthttpd

7cfaffd11f1a536136de38102922272faba80908 — Jeremy Lee Shields 1 year, 28 days ago b297c22
Banner and footer
1 files changed, 10 insertions(+), 8 deletions(-)

M src/libhttpd.c
M src/libhttpd.c => src/libhttpd.c +10 -8
@@ 2760,13 2760,15 @@ ls( httpd_conn* hc )
a { color: #00EE00; }\n\
.red { color: red }\n\
body { background-color: #101010; color: #eeeeee; -webkit-font-smoothing: none; padding: 0 5px; margin: 40px auto; max-width: 750px; line-height: 1.1; -webkit-font-smoothing: none;}\n\
fieldset { margin: 0; border: 12px groove #008080;}\n\
</style><link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\"/></head><body>\n\
<div id=\"particles-js\"></div>\n\
<h3><span class=\"red\">[</span>Index of %.80s<span class=\"red\">]</span></h3>\n\
<p>&nbsp;&nbsp;Navigate: <a href=\"/index.html\">homepage</a>%.80s</p>\n\
<fieldset><legend><h3><span class=\"red\">[</span>Index of %.80s<span class=\"red\">]</span></h3></legend>\n\
<pre>\n\
mode  links  bytes  last-changed  name\n\
<HR>",
		hc->encodedurl, hc->encodedurl );
		hc->encodedurl, hc->encodedurl, hc->encodedurl );

	    /* Read in names. */
	    nnames = 0;


@@ 2884,11 2886,11 @@ mode  links  bytes  last-changed  name\n\
		timestr[ 6] = ' ';
		if ( now - lsb.st_mtime > 60*60*24*182 )        /* 1/2 year */
		    {
		    timestr[ 7] = ' ';
		    timestr[ 8] = timestr[20];
		    timestr[ 9] = timestr[21];
		    timestr[10] = timestr[22];
		    timestr[11] = timestr[23];
		    timestr[ 7] = timestr[20];
		    timestr[ 8] = timestr[21];
		    timestr[ 9] = timestr[22];
		    timestr[10] = timestr[23];
		    timestr[11] = '.';
		    }
		else
		    {


@@ 2919,7 2921,7 @@ mode  links  bytes  last-changed  name\n\
		    nameptrs[i], linkprefix, link, fileclass );
		}

	    (void) fprintf( fp, "<script src=\"/scripts.js\"></script></pre></body>\n</html>\n" );
	    (void) fprintf( fp, "</pre></fieldset><hr><p>Powered by <a href=\"https://github.com/blueness/sthttpd\">sthttpd</a>, <a href=\"http://www.haproxy.org/\">Haproxy</a> and <a href=\"https://www.archlinux.org/\">Archlinux</a></p><script src=\"/scripts.js\"></script></body>\n</html>\n" );
	    (void) fclose( fp );
	    exit( 0 );
	    }