├── .gitignore ├── info.php ├── img ├── icon-wp.png └── icon-gear.png ├── README.md ├── config.sample.php ├── css └── main.css └── index.php /.gitignore: -------------------------------------------------------------------------------- 1 | config.php -------------------------------------------------------------------------------- /info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /img/icon-wp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmall/LocalHomePage/HEAD/img/icon-wp.png -------------------------------------------------------------------------------- /img/icon-gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmall/LocalHomePage/HEAD/img/icon-gear.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### A Local Home Page for OSX Web Development 2 | 3 | This is a small and simple local home page that automatically lists, and provide links to, your local sites. It's a companion project for a [blog post](http://mallinson.ca/post/osx-web-development) I wrote about setting up your Mac for web development. 4 | 5 | 6 | * img/icon-gear.png from [Icons DB](http://www.iconsdb.com/black-icons/gear-2-icon.html) -------------------------------------------------------------------------------- /config.sample.php: -------------------------------------------------------------------------------- 1 | 'Tool', 'url' => 'http://example.com/' ), 39 | array( 'name' => 'Web Host Admin', 'url' => 'http://example.com/' ), 40 | array( 'name' => 'Github', 'url' => 'http://github.com/' ), 41 | ); 42 | 43 | /* 44 | * 45 | * Options for sites being displayed. These are completely optional, if you don't set 46 | * anything there are default options which will take over. 47 | * 48 | * If you only want to specify a display name for a site you can use the format: 49 | * 50 | * 'sitedir' => 'Display Name', 51 | * 52 | * Otherwise, if you want to set additional options you'll use an array for the options. 53 | * 54 | * 'sitedir' => array( 'displayname' => 'Display Name', 'adminurl' => 'http://example.sites.dev/admin' ), 55 | * 56 | */ 57 | $siteoptions = array( 58 | // 'dirname' => 'Display Name', 59 | // 'dirname' => array( 'displayname' => 'DisplayName', 'adminurl' => 'http://something/admin' ), 60 | 61 | ); 62 | 63 | /* 64 | * 65 | * Directory names of sites you want to hide from the page. If you're using multiple directories 66 | * in $dir be aware that any directory names in the array below that show up in any of 67 | * your directories will be hidden. 68 | * 69 | */ 70 | $hiddensites = array( 'home', ); -------------------------------------------------------------------------------- /css/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 0; 3 | margin: 0; 4 | } 5 | 6 | .canvas { 7 | width:75%; 8 | margin: 0; 9 | padding:15px 55px; 10 | background-color: #FFF; 11 | } 12 | 13 | ul { 14 | list-style: none; 15 | margin:10px 0 5px 0; 16 | padding: 0; 17 | } 18 | 19 | nav ul li { 20 | display: block; 21 | margin: 0; 22 | font-size: .8em; 23 | } 24 | 25 | 26 | li { 27 | font-size: 1rem; 28 | line-height: 1.8rem; 29 | font-family: helvetica, arial, sans-serif; 30 | } 31 | 32 | li a { 33 | text-decoration: none; 34 | color: #444; 35 | } 36 | 37 | .sites li { 38 | width: 100%; 39 | height: 2rem; 40 | position: relative; 41 | background-color: #F4F4F4; 42 | margin: 2px 0 2px 0; 43 | padding: 0; 44 | float: left; 45 | } 46 | 47 | .sites li:hover { 48 | background-color: #EEE; 49 | } 50 | 51 | 52 | .icon, .sites img { 53 | float: right; 54 | font-size: .7rem; 55 | display: inline-block; 56 | text-indent: -10000px; 57 | background-size: 1.2rem; 58 | background-repeat: no-repeat; 59 | background-position: center center; 60 | height: 2rem; 61 | width: 2rem; 62 | } 63 | 64 | .sites img, .sites .no-img { 65 | float: left; 66 | height: 2rem; 67 | width: 2rem; 68 | background-color: #EEE; 69 | } 70 | 71 | .sites .no-img { 72 | background-color: #999; 73 | } 74 | 75 | 76 | .wp { 77 | background-color: #21759a; 78 | background-image: url('/img/icon-wp.png'); 79 | } 80 | 81 | .site { 82 | padding: 0 10px; 83 | } 84 | 85 | .cf:before, 86 | .cf:after { 87 | content: " "; /* 1 */ 88 | display: table; /* 2 */ 89 | } 90 | 91 | .cf:after { 92 | clear: both; 93 | } 94 | 95 | 96 | 97 | 98 | @media all and (min-width: 699px) { 99 | 100 | body { 101 | background-color: #DDD; 102 | } 103 | 104 | .canvas { 105 | width:80%; 106 | margin: 20px auto; 107 | box-shadow: 0 0 20px #AAA; 108 | } 109 | 110 | .sites li { 111 | width: 45%; 112 | height: 2rem; 113 | position: relative; 114 | background-color: #F4F4F4; 115 | margin: 2px 3% 2px 0; 116 | padding: 0; 117 | float: left; 118 | } 119 | 120 | nav ul li { 121 | display: inline; 122 | margin: 5px 5px 5px 0; 123 | padding: 4px 12px; 124 | background-color: #EEE; 125 | border-radius: 2px; 126 | } 127 | 128 | 129 | 130 | } 131 | 132 | .admin { 133 | background-color: #000000; 134 | background-image: url('/img/icon-gear.png'); 135 | } 136 | 137 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 | 8 | 9 |