Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for demos in categories #143

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
90 changes: 59 additions & 31 deletions _layouts/category.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,68 @@ <h2 class="category-title">{{ page.title }}</h2>
{{ content }}
</article>

<h5>Articles in this category:</h5>
<h4 class="mb-4 mt-4">Articles in this category</h4>

<div class="card-columns category-posts-list">
{% assign category_posts = site.posts | where: 'category',page.category | reverse %}
{% for post in category_posts %}
<div class="card">
<div class="card-header">
<div class="post-details">
<img class="post-details-icon" src="/img/calendar.png" />
<span class="post-date">
{{ post.date | date_to_rfc822 | date: "%-d %B %Y" }}
</span>
</div>
</div>
<div class="card-body">
<h4 class="card-title">
<a class="muted-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h4>
<hr class="h-splitter" />
<p class="card-text">
{% if post.synopsis %}{{ post.synopsis }}{% else %}{{ post.excerpt }}{% endif %}
</p>
<p class="card-text">
<small class="text-muted">
<a href="{{ post.url | prepend: site.baseurl }}">Continue reading...</a>
</small>
</p>
{% assign category_posts = site.posts | where: 'category',page.category | reverse %}
{% for post in category_posts %}
{% if post.demos %}
{% assign there_are_posts_with_demos = true %}
{% endif %}
<div class="card">
<div class="card-header">
<div class="post-details">
<img class="post-details-icon" src="/img/calendar.png" />
<span class="post-date">
{{ post.date | date_to_rfc822 | date: "%-d %B %Y" }}
</span>
</div>
</div>
{% endfor %}
<div class="card-body">
<h4 class="card-title">
<a class="muted-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h4>
<hr class="h-splitter" />
<p class="card-text">
{% if post.synopsis %}{{ post.synopsis }}{% else %}{{ post.excerpt }}{% endif %}
</p>
<p class="card-text">
<small class="text-muted">
<a href="{{ post.url | prepend: site.baseurl }}">Continue reading...</a>
</small>
</p>
</div>
</div>

<footer class="category-footer">
<p class="category-meta"><a href="https://github.com/{{ site.github_username }}/{{ site.github_repository }}/tree/master/{{ page.path }}">Improve this category</a></p>
</footer>
{% endfor %}
</div>

{% if page.demos or there_are_posts_with_demos %}
<h4 class="mb-2 mt-4">Demos available in this category</h4>
<ul class="demos-list">
{% if page.demos %}
{% for category_demo in page.demos %}
<li class="category-demo">{{ category_demo.title }}: <a title="{{ category_demo.title }}"
href="{{ category_demo.url }}">{{ category_demo.url }}</a></li>
{% endfor %}
{% endif %}

{% if there_are_posts_with_demos %}
{% for post in category_posts %}
{% if post.demos %}
{% for post_demo in post.demos %}
<li class="post-demo">{{ post_demo.title }}: <a title="{{ post_demo.title }}"
href="{{ post_demo.url }}">{{ post_demo.url }}</a> (Discussed in <a class="muted-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>)</li>
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
</ul>
{% endif %}

<footer class="category-footer mt-4">
<p class="category-meta"><a
href="https://github.com/{{ site.github_username }}/{{ site.github_repository }}/tree/master/{{ page.path }}">Improve
this category</a></p>
</footer>

</div>
</div>
5 changes: 5 additions & 0 deletions _posts/2019-04-03-turn-on-the-motors.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ tags:
- SOA
- Services ViewModel Composition
category: view-model-composition
demos:
- title: "Composition Gateway"
url: https://github.com/mauroservienti/composition-gateway-sample
- title: "Single Item Composition"
url: https://github.com/mauroservienti/composition-gateway-sample/src/basic-single-item
---

We spent the last seven posts introducing ViewModel Composition and diving into many aspects of it. A detailed list of articles can be found in the [ViewModel Composition](https://milestone.topics.it/categories/view-model-composition.html) category.
Expand Down
2 changes: 1 addition & 1 deletion categories/view-model-composition.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ This type of questions lead systems to be designed using rich events, and not th

This is the beginning of a road that can only lead to a distributed monolith, where data ownership is a lost concept and every change impacts and breaks the whole system. In such a scenario it’s very easy to blame SOA and the tool set.

ViewModel Composition techniques are designed to address all these concerns. ViewModel Composition brings the separation of concerns, desinged at the back-end, to the front-end.
ViewModel Composition techniques are designed to address all these concerns. ViewModel Composition brings the separation of concerns, desinged at the back-end, to the front-end.