Browse files

404-Bump Style

  • Loading branch information...
1 parent 9db4592 commit 2b1fd254769c469f069797cde79e2c870a7bb38d @atomicframeworks committed Jan 8, 2012
View
4 application/includes/jquery.php
@@ -0,0 +1,4 @@
+<?php
+ $src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js';
+ echo "<script type='text/javascript' src='{$src}'></script>";
+?>
View
168 application/views/headers/404.php
@@ -3,20 +3,172 @@
header($header);
$header = 'Status: 404 Not Found';
header($header);
+ $tTime = '2s';
+ $transition = 'ease-in-out';
//print_r(get_defined_vars());
?>
<html>
+ <head>
+ <?php include_once(DEFAULT_JQUERY); ?>
+
+ </head>
<body>
- <style>
- </style>
+ <style>
+ /* font */
+ @font-face {font-family: 'HelveticaNeue-Light'; src: url('<?php echo ASSET_HOST; ?>/ttf/HelveticaNeue-Light.otf'); }
- <h2>
- ERROR 404: Not Found
- </h2>
- The requested url <?php echo $_SERVER['REQUEST_URI']; ?> was not found on this server.
- </body>
-</html>
+ body {
+ text-align: center;
+ color: #737CA1;
+ font-family: 'HelveticaNeue-Light', 'Helvetica Neue', Helvetica, arial, sans-serif;
+ }
+
+ body h2 {
+ margin-bottom: 5px;
+ font-size: 36px;
+ }
+
+ body {
+ background: url("http://px.gaiabook.com/images/paper2.jpg");
+ -moz-background-size:100% 100%; /* Firefox 3.6 */
+ background-size:100% 100%;
+ background-repeat:no-repeat;
+ }
+
+ #floater {float:left; height:50%; margin-bottom:-120px;}
+ #content {clear:both; height:240px; position:relative;}
+
+ #fade {
+ -webkit-transition: opacity <?php echo $transition . ' ' . $tTime ?>;
+ -moz-transition: opacity <?php echo $transition . ' ' . $tTime ?>;
+ -o-transition: opacity <?php echo $transition . ' ' . $tTime ?>;
+ transition: opacity <?php echo $transition . ' ' . $tTime ?>;
+ opacity: 0;
+ }
+
+ #fade.focus{
+ -webkit-transition: opacity <?php echo $transition . ' ' . $tTime ?>;
+ -moz-transition: opacity <?php echo $transition . ' ' . $tTime ?>;
+ -o-transition: opacity <?php echo $transition . ' ' . $tTime ?>;
+ transition: opacity <?php echo $transition . ' ' . $tTime ?>;
+ opacity: 1;
+ }
+
+ .outside {
+ display: table;
+ height: 100%;
+ overflow: hidden;
+ text-align:center;
+ #position: relative;
+ }
+
+ .outside .inside {
+ display: table-cell;
+ vertical-align: middle;
+ #position: absolute;
+ #top: 50%;
+ }
+
+ .outside .inside .container {
+ #position: relative;
+ #top: -50%;
+ }
+
+ form input {
+ font-family: 'HelveticaNeue-Light', 'Helvetica Neue', Helvetica, arial, sans-serif;
+ /* Set all inputs to same height */
+ height: 40px;
+
+ /* Text */
+ font-weight: bold;
+
+ /* Borders */
+ border-radius: 10px;
+ border: 2px solid #00aeef;
+ }
+
+ form input.button {
+ /* Text */
+ text-transform: uppercase;
+ font-size: 14px;
+ color: #ffffff;
+ /* Borders */
+ border: 2px solid #00aeef;
+ background-color: #00aeef;
+ padding: 0px 18px 0px 20px;
+ /* Gradient for Submit button in form*/
+ /* 100% black to 100% white 25% opacity */
+ background-color: #00aeef;
+ background-image: -moz-linear-gradient(top, rgba(255,255,255,0.25) 0%, rgba(0,0,0,0.25) 100%); /* FF3.6+ */
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.25)), color-stop(100%,rgba(0,0,0,0.25))); /* Chrome,Safari4+ */
+ background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.25) 0%,rgba(0,0,0,0.25) 100%); /* Chrome10+,Safari5.1+ */
+ background-image: -o-linear-gradient(top, rgba(255,255,255,0.25) 0%,rgba(0,0,0,0.25) 100%); /* Opera 11.10+ */
+ background-image: -ms-linear-gradient(top, rgba(255,255,255,0.25) 0%,rgba(0,0,0,0.25) 100%); /* IE10+ */
+ background-image: linear-gradient(top, rgba(255,255,255,0.25) 0%,rgba(0,0,0,0.25) 100%); /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff00aeef', endColorstr='#ff0082b3',GradientType=0 ); /* IE6-9 */
+ }
+
+ /* Pressed submit button in .footer form */
+ form input.button.pressed {
+ border: 2px solid #0089d0;
+ background-color: #0089d0;
+ }
+
+ </style>
+ <center>
+ <div class="outside" style="">
+ <div class="inside">
+ <div class="container" style="">
+ <div id="fade">
+ <h2>
+ <img src="<?php echo ASSET_HOST; ?>/images/404_img_24.png" />
+ <br />
+ Sorry!
+ </h2>
+ The requested url <?php echo $_SERVER['REQUEST_URI']; ?> was not found on this server.
+ <br/>
+ <br/>
+ <form action="<?php echo ASSET_HOST; ?>/mvc/<?php echo DEFAULT_CONTROLLER . DS . DEFAULT_VIEW ?>" method="post">
+ <input type="submit" name="submit" value="Home" class="button" />
+ </form>
+ </div>
+
+ </div>
+ </div>
+ </div>
+
+ </center>
+
+ <script type="text/javascript">
+
+ $(document).ready(function() {
+ // Fade in items in fade div
+ $("#fade").css('opacity',1);
+
+
+ // Toggle pressed button class on mouse down & up
+ $(".button").bind('mousedown mouseup',
+ function (){
+ $(this).toggleClass('pressed');
+ }
+ );
+
+ // Remove pressed button class on mouse leave
+ $(".button").bind('mouseleave',
+ function (){
+ $(this).removeClass('pressed');
+ }
+ );
+
+
+ });
+
+ </script>
+
+
+ </body>
+</html>
<?php die;?>
View
3 application/views/proxies/select.php
@@ -19,8 +19,7 @@
background-color:rgb(237, 236, 236);
}
</style>
-
- <form method="get" action="../<?php echo $controller->database . DS ;?>show">
+ <form method="get" action="<?php echo ASSET_HOST . DS . 'mvc' . DS . $controller->database . DS ;?>show">
Query: <input type="text" size="100" maxlength="100" name="query" value='select INET_NTOA(ip) as ip, id, port, http_code, last_update from proxies where country = "China"'> <br />
<input type="submit" value="query">
</form>
View
14 config/config.php
@@ -1,17 +1,19 @@
<?php
- //// Global config vars
- define('DEVELOPMENT_ENVIRONMENT',true);
+ //// Global config options
+ define('DEVELOPMENT_ENVIRONMENT',false);
- define('DB_USERNAME', 'password');
- define('DB_PASSWORD', 'username');
+ define('DB_USERNAME', 'username');
+ define('DB_PASSWORD', 'password');
define('DB_HOST', 'localhost');
define('DEFAULT_CONTROLLER', 'proxies');
define('DEFAULT_VIEW', 'select');
define('DEFAULT_404_HEADER', '404');
define('DEFAULT_503_HEADER', '503');
- define('DEFAULT_TEXT_HEADER', 'txt');
+ define('DEFAULT_TEXT_HEADER', 'txt');
+
+ define('DEFAULT_JQUERY', ROOT . DS . 'application' . DS . 'includes/jquery.php');
-
+ define('ASSET_HOST', 'http://'.$_SERVER['HTTP_HOST']);
View
BIN images/404_img_24.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/404_img_8.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/paper.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
2 index.php
@@ -1,10 +1,8 @@
<?php
-
//// Globals
define('DS', DIRECTORY_SEPARATOR);
define('ROOT', dirname(__FILE__));
-
//// Load up our bootstrap (which loads config & shared files)
require_once (ROOT . DS . 'library' . DS . 'bootstrap.php');
View
22 js/input.js
@@ -0,0 +1,22 @@
+$(document).ready(function() {
+
+ // Set input box to clear and focus
+ $(".inputBox").click(function (){$(this).val('');$(this).focus();});
+ // Set input box to reset if empty on blur
+ $(".inputBox").blur(function (){ if ($(this).val() === ''){$(this).val('Enter Email');}});
+
+ // Toggle pressed button class on mouse down & up
+ $(".button").bind('mousedown mouseup',
+ function (){
+ $(this).toggleClass('pressed');
+ }
+ );
+
+ // Remove pressed button class on mouse leave
+ $(".button").bind('mouseleave',
+ function (){
+ $(this).removeClass('pressed');
+ }
+ );
+
+});
View
101 js/slideshow.js
@@ -0,0 +1,101 @@
+ $(document).ready(function() {
+ // New array to hold preloaded images
+ var imageSrcArray = [];
+
+ // Populate image array
+ // Foreach element in list -- push img reference to imageSrcArray
+ $(".active").parent().children().each(
+ function(){
+ //access to form element via $(this)
+ var src = $(this).attr("data-imgref");
+ imageSrcArray.push(src);
+ }
+ );
+ // Preload image our populated image array
+ preload(imageSrcArray);
+
+ // Replace imgref attr with our preloaded image array [index]
+ $(".active").parent().children().each(
+ function(index){
+ //access to form element via $(this)
+ //console.log(imageSrcArray[index]);
+ $(this).attr("data-imgref",imageSrcArray[index]);
+ }
+ );
+
+ $activeElement = $(".active");
+ $("li").click( function(){
+ clickDot(this);
+ });
+ // Start slideShow
+ loopShow($activeElement);
+ });
+
+ // Time before initiating next slide click
+ var waitTime = 7000;
+
+ // Time to complete fade
+ var fadeTime = 333;
+
+ var next;
+ function loopShow(eleIn){
+ //console.log('Starting loop: '+eleIn);
+ setTimeout(function (){loop(eleIn.next())},waitTime);
+ }
+
+ // Recursive Loop Function -
+ // Trigger click on next element. Set new next element. Loop.
+ function loop(eleIn){
+ //console.log('Continue loop: '+eleIn);
+ eleIn.trigger('click');
+ next = eleIn.next();
+
+ // Check if last element
+ if (next.length == 0){
+ // Get the first element of our parent container
+ next = $(".active").parent().children(":first");
+ //console.log('End of elements. Setting to first.');
+ }
+ // Continue loop
+ setTimeout(function (){loop(next)},waitTime);
+ }
+
+ // slideShow Nav - li - Click event function
+ function clickDot(clickEleIn){
+ // Wrap clicked element
+ eleIn = $(clickEleIn);
+
+ // Check if clicking already active
+ if (eleIn.attr("class") === 'active'){
+ return;
+ }
+
+ // Set next in loop
+ next = eleIn.next();
+ if (next.length == 0){
+ // Get the first element of our parent container
+ next = $(".active").parent().children(":first");
+ //console.log('End of elements. Setting next element to first in sequence.');
+ }
+
+ // Deactivate current
+ $('.active').attr("class", "");
+ // Activate new
+ eleIn.attr("class", "active");
+
+ // Fade out current
+ $(".slideShow").fadeOut(fadeTime, 'swing', function() {
+ // Swap img src
+ $(".slideShow").attr("src",eleIn.attr("data-imgref"));
+ // Fade in new
+ $(".slideShow").fadeIn(fadeTime, 'swing', function() {
+ });
+
+ });
+ }
+
+ function preload(arrayOfImages) {
+ $(arrayOfImages).each(function(){
+ $('<img/>')[0].src = this;
+ });
+}

0 comments on commit 2b1fd25

Please sign in to comment.