ghostium
ghostium copied to clipboard
Switch to Ghost post image implementation
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?
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}})
My bad, this solution works properly ;)
<div class="post-image" style="background-image: url({{image}})">
@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.
How to disable first image in post as a image post?
@bgantz it's probably just a case of stripping out src/assets/js/scripts.js#L39-L50
Okey, there is a few issue:
- On static site, when i scroll down my post is getting darker. I think, there is something with interpretation first
<p>. - 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?
- Also, Ghost is getting files from
content/theme/*or fromcontent/theme/build/*? Or maybe i just broke something after my Grunt-fight.
- 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.
- 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
srcnotbuild. - The latter I expect, I don't recall, but I'd expect it to be
build.
- 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).
- Ok, now i see it, but... some kind of manual for newbies?:>
- So, now i have three assets files... theme root, src/ , and build/ ;/ For me it's messy...
- 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? - 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.
- Yep.