Skip to content

nrjmadan/localhost-styler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

localhost-styler

Utility to browse through localhost

As a web designer, with multiple local wordpress installations, I find myself browsing localhost on various devices over wifi network. The native look generated by the browser isn't the one I prefer. localhost-styler is intended to provide an asthetically pleasing interface for browsing files being served through php servers.

alt text

Installation

Copy index.php and localhost-styler to your MAMP root folder.

Note: If your root folder already has index.php file, you could rename localhost-styler's index.php to something else (as you please) and supply the new name to index.php as $primary_filename under options.

Eg. Rename index.php to localhost.php and set $primary_filename = 'localhost.php';

Now you can access localhost-styler from http://<your-localhost-address>/localhost.php

Options:

  1. Hide some filenames/directories (from all directories)
  2. Set $hide_files = true;
  3. Specify which filenames to hide in $hidden array.
$hidden = array(
'.DS_Store',
'localhost-styler'
);
  1. Highlight some filenames/directories (in all directories)
  2. Set $highlight_files = true;
  3. Specify which filenames to hide in $highlight array.
$highlight = array(
'index.html',
'index.php',
);
  1. Detect if index files are present in directories. If directory has an index file, a special icon appears on directory icon.

  2. Set $detect_index_file = true;

  3. Use index file (if present), instead of browsing the directory with localhost-styler.

  4. Set $use_index_file = true;

Note: If you have security concerns regarding your files being copied by others over shared network, I'ld advise you not to use the utility. If you are using localhost-styler for viewing files over shared wi-fi, anyone who types in your ip address in their browser will also be viewing the same files (in the same view as available to you). So use the options accordingly. One of the workarounds is to give index.php a custom name, since index.php is loaded by default, while a custom name would have to be guessed.

On the other hand, you could share files inside your localhost root folder, over shared networks, by giving your ip address and localhost styler's index filename to your friends. :)

About

Utility to browse through localhost

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published