TryGhost/Ghost

View on GitHub
ghost/admin/app/components/modals/whats-new.hbs

Summary

Maintainability
Test Coverage
<div class="modal-content">
    <h1 class="gh-whasnew-modal-title">What's new?</h1>
    <section class="gh-whatsnew-modal-entries" {{did-insert (perform this.whatsNew.updateLastSeen)}}>
        {{#each this.whatsNew.entries as |entry|}}
            <a class="gh-whatsnew-modal-entry" href={{entry.url}} target="_blank" rel="noopener noreferrer">
                {{#if entry.feature_image}}
                    <img class="gh-whatsnew-modal-entry-featureimage" src={{entry.feature_image}} alt={{entry.title}}>
                {{/if}}
                <div class="gh-whatsnew-modal-entrycontent">
                    <h2>{{entry.title}}</h2>
                    {{#if entry.custom_excerpt}}
                        <p>{{entry.custom_excerpt}}</p>
                    {{/if}}
                    <span>{{moment-format entry.published_at "DD MMMM YYYY"}}</span>
                </div>
            </a>
        {{/each}}
    </section>

    <div class="gh-whatsnew-modal-footer">
        <a href="https://ghost.org/changelog/#/portal/signup" class="gh-btn" type="button" target="_blank" rel="noopener noreferrer"><span>Turn on notifications</span></a>
        <a class="gh-btn gh-btn-primary" href="https://ghost.org/changelog" target="_blank" rel="noopener noreferrer"><span>All updates &rarr;</span></a>
    </div>
</div>