Giter Site home page Giter Site logo

potherca / apachedirectorylisttheming Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 5.0 1.05 MB

A nicer looking directory listing for Apache using PHP, HTML, CSS and the Apache AutoIndex Module

Home Page: https://pother.ca/ApacheDirectoryListTheming/

License: GNU General Public License v3.0

CSS 5.62% PHP 55.60% Shell 1.67% JavaScript 24.56% HTML 12.55%

apachedirectorylisttheming's Introduction

apachedirectorylisttheming's People

Contributors

codelingobot avatar fossabot avatar imgbotapp avatar potherca avatar renovate-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

apachedirectorylisttheming's Issues

Improve the javascript for file name filter

The javascript for the filter currently only takes the "HTMLTable" format into account, not the other formats.

F=0 formats the listing as a simple list (not FancyIndexed)
F=1 formats the listing as a FancyIndexed list
F=2 formats the listing as an HTMLTable FancyIndexed list

See the apache manual for mod_autoindex for more information.

Replace thumbnail code with vendor

The logic in thumbnail.php, beyond controlling which action to take, should be replaced with a class wrapping vendor libraries.

As several different types of media need to be supported (see #5, #6, #7, #8 and other not yet named media types), several different libraries may need to be used.

For images Intervention/image seems a fine candidate. As this does not support PDF another package will be needed until it does. Maybe spatie/pdf-to-image ?

Other formats need to be looked into.

Action plan:

  • Separate / clean up thumbnail.php
  • Create a Provider interface and a concrete implementation (wrapping the Intervention/image library)
  • Find libraries than can (help) create images from other media types
    • Video
    • HTML
    • ?
  • Create a Provider for each MIME Type (use separate issues mentioned above to track)

Use SVG for thumbnail error Images

The current messy code using GD/Imagick could be simplified by creating an SVG instead.

This error image should work for all file tupes that thumbnails could be created for.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.


โš  Dependency Lookup Warnings โš 

  • Renovate failed to look up the following dependencies: bower-asset/bootstrap, bower-asset/fuelux, bower-asset/bootswatch.

Files affected: composer.json


This repository currently has no open or pending branches.

Detected dependencies

composer
composer.json
  • fxp/composer-asset-plugin ^1.1
  • bower-asset/bootstrap ^3.3
  • bower-asset/fuelux ^3.11
  • bower-asset/bootswatch ^3.3
  • intervention/image ^2.3
  • league/commonmark ^2.0.0
  • phptal/phptal ^1.3

  • Check this box to trigger a request for Renovate to run again on this repository

Clean up the code base

All of the code in the code-base (PHP, CSS) was cobbled together and never looked at again.

It really needs to be cleaned up and improved.

Steps to take are:

Clean up the Theming

  • Create separate directory for themes
  • Create a Base CSS for easier expansion
  • Cleanup CSS code into a theme extending the base
  • Document how to customize/expand the CSS theming
    For a reference see the IndexStyleSheet Directive in the Apache manual on mod_autoindex.

Clean up Logic

  • Place as much logic from the PHP files into src/Foo.php file, for re-use and testability
  • Add unit tests and refactor/clean up class(es) code has been moved to
  • Use actual templates for the HTML output so widget/plugins can be added (even if it is only on a per-page/as-needed basis)
  • Use Composer to pull in dependencies (like the markdown parser).
  • Move configurable items to a config file

Other

  • [ ] Add a mechanism to change the images used as icons Replaced by #13

That should make this ugly little project a lot more useful and a lot less ugly!

SensioLabsInsight

Add another theme

It would be nice to have an other theme than the current Firefox 3 based on.
Something similar to Github's could be nice, for a more similar feel between repo and local browsing?

Depends on #9

Place thumbnails in `/tmp` by default

Currently the preview thumbnails for images are placed under the project in a directory named thumbs. This should be changed to place the thumbnails in whatever sys_get_temp_dir() says is the temp folder.

Install instructions for `.htaccess`

There should also be install instructions for those that do not have access to the servers config files to do everything just using a .htaccess file. This is the main way others like Apaxy do things, so we might as well.

Add a mechanism to easily change icons

Currently the icons used are from the Famfamfam set. Besides having a slightly outdated look, there are 3 other drawbacks with the current approach:

  1. The icons are present in the repo instead of as a dependency, so updating icons requires a new release.
  2. Users do not have a choice in which iconset they use
  3. Switching icons is also cumbersome as it requires editing the directory_list_theming.conf file used by apache.

The first item can be easily resolved, the other two items will require some more thought (and work).

Parse markdown files and display as HTML

With minor adjustments (basically redirecting *.md files) Markdown files could be window dressed.

# display Markdown as HTML by default
RewriteEngine on
RewriteRule .+\.(markdown|mdown|md|mkd)$ markdown.php [L, QSA]

If the header.php is used/abused/copied, it count render markdown files in a similar fashion as is currently done with README files.

The only question would be how then to show the bare/raw file?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.