Merging from upstream repo

This commit is contained in:
Jacob Gable 2013-05-14 10:11:08 -05:00
commit 7f7363c7fc
10 changed files with 208 additions and 317 deletions

View File

@ -1,3 +1,5 @@
[![Build Status](https://magnum.travis-ci.com/TryGhost/Ghost.png?token=hMRLUurj2P3wzBdscyQs&branch=master)](https://magnum.travis-ci.com/TryGhost/Ghost)
# Ghost
Welcome to the Ghost core repo. The code here is the result of a few stolen hours of free time hacking a proof of concept for the Kickstarter video. Pretty much everything is subject to and expected to change.

View File

@ -1,4 +1,4 @@
/*globals document, jQuery */
/*globals document, location, jQuery */
(function ($) {
"use strict";
@ -7,6 +7,7 @@
e.preventDefault();
$('.settings-menu .active').removeClass('active');
location.hash = $(this).attr('class'); // Placed here so never gets given the active attribute.
$(this).addClass('active');
$('.settings-content').fadeOut().delay(250);
@ -15,7 +16,20 @@
};
$(document).ready(function () {
if (location.hash) {
var page = $(".settings-menu li." + location.hash.replace('#', '')),
newPage = page.children('a').attr('href');
$('.settings-menu .active').removeClass('active');
page.addClass('active');
$('.settings-content').hide().delay(250);
$(newPage).show();
}
$('.settings-menu li').on('click', changePage);
$('input').iCheck({
checkboxClass: 'icheckbox_square-grey'
});
});
}(jQuery));

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -0,0 +1,62 @@
/* iCheck plugin Square skin, grey
----------------------------------- */
.icheckbox_square-grey,
.iradio_square-grey {
display: block;
margin: 0;
padding: 0;
width: 22px;
height: 22px;
background: url(grey.png) no-repeat;
border: none;
cursor: pointer;
float: left;
margin-right: 6px;
}
.icheckbox_square-grey {
background-position: 0 0;
}
.icheckbox_square-grey.hover {
background-position: -24px 0;
}
.icheckbox_square-grey.checked {
background-position: -48px 0;
}
.icheckbox_square-grey.disabled {
background-position: -72px 0;
cursor: default;
}
.icheckbox_square-grey.checked.disabled {
background-position: -96px 0;
}
.iradio_square-grey {
background-position: -120px 0;
}
.iradio_square-grey.hover {
background-position: -144px 0;
}
.iradio_square-grey.checked {
background-position: -168px 0;
}
.iradio_square-grey.disabled {
background-position: -192px 0;
cursor: default;
}
.iradio_square-grey.checked.disabled {
background-position: -216px 0;
}
/* Retina support */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (-moz-min-device-pixel-ratio: 1.5),
only screen and (-o-min-device-pixel-ratio: 3/2),
only screen and (min-device-pixel-ratio: 1.5) {
.icheckbox_square-grey,
.iradio_square-grey {
background-image: url(grey@2x.png);
-webkit-background-size: 240px 24px;
background-size: 240px 24px;
}
}

View File

@ -0,0 +1,11 @@
/*!
* iCheck v0.8.5 jQuery plugin, http://git.io/uhUPMA
*/
(function(f,m,z,u,k,r,l,n,D,t,v,s){function A(a,c,j){var d=a[0],b=/ble/.test(j)?r:k;active="update"==j?{checked:d[k],disabled:d[r]}:d[b];if(/^ch|di/.test(j)&&!active)w(a,b);else if(/^un|en/.test(j)&&active)x(a,b);else if("update"==j)for(var b in active)active[b]?w(a,b,!0):x(a,b,!0);else if(!c||"toggle"==j)c||a.trigger("ifClicked"),active?d[l]!==u&&x(a,b):w(a,b)}function w(a,c,j){var d=a[0],b=a.parent(),E=c==r?"enabled":"un"+k,n=e(a,E+g(d[l])),h=e(a,c+g(d[l]));if(!0!==d[c]&&!j&&(d[c]=!0,a.trigger("ifChanged").trigger("if"+
g(c)),c==k&&d[l]==u&&d.name)){j=a.closest("form");var p='input[name="'+d.name+'"]',p=j.length?j.find(p):f(p);p.each(function(){this!==d&&f(this).data(m)&&x(f(this),c)})}d[r]&&e(a,s,!0)&&b.find("."+m+"-helper").css(s,"default");b[t](h||e(a,c));b[v](n||e(a,E)||"")}function x(a,c,j){var d=a[0],b=a.parent(),f=c==r?"enabled":"un"+k,n=e(a,f+g(d[l])),h=e(a,c+g(d[l]));!1!==d[c]&&!j&&(d[c]=!1,a.trigger("ifChanged").trigger("if"+g(f)));!d[r]&&e(a,s,!0)&&b.find("."+m+"-helper").css(s,"pointer");b[v](h||e(a,
c)||"");b[t](n||e(a,f))}function F(a,c){a.data(m)&&(a.parent().html(a.attr("style",a.data(m).s||"").trigger(c||"")),a.off(".i").unwrap(),f('label[for="'+a[0].id+'"]').add(a.closest("label")).off(".i"))}function e(a,c,f){if(a.data(m))return a.data(m).o[c+(f?"":"Class")]}function g(a){return a.charAt(0).toUpperCase()+a.slice(1)}f.fn[m]=function(a,c){var j=navigator.userAgent,d=/ipad|iphone|ipod/i.test(j),b=":"+z+", :"+u,e=f(),g=function(a){a.each(function(){var a=f(this);e=a.is(b)?e.add(a):e.add(a.find(b))})};
if(/^(check|uncheck|toggle|disable|enable|update|destroy)$/.test(a))return g(this),e.each(function(){var d=f(this);"destroy"==a?F(d,"ifDestroyed"):A(d,!0,a);f.isFunction(c)&&c()});if("object"==typeof a||!a){var h=f.extend({checkedClass:k,disabledClass:r,labelHover:!0},a),p=h.handle,s=h.hoverClass||"hover",I=h.focusClass||"focus",G=h.activeClass||"active",H=!!h.labelHover,C=h.labelHoverClass||"hover",y=(""+h.increaseArea).replace("%","")|0;if(p==z||p==u)b=":"+p;-50>y&&(y=-50);g(this);return e.each(function(){var a=
f(this);F(a);var c=this,b=c.id,e=-y+"%",g=100+2*y+"%",g={position:"absolute",top:e,left:e,display:"block",width:g,height:g,margin:0,padding:0,background:"#fff",border:0,opacity:0},e=d||/android|blackberry|windows phone|opera mini/i.test(j)?{position:"absolute",visibility:"hidden"}:y?g:{position:"absolute",opacity:0},p=c[l]==z?h.checkboxClass||"i"+z:h.radioClass||"i"+u,B=f('label[for="'+b+'"]').add(a.closest("label")),q=a.wrap('<div class="'+p+'"/>').trigger("ifCreated").parent().append(h.insert),
g=f('<ins class="'+m+'-helper"/>').css(g).appendTo(q);a.data(m,{o:h,s:a.attr("style")}).css(e);h.inheritClass&&q[t](c.className);h.inheritID&&b&&q.attr("id",m+"-"+b);"static"==q.css("position")&&q.css("position","relative");A(a,!0,"update");if(B.length)B.on(n+".i mouseenter.i mouseleave.i "+D,function(b){var e=b[l],g=f(this);if(!c[r])if(e==n?A(a,!1,!0):H&&(/ve|nd/.test(e)?(q[v](s),g[v](C)):(q[t](s),g[t](C))),d)b.stopPropagation();else return!1});a.on(n+".i focus.i blur.i keyup.i keydown.i keypress.i",
function(b){var d=b[l];b=b.keyCode;if(d==n)return!1;if("keydown"==d&&32==b)return c[l]==u&&c[k]||(c[k]?x(a,k):w(a,k)),!1;if("keyup"==d&&c[l]==u)!c[k]&&w(a,k);else if(/us|ur/.test(d))q["blur"==d?v:t](I)});g.on(n+" mousedown mouseup mouseover mouseout "+D,function(b){var e=b[l],f=/wn|up/.test(e)?G:s;if(!c[r]){if(e==n)A(a,!1,!0);else{if(/wn|er|in/.test(e))q[t](f);else q[v](f+" "+G);if(B.length&&H&&f==s)B[/ut|nd/.test(e)?v:t](C)}if(d)b.stopPropagation();else return!1}})})}return this}})(jQuery,"iCheck",
"checkbox","radio","checked","disabled","type","click","touchbegin.i touchend.i","addClass","removeClass","cursor");

View File

@ -219,6 +219,89 @@
padding:40px;
@include breakpoint($netbook) { padding-left:15px; }
@include breakpoint($letterbox) { top: 0; }
.sub{
color: rgb(158, 157, 149);
padding-bottom: 20px;
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
border-color: -moz-use-text-color -moz-use-text-color #EDECE4;
border-image: none;
border-right: 0 none;
border-style: none none solid;
border-width: 0 0 1px;
margin-bottom: 0px;
}
ul.users{
list-style: none;
padding: 0px;
margin-top: 0px;
width: 75%;
clear: both;
li{
display: block;
width: 100%;
padding: 20px;
@include box-sizing(border-box);
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
border-color: -moz-use-text-color -moz-use-text-color #EDECE4;
border-image: none;
border-right: 0 none;
border-style: none none solid;
border-width: 0 0 1px;
&:last-child{
border: none;
}
.user_image{
float: left;
width: 40px;
height: 40px;
margin-right: 17px;
background-color: #ccc;
@include border-radius(20px);
img{
width: 40px;
height: 40px;
@include border-radius(20px);
}
}
.user_info{
float: left;
span{
display: block;
line-height: 1em;
&.name{
margin-top: 0.4em;
font-weight: bold;
font-size: 1.2em;
}
}
}
label{
float: right;
color: #fff;
padding: 4px 8px;
margin-right: 20px;
&.admin{
background-color: #DE523A;
}
&.editor{
background-color: #4A8CBD;
}
}
}
}
}
}//.settings-content

View File

@ -24,11 +24,13 @@
<!-- need per file scripts and styles :/ -->
<link rel="stylesheet" type="text/css" href="/core/admin/assets/lib/codemirror/codemirror.css"> <!-- TODO: Kill this - #29 -->
<link rel="stylesheet" type="text/css" href="/core/admin/assets/lib/icheck/css/icheck.css"> <!-- TODO: Kill this - #29 -->
<!-- jQuery is for all so here for now -->
<script type="text/javascript" src="/core/admin/assets/lib/jquery/jquery.min.js"></script>
<script type="text/javascript" src="/core/admin/assets/js/toggle.js"></script>
<script type="text/javascript" src="/core/admin/assets/js/admin-ui-temp.js"></script>
<script type="text/javascript" src="/core/admin/assets/lib/icheck/jquery.icheck.min.js"></script> <!-- The right place for this? -->
</head>
<body class="{{bodyClass}}">
{{> navbar}}

View File

@ -162,7 +162,39 @@
</section>
</header>
<section class="content">
<img src="/core/admin/assets/img/users.png" alt="users" style="width:900px;height:auto" />
<h6 class="sub">Invited Users</h6>
<ul class="users">
<li class="clearfix">
<div class="user_image"></div>
<div class="user_info">
<span class="name">Some Name</span>
<span class"timestamp">Invitation Sent: 7 hours ago</span>
</div>
</li>
</ul>
<h6 class="sub">Active Users</h6>
<ul class="users">
<li class="clearfix">
<div class="user_image">
<img src="/core/admin/assets/img/user.jpg" alt="user"/>
</div>
<div class="user_info">
<span class="name">Some Name</span>
<span class"timestamp">Last Seen: 7 hours ago</span>
</div>
<label class="admin">Admin</label>
</li>
<li class="clearfix">
<div class="user_image">
<img src="/core/admin/assets/img/user.jpg" alt="user"/>
</div>
<div class="user_info">
<span class="name">Some Name</span>
<span class"timestamp">Last Seen: 2 days ago</span>
</div>
<label class="editor">Editor</label>
</li>
</ul>
</section>
</section>
</div>

315
npm-shrinkwrap.json generated
View File

@ -1,315 +0,0 @@
{
"name": "tryghost",
"version": "0.0.1",
"dependencies": {
"express": {
"version": "3.1.0",
"from": "express@3.1.0",
"resolved": "https://registry.npmjs.org/express/-/express-3.1.0.tgz",
"dependencies": {
"connect": {
"version": "2.7.2",
"from": "connect@2.7.2",
"resolved": "https://registry.npmjs.org/connect/-/connect-2.7.2.tgz",
"dependencies": {
"qs": {
"version": "0.5.1",
"from": "qs@0.5.1"
},
"formidable": {
"version": "1.0.11",
"from": "formidable@1.0.11"
},
"bytes": {
"version": "0.1.0",
"from": "bytes@0.1.0"
},
"pause": {
"version": "0.0.1",
"from": "pause@0.0.1"
}
}
},
"commander": {
"version": "0.6.1",
"from": "commander@0.6.1"
},
"range-parser": {
"version": "0.0.4",
"from": "range-parser@0.0.4"
},
"mkdirp": {
"version": "0.3.3",
"from": "mkdirp@0.3.3"
},
"cookie": {
"version": "0.0.5",
"from": "cookie@0.0.5"
},
"buffer-crc32": {
"version": "0.1.1",
"from": "buffer-crc32@0.1.1"
},
"fresh": {
"version": "0.1.0",
"from": "fresh@0.1.0"
},
"methods": {
"version": "0.0.1",
"from": "methods@0.0.1"
},
"send": {
"version": "0.1.0",
"from": "send@0.1.0",
"dependencies": {
"mime": {
"version": "1.2.6",
"from": "mime@1.2.6"
}
}
},
"cookie-signature": {
"version": "0.0.1",
"from": "cookie-signature@0.0.1",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-0.0.1.tgz"
},
"debug": {
"version": "0.7.2",
"from": "debug@*"
}
}
},
"express-hbs": {
"version": "0.1.3-pre",
"from": "express-hbs@*",
"resolved": "https://registry.npmjs.org/express-hbs/-/express-hbs-0.1.3-pre.tgz"
},
"connect-flash": {
"version": "0.1.0",
"from": "connect-flash@",
"resolved": "https://registry.npmjs.org/connect-flash/-/connect-flash-0.1.0.tgz"
},
"css": {
"version": "1.0.7",
"from": "css@*",
"resolved": "https://registry.npmjs.org/css/-/css-1.0.7.tgz",
"dependencies": {
"css-parse": {
"version": "1.0.4",
"from": "css-parse@1.0.4",
"resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.0.4.tgz"
},
"css-stringify": {
"version": "1.0.4",
"from": "css-stringify@1.0.4",
"resolved": "https://registry.npmjs.org/css-stringify/-/css-stringify-1.0.4.tgz"
}
}
},
"moment": {
"version": "2.0.0",
"from": "moment@*",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.0.0.tgz"
},
"underscore": {
"version": "1.4.4",
"from": "underscore@*",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz"
},
"nodeunit": {
"version": "0.7.4",
"from": "nodeunit@",
"resolved": "https://registry.npmjs.org/nodeunit/-/nodeunit-0.7.4.tgz",
"dependencies": {
"tap": {
"version": "0.4.0",
"from": "tap@>=0.2.3",
"resolved": "https://registry.npmjs.org/tap/-/tap-0.4.0.tgz",
"dependencies": {
"inherits": {
"version": "1.0.0"
},
"yamlish": {
"version": "0.0.5"
},
"slide": {
"version": "1.1.3",
"from": "slide@*",
"resolved": "https://registry.npmjs.org/slide/-/slide-1.1.3.tgz"
},
"runforcover": {
"version": "0.0.2",
"from": "runforcover@~0.0.2",
"resolved": "https://registry.npmjs.org/runforcover/-/runforcover-0.0.2.tgz",
"dependencies": {
"bunker": {
"version": "0.1.2",
"from": "bunker@0.1.X",
"resolved": "https://registry.npmjs.org/bunker/-/bunker-0.1.2.tgz",
"dependencies": {
"burrito": {
"version": "0.2.12",
"from": "burrito@>=0.2.5 <0.3",
"resolved": "https://registry.npmjs.org/burrito/-/burrito-0.2.12.tgz",
"dependencies": {
"traverse": {
"version": "0.5.2",
"from": "traverse@~0.5.1",
"resolved": "https://registry.npmjs.org/traverse/-/traverse-0.5.2.tgz"
},
"uglify-js": {
"version": "1.1.1",
"from": "uglify-js@~1.1.1",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-1.1.1.tgz"
}
}
}
}
}
}
},
"nopt": {
"version": "2.1.1",
"from": "nopt@~2",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-2.1.1.tgz",
"dependencies": {
"abbrev": {
"version": "1.0.4",
"from": "abbrev@1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.4.tgz"
}
}
},
"mkdirp": {
"version": "0.3.5",
"from": "mkdirp@~0.3"
},
"difflet": {
"version": "0.2.3",
"from": "difflet@~0.2.0",
"resolved": "https://registry.npmjs.org/difflet/-/difflet-0.2.3.tgz",
"dependencies": {
"traverse": {
"version": "0.6.3",
"from": "traverse@0.6.x",
"resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.3.tgz"
},
"charm": {
"version": "0.0.8",
"from": "charm@0.0.x",
"resolved": "https://registry.npmjs.org/charm/-/charm-0.0.8.tgz"
}
}
},
"deep-equal": {
"version": "0.0.0",
"from": "deep-equal@~0.0.0",
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.0.0.tgz"
},
"buffer-equal": {
"version": "0.0.0",
"from": "buffer-equal@~0.0.0",
"resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.0.tgz"
},
"glob": {
"version": "3.1.21",
"from": "glob@~3.1.14",
"resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz",
"dependencies": {
"minimatch": {
"version": "0.2.11",
"from": "minimatch@~0.2.11",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.11.tgz",
"dependencies": {
"lru-cache": {
"version": "2.2.2",
"from": "lru-cache@2",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.2.tgz"
},
"sigmund": {
"version": "1.0.0",
"from": "sigmund@~1.0.0",
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz"
}
}
},
"graceful-fs": {
"version": "1.2.0",
"from": "graceful-fs@~1.2.0",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.0.tgz"
},
"inherits": {
"version": "1.0.0",
"from": "inherits@1",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz"
}
}
}
}
}
}
},
"showdown": {
"version": "0.3.1",
"from": "showdown@*",
"resolved": "https://registry.npmjs.org/showdown/-/showdown-0.3.1.tgz"
},
"sqlite3": {
"version": "2.1.7",
"from": "sqlite3@"
},
"jugglingdb": {
"version": "0.2.0-29",
"from": "jugglingdb@0.2.0-29",
"resolved": "https://registry.npmjs.org/jugglingdb/-/jugglingdb-0.2.0-29.tgz",
"dependencies": {
"inflection": {
"version": "1.2.5",
"from": "inflection@~1.2.5"
}
}
},
"jugglingdb-sqlite3": {
"version": "0.0.2",
"from": "jugglingdb-sqlite3@0.0.2",
"resolved": "https://registry.npmjs.org/jugglingdb-sqlite3/-/jugglingdb-sqlite3-0.0.2.tgz",
"dependencies": {
"jugglingdb": {
"version": "0.2.0-29",
"from": "jugglingdb@0.2.0-29",
"resolved": "https://registry.npmjs.org/jugglingdb/-/jugglingdb-0.2.0-29.tgz",
"dependencies": {
"inflection": {
"version": "1.2.5",
"from": "inflection@~1.2.5"
}
}
}
}
},
"handlebars": {
"version": "1.0.10",
"from": "handlebars@*",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-1.0.10.tgz",
"dependencies": {
"optimist": {
"version": "0.3.5",
"from": "optimist@~0.3",
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.5.tgz",
"dependencies": {
"wordwrap": {
"version": "0.0.2",
"from": "wordwrap@~0.0.2",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz"
}
}
},
"uglify-js": {
"version": "1.2.6",
"from": "uglify-js@~1.2",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.6.tgz"
}
}
}
}
}