Begin CSS refactoring for improved organization

CSS code was divided in multiple files, however this was not practical
for organization since different pages needed different CSS classes one
 another, that were in most of those CSS files.

This commit brings (mostly) everything in one file with a table of
contents on top.

An exception is made for fonts, that are now in a separate "fonts.css"
file, since they contain fundamentally different things.

Classes organization is not yet complete, however a great part was done.
Next commits will finalize this organization and finish moving classes.

Signed-off-by: Lorenzo Dellacà <lorenzo.dellaca@mind-overflow.net>
This commit is contained in:
Lorenzo Dellacà
2020-08-18 18:20:39 +02:00
parent da155c7d7e
commit 67344effd0
19 changed files with 467 additions and 391 deletions

View File

@@ -1,17 +1,17 @@
<article class="{{post_class}}">
<a class="post-card_main" href="{{url}}">
<img class="post-card_feature-image" src="{{img_url feature_image size="m"}}" />
<header class="post-card_header">
<p class="post-card_meta"><span class="post-card_tag">{{primary_tag.name}}</span>
<a class="mind-post-card-big_main" href="{{url}}">
<img class="mind-post-card-big_feature-image" src="{{img_url feature_image size="m"}}" />
<header class="mind-post-card-big_header">
<p class="mind-post-card-big_meta"><span class="mind-post-card-big_tag">{{primary_tag.name}}</span>
• <time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time></p>
<h3>{{title}}</h3>
</header>
<section class="post-card_excerpt">
<section class="mind-post-card-big_excerpt">
<p>{{excerpt words="26"}}</p>
</section>
<footer class="post-card_footer">
<footer class="mind-post-card-big_footer">
{{primary_author.name}}
{{#if primary_author.profile_image}}<img class="post-card_author-image" src="{{img_url primary_author.profile_image size="xxs"}}" alt="Author image" />{{/if}}
{{#if primary_author.profile_image}}<img class="mind-post-card-big_author-image" src="{{img_url primary_author.profile_image size="xxs"}}" alt="Author image" />{{/if}}
</footer>
</a>
</article>

View File

@@ -0,0 +1,16 @@
{{#get "posts" limit="3" filter="tags:[{{post.tags}}]+id:-{{post.id}}" include="tags" as |related|}}
<h4>Similar posts</h4>
{{#foreach related}}
<article class="{{post_class}}">
<a class="mind-post-card-sidebar_main" href="{{url}}">
<img class="mind-post-card-sidebar_feature-image" src="{{img_url feature_image size="s"}}" />
<header class="mind-post-card-sidebar_header">
<p class="mind-post-card-sidebar_meta"><span class="mind-post-card-sidebar_tag">{{primary_tag.name}}</span> • <time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time></p>
<h5>{{title}}</h5>
</header>
</a>
</article>
{{/foreach}}
{{else}}
<h4>No related posts</h4>
{{/get}}

View File

@@ -1,16 +0,0 @@
{{#get "posts" limit="3" filter="tags:[{{post.tags}}]+id:-{{post.id}}" include="tags" as |related|}}
<h4>Similar posts</h4>
{{#foreach related}}
<article class="{{post_class}}">
<a class="post-card-sidebar_main" href="{{url}}">
<img class="post-card-sidebar_feature-image" src="{{img_url feature_image size="s"}}" />
<header class="post-card-sidebar_header">
<p class="post-card-sidebar_meta"><span class="post-card-sidebar_tag">{{primary_tag.name}}</span> • <time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time></p>
<h5>{{title}}</h5>
</header>
</a>
</article>
{{/foreach}}
{{else}}
<h4>No related posts</h4>
{{/get}}

17
partials/tag-card-big.hbs Normal file
View File

@@ -0,0 +1,17 @@
<article class="{{post_class}}">
<a class="mind-post-card-big_main" href="{{url}}">
<img class="mind-post-card-big_feature-image" src="{{img_url feature_image size="m"}}" />
<header class="mind-post-card-big_header">
<p class="mind-post-card-big_meta"><span class="mind-post-card-big_tag">{{primary_tag.name}}</span>
• <time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time></p>
<h3>{{title}}</h3>
</header>
<section class="mind-post-card-big_excerpt">
<p>{{excerpt words="26"}}</p>
</section>
<footer class="mind-post-card-big_footer">
{{primary_author.name}}
{{#if primary_author.profile_image}}<img class="mind-post-card-big_author-image" src="{{img_url primary_author.profile_image size="xxs"}}" alt="Author image" />{{/if}}
</footer>
</a>
</article>