"Coming soon" placeholder generator: ComingSoon
Are you working on many web development projects and registering their domains, but don't have anything to show there until it's ready? Are you tired of the nineties animated placeholders with "Under Construction" festering on an incomplete site?
ComingSoon generates a stylish, minimalistic HTML 5 "coming soon" placeholder. An image is centered in the page, with optional comments above and below the image.
Additionally, ComingSoon allows you to handle your own server and client error codes in a standardized manner, rather than defaulting to the web server's built-in messages.
Default index page:
Default error page:
ComingSoon has no library dependencies, but does require Apache (for
.htaccess) and PHP.
Place the contents of ComingSoon in the target web root. If you are not
using the root, you will have to modify the
.htaccess to reflect the proper location.
There are two configuration files; one for the index page, and one for the error page.
Each configuration file has the following format:
global $_CONFIG; $_CONFIG = array(); // All relative URLs will be converted to absolute URLs $_CONFIG['base_url'] = '/comingsoon/'; // Style sheet, relative to css directory from base_url; required $_CONFIG['stylesheet'] = 'comingsoon.css'; // Favorites icon, relative to images directory from base_url; optional, but highly recommended $_CONFIG['favicon'] = 'favicon.ico'; // Page description; optional $_CONFIG['meta_description'] = 'This site has not yet launched.'; // Page keywords, comma separated, no spaces; optional $_CONFIG['meta_keywords'] = ''; // Page title; required $_CONFIG['title'] = 'Placeholder - coming soon...'; // Photo; required // -- Filename, relative to images directory from base_url $_CONFIG['photo']['filename'] = 'placeholder.png'; // -- Alt text $_CONFIG['photo']['alt'] = 'Placeholder'; // -- Height in pixels $_CONFIG['photo']['height_px'] = 72; // -- Width in pixels $_CONFIG['photo']['width_px'] = 493; // Google Analytics Account ID; optional $_CONFIG['google_analytics_account_id'] = ''; // Top caption; optional // -- Content $_CONFIG['caption_top']['content'] = '<h1>Coming soon...</h1>'; // -- CSS Height, include units $_CONFIG['caption_top']['height'] = '100px'; // Bottom caption; optional // -- Content $_CONFIG['caption_bottom']['content'] = '<h2>Stay tuned for details.</h2>'; $_CONFIG['caption_bottom']['content'] .= '<div>This site has not yet launched.</div>'; // -- CSS Height, include units $_CONFIG['caption_bottom']['height'] = '100px';
For maximum flexibility, both the index and error pages can have their own stylesheet, image and favicon.
If you replace the image, remember to adjust the
as the dimensions, alternate text and filename will have changed and are used
to correctly render the page.
Error code handling
.htaccess file contains Apache ErrorDocument Directives that direct
the client to the local error handler.
You may wish to customize the status messages to something more touchy-feely if the minimalistic "accurate but cold" approach isn't best suited for your needs.
.htaccess vs Apache configuration
If you have access to your Apache configuration and are looking for
the optimization of avoiding .htaccess execution, you can copy
ErrorDocument directives in the following format:
<Directory /web/docs> ErrorDocument 404 /comingsoon/error.php </Directory>
Validation and compatibility
The layout and rendering look fine in Firefox 5 and Internet Explorer 9. The vertical lines are off by a pixel or two in Chrome 13.
The ComingSoon source code is hosted on GitHub.
Please use the issue tracker if you find any bugs or wish to contribute.
Copyright (c) 2011 Jon Peck (FluxSauce.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.