├── .repo-rt ├── README.md ├── css ├── basic.css └── enhanced.css ├── images ├── bg-btn.png ├── bg-submit.gif ├── icon-generic.gif ├── icon-image.gif ├── icon-media.gif └── icon-zip.gif ├── index.html ├── js ├── example.js └── jQuery.fileinput.js └── license.txt /.repo-rt: -------------------------------------------------------------------------------- 1 | RETIRED 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | :warning: This project is archived and the repository is no longer maintained. 2 | 3 | # Code Examples from the book [Designing with Progressive Enhancement](http://filamentgroup.com/dwpe) 4 | 5 | [ ](http://www.filamentgroup.com/) 6 | 7 | This repository includes open-sourced code developed and maintained by Filament Group, Inc. as part of the book "Designing With Progressive Enhancement" (Peachpit). 8 | 9 | All examples use the [jQuery JavaScript library](http://jquery.com). 10 | 11 | These code examples use the [EnhanceJS framework](https://github.com/filamentgroup/EnhanceJS) for applying progressive enhancement based on browser capabilities testing. 12 | -------------------------------------------------------------------------------- /css/basic.css: -------------------------------------------------------------------------------- 1 | body { font-family: "Segoe UI", Arial, sans-serif; } 2 | label{ display:block; } -------------------------------------------------------------------------------- /css/enhanced.css: -------------------------------------------------------------------------------- 1 | body { font-size: 62.5%; margin: 50px; } 2 | fieldset { padding: .6em 0;border:0;border-top: 1px dotted #ddd; } 3 | legend { font-size: 1.5em; font-weight: bold; color: #555; padding: .5em 1em .5em 0; background: #fff; } 4 | label { font-size: 1.4em; display: block; margin: .5em 10px .5em 0; } 5 | input#upload { background: #aaa url(../images/bg-btn.png) bottom repeat-x; padding: .4em 1.2em;border: 1px solid #aaa; color: #222; font-size: 1.2em; font-weight: bold; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; cursor: pointer; margin: 2em 0; } 6 | input#upload:hover { background: #eee; color: #111; border-color:#777; } 7 | 8 | 9 | /*custom upload elements*/ 10 | .customfile-input { position: absolute; height: 100px; cursor: pointer; background: transparent; border: 0; opacity: 0; -moz-opacity: 0; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0); z-index: 999; } 11 | 12 | .customfile { width: 400px; background: #666; cursor: pointer; overflow: hidden; padding: 2px; border: 1px solid #444; -moz-border-radius:7px; -webkit-border-radius:7px; border-radius:7px; position: relative; } 13 | .customfile-disabled { opacity: .5; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0); cursor: default; } 14 | .customfile-feedback { display: block; margin: 1px 1px 1px 5px; font-size: 1.2em; color: #fff; font-style: italic; padding: .3em .6em; } 15 | .customfile-feedback-populated { color: #fff; font-style: normal; font-weight: bold; padding-left: 20px; background: url(../images/icon-generic.gif) left 4px no-repeat; } 16 | .customfile-button { border: 1px solid #999; background: #333 url(../images/bg-submit.gif) bottom repeat-x; color: #fff; font-weight: bold; float: right; width: 50px; padding: .3em .6em; text-align: center; text-decoration: none; font-size: 1.2em; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; } 17 | .customfile-hover .customfile-button, .customfile-focus .customfile-button { color:#111; background: #aaa url(../images/bg-btn.png) bottom repeat-x; border-color:#aaa; padding: .3em .6em; } 18 | .customfile-focus .customfile-button { outline: 1px dotted #ccc; } 19 | 20 | /*file type icons*/ 21 | .customfile-ext-jpg, .customfile-ext-gif, .customfile-ext-png, .customfile-ext-jpeg, .customfile-ext-bmp { background-image: url(../images/icon-image.gif);} 22 | .customfile-ext-mp3, .customfile-ext-mp4, .customfile-ext-mov, .customfile-ext-swf, .customfile-ext-wav, .customfile-ext-m4v { background-image: url(../images/icon-media.gif);} 23 | .customfile-ext-zip, .customfile-ext-tar, .customfile-ext-sit { background-image: url(../images/icon-zip.gif);} 24 | 25 | 26 | -------------------------------------------------------------------------------- /images/bg-btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filamentgroup/jQuery-Custom-File-Input/db6fbd6e1d6fee247974c152b47f04d99b1e0b26/images/bg-btn.png -------------------------------------------------------------------------------- /images/bg-submit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filamentgroup/jQuery-Custom-File-Input/db6fbd6e1d6fee247974c152b47f04d99b1e0b26/images/bg-submit.gif -------------------------------------------------------------------------------- /images/icon-generic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filamentgroup/jQuery-Custom-File-Input/db6fbd6e1d6fee247974c152b47f04d99b1e0b26/images/icon-generic.gif -------------------------------------------------------------------------------- /images/icon-image.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filamentgroup/jQuery-Custom-File-Input/db6fbd6e1d6fee247974c152b47f04d99b1e0b26/images/icon-image.gif -------------------------------------------------------------------------------- /images/icon-media.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filamentgroup/jQuery-Custom-File-Input/db6fbd6e1d6fee247974c152b47f04d99b1e0b26/images/icon-media.gif -------------------------------------------------------------------------------- /images/icon-zip.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filamentgroup/jQuery-Custom-File-Input/db6fbd6e1d6fee247974c152b47f04d99b1e0b26/images/icon-zip.gif -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |