Merge pull request #2397 from manuelmitasch/ember-add-assets

Ember.js: Add assets img + css (ember-hacks.css) to ember admin
This commit is contained in:
Hannah Wolfe 2014-03-15 18:48:50 +00:00
commit 22fe020d7c
14 changed files with 36 additions and 49 deletions

1
.gitignore vendored
View File

@ -38,6 +38,7 @@ projectFilesBackup
/core/clientold/assets/fonts /core/clientold/assets/fonts
/core/clientold/assets/vendor /core/clientold/assets/vendor
/core/client/assets/css /core/client/assets/css
!/core/client/assets/css/ember-hacks.css
/core/client/assets/fonts /core/client/assets/fonts
/core/server/data/export/exported* /core/server/data/export/exported*
/docs /docs

View File

@ -0,0 +1,20 @@
/*
Cosmetic changes to ghost styles, that help during development.
The contents should be solved properly or moved into ghost-ui package.
*/
.post-settings-menu {
display: none !important;
}
#entry-markdown,
.entry-preview,
.CodeMirror.cm-s-default {
height: 500px !important;
}
.editor input {
-webkit-transition: none;
-moz-transition: none;
transition: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

View File

@ -1,43 +1,3 @@
<style>
/* Put your CSS here */
/*
@keyframes domChanged { from { background: yellow; } }
@-webkit-keyframes domChanged { from { background: yellow; } }
.ember-view { animation: domChanged 1s; -webkit-animation: domChanged 1s; }
*/
@font-face {
font-family: "Icons";
src: url("https://testblog111.ghost.io/ghost/fonts/icons.woff") format('woff');
}
/*
Cosmetic changes to ghost styles, that help during development.
The contents should be solved properly or moved into the other assets.
*/
.post-settings-menu {
display: none !important;
}
#entry-markdown, .entry-preview,
.CodeMirror.cm-s-default {
height: 500px !important;
}
.editor .entry-title {
box-shadow: none !important;
background: none !important;
padding: 0 !important;
height: auto !important;
}
.editor input {
-webkit-transition: none;
-moz-transition: none;
transition: none;
}
</style>
<section class="entry-container"> <section class="entry-container">
<header> <header>
<section class="box entry-title"> <section class="box entry-title">

View File

@ -158,17 +158,21 @@ coreHelpers.url = function (options) {
// *Usage example:* // *Usage example:*
// `{{asset "css/screen.css"}}` // `{{asset "css/screen.css"}}`
// `{{asset "css/screen.css" ghost="true"}}` // `{{asset "css/screen.css" ghost="true"}}`
// `{{asset "css/screen.css" ember="true"}}`
// Returns the path to the specified asset. The ghost // Returns the path to the specified asset. The ghost
// flag outputs the asset path for the Ghost admin // flag outputs the asset path for the Ghost admin
coreHelpers.asset = function (context, options) { coreHelpers.asset = function (context, options) {
var output = '', var output = '',
isAdmin = options && options.hash && options.hash.ghost; isAdmin = options && options.hash && options.hash.ghost,
isEmberAdmin = options && options.hash && options.hash.ember;
output += config().paths.subdir + '/'; output += config().paths.subdir + '/';
if (!context.match(/^favicon\.ico$/) && !context.match(/^shared/) && !context.match(/^asset/)) { if (!context.match(/^favicon\.ico$/) && !context.match(/^shared/) && !context.match(/^asset/)) {
if (isAdmin) { if (isAdmin) {
output += 'ghost/'; output += 'ghost/';
} else if (isEmberAdmin) {
output += 'ghost/ember/';
} else { } else {
output += 'assets/'; output += 'assets/';
} }

View File

@ -232,6 +232,7 @@ module.exports = function (server, dbHash) {
// Admin only config // Admin only config
expressServer.use(subdir + '/ghost', middleware.whenEnabled('admin', express['static'](path.join(corePath, '/clientold/assets'), {maxAge: ONE_YEAR_MS}))); expressServer.use(subdir + '/ghost', middleware.whenEnabled('admin', express['static'](path.join(corePath, '/clientold/assets'), {maxAge: ONE_YEAR_MS})));
expressServer.use(subdir + '/ghost/ember', middleware.whenEnabled('admin', express['static'](path.join(corePath, '/client/assets'), {maxAge: ONE_YEAR_MS})));
// Force SSL // Force SSL
// NOTE: Importantly this is _after_ the check above for admin-theme static resources, // NOTE: Importantly this is _after_ the check above for admin-theme static resources,

View File

@ -16,19 +16,20 @@
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="shortcut icon" href="{{asset "favicon.ico"}}"> <link rel="shortcut icon" href="{{asset "favicon.ico"}}">
<link rel="apple-touch-icon-precomposed" href="{{asset "img/touch-icon-iphone.png" ghost="true"}}" /> <link rel="apple-touch-icon-precomposed" href="{{asset "img/touch-icon-iphone.png" ember="true"}}" />
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="{{asset "img/touch-icon-ipad.png" ghost="true"}}" /> <link rel="apple-touch-icon-precomposed" sizes="76x76" href="{{asset "img/touch-icon-ipad.png" ember="true"}}" />
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="{{asset "img/small.png" ghost="true"}}" /> <link rel="apple-touch-icon-precomposed" sizes="120x120" href="{{asset "img/small.png" ember="true"}}" />
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="{{asset "img/medium.png" ghost="true"}}" /> <link rel="apple-touch-icon-precomposed" sizes="152x152" href="{{asset "img/medium.png" ember="true"}}" />
<meta name="application-name" content="Ghost"/> <meta name="application-name" content="Ghost"/>
<meta name="msapplication-TileColor" content="#ffffff"/> <meta name="msapplication-TileColor" content="#ffffff"/>
<meta name="msapplication-square70x70logo" content="{{asset "img/small.png" ghost="true"}}" /> <meta name="msapplication-square70x70logo" content="{{asset "img/small.png" ember="true"}}" />
<meta name="msapplication-square150x150logo" content="{{asset "img/medium.png" ghost="true"}}" /> <meta name="msapplication-square150x150logo" content="{{asset "img/medium.png" ember="true"}}" />
<meta name="msapplication-square310x310logo" content="{{asset "img/large.png" ghost="true"}}" /> <meta name="msapplication-square310x310logo" content="{{asset "img/large.png" ember="true"}}" />
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans:400,300,700"> <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans:400,300,700">
<link rel="stylesheet" href="{{asset "css/ghost-ui.min.css" ghost="true"}}"> <link rel="stylesheet" href="{{asset "css/ghost-ui.min.css" ember="true"}}">
<link rel="stylesheet" href="{{asset "css/ember-hacks.css" ember="true"}}">
</head> </head>
<body class="{{bodyClass}}{{update_notification classOnly="true"}}"> <body class="{{bodyClass}}{{update_notification classOnly="true"}}">