Skip to content

Commit

Permalink
Merge pull request #53 from koraylinux/master
Browse files Browse the repository at this point in the history
minor changes for ghost v4 compatibility
  • Loading branch information
kathyqian committed May 4, 2021
2 parents 0808cdd + 581890c commit eed071b
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 4 deletions.
140 changes: 140 additions & 0 deletions assets/styles/crisp.css
Expand Up @@ -274,4 +274,144 @@ footer a:hover {
ul, ol {
margin-left: 2em;
}
}

/* ghost compatibility */

.kg-width-wide {
position: relative;
width: 85vw;
min-width: 100%;
margin: auto calc(50% - 50vw);
transform: translateX(calc(50vw - 50%));
}

.kg-width-full {
position: relative;
width: 100vw;
left: 50%;
right: 50%;
margin-left: -50vw;
margin-right: -50vw;
}

.kg-bookmark-card {
width: 100%;
position: relative;
}

.kg-bookmark-container {
display: flex;
flex-wrap: wrap;
flex-direction: row-reverse;
color: currentColor;
font-family: inherit;
text-decoration: none;
border: 1px solid rgba(0, 0, 0, 0.1);
}

.kg-bookmark-container:hover {
text-decoration: none;
}

.kg-bookmark-content {
flex-basis: 0;
flex-grow: 999;
padding: 20px;
order: 1;
}

.kg-bookmark-title {
font-weight: 600;
}

.kg-bookmark-metadata,
.kg-bookmark-description {
margin-top: .5em;
}

.kg-bookmark-metadata {
align-items: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.kg-bookmark-description {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}

.kg-bookmark-icon {
display: inline-block;
width: 1em;
height: 1em;
vertical-align: text-bottom;
margin-right: .5em;
margin-bottom: .05em;
}

.kg-bookmark-thumbnail {
display: flex;
flex-basis: 24rem;
flex-grow: 1;
}

.kg-bookmark-thumbnail img {
max-width: 100%;
height: auto;
vertical-align: bottom;
object-fit: cover;
}

.kg-bookmark-author {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}

.kg-bookmark-publisher::before {
content: "•";
margin: 0 .5em;
}

.kg-image-card,
.kg-gallery-card {
margin: 0 0 1.5em;
}

.kg-image-card figcaption,
.kg-gallery-card figcaption {
margin: -1.0em 0 1.5em;
}

.kg-gallery-container {
display: flex;
flex-direction: column;
margin: 1.5em auto;
max-width: 1040px;
width: 100vw;
}

.kg-gallery-row {
display: flex;
flex-direction: row;
justify-content: center;
}

.kg-gallery-image img {
display: block;
margin: 0;
width: 100%;
height: 100%;
}

.kg-gallery-row:not(:first-of-type) {
margin: 0.75em 0 0 0;
}

.kg-gallery-image:not(:first-of-type) {
margin: 0 0 0 0.75em;
}
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -3,7 +3,7 @@
"description" : "A minimalist, responsive, and open-source theme for Ghost",
"version" : "1.0.0",
"engines": {
"ghost-api": "v3"
"ghost-api": "v4"
},
"license": "MIT",
"screenshots": {
Expand Down
2 changes: 1 addition & 1 deletion page.hbs
@@ -1,6 +1,6 @@
{{!< default}}
{{#post}}
<article id="{{id}}" class="{{post_class}}">
<article id="{{comment_id}}" class="{{post_class}}">
<h1 class="post-title">{{title}}</h1>
{{content}}
</article>
Expand Down
2 changes: 1 addition & 1 deletion partials/postlist.hbs
@@ -1,5 +1,5 @@
{{#foreach posts}}
<section id="{{id}}" class="{{post_class}}">
<section id="{{comment_id}}" class="{{post_class}}">
<h3 class="post-title"><a href="{{url}}">{{title}}</a><span class="separator"> &middot; </span>{{date published_at format='MMMM D, YYYY'}}<span class="taglist">{{tags separator=" " prefix=" &middot; "}}</span>{{#if featured}}<span class="separator"> &middot; </span><i class="fa fa-star-o feature-star"></i>{{/if}}</h3>
</section>
{{/foreach}}
2 changes: 1 addition & 1 deletion post.hbs
@@ -1,6 +1,6 @@
{{!< default}}
{{#post}}
<article id="{{id}}" class="{{post_class}}">
<article id="{{comment_id}}" class="{{post_class}}">
<div class="post-stamp">{{date published_at format='MMMM D, YYYY'}}<span class="taglist">{{tags separator=" " prefix=" &middot; "}}</span>{{#if featured}}<span class="separator"> &middot; </span><i class="fa fa-star-o feature-star"></i>{{/if}}</div>
<h1 class="post-title">{{title}}</h1>
{{content}}
Expand Down

0 comments on commit eed071b

Please sign in to comment.