From 463553f8216029942e478f6be346897e8ce2c83d Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 15 Jul 2013 21:02:58 +0200 Subject: Add footer; move contact info to footer Signed-off-by: Florian Pritz --- application/config/config.php | 2 -- application/controllers/file.php | 15 +++++++- application/views/contact.php | 1 + application/views/file/upload_form.php | 3 -- application/views/footer.php | 15 ++++++++ application/views/header.php | 2 ++ data/css/style.css | 66 ++++++++++++++++++++++++++++++---- 7 files changed, 92 insertions(+), 12 deletions(-) create mode 100644 application/views/contact.php diff --git a/application/config/config.php b/application/config/config.php index 639e4e566..3ff8b816b 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -380,8 +380,6 @@ $config['actions_max_age'] = 60*60*24*5; // 5 days // won't be deleted $config['small_upload_size'] = 1024*10; // 10KB -$config['contact_me_url'] = ''; // ommiting this will remove the "contact me" line. - // for possible drivers look into ./application/libraries/Duser/drivers/ $config['authentication_driver'] = 'db'; diff --git a/application/controllers/file.php b/application/controllers/file.php index d0884e3f7..438a47590 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -349,7 +349,6 @@ class File extends CI_Controller { $this->data['small_upload_size'] = $this->config->item('small_upload_size'); $this->data['max_upload_size'] = $this->config->item('upload_max_size'); $this->data['upload_max_age'] = $this->config->item('upload_max_age')/60/60/24; - $this->data['contact_me_url'] = $this->config->item('contact_me_url'); $this->data['username'] = $this->muser->get_username(); @@ -681,6 +680,20 @@ class File extends CI_Controller { $this->_show_url($ids, $last_upload["lexer"]); } + function contact() + { + $file = FCPATH."data/local/contact-info.php"; + if (file_exists($file)) { + $this->data["contact_info"] = file_get_contents($file); + } else { + $this->data["contact_info"] = '

Contact info not available.

'; + } + + $this->load->view('header', $this->data); + $this->load->view('contact', $this->data); + $this->load->view('footer', $this->data); + } + /* Functions below this comment can only be run via the CLI * `php index.php file ` */ diff --git a/application/views/contact.php b/application/views/contact.php new file mode 100644 index 000000000..6497ab6a7 --- /dev/null +++ b/application/views/contact.php @@ -0,0 +1 @@ + diff --git a/application/views/file/upload_form.php b/application/views/file/upload_form.php index a83ca3c87..bc6362988 100644 --- a/application/views/file/upload_form.php +++ b/application/views/file/upload_form.php @@ -74,8 +74,5 @@

If you believe you deserve an account, ask someone who is already using this service to ">invite you.

- -

If you experience any problems feel free to contact me.

- diff --git a/application/views/footer.php b/application/views/footer.php index 973210d19..459b62959 100644 --- a/application/views/footer.php +++ b/application/views/footer.php @@ -4,6 +4,21 @@ if (is_cli_client() && !isset($force_full_html)) { } ?> +
+ + diff --git a/application/views/header.php b/application/views/header.php index deafa1ef5..ae6f037fb 100644 --- a/application/views/header.php +++ b/application/views/header.php @@ -24,6 +24,8 @@ if (is_cli_client() && !isset($force_full_html)) { +
+ diff --git a/data/css/style.css b/data/css/style.css index 52d84b505..cc2e00b12 100644 --- a/data/css/style.css +++ b/data/css/style.css @@ -4,10 +4,6 @@ margin-top: -20px; } -body { - padding-bottom: 30px; -} - @media (max-width: 767px) { .navbar-static-top { margin-left: 0; @@ -16,8 +12,8 @@ body { } @media (min-width: 980px) { - body { - padding-top: 60px; + #navbar-height { + height: 60px; } .anchor { @@ -66,6 +62,64 @@ code, pre, textarea { background: #fff; } +/* Sticky footer styles + * Source: http://twitter.github.io/bootstrap/examples/sticky-footer.html +-------------------------------------------------- */ +.footer { + background-color: #f5f5f5; + border-top: 1px solid #e5e5e5; + /*padding: 30px 0;*/ + /*margin-top: 70px;*/ + text-align: center; +} + + +html, +body { + height: 100%; + /* The html and body elements cannot have any padding or margin. */ +} + +/* Wrapper for page content to push down footer */ +#wrap { + min-height: 100%; + height: auto !important; + height: 100%; + /* Negative indent footer by it's height */ + margin: 0 auto -131px; +} + +/* Set the fixed height of the footer here */ +#footer { + height: 130px; +} + +/* Set to footer height + 70px "padding" */ +#push { + height: 200px; +} + +/* Lastly, apply responsive CSS fixes as necessary */ +@media (max-width: 767px) { + #footer { + margin-left: -20px; + margin-right: -20px; + padding-left: 20px; + padding-right: 20px; + } +} + +.footer-links { + margin: 10px 0; +} +.footer-links li { + display: inline; + padding: 0 2px; +} +.footer-links li:first-child { + padding-left: 0; +} + .paste-container { padding-top: 40px; background: #eee; -- cgit v1.2.3-24-g4f1b