Skip to content

Commit

Permalink
Merge pull request #67 from royalfig/bug-fixes
Browse files Browse the repository at this point in the history
Bug fixes
  • Loading branch information
royalfig authored Jun 27, 2021
2 parents 59a1af4 + e73744a commit 30d38b4
Show file tree
Hide file tree
Showing 26 changed files with 170 additions and 7,094 deletions.
4 changes: 2 additions & 2 deletions assets/built/app.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/built/app.css.map

Large diffs are not rendered by default.

5,912 changes: 2 additions & 5,910 deletions assets/built/app.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/built/app.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/built/post.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/built/post.css.map

Large diffs are not rendered by default.

982 changes: 3 additions & 979 deletions assets/built/post.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions assets/built/post.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*! fluidvids.js v2.4.1 | (c) 2014 @toddmotto | https://github.com/toddmotto/fluidvids */

/*! medium-zoom 1.0.6 | MIT License | https://github.com/francoischalifour/medium-zoom */
1 change: 1 addition & 0 deletions assets/built/post.js.map

Large diffs are not rendered by default.

21 changes: 11 additions & 10 deletions author.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@ into the {body} of the default.hbs template --}}
{{#author}}

{{!-- Post Header --}}
<header class="{{^if cover_image}}sm-post__no-img--container">{{else}}sm-post__img">
<img srcset="{{img_url cover_image size="s"}} 300w,
{{img_url cover_image size="m"}} 740w,
{{img_url cover_image size="l"}} 1000w" sizes="(min-width: 1124px) 1000px, 100vw"
src="{{img_url cover_image size="l"}}" alt="{{title}}" height="340">
{{/if}}
{{^if cover_image}}
<div class="sm-post__no-img"></div>
{{/if}}
</header>


<main class="sm-main" id="sm-main">
<div class="sm-main__outer-container">
<div class="sm-main__inner-container">
<header class="sm-post__img--container">
{{#if cover_image}}
<img class="sm-post__img" srcset="{{img_url cover_image size="s"}} 300w,
{{img_url cover_image size="m"}} 740w,
{{img_url cover_image size="l"}} 1024w" sizes="(min-width: 740px) 740px, 100vw"
src="{{img_url cover_image size="l"}}" alt="{{title}}" height="340">
{{else}}
<div class="sm-post__no-img"></div>
{{/if}}
</header>
<section class="{{slug}}">

<header class="sm-author__header">
Expand Down
22 changes: 10 additions & 12 deletions error-404.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,19 @@ It's a good idea to keep this template as minimal as possible in terms of both f
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}

{{!-- Post Header --}}
<header class="{{^if @site.cover_image}}sm-post__no-img--container">{{else}}sm-post__img">
<img srcset="{{img_url @site.cover_image size="s"}} 300w,
{{img_url @site.cover_image size="m"}} 740w,
{{img_url @site.cover_image size="l"}} 1000w" sizes="(min-width: 1124px) 1000px, 100vw"
src="{{img_url @site.cover_image size="l"}}" alt="{{title}}" height="340">
{{/if}}
{{^if @site.cover_image}}
<div class="sm-post__no-img"></div>
{{/if}}
</header>

<main class="sm-main--error">
<div class="sm-main__outer-container">
<div class="sm-main__inner-container">
<header class="sm-post__img--container">
{{#if @site.cover_image}}
<img class="sm-post__img" srcset="{{img_url @site.cover_image size="s"}} 300w,
{{img_url @site.cover_image size="m"}} 740w,
{{img_url @site.cover_image size="l"}} 1024w" sizes="(min-width: 1024px) 1024px, 100vw"
src="{{img_url @site.cover_image size="l"}}" alt="{{title}}" height="576">
{{else}}
<div class="sm-post__no-img"></div>
{{/if}}
</header>
<header class="sm-post__header">
<h1 class="sm-main--error__heading">{{statusCode}}</h1>
<p class="sm-main--error__text">{{message}}</p>
Expand Down
23 changes: 10 additions & 13 deletions index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,19 @@
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}

{{!-- Post Header --}}
<header class="{{^if @site.cover_image}}sm-post__no-img--container">{{else}}sm-post__img">
<img srcset="{{img_url @site.cover_image size="s"}} 300w,
{{img_url @site.cover_image size="m"}} 740w,
{{img_url @site.cover_image size="l"}} 1000w" sizes="(min-width: 1124px) 1000px, 100vw"
src="{{img_url @site.cover_image size="l"}}" alt="{{title}}" height="340">
{{/if}}
{{^if @site.cover_image}}
<div class="sm-post__no-img"></div>
{{/if}}
</header>
{{!-- Post Header --}}

<main class="sm-main" id="sm-main">
<div class="sm-main__outer-container">
<div class="sm-main__inner-container">
<div class="sm-post__img--container">
{{#if @site.cover_image}}
<img class="sm-post__img" srcset="{{img_url @site.cover_image size="s"}} 300w,
{{img_url @site.cover_image size="m"}} 740w,
{{img_url @site.cover_image size="l"}} 1024w" sizes="(min-width: 1024px) 1024px, 100vw"
src="{{img_url @site.cover_image size="l"}}" alt="{{title}}" height="576">
{{else}}
<div class="sm-post__no-img"></div>
{{/if}}
</div>
<header class="sm-post__header">
<h1 class="sm-post__title--serif">Latest
<span>{{plural pagination.page empty='' singular='' plural='%'}}</span></h1>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "smart",
"version": "1.1.8",
"version": "1.2.0",
"description": "An elegant Ghost theme",
"main": "index.js",
"engines": {
Expand Down
22 changes: 10 additions & 12 deletions page-tags.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,21 @@
into the {body} of the default.hbs template --}}

{{#post}}
{{!-- Post Header --}}
<header class="{{^if feature_image}}sm-post__no-img--container">{{else}}sm-post__img">
<img srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 740w,
{{img_url feature_image size="l"}} 1024w,
{{img_url feature_image size="xl"}} 2000w" sizes="(min-width: 1024px) 1024px, 100vw"
src="{{img_url feature_image size="l"}}" alt="{{title}}" height="340">
{{/if}}
{{^if feature_image}}
<div class="sm-post__no-img"></div>
{{/if}}
</header>

{{!-- Main --}}
<main class="sm-main" id="sm-main">
<div class="sm-main__outer-container">
<div class="sm-main__inner-container">
<div class="sm-post__img--container">
{{#if feature_image}}
<img class="sm-post__img" srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 740w,
{{img_url feature_image size="l"}} 1024w" sizes="(min-width: 1024px) 1024px, 100vw"
src="{{img_url feature_image size="l"}}" alt="{{title}}" height="576">
{{else}}
<div class="sm-post__no-img"></div>
{{/if}}
</div>
<header class="sm-post__header">
<h1 class="sm-post__title--serif">{{title}}</h1>
</header>
Expand Down
22 changes: 10 additions & 12 deletions page.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,20 @@ into the {body} of the default.hbs template --}}

{{#post}}

{{!-- Post Header --}}
<header class="{{^if feature_image}}sm-post__no-img--container">{{else}}sm-post__img">
<img srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 740w,
{{img_url feature_image size="l"}} 1024w" sizes="(min-width: 740px) 740px, 100vw"
src="{{img_url feature_image size="l"}}" alt="{{title}}" height="340">
{{/if}}
{{^if feature_image}}
<div class="sm-post__no-img"></div>
{{/if}}
</header>

{{!-- Main --}}
<main class="sm-main" id="sm-main">
<div class="sm-main__outer-container">
<div class="sm-main__inner-container">
<header class="sm-post__img--container">
{{#if feature_image}}
<img class="sm-post__img" srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 740w,
{{img_url feature_image size="l"}} 1024w" sizes="(min-width: 1024px) 1024px, 100vw"
src="{{img_url feature_image size="l"}}" alt="{{title}}" height="576">
{{else}}
<div class="sm-post__no-img"></div>
{{/if}}
</header>
<article class="{{post_class}} sm-post">
<header class="sm-post__header">
<h1 class="sm-post__title--serif">{{title}}</h1>
Expand Down
5 changes: 3 additions & 2 deletions partials/navbar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="sm-navbar__top">
<div class="sm-navbar__top--left">
{{#is "home, author, tag, paged"}}
<span class="sm-navbar__new-tag">New</span>
<span class="sm-navbar__new-tag"> {{^is "paged"}}New{{else}}Read{{/is}}</span>
{{#foreach posts limit="1"}}
{{#link href=(url) class="sm-navbar__new-link"}}{{title}}{{/link}}
{{/foreach}}
Expand Down Expand Up @@ -62,7 +62,8 @@
</button>
</div>
</div>
{{!-- End navbar top --}}
{{!-- Navbar Divider --}}
<div class="sm-navbar__divider"></div>
{{!-- Navbar bottom --}}
<div class="sm-navbar__bottom">
<div class="sm-navbar__bottom--left">
Expand Down
20 changes: 10 additions & 10 deletions post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ into the {body} of the default.hbs template --}}
{{#post}}

{{!-- Post Header --}}
<header class="{{^if feature_image}}sm-post__no-img--container">{{else}}sm-post__img">
<img srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 740w,
{{img_url feature_image size="l"}} 1024w" sizes="(min-width: 740px) 740px, 100vw"
src="{{img_url feature_image size="l"}}" alt="{{title}}" height="340">
{{/if}}
{{^if feature_image}}
<div class="sm-post__no-img"></div>
{{/if}}
</header>

{{!-- Main --}}
<main class="sm-main" id="sm-main">
<div class="sm-outer-container">
<div class="sm-inner-container">
<header class="sm-post__img--container">
{{#if feature_image}}
<img class="sm-post__img" srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 740w,
{{img_url feature_image size="l"}} 1024w" sizes="(min-width: 1024px) 1024px, 100vw"
src="{{img_url feature_image size="l"}}" alt="{{title}}" height="576">
{{else}}
<div class="sm-post__no-img"></div>
{{/if}}
</header>
<article class="{{post_class}} sm-post">
<header class="sm-post__header">
<h1 class="sm-post__title--serif">{{title}}</h1>
Expand Down
2 changes: 1 addition & 1 deletion src/scss/base/_default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//-------------------------------------------
// Custom Properties
//-------------------------------------------
@use '../themes/sm_theme';
@use '../themes/_sm_theme';
//-------------------------------------------
// Global Styles
//-------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion src/scss/components/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
height: 0;
padding-top: 50%;
overflow: hidden;
border-radius: 0;
border-top-left-radius: variables.$radius;
border-top-right-radius: variables.$radius;
&.paid,
Expand Down Expand Up @@ -69,12 +70,13 @@
height: 100%;
object-fit: cover;
overflow: hidden;
border-radius: 0;
border-top-left-radius: variables.$radius;
border-top-right-radius: variables.$radius;
}

&__no-img {
@include mixins.mesh();
background-image: var(--gradient);
}

&__body {
Expand Down
5 changes: 5 additions & 0 deletions src/scss/components/_grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
border-radius: 0;
border-top-left-radius: variables.$radius;
border-bottom-left-radius: variables.$radius;
& > * {
border-radius: 0;
border-top-left-radius: variables.$radius;
border-bottom-left-radius: variables.$radius;
}
}

&__img {
Expand Down
17 changes: 15 additions & 2 deletions src/scss/layout/_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,24 @@
margin: 0 auto;
}

&__divider {
position: absolute;
left: 0;
display: none;
width: 100vw;
height: 1px;
background-color: var(--text1);
opacity: 0.1;
transform: translateY(6px);

@include mixins.respond-above(variables.$laptop) {
display: block;
}
}

&__top {
display: none;
height: 2.25rem;
border-bottom: 1px solid;
@include mixins.color-map(border-bottom-color, surface4);

@include mixins.respond-above(variables.$laptop) {
display: flex;
Expand Down
77 changes: 37 additions & 40 deletions src/scss/pages/_post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,59 +9,56 @@
max-width: variables.$tablet;
margin: 0 auto 3rem;

&__img,
&__no-img {
&__img--container {
position: relative;
box-sizing: content-box;
width: calc(100% - 2rem);
height: 340px;
padding: 2rem 1rem 0;
@include mixins.navbar(margin-top);
}

.page-tags &,
.author-template &,
.paged & {
&__no-img,
&__img img {
max-width: variables.$laptop;
}
width: 100%;
padding-top: 56.25%;
@include mixins.navbar(margin-top, $increase: 1);
margin-bottom: 2rem;
}

&__img,
&__no-img {
width: auto;
// max-width: variables.$laptop;
max-width: variables.$tablet;

margin: 0 auto;
@include mixins.navbar(margin-top, $increase: 1);
overflow: hidden;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
border-radius: variables.$radius;
box-shadow: variables.$box-shadow;
}

// .post-template & {
// max-width: variables.$tablet + 100;
// }
// .page-tags &,
// .author-template &,
// .tag-template &,
// .paged & {
// &__no-img,
// &__img img {
// max-width: variables.$laptop;
// }
// }

&:after {
@include mixins.mesh();
}
&__no-img {
// width: auto;
// // max-width: variables.$laptop;
// max-width: variables.$tablet;

&--container {
padding: 0 1rem;
}
// margin: 0 auto;
// overflow: hidden;
background-image: var(--gradient);
}

&__img {
img {
display: block;
width: auto;
max-width: variables.$tablet + 100;
height: 100%;
margin: 0 auto;
object-fit: cover;
border-radius: variables.$radius;
box-shadow: variables.$box-shadow;
// display: block;
// width: auto;
// max-width: variables.$tablet + 100;
// height: 100%;
// margin: 0 auto;
// object-fit: cover;
// border-radius: variables.$radius;
// box-shadow: variables.$box-shadow;

@supports (object-fit: cover) {
width: 100%;
Expand Down
Loading

0 comments on commit 30d38b4

Please sign in to comment.