Comments (7)
i would rather the <link rel="stylesheet" href="darkhttpd.css">
be included in darkhttpd source, so that each user can just read the docs and add an optional darkhttpd.css
. That's why i submitted an FR instead of just modifying my copy and moving on, assuming i could do it correctly since i don't write c. :)
thanks
from darkhttpd.
CSS will load with <link rel="stylesheet" href="darkhttpd.css">
and darkhttpd.css in the same directory.
from darkhttpd.
@guest271314 I guess i should have specified that i mean for the html that darkhttpd generates for serving whatever files happen to be in a directory, not serving my theoretical custom static html files. I'm using it for an alpine linux mirror, for example. i don't have any html it's serving. My understanding is that darkhttpd is generating it's own basic html to show the directories and package tarballs, and this FR asks that the <link rel="stylesheet" href="darkhttpd.css">
be added to that darkhttpd generation source code or a --css
flag added.
from darkhttpd.
I guess i should have specified that i mean for the html that darkhttpd generates for serving whatever files happen to be in a directory
I'm not familiar with that option.
I was just reading the source code at https://github.com/emikulic/darkhttpd/blob/master/darkhttpd.c#L1530-L1579 however I don't see a way to serve that by passing options.
from darkhttpd.
It looks like this is where the directory listing is generated
Lines 1966 to 2056 in 11d36de
<style>
element, then compile darkhttpd.from darkhttpd.
You probably want href="/absolute/path.css"
so that it also works from nested directories and not just the root.
This is starting to get into "darkhttpd is not intended to be a production webserver" territory though. Directory listings are meant to be quick and dirty so you can download one of a small number of files in a hurry. If you want stylized ones, at some point you should make your own and save them as a set of index.html
files.
from darkhttpd.
sure, my <link>
is really just an example to explain the FR. I know dir listings and the auto-generated html is supposed to be minimalist, and i can get behind that, but i can't predict these dirs, as they are pulled in from rsync'd remote source and just being able to control background color, font size, etc of the generated html would make a huge difference, with only the <link>
being added to darkhttpd source. I think users would like it, but it's up to you of course.
from darkhttpd.
Related Issues (20)
- Can not listen to IPv6 address. HOT 2
- darkhttp possibly logs incorrect size for requests.
- Skip link to parent directory when in root HOT 1
- macOS: Access to some macOS special files should be filtered out HOT 3
- PROPFIND / Read-Only WebDAV HOT 6
- Listen on IPv4 and IPv6 HOT 2
- Support FreeBSD 14+ chroot as non-root feature HOT 2
- Better argument parsing HOT 16
- Is the date header necessary? HOT 3
- Directory listings missing size in Kodi HOT 6
- With `--forward-https` set `client` ip from `X-Forwarded-For` HOT 1
- 500 for not found directory listing HOT 3
- Tests don't pass, but say they do
- --help / usage sorting is unintuitive HOT 1
- Update generated html HOT 5
- [FR] Print IEC formatted file sizes in directory listing HOT 4
- Use of stdout after fclose() HOT 2
- File starting with ' shows up before ../ in the directory listing (in rare cases) HOT 5
- Out-of-chroot pidfile handling? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from darkhttpd.