roycehaynes / rollsroyce

A minimal Ghost theme
MIT License
89 stars 25 forks source link

Subtitles #11

Open vonoiral opened 10 years ago

vonoiral commented 10 years ago

Pardon my stupidity. I ve got no idea how to use this beautiful art-subtitles.

Please, provide me with some instructions.

roycehaynes commented 10 years ago

@vonoiral - I have to be frank. I'm using a static generator for my personal site. Since I didn't feel like hacking or making updates to Ghost code, the subtitle and cover image was super simple to include on a non-ghost site. I'll look into Ghost and see if they have a tag to support subtitles.

omfgitsasalmon commented 10 years ago

I managed to implement this.

Add this to your app.js

// Subtitles
var $subtitle = $('span[id="subtitle"]');
if ( $subtitle.length ) {
    var subtitleText = $('#subtitle').text();
    $('.art-subtitle').html(subtitleText);
}
$subtitle.remove();

To add a subtitle to your post, just paste this into your post:

<span id='subtitle'> This is an amazing subtitle </span>

and it'll be rendered as a subtitle.

kianlavi commented 10 years ago

@omfgitsasalmon You are awesome. Thank you so much for this

id192313 commented 10 years ago

Hi there, is there a way to just appear in the post instead of it showing in the content? Thanks.

omfgitsasalmon commented 10 years ago

It doesn't appear in the post. The last bit of the JavaScript removes the entire element from the post.

Unless you mean it appears in the excerpt. In that case, just put the subtitle at the end of the article and the excerpt will not pick up the subtitle while the script still do. — Sent from Mailbox

On Tue, Jul 15, 2014 at 4:00 PM, id192313 notifications@github.com wrote:

Hi there, is there a way to just appear in the post instead of it showing in the content? Thanks.

Reply to this email directly or view it on GitHub: https://github.com/roycehaynes/rollsroyce/issues/11#issuecomment-49001639

omfgitsasalmon commented 9 years ago

@vonoiral @id192313

I have forked this theme over at bitbucket and with permission from Royce, I'm posting it here.

http://bitbucket.caffein8.com/bentley

I have since implemented:

  1. Cover Photos
  2. Subtitles
  3. Pagination
  4. Featured Articles
  5. Cleaner, more "medium-like" typography (WIP)
  6. A better looking <code> support

Take a look at my style guide to see demonstration.

Feel free to fork / add issues for things you want / need over at my bitbucket.

Cheers! Alson