Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Lots of design stuff

  • Loading branch information...
commit b187008e0c71e119ea3e0fe12cbbe9e308fe5d8c 1 parent c2e067d
myfreeweb authored
View
5 static/modernizr.js
@@ -1,2 +1,3 @@
-/* Modernizr custom build of 1.7pre: csstransitions | iepp */
-window.Modernizr=function(a,b,c){function G(){}function F(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return!!E(d,b)}function E(a,b){for(var d in a)if(k[a[d]]!==c&&(!b||b(a[d],j)))return!0}function D(a,b){return(""+a).indexOf(b)!==-1}function C(a,b){return typeof a===b}function B(a,b){return A(o.join(a+";")+(b||""))}function A(a){k.cssText=a}var d="1.7pre",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v,w=function(a){var c=b.createElement("style"),d=b.createElement("div"),e;c.textContent=a+"{#modernizr{height:3px}}",h.appendChild(c),d.id="modernizr",g.appendChild(d),e=d.offsetHeight===3,c.parentNode.removeChild(c),d.parentNode.removeChild(d);return!!e},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div");var f=(d="on"+d)in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=C(e[d],"function"),C(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y=({}).hasOwnProperty,z;C(y,c)||C(y.call,c)?z=function(a,b){return b in a&&C(a.constructor.prototype[b],c)}:z=function(a,b){return y.call(a,b)},r.csstransitions=function(){return F("transitionProperty")};for(var H in r)z(r,H)&&(v=H.toLowerCase(),e[v]=r[H](),u.push((e[v]?"":"no-")+v));e.input||G(),e.crosswindowmessaging=e.postmessage,e.historymanagement=e.history,e.addTest=function(a,b){a=a.toLowerCase();if(!e[a]){b=!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b;return e}},A(""),j=l=null,f&&a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function p(a,b){var c=-1,d=a.length,e,f=[];while(++c<d)e=a[c],(b=e.media||b)!="screen"&&f.push(p(e.imports,b),e.cssText);return f.join("")}function o(a){var b=-1;while(++b<e)a.createElement(d[b])}var c="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",d=c.split("|"),e=d.length,f=new RegExp("(^|\\s)("+c+")","gi"),g=new RegExp("<(/*)("+c+")","gi"),h=new RegExp("(^|[^\\n]*?\\s)("+c+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),i=b.createDocumentFragment(),j=b.documentElement,k=j.firstChild,l=b.createElement("body"),m=b.createElement("style"),n;o(b),o(i),k.insertBefore(m,k.firstChild),m.media="print",a.attachEvent("onbeforeprint",function(){var a=-1,c=p(b.styleSheets,"all"),k=[],o;n=n||b.body;while((o=h.exec(c))!=null)k.push((o[1]+o[2]+o[3]).replace(f,"$1.iepp_$2")+o[4]);m.styleSheet.cssText=k.join("\n");while(++a<e){var q=b.getElementsByTagName(d[a]),r=q.length,s=-1;while(++s<r)q[s].className.indexOf("iepp_")<0&&(q[s].className+=" iepp_"+d[a])}i.appendChild(n),j.appendChild(l),l.className=n.className,l.innerHTML=n.innerHTML.replace(g,"<$1font")}),a.attachEvent("onafterprint",function(){l.innerHTML="",j.removeChild(l),j.appendChild(n),m.styleSheet.cssText=""})}(a,b),e._enableHTML5=f,e._version=d,g.className=g.className.replace(/\bno-js\b/,"")+" js "+u.join(" ");return e}(this,this.document)
+/* Modernizr custom build of 1.7pre: flexbox | cssgradients | csstransitions | iepp */
+/* Modernizr.load enabled */
+window.Modernizr=function(a,b,c){function G(){}function F(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return!!E(d,b)}function E(a,b){for(var d in a)if(k[a[d]]!==c&&(!b||b(a[d],j)))return!0}function D(a,b){return(""+a).indexOf(b)!==-1}function C(a,b){return typeof a===b}function B(a,b){return A(o.join(a+";")+(b||""))}function A(a){k.cssText=a}var d="1.7pre",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v,w=function(a){var c=b.createElement("style"),d=b.createElement("div"),e;c.textContent=a+"{#modernizr{height:3px}}",h.appendChild(c),d.id="modernizr",g.appendChild(d),e=d.offsetHeight===3,c.parentNode.removeChild(c),d.parentNode.removeChild(d);return!!e},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div");var f=(d="on"+d)in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=C(e[d],"function"),C(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y=({}).hasOwnProperty,z;C(y,c)||C(y.call,c)?z=function(a,b){return b in a&&C(a.constructor.prototype[b],c)}:z=function(a,b){return y.call(a,b)},r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";A((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return D(k.backgroundImage,"gradient")},r.csstransitions=function(){return F("transitionProperty")};for(var H in r)z(r,H)&&(v=H.toLowerCase(),e[v]=r[H](),u.push((e[v]?"":"no-")+v));e.input||G(),e.crosswindowmessaging=e.postmessage,e.historymanagement=e.history,e.addTest=function(a,b){a=a.toLowerCase();if(!e[a]){b=!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b;return e}},A(""),j=l=null,f&&a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function p(a,b){var c=-1,d=a.length,e,f=[];while(++c<d)e=a[c],(b=e.media||b)!="screen"&&f.push(p(e.imports,b),e.cssText);return f.join("")}function o(a){var b=-1;while(++b<e)a.createElement(d[b])}var c="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",d=c.split("|"),e=d.length,f=new RegExp("(^|\\s)("+c+")","gi"),g=new RegExp("<(/*)("+c+")","gi"),h=new RegExp("(^|[^\\n]*?\\s)("+c+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),i=b.createDocumentFragment(),j=b.documentElement,k=j.firstChild,l=b.createElement("body"),m=b.createElement("style"),n;o(b),o(i),k.insertBefore(m,k.firstChild),m.media="print",a.attachEvent("onbeforeprint",function(){var a=-1,c=p(b.styleSheets,"all"),k=[],o;n=n||b.body;while((o=h.exec(c))!=null)k.push((o[1]+o[2]+o[3]).replace(f,"$1.iepp_$2")+o[4]);m.styleSheet.cssText=k.join("\n");while(++a<e){var q=b.getElementsByTagName(d[a]),r=q.length,s=-1;while(++s<r)q[s].className.indexOf("iepp_")<0&&(q[s].className+=" iepp_"+d[a])}i.appendChild(n),j.appendChild(l),l.className=n.className,l.innerHTML=n.innerHTML.replace(g,"<$1font")}),a.attachEvent("onafterprint",function(){l.innerHTML="",j.removeChild(l),j.appendChild(n),m.styleSheet.cssText=""})}(a,b),e._enableHTML5=f,e._version=d,g.className=g.className.replace(/\bno-js\b/,"")+" js "+u.join(" ");return e}(this,this.document),function(a,b,c){function E(){var a=w;a.loader={load:D,i:0};return a}function D(a,b,c){var e=b=="c"?o:n;i=0,b=b||"j",r(a)?C(e,a,b,this.i++,d,c):h.splice(this.i++,0,a);return this}function C(a,c,d,f,g,j){function o(){!m&&x(k.readyState)&&(n.r=m=1,!i&&y(),k.onload=k.onreadystatechange=null,g.removeChild(k))}var k=b.createElement(a),m=0,n={t:d,s:c,e:j};k.src=k.data=c,k.width=k.height="0",a!="object"&&(k.type=d),k.onload=k.onreadystatechange=o,a=="img"?k.onerror=o:a=="script"&&(k.onerror=function(){n.r=1,B(1)}),h.splice(f,0,n),g.appendChild(k),(l&&a=="script"||a=="object")&&e(function(){m||(g.removeChild(k),n.r=n.e=m=1,y())},w.errorTimeout)}function B(a){var b=h.shift(),d=b?b.s:c,f=b?b.t:c;i=1,a&&d&&(b=h.shift(),d=c),b?d&&f=="j"?e(function(){z(b)},0):d&&f=="c"?A(b):(b(),y()):i=0}function A(a){var c=b.createElement("link"),g;c.href=a.s,c.rel="stylesheet",c.type="text/css",a.e||!m&&!j?(c.onload=function(){g||(g=1,e(function(){y()},0))},a.e&&c.onload()):function h(a){e(function(){if(!g)try{a.sheet&&a.sheet.cssRules&&a.sheet.cssRules.length?(g=1,y()):h(a)}catch(b){b.code==1e3||b.message.match(/security|denied/i)?(g=1,e(function(){y()},0)):h(a)}},0)}(c),e(function(){g||(g=1,d.removeChild(c),y())},w.errorTimeout),!a.e&&d.insertBefore(c,f)}function z(a){var c=b.createElement("script"),f;c.src=a.s,c.onreadystatechange=c.onload=function(){!f&&x(c.readyState)&&(f=1,y(),c.onload=c.onreadystatechange=null,!a.e&&d.removeChild(c))},e(function(){f||(f=1,d.removeChild(c),y())},w.errorTimeout),a.e?c.onload():d.appendChild(c)}function y(){var a=1,b=-1;while(h.length- ++b)if(h[b].s&&!(a=h[b].r))break;a&&B()}function x(a){return!a||a=="loaded"||a=="complete"}var d=b.documentElement,e=a.setTimeout,f=b.getElementsByTagName("head")[0],g=({}).toString,h=[],i=0,j="MozAppearance"in d.style,k=j&&!!a.Event.prototype.preventBubble,l=a.opera&&g.call(a.opera)=="[object Opera]",m="webkitAppearance"in d.style,n=l||j&&!k?"img":j?"object":"script",o=m?"img":n,p=Array.isArray||function(a){return g.call(a)=="[object Array]"},q=function(a){return typeof a=="object"},r=function(a){return typeof a=="string"},s=function(a){return g.call(a)=="[object Function]"},t=[],u={},v,w;w=function(a){function h(a,b){function i(a){if(r(a))g(a,f,b,0,c);else if(q(a))for(h in a)a.hasOwnProperty(h)&&g(a[h],f,b,h,c)}var c=!!a.test,d=c?a.yep:a.nope,e=a.load||a.both,f=a.callback,h;i(d),i(e),a.complete&&b.load(a.complete)}function g(a,b,d,e,g){var h=f(a),i=h.autoCallback;if(!h.bypass){b&&(b=s(b)?b:b[a]||b[e]||b[a.split("/").pop().split("?")[0]]);if(h.instead)return h.instead(a,b,d,e,g);d.load(h.url,h.forceCSS||!h.forceJS&&/css$/.test(h.url)?"c":c,h.noexec),(s(b)||s(i))&&d.load(function(){E(),b&&b(h.origUrl,g,e),i&&i(h.origUrl,g,e)})}}function f(a){var b=a.split("!"),c=t.length,d=b.pop(),e=b.length,f={url:d,origUrl:d,prefixes:b},g,h;for(h=0;h<e;h++)g=u[b[h]],g&&(f=g(f));for(h=0;h<c;h++)f=t[h](f);return f}var b,d,e=this.yepnope.loader;if(r(a))g(a,0,e,0);else if(p(a))for(b=0;b<a.length;b++)d=a[b],r(d)?g(d,0,e,0):p(d)?w(d):q(d)&&h(d,e);else q(a)&&h(a,e)},w.addPrefix=function(a,b){u[a]=b},w.addFilter=function(a){t.push(a)},w.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",v=function(){b.removeEventListener("DOMContentLoaded",v,0),b.readyState="complete"},0)),a.yepnope=w=E()}(this,this.document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))}
View
3  views/about.md
@@ -0,0 +1,3 @@
+is your personal private wiki &mdash; collection of linked notes in plain text, [Markdown](http://daringfireball.net/projects/markdown/syntax) and/or [Textile](http://textism.com/tools/textile/) stored in [Dropbox](http://db.tt/EnvkDxc) (a free web service for storing, syncing and sharing your files).
+
+Created by [Grigory V. (myfreeweb)](http://myfreeweb.ru) in 24 hours with [Ruby](http://ruby-lang.org), [Sinatra](http://sinatrarb.com), [Sequel](http://sequel.rubyforge.org), [Haml](http://haml-lang.com), [Sass](http://sass-lang.com)/[Compass](http://compass-style.org), [RDiscount](https://github.com/rtomayko/rdiscount), [RedCloth](http://redcloth.org) and hosted on [Heroku](http://heroku.com).
View
5 views/head.haml
@@ -1,3 +1,6 @@
%meta{:charset => "utf-8"}
%link{:rel => "stylesheet", :media => "screen", :href => "/screen.css"}
-%script{:type => "text/javascript", :src => "/modernizr.js"}
+%script{:type => "text/javascript", :src => "/modernizr.js"}
+- if @cur_page
+ :javascript
+ Modernizr.load({test: Modernizr.flexbox, nope: ['https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js', 'https://github.com/doctyper/flexie/raw/master/dist/flexie.min.js']})
View
6 views/js.haml
@@ -29,7 +29,7 @@
setTimeout(function() {
if(Modernizr.csstransitions) el.forEach(function(e){$dom.addClass(e,'fade')});
else el.forEach(function(e){$dom.transform(e,{opacity:0},600)});
- }, 1500);
+ }, 2000);
setTimeout(function() {
- el.forEach(function(e){e.outerHTML=''});
- }, 2100)
+ el.forEach(function(e){$dom.ancestor(e).removeChild(e)});
+ }, 2600);
View
7 views/landing.haml
@@ -3,6 +3,7 @@
%head
%title Wikibox
= haml :head
- %body
- %h1 Wikibox alpha
- %a{:href => "/auth"} Login with Dropbox
+ %body#landing
+ %h1 Wikibox
+ = markdown :about
+ %a#auth{:href => "/auth"} Login with Dropbox
View
2  views/pages.haml
@@ -3,7 +3,7 @@
%head
%title Wikibox
= haml :head
- %body.page
+ %body#page
= haml :header
#wrapper
%nav
View
61 views/screen.sass
@@ -1,4 +1,5 @@
@import compass/reset
+@import compass/reset/utilities
@import compass/utilities
@import compass/utilities/general/min
@import compass/utilities/general/clearfix
@@ -7,14 +8,18 @@
@import compass/utilities/links/unstyled-link
@import compass/css3/box
@import compass/css3/transition
+@import compass/css3/border-radius
+@import compass/css3/gradient
+
++reset-html5
$sidepad: 2em
+$col: #e80556
body
font: 16px "Helvetica Neue", sans-serif
a
- $col: #e80556
+link-colors($col, lighten($col, 25%), saturate($col, 40%))
+hover-link
@@ -22,10 +27,12 @@ body > header
padding: 0.5em $sidepad*0.6
border-bottom: #c4c4c4 solid 1px
font-size: 1.2em
+ overflow: hidden
h1
float: left
nav
text-align: right
+ width: 100%
.flash
padding: 0.8em $sidepad
@@ -44,9 +51,12 @@ body > header
.hidden
display: none
-.page
+#page
#wrapper
+display-box
+ +box-pack(start)
+ +box-orient(horizontal)
+ min-width: 90% /* damn gecko */
padding: 2em $sidepad 0
nav
+box-flex(1)
@@ -78,3 +88,50 @@ body > header
font:
weight: bold
size: 1.4em
+
+#landing
+ text-align: center
+ padding: 5em
+ h1
+ font-size: 3em
+ p
+ margin: 2em auto
+ width: 55%
+ #auth
+ display: block
+ width: 70%
+ margin: 0 auto
+ padding: 0.4em 0
+ font:
+ weight: bold
+ size: 2.5em
+ +border-radius(0.3em)
+ +linear-gradient(color-stops(lighten($col, 25%), darken($col, 20%)))
+ color: #fefefe
+ text-shadow: lighten($col, 10%) 0 1px
+
+.no-cssgradients #auth
+ background: url('http://webgradients.appspot.com/make?start=FC71A2&end=840331&height=80') repeat-x #840331
+
+#settings
+ & > h1
+ margin: 1em $sidepad
+ font:
+ weight: bold
+ size: 1.4em
+ label, input
+ float: left
+ margin-bottom: 0.6em
+ label
+ width: 35%
+ line-height: 1.25em
+ text-align: right
+ vertical-align: text-bottom
+ clear: left
+ input
+ width: 40%
+ button
+ display: block
+ margin-left: 35%
+ clear: left
+ font-size: 1.2em
View
2  views/settings.haml
@@ -3,7 +3,7 @@
%head
%title Settings / Wikibox
= haml :head
- %body.settings
+ %body#settings
= haml :header
%h1 Settings
%form{:method => "post", :action => ""}
Please sign in to comment.
Something went wrong with that request. Please try again.