ghostium icon indicating copy to clipboard operation
ghostium copied to clipboard

Switch to Ghost post image implementation

Open b-gantz opened this issue 10 years ago • 9 comments

Hey,

You prepared theme for incoming image-post output, and as i know there is option to get image to post by {{image}}. But as I tried, there was some difficulties. For example, when i try to put

background-image: url: '( {{image}} )' 

in post.hbs in (in my opinion) proper place, my output in browser is weird, absolute="true" doesn't change it, unfortunetely (then i lost every / ) in code.

Would you tell me, how can i implement this thing to my theme?

b-gantz avatar Feb 20 '15 10:02 b-gantz

My head isn't in the right place to look properly, but where are you trying to put that? Syntax looks weird if that's meant to be CSS – maybe try?

background-image: url({{image}})

stevelacey avatar Feb 28 '15 12:02 stevelacey

My bad, this solution works properly ;)

<div class="post-image" style="background-image: url({{image}})">

b-gantz avatar Feb 28 '15 17:02 b-gantz

@bgantz great! Pull request that :smile: bonus points for stripping back the old functionality – I don't see much need to maintain backwards compat with Ghost prior to formal post image support – and not stripping the first image when proper post images are used would be good.

stevelacey avatar Feb 28 '15 17:02 stevelacey

How to disable first image in post as a image post?

b-gantz avatar Mar 23 '15 23:03 b-gantz

@bgantz it's probably just a case of stripping out src/assets/js/scripts.js#L39-L50

stevelacey avatar Mar 24 '15 00:03 stevelacey

Okey, there is a few issue:

  1. On static site, when i scroll down my post is getting darker. I think, there is something with interpretation first <p>.
  2. I wish to develop these theme by myself, but there is a bunch of grunt/SCSS/bower stuff. I don't see anything about it in theme docs. Would you fix it? I know i can read docs online (I'm reading devdocs.io almost every 10min, but... some guide for "launch" and "where is what?" for beginning?
  3. Also, Ghost is getting files from content/theme/* or from content/theme/build/*? Or maybe i just broke something after my Grunt-fight.

b-gantz avatar Apr 01 '15 22:04 b-gantz

  1. the cover image is supposed to get darker as you scroll down, if your page content is doing it too - it's probably a broken in your setup/changes, see http://blog.stevelacey.net/streamlining-your-streaming-build-system for a working example.
  2. Grunt should handle it all, there's a build and watch task IIRC, if you can get that working it should compile everything for you, generally you work in src not build.
  3. The latter I expect, I don't recall, but I'd expect it to be build.

stevelacey avatar Apr 02 '15 09:04 stevelacey

  1. I'am not talking about cover image. I'm talking about static page. Please scroll on this page http://wynurzony.pl/kto-zacz (don't bother about conten - it's polish ;))

It's Static ghost page, linked manualy in navigation and it doesn't have cover image (because i don't want to, for now).

  1. Ok, now i see it, but... some kind of manual for newbies?:>
  2. So, now i have three assets files... theme root, src/ , and build/ ;/ For me it's messy...

b-gantz avatar Apr 02 '15 13:04 b-gantz

  1. Yeah, that's the logic for the cover image malfunctioning - presumably because of your change? Or maybe it's always been a bug and it's because you don't have a cover image on that post? – Maybe the JS does a lazy check to get the first <div> on the page or something?
  2. Yeah, my preference would be to just not have a complicated Grunt set up, I'd write the manual, but I hardly understanding it either.
  3. Yep.

stevelacey avatar Apr 02 '15 14:04 stevelacey