From e0e2a185af4167b1db5494541d6d353b49c016d4 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Sat, 13 Jul 2013 09:30:44 +0200 Subject: [PATCH] Added some marketing stuff to website --- jOOQ-website/.htaccess | 7 +- jOOQ-website/css/jooq.css | 92 +++++-- jOOQ-website/css/jquery.modal.css | 44 ++++ jOOQ-website/download.php | 34 +++ jOOQ-website/frame.php | 80 ++++++ jOOQ-website/js/jquery.cookie.js | 95 ++++++++ jOOQ-website/js/jquery.modal.js | 187 ++++++++++++++ jOOQ-website/registration-email-save.php | 14 ++ jOOQ-website/registration-email.php | 294 +++++++++++++++++++++++ jOOQ-website/users.csv | 0 10 files changed, 825 insertions(+), 22 deletions(-) create mode 100644 jOOQ-website/css/jquery.modal.css create mode 100644 jOOQ-website/js/jquery.cookie.js create mode 100644 jOOQ-website/js/jquery.modal.js create mode 100644 jOOQ-website/registration-email-save.php create mode 100644 jOOQ-website/registration-email.php create mode 100644 jOOQ-website/users.csv diff --git a/jOOQ-website/.htaccess b/jOOQ-website/.htaccess index 3031ea2c4c..de453bccb3 100644 --- a/jOOQ-website/.htaccess +++ b/jOOQ-website/.htaccess @@ -30,4 +30,9 @@ ErrorDocument 503 /e/503-service_unavailable.html RewriteEngine On RewriteBase / RewriteRule ^manual(.*)$ doc/2.4/manual$1 [L,R=301] -RewriteRule ^doc/latest/manual([^/]*)/(.*)$ doc/3.0/manual$1/$2 [L,R=307] \ No newline at end of file +RewriteRule ^doc/latest/manual([^/]*)/(.*)$ doc/3.0/manual$1/$2 [L,R=307] + + +Order Allow,Deny +Deny from all + \ No newline at end of file diff --git a/jOOQ-website/css/jooq.css b/jOOQ-website/css/jooq.css index f9bd237ede..5771898061 100644 --- a/jOOQ-website/css/jooq.css +++ b/jOOQ-website/css/jooq.css @@ -64,6 +64,22 @@ pre { text-align: left; } +button { + background: none repeat scroll 0 0 #333333; + border-width: 2px; + border-style: solid; + border-color: #000; + box-shadow: 5px 5px 20px #AAAAAA; + color: #F1F2F3; + display: block; + font-size: 12px; + line-height: 1.5em; + margin: 1.5em 0; + padding: 0.3em; + text-align: center; + width: 90%; +} + p { padding-left: 1em; padding-right: 1em; @@ -124,7 +140,22 @@ dl.toc dd.toc-main { padding-top: 1em; } -a, a:link, a:visited, a:hover, a:active { +button a, +button a:link, +button a:visited, +button a:hover, +button a:active { + color: #F1F2F3; + text-decoration: none; + text-shadow: 0 1px 2px #333333; +} + + +a, +a:link, +a:visited, +a:hover, +a:active { color: #000000; text-decoration: none; text-shadow: 0 1px 2px #333333; @@ -335,39 +366,58 @@ code { font-family: monospace; } +.row { + width: 100%; + margin-top: 0; + margin-left: auto; + margin-right: auto; + overflow: hidden; +} + +.col { + float: left; + margin: 0; + overflow: hidden; +} + +.col > * { + margin-right: 20px; +} + +.col .input, +.col select { + width: 90%; +} + +.col-1 { + width: 33%; +} + +.col-2 { + width: 66%; +} + +.col-3 { + width: 100%; +} + #intro { height: auto; margin-top: 40px; } #intro .row { - width: 100%; - margin-top: 0; - margin-left: auto; - margin-right: auto; margin-bottom: 30px; - overflow: hidden; } #intro .col { - float: left; height: 300px; - margin: 0; - overflow: hidden; } -#intro .col > * { - margin-right: 20px; +#registration { + height: auto; } -#intro .col-1 { - width: 33%; +#registration .row { + margin-bottom: 10px; } - -#intro .col-2 { - width: 66%; -} - -#intro .col-3 { - width: 100%; -} \ No newline at end of file diff --git a/jOOQ-website/css/jquery.modal.css b/jOOQ-website/css/jquery.modal.css new file mode 100644 index 0000000000..7f5c7fc840 --- /dev/null +++ b/jOOQ-website/css/jquery.modal.css @@ -0,0 +1,44 @@ +.modal { + display: none; + width: 400px; + background: #fff; + padding: 15px 30px; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + -o-border-radius: 8px; + -ms-border-radius: 8px; + border-radius: 8px; + -webkit-box-shadow: 0 0 10px #000; + -moz-box-shadow: 0 0 10px #000; + -o-box-shadow: 0 0 10px #000; + -ms-box-shadow: 0 0 10px #000; + box-shadow: 0 0 10px #000; +} + +.modal a.close-modal { + position: absolute; + top: -12.5px; + right: -12.5px; + display: block; + width: 30px; + height: 30px; + text-indent: -9999px; + background: url(close.png) no-repeat 0 0; +} + +.modal-spinner { + display: none; + width: 64px; + height: 64px; + position: fixed; + top: 50%; + left: 50%; + margin-right: -32px; + margin-top: -32px; + background: url(spinner.gif) #111 no-repeat center center; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + -o-border-radius: 8px; + -ms-border-radius: 8px; + border-radius: 8px; +} \ No newline at end of file diff --git a/jOOQ-website/download.php b/jOOQ-website/download.php index 00cb0707d2..6fe25cfa64 100644 --- a/jOOQ-website/download.php +++ b/jOOQ-website/download.php @@ -117,6 +117,40 @@ are some other products: created out of necessity, as jOOQ supports MySQL's (and other databases') unsigned integers

+ + + \ No newline at end of file diff --git a/jOOQ-website/frame.php b/jOOQ-website/frame.php index 4589015b01..3bc13117d7 100644 --- a/jOOQ-website/frame.php +++ b/jOOQ-website/frame.php @@ -37,8 +37,11 @@ function manualHeader($isSingle, $forVersion) { + + + @@ -60,7 +63,82 @@ function manualHeader($isSingle, $forVersion) { @@ -193,9 +271,11 @@ function manualHeader($isSingle, $forVersion) { +
The jOOQ Logo
diff --git a/jOOQ-website/js/jquery.cookie.js b/jOOQ-website/js/jquery.cookie.js new file mode 100644 index 0000000000..32badc56d7 --- /dev/null +++ b/jOOQ-website/js/jquery.cookie.js @@ -0,0 +1,95 @@ +/*! + * jQuery Cookie Plugin v1.3.1 + * https://github.com/carhartl/jquery-cookie + * + * Copyright 2013 Klaus Hartl + * Released under the MIT license + */ +(function (factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as anonymous module. + define(['jquery'], factory); + } else { + // Browser globals. + factory(jQuery); + } +}(function ($) { + + var pluses = /\+/g; + + function raw(s) { + return s; + } + + function decoded(s) { + return decodeURIComponent(s.replace(pluses, ' ')); + } + + function converted(s) { + if (s.indexOf('"') === 0) { + // This is a quoted cookie as according to RFC2068, unescape + s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); + } + try { + return config.json ? JSON.parse(s) : s; + } catch(er) {} + } + + var config = $.cookie = function (key, value, options) { + + // write + if (value !== undefined) { + options = $.extend({}, config.defaults, options); + + if (typeof options.expires === 'number') { + var days = options.expires, t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + + value = config.json ? JSON.stringify(value) : String(value); + + return (document.cookie = [ + config.raw ? key : encodeURIComponent(key), + '=', + config.raw ? value : encodeURIComponent(value), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + + // read + var decode = config.raw ? raw : decoded; + var cookies = document.cookie.split('; '); + var result = key ? undefined : {}; + for (var i = 0, l = cookies.length; i < l; i++) { + var parts = cookies[i].split('='); + var name = decode(parts.shift()); + var cookie = decode(parts.join('=')); + + if (key && key === name) { + result = converted(cookie); + break; + } + + if (!key) { + result[name] = converted(cookie); + } + } + + return result; + }; + + config.defaults = {}; + + $.removeCookie = function (key, options) { + if ($.cookie(key) !== undefined) { + // Must not alter options, thus extending a fresh object... + $.cookie(key, '', $.extend({}, options, { expires: -1 })); + return true; + } + return false; + }; + +})); \ No newline at end of file diff --git a/jOOQ-website/js/jquery.modal.js b/jOOQ-website/js/jquery.modal.js new file mode 100644 index 0000000000..130cc65efd --- /dev/null +++ b/jOOQ-website/js/jquery.modal.js @@ -0,0 +1,187 @@ +/* + A simple jQuery modal (http://github.com/kylefox/jquery-modal) + Version 0.5.3 +*/ +(function($) { + + var current = null; + + $.modal = function(el, options) { + $.modal.close(); // Close any open modals. + var remove, target; + this.$body = $('body'); + this.options = $.extend({}, $.modal.defaults, options); + if (el.is('a')) { + target = el.attr('href'); + //Select element by id from href + if (/^#/.test(target)) { + this.$elm = $(target); + if (this.$elm.length !== 1) return null; + this.open(); + //AJAX + } else { + this.$elm = $('
'); + this.$body.append(this.$elm); + remove = function(event, modal) { modal.elm.remove(); }; + this.showSpinner(); + el.trigger($.modal.AJAX_SEND); + $.get(target).done(function(html) { + if (!current) return; + el.trigger($.modal.AJAX_SUCCESS); + current.$elm.empty().append(html).on($.modal.CLOSE, remove); + current.hideSpinner(); + current.open(); + el.trigger($.modal.AJAX_COMPLETE); + }).fail(function() { + el.trigger($.modal.AJAX_FAIL); + current.hideSpinner(); + el.trigger($.modal.AJAX_COMPLETE); + }); + } + } else { + this.$elm = el; + this.open(); + } + }; + + $.modal.prototype = { + constructor: $.modal, + + open: function() { + this.block(); + this.show(); + if (this.options.escapeClose) { + $(document).on('keydown.modal', function(event) { + if (event.which == 27) $.modal.close(); + }); + } + if (this.options.clickClose) this.blocker.click($.modal.close); + }, + + close: function() { + this.unblock(); + this.hide(); + $(document).off('keydown.modal'); + }, + + block: function() { + this.$elm.trigger($.modal.BEFORE_BLOCK, [this._ctx()]); + this.blocker = $('
').css({ + top: 0, right: 0, bottom: 0, left: 0, + width: "100%", height: "100%", + position: "fixed", + zIndex: this.options.zIndex, + background: this.options.overlay, + opacity: this.options.opacity + }); + this.$body.append(this.blocker); + this.$elm.trigger($.modal.BLOCK, [this._ctx()]); + }, + + unblock: function() { + this.blocker.remove(); + }, + + show: function() { + this.$elm.trigger($.modal.BEFORE_OPEN, [this._ctx()]); + if (this.options.showClose) { + this.closeButton = $('' + this.options.closeText + ''); + this.$elm.append(this.closeButton); + } + this.$elm.addClass(this.options.modalClass + ' current'); + this.center(); + this.$elm.show().trigger($.modal.OPEN, [this._ctx()]); + }, + + hide: function() { + this.$elm.trigger($.modal.BEFORE_CLOSE, [this._ctx()]); + if (this.closeButton) this.closeButton.remove(); + this.$elm.removeClass('current').hide(); + this.$elm.trigger($.modal.CLOSE, [this._ctx()]); + }, + + showSpinner: function() { + if (!this.options.showSpinner) return; + this.spinner = this.spinner || $('
') + .append(this.options.spinnerHtml); + this.$body.append(this.spinner); + this.spinner.show(); + }, + + hideSpinner: function() { + if (this.spinner) this.spinner.remove(); + }, + + center: function() { + this.$elm.css({ + position: 'fixed', + top: "50%", + left: "50%", + marginTop: - (this.$elm.outerHeight() / 2), + marginLeft: - (this.$elm.outerWidth() / 2), + zIndex: this.options.zIndex + 1 + }); + }, + + //Return context for custom events + _ctx: function() { + return { elm: this.$elm, blocker: this.blocker, options: this.options }; + } + }; + + //resize is alias for center for now + $.modal.prototype.resize = $.modal.prototype.center; + + $.modal.close = function(event) { + if (!current) return; + if (event) event.preventDefault(); + current.close(); + var that = current.$elm; + current = null; + return that; + }; + + $.modal.resize = function() { + if (!current) return; + current.resize(); + }; + + $.modal.defaults = { + overlay: "#000", + opacity: 0.75, + zIndex: 1, + escapeClose: true, + clickClose: true, + closeText: 'Close', + modalClass: "modal", + spinnerHtml: null, + showSpinner: true, + showClose: true + }; + + // Event constants + $.modal.BEFORE_BLOCK = 'modal:before-block'; + $.modal.BLOCK = 'modal:block'; + $.modal.BEFORE_OPEN = 'modal:before-open'; + $.modal.OPEN = 'modal:open'; + $.modal.BEFORE_CLOSE = 'modal:before-close'; + $.modal.CLOSE = 'modal:close'; + $.modal.AJAX_SEND = 'modal:ajax:send'; + $.modal.AJAX_SUCCESS = 'modal:ajax:success'; + $.modal.AJAX_FAIL = 'modal:ajax:fail'; + $.modal.AJAX_COMPLETE = 'modal:ajax:complete'; + + $.fn.modal = function(options){ + if (this.length === 1) { + current = new $.modal(this, options); + } + return this; + }; + + // Automatically bind links with rel="modal:close" to, well, close the modal. + $(document).on('click.modal', 'a[rel="modal:close"]', $.modal.close); + $(document).on('click.modal', 'a[rel="modal:open"]', function(event) { + event.preventDefault(); + $(this).modal(); + }); +})(jQuery); \ No newline at end of file diff --git a/jOOQ-website/registration-email-save.php b/jOOQ-website/registration-email-save.php new file mode 100644 index 0000000000..dc09e08fc8 --- /dev/null +++ b/jOOQ-website/registration-email-save.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/jOOQ-website/registration-email.php b/jOOQ-website/registration-email.php new file mode 100644 index 0000000000..f5a2184861 --- /dev/null +++ b/jOOQ-website/registration-email.php @@ -0,0 +1,294 @@ +
+
+
Name
+
+
+
+
E-Mail
+
+
+
+
Country
+
+ +
+
+
+
Company Name
+
+
+
+
Company Size
+
+ +
+
+
+
Newsletter
+
+
+
+
 
+
+ +
+
+ +
+
+
\ No newline at end of file diff --git a/jOOQ-website/users.csv b/jOOQ-website/users.csv new file mode 100644 index 0000000000..e69de29bb2