8000 Post sharing done. · moktadirul-raju/DjangoBlog@8ba4ce2 · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit 8ba4ce2

Browse files
committed
Post sharing done.
1 parent 7cc78ab commit 8ba4ce2

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

templates/blog/base.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<title>Django Blog</title>
77
<link href="{% static "css/bootstrap.min.css" %}"rel="stylesheet" type="text/css">
88
<link href="{% static "css/jquery-ui.css" %}" rel="stylesheet">
9+
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/jquery.jssocials/1.4.0/jssocials.css" />
10+
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/jquery.jssocials/1.4.0/jssocials-theme-classic.css"/>
911
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
1012
<link href="{% static "css/style.css" %}" rel="stylesheet" type="text/css">
1113
<style type="text/css">
@@ -132,6 +134,15 @@ <h2>Tags</h2>
132134
<script src="{% static "js/jquery-3.2.1.min.js" %}"></script>
133135
<script src="{% static "js/bootstrap.min.js" %}"></script>
134136
<script src="{% static "js/jquery-ui.js" %}"></script>
137+
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery.jssocials/1.4.0/jssocials.min.js"></script>
135138
<script src="{% static "js/script.js" %}"></script>
139+
<script>
140+
$("#share").jsSocials({
141+
shares: ["email", "twitter", "facebook", "googleplus", "linkedin", "pinterest", "stumbleupon", "whatsapp"],
142+
text: "{{ post.title }}",
143+
showLabel: true,
144+
showCount: false,
145+
});
146+
</script>
136147
</body>
137148
</html>

templates/blog/sign-up.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<div class="collapse navbar-collapse" id="navbarSupportedContent">
3636
<ul class="navbar-nav mr-auto">
3737
<li class="nav-item active">
38-
<a class="nav-link" href="index.html">Home <span class="sr-only">(current)</span></a>
38+
<a class="nav-link" href="{% url 'index' %}">Home <span class="sr-only">(current)</span></a>
3939
</li>
4040
<li class="nav-item">
4141
<a class="nav-link" href="#">About</a>
@@ -46,8 +46,8 @@
4646
</li>
4747
</ul>
4848
<form class="form-inline my-2 my-lg-0">
49-
<a class="nav-link btn btn-outline-primary" href="login.html" >Login</a>
50-
<a class="nav-link btn btn-outline-success" href="sign-up.html" style="margin-left: 10px">Sign Up</a>
49+
<a class="nav-link btn btn-outline-primary" href="{% url 'blog:user_login' %}" >Login</a>
50+
<a class="nav-link btn btn-outline-success" href="{% url 'blog:sign-up'%}" style="margin-left: 10px">Sign Up</a>
5151
</form>
5252
</div>
5353
</nav>

templates/blog/single.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ <h2>{{post.title}}</h2>
3131
<p><b>Categories:</b><a href="/blog/category/{{ post.category }}" />{{ post.category }}</a></p> <br>
3232
<p><b>Tags:</b><a href="/blog/tag/{{ post.tag }}" />{{ post.tag }}</a></p>
3333

34-
<!--
35-
Share option will be add in next version
34+
35+
3636
<div id="share">Share This Post</div>
37-
-->
37+
3838

3939
<div class="card">
4040

0 commit comments

Comments
 (0)
0