Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion author.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{!< default}}

{{#author}}
{{#primary_author}}

<header id="blog-header"{{#if cover}} class="has-cover"{{else}}{{#if @blog.cover}} class="has-cover"{{/if}}{{/if}}>
<div class="inner">
Expand Down
2 changes: 1 addition & 1 deletion post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

<div class="clear"></div>

{{#author}}
{{#primary_author}}
<aside class="post-author">
{{#if image}}
<figure class="post-author-avatar">
Expand Down
208 changes: 208 additions & 0 deletions src/sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1468,3 +1468,211 @@ img {
display: none;
}
}


/* ==========================================================================
KG Cards
========================================================================== */

.post-content {

// KG Image
.kg-image-card {
margin: 0 0 4rem;
max-width: none !important;

&.kg-width-wide {
max-width: calc(72rem + 24vw) !important;
min-width: 100%;
width: calc(100vw - 4rem);
}

&.kg-width-full {
max-width: none;
width: 100vw;
margin-top: 2em;
}

.kg-image {
margin: 0 auto;
}

.kg-image-full + figcaption {
margin-bottom: 1.33334em;
}
}

// KG Gallery
.kg-gallery-card {
margin: 0 0 4rem;
max-width: calc(72rem + 24vw) !important;
min-width: 100%;
width: calc(100vw - 4rem);
}

.kg-gallery-container {
display: flex;
flex-direction: column;
}

.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;
}

.kg-gallery-image:not(:first-of-type) {
margin: 0 0 0 0.75em;
}
// KG Embed
.kg-embed-card {
margin: 0 0 4rem;

> * {
margin-left: auto;
margin-right: auto;
}
}
// KG Code
.kg-code-card {
min-width: 100%;
margin: 0 0 4rem;
}

.kg-code-card pre {
margin: 0;
}
// KG Bookmark
.kg-bookmark-card {
width: 100%;
margin: 0 0 4rem;
}

.kg-bookmark-container {
display: flex;
text-decoration: none;
min-height: 8em;
background: $color-background;
border: 1px solid $color-border;
box-shadow: none !important;
overflow: hidden;
@media (prefers-color-scheme: dark) {
background: $color-background-dark;
border-color: $color-border-dark;
}
}

.kg-bookmark-content {
text-rendering: optimizeLegibility;
display: flex;
flex-direction: column;
flex-grow: 1;
align-items: flex-start;
justify-content: start;
padding: 1.5em;
color: $color-text-secondary;
@media (prefers-color-scheme: dark) {
color: $color-text-secondary-dark;
}
}

.kg-bookmark-title {
color: $color-text-primary;
font-size: 0.75em;
line-height: 1.66667em;
font-weight: 700;
letter-spacing: 0.5px;
@media (prefers-color-scheme: dark) {
color: $color-text-primary-dark;
}
}

.kg-bookmark-description {
display: -webkit-box;
font-size: 0.75em;
line-height: 1.66667em;
font-weight: 400;
margin-top: 0.33334em;
max-height: 3.33334em;
overflow-y: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}

.kg-bookmark-thumbnail {
position: relative;
min-width: 33%;
max-height: 100%;
}

.kg-bookmark-thumbnail img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}

.kg-bookmark-metadata {
text-rendering: optimizeLegibility;
display: flex;
align-items: center;
font-size: 0.75em;
line-height: 1.66667em;
color: $color-text-primary;
font-weight: 400;
margin-top: 1em;
flex-wrap: wrap;
@media (prefers-color-scheme: dark) {
color: $color-text-primary-dark;
}
}

.kg-bookmark-icon {
width: 1.33334em;
margin: 0 0.75em 0 0;
}

.kg-bookmark-author:after {
content: "•";
margin: 0 0.33334em;
}

.kg-bookmark-publisher {
color: $color-primary;
}

@media (max-width: 640px) {
.kg-bookmark-container {
flex-direction: column;
}

.kg-bookmark-thumbnail {
order: 1;
width: 100%;
min-height: 160px;
}

.kg-bookmark-thumbnail img {
border-radius: 3px 3px 0 0;
}

.kg-bookmark-content {
order: 2;
}
}
}