Skip to content

Commit

Permalink
refactor: adding the share component
Browse files Browse the repository at this point in the history
  • Loading branch information
rzashakeri committed Jul 2, 2022
1 parent e35f5d2 commit 123f9f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 8 additions & 0 deletions post/templates/post/components/share_component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="flex gap-2 tooltip tooltip-bottom" data-tip="Share">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24"
stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round"
d="M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z"></path>
</svg>
<span>Share</span>
</div>
9 changes: 1 addition & 8 deletions post/templates/post/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,7 @@ <h1 class="text-xl font-bold capitalize">{{ post.user.get_full_name }}</h1>

{% include "post/components/viral_component.html" %}

<div class="flex gap-2 tooltip tooltip-bottom" data-tip="Share">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24"
stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round"
d="M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z"></path>
</svg>
<span>Share</span>
</div>
{% include "post/components/share_component.html" %}
<div class="flex gap-2 tooltip tooltip-bottom" data-tip="Save">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24"
stroke="currentColor" stroke-width="2">
Expand Down

0 comments on commit 123f9f2

Please sign in to comment.