• Stars
    star
    184
  • Rank 209,187 (Top 5 %)
  • Language
    CSS
  • Created over 14 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pretty up your localhost. No more 1996 jank.

Windex

Make your localhost look nice with styled directory index pages. No more 1996 jank.

Features include:

  • SVG icons, sized pixel-perfect for 24x24 & multiples thereof
  • View HTML files without extensions: project/page.html at project/page
  • Nice mobile view with big tap targets

View Windex demo on CodePen

Windex screenshot

Install

Windex uses Apache.

Let's say your root folder used for localhost is ~/dev.

  1. Download or clone this project to the root folder: ~/dev/windex
  2. Move .htaccess to the root folder: ~/dev/.htaccess

.htaccess is a hidden file. You can copy it to its location in Terminal via the command line:

cd ~/dev
cp windex/.htaccess .

Setting up a practical localhost on macOS

I like to use localhost so I can view my projects in ~/dev. This allows me to create static sites that I can easily view in the browser, without having to start up a server. For example, going to localhost/masonry/sandbox allows me to see ~/dev/masonry/sandbox.

Below are instructions to set that up on macOS. This will make a single user's folder viewable for all users. For separate users folders like localhost/~username, view these instructions.


Open /etc/apache2/httpd.conf in your text editor. Making changes to this file will require administrator access. Change the following lines (line numbers may vary in your file):

Line 186: Enable mod_rewrite. This enables .htaccess files to rewrite URLs.

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

Lines 255-256: Change DocumentRoot and subsequent Directory to your desired directory. This sets localhost to point to the directory.

DocumentRoot "/Users/username/dev"
<Directory "/Users/username/dev">

Line 269: Within this <Directory> block, add Indexes to Options. This enables file index view.

    Options FollowSymLinks Multiviews Indexes

Line 277: Change AllowOverride value to All. This enables .htaccess files.

    AllowOverride All

That block should look like:

DocumentRoot "/Users/username/dev"
<Directory "/Users/username/dev">
    # Possible values for the Options directive...
    Options FollowSymLinks Multiviews Indexes
    MultiviewsMatch Any

    # AllowOverride controls what directives...
    AllowOverride All

    # Controls who can get stuff from this server.
    Require all granted
</Directory>

Save changes to httpd.conf. This may require macOS user approval.

In Terminal, start or restart apachectl.

sudo apachectl restart

View http://localhost in a browser. You'll should see the index page for ~/dev. Without Windex, it's ugly, but it works. With Windex, it's pretty.

If you messed up httpd.conf, you can replace it with its original at /etc/apache2/original/httpd.conf.

Viewing on other devices on macOS

You can view this localhost on another device like a phone.

  1. Open System Preferences. Select Sharing.
  2. Change Computer name to something rad, like thunderclaw, if you haven't already.
  3. Enable File sharing.

Now, you can view http://thunderclaw.local on another device if you are on the same Wi-Fi.

Alternatives

License

Windex is released under the MIT license. Have at it.


Made by David DeSandro

More Repositories

1

masonry

🏩 Cascading grid layout plugin
HTML
16,283
star
2

imagesloaded

📷 JavaScript is all like "You images done yet or what?"
JavaScript
8,878
star
3

draggabilly

👇 Make that shiz draggable
JavaScript
3,856
star
4

3dtransforms

📦 Introduction to CSS 3D transforms
CSS
1,011
star
5

classie

🎩 class helper functions
JavaScript
869
star
6

close-pixelate

Pixelate an image with <canvas> a la Chuck Close
JavaScript
725
star
7

colcade

Lightweight masonry layout
HTML
488
star
8

vanilla-masonry

[deprecated] Masonry layouts without any frameworks
JavaScript
327
star
9

practical-ui-physics

Learn basic physics for UI
JavaScript
324
star
10

breathing-halftone

Images go whoa with lots of floaty dots
JavaScript
254
star
11

arpeggiator

Web audio arpeggiator
JavaScript
176
star
12

get-size

📐 Measure elements
JavaScript
174
star
13

CSS3.tmbundle

TextMate bundle for new CSS3 properties. Includes vendor specific properties and HTML5 elements
108
star
14

jquery-bridget

🌉 bridget makes jQuery plugins
JavaScript
108
star
15

zui-site-riot

Tutorial for zoom-scrolling on 2011.beercamp.com
JavaScript
54
star
16

eventie

event binding helper
JavaScript
54
star
17

doc-ready

lets get this party started... on document ready
JavaScript
49
star
18

sticky-titles

iOS/Android-like fixied titles that scroll sorta
JavaScript
33
star
19

jumbyl

Post to Tumblr from the command line
JavaScript
31
star
20

neo-vision

Chrome extension that syntax-highlights source code files with customizable themes
JavaScript
30
star
21

matches-selector

👗 matchesSelector helper
JavaScript
29
star
22

v3.desandro.com

All about me! In orange!
JavaScript
20
star
23

dotfiles

Personalized settings for Terminal, Git, TextMate, etc.
Shell
20
star
24

masonry-docs

📝 Documentation for Masonry
Handlebars
20
star
25

textmate-bundles

My modifications to TextMate's bundles
HTML
19
star
26

v2.desandro.com

My personal site. Runs on Stacey CMS
PHP
18
star
27

curtis-css-typeface

type made with CSS shapes
CSS
18
star
28

transitn

JS utility class for CSS transitions
JavaScript
17
star
29

get-style-property

quick & dirty CSS property testing
JavaScript
16
star
30

welovemariokart

JavaScript
14
star
31

dropshado.ws

👻 blog about front-end development minutiae
JavaScript
13
star
32

smallblog

🐭 I don't know how to put this in words but this is me trying
CSS
9
star
33

ani-halftone

Animated halftones
JavaScript
9
star
34

typekit-table

Sort and filter high-quality fonts from Typekit
JavaScript
8
star
35

requirejs-bower-homework

Help me figure out this RequireJS business
JavaScript
7
star
36

jtetypes

Try out fonts by James T. Edmondson
JavaScript
7
star
37

lists

📜 of lists
7
star
38

motion-emotion

Presentation on CSS transitions and transforms
6
star
39

demo

Demos, tests, and misfit fun things
JavaScript
6
star
40

organize-bower-sources

Get Bower dependency source files, in order, listed by file extension.
JavaScript
5
star
41

nclud-v3-talk

Presentation outline for talk about nclud.com v3
JavaScript
5
star
42

issues-agreement

Help me dev you
5
star
43

touchy-feely-dev

Outline for presentation at Future Insights Live 2012
CSS
4
star
44

mcgilldesandro.com

I'm getting hitched. This is the website.
JavaScript
4
star
45

dotvim

Vim config
Vim Script
4
star
46

make-julesmarie-cry

A sadistic bookmarklet for "Click here" links
JavaScript
4
star
47

mobile-safari-machete

"Mobile Safari: Bring your machete" presentation from Front Trends 2012
JavaScript
4
star
48

prefs

Personal preferences
3
star
49

blahble

A boring Tumblr theme
HTML
3
star
50

open-source-aint-free

Talk for Valio Con 2012
JavaScript
3
star
51

concatminify.com

Help newbie devs learn concat & minify
CSS
3
star
52

bower-introduction

Notes for presentation
2
star
53

masonry-v2-3-shim

Maintain backwards compatibility using Masonry v3 with code for Masonry v2.
JavaScript
2
star
54

v4.desandro.com

Personal site
Handlebars
1
star
55

button-group

JavaScript
1
star