Skip to content

Commit

Permalink
Misc layout updated
Browse files Browse the repository at this point in the history
  • Loading branch information
nilandev authored Jan 3, 2024
1 parent 4b361ba commit b99ba2e
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 30 deletions.
11 changes: 2 additions & 9 deletions bloggy/templates/pages/single/lesson.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,12 @@
<h1 class="display-2 fw-600"
style="line-height: 1.2;letter-spacing: -0.04rem">{{ post.title }}</h1>

{% if post.video_id %}
<div class="article-details-card my-4">
{% with '[youtube=https://www.youtube.com/watch?v='|addstr:post.video_id|addstr:']' as youtubeUrl %}
{{ youtubeUrl|shortcodes|safe }}
{% endwith %}
</div>
{% endif %}


{% if post.thumbnail and post.template_type == "cover" %}
<div class="article-single-thumbnails my-4">
<img src="{{ post.thumbnail.url }}" alt="{{ post.title }}" loading="lazy"/>
</div>
{% else %}
{% include 'partials/video_widget.html' %}
{% endif %}

<article id="article-content" class="article-content" data-cid="{{ post.id }}"
Expand Down
2 changes: 1 addition & 1 deletion bloggy/templates/pages/single/post-naked.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1 class="display-2 fw-bolder">{{ article.title }}</h1>

<div class="hero article-meta-container mb-4">
{% if article.publish_status == "DRAFT" %}
<span class="badge rounded-pill text-bg-warning text-white">{{ article.publish_status }} / PREVIEW</span>
<span class="badge rounded-pill text-bg-warning text-white">{{ article.publish_status }}/PREVIEW</span>
{% endif %}
<small class="d-inline-block mb-1 text-muted text-uppercase fw-bolder"
style="font-size:0.75rem">Published {% pretty_date article.updated_date %},&nbsp</small>
Expand Down
7 changes: 3 additions & 4 deletions bloggy/templates/pages/single/post-standard.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
<div class="article-single-thumbnails my-4">
<img src="{{ post.thumbnail.url }}" alt="{{ post.title }}" loading="lazy"/>
</div>
{% else %}
{% include 'partials/video_widget.html' %}
{% endif %}

<div class="d-lg-flex justify-content-between align-items-center py-2 mb-2">
Expand Down Expand Up @@ -73,21 +75,18 @@
</main>

<aside id="right-sidebar" class="col-12 col-md-3 col-lg-3 d-print-none">
{% include 'partials/video_widget.html' %}
{% include 'widgets/ad-unit-vertical-responsive.html' %}
{% if post %}
{% include 'partials/toc_widget.html' %}
{% include 'partials/github_widget.html' with githubLink=post.github_link %}
{% endif %}

<div class="sidebar-content" style="z-index: 99">
{# {% include "partials/home_widget_contribute_cta.html" %}#}
{% include 'partials/newsletter.html' %}
</div>
{% include 'widgets/ad-unit-vertical-responsive.html' %}
</aside>
</div>
{% include 'widgets/ad-unit-horizontal-responsive.html' %}
</div>
</div>

<div class="bg-light border-bottom py-5">
Expand Down
6 changes: 3 additions & 3 deletions bloggy/templates/partials/video_widget.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
{% load define_action %}
{% load shortcodes_filters %}
{% if post.video_id %}
<div class="article-details-card p-0">
<div class="article-details-card my-4">
{% with '[youtube=https://www.youtube.com/watch?v='|addstr:post.video_id|addstr:']' as youtubeUrl %}
{{ youtubeUrl|shortcodes|safe }}
{% endwith %}
</div>
<div class="pt-2 mb-4">
<!-- <div class="pt-2 mb-4">
<a href="{{ 'https://www.youtube.com/watch?v='|addstr:post.video_id }}"
class="youtube-button" target="_blank">
<i class="fa-brands fa-youtube pe-2"></i>Watch on YouTube</a>
</div>
</div> -->
{% endif %}
10 changes: 6 additions & 4 deletions bloggy/templates/widgets/ad-unit-horizontal-responsive.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% if LOAD_GOOGLE_ADS %}
<div class="mb-3">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5125794458843883"
crossorigin="anonymous"></script>
<!-- horizontal-ad-units -->
Expand All @@ -11,8 +12,9 @@
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
{#{% else %}#}
{# <div class="d-flex align-items-center bg-light my-3" style="width:100%;height:120px;">#}
{# <small class="text-center font-xs text-muted mx-auto">AD-SPACE</small>#}
{# </div>#}
</div>
{% else %}
<div class="d-flex align-items-center bg-light my-3" style="width:100%;height:120px;">
<small class="text-center font-xs text-muted mx-auto">AD-SPACE</small>
</div>
{% endif %}
10 changes: 5 additions & 5 deletions bloggy/templates/widgets/ad-unit-in-feed.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% if LOAD_GOOGLE_ADS %}
<div style="max-width: 720px">
<div style="max-width: 720px" class="my-3">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5125794458843883"
crossorigin="anonymous"></script>
<ins class="adsbygoogle"
Expand All @@ -12,8 +12,8 @@
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
{#{% else %}#}
{# <div class="d-flex align-items-center bg-light my-3" style="width:100%;height:100px;">#}
{# <small class="text-center font-xs text-muted mx-auto">AD-SPACE</small>#}
{# </div>#}
{% else %}
<div class="d-flex align-items-center bg-light my-3" style="width:100%;height:100px;">
<small class="text-center font-xs text-muted mx-auto">AD-SPACE</small>
</div>
{% endif %}
10 changes: 6 additions & 4 deletions bloggy/templates/widgets/ad-unit-vertical-responsive.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% if LOAD_GOOGLE_ADS %}
<div class="mb-3">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5125794458843883"
crossorigin="anonymous"></script>
<!-- vertical-ad-units -->
Expand All @@ -11,8 +12,9 @@
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
{#{% else %}#}
{# <div class="d-flex align-items-center bg-light my-3" style="width:100%;height:500px;">#}
{# <small class="text-center font-xs text-muted mx-auto">AD-SPACE</small>#}
{# </div>#}
</div>
{% else %}
<div class="d-flex align-items-center bg-light my-3" style="width:100%;height:500px;">
<small class="text-center font-xs text-muted mx-auto">AD-SPACE</small>
</div>
{% endif %}

0 comments on commit b99ba2e

Please sign in to comment.