Skip to content
This repository was archived by the owner on Oct 28, 2019. It is now read-only.

Commit 14c7675

Browse files
Sam Joneskylef
authored andcommitted
Add share button
Closes #10
1 parent 34e3921 commit 14c7675

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

paste/templates/paste/snippet_detail.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ <h1>
2626
<div class="btn-group pull-right">
2727
<a href="/?fork={{ object.slug }}" class="btn">Fork</a>
2828
<a href="{{ object.get_absolute_url }}" class="btn">Raw</a>
29+
<a href="#share" data-toggle="modal" class="btn">Share</a>
2930
{% ifequal object.author user %}
3031
<a href="#confirm-delete" data-toggle="modal" class="btn btn-danger">Delete</a>
3132
{% endifequal %}

pasteapp/templates/base.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,23 @@
7272
</div>
7373
{% endblock %}
7474

75+
<div class="modal fade" id="share">
76+
<div class="modal-header">
77+
<button type="button" class="close" data-dismiss="modal">×</button>
78+
<h3>Share {{ object }}</h3>
79+
</div>
80+
81+
<div class="modal-body">
82+
<p>Share your snippt</p>
83+
</div>
84+
85+
<div class="modal-footer">
86+
<a href="https://twitter.com/share" class="btn" data-text="check out this snippt"><i class="icon-twitter"></i> Tweet</a>
87+
<script>!function(d,s,id){varjs,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
88+
<a href="#" class="btn" data-dismiss="modal">Close</a>
89+
</div>
90+
</div>
91+
7592
{% if request.user.is_authenticated %}
7693
<div class="modal fade" id="settings">
7794
<form action="" method="post" accept-charset="utf-8" class="form-horizontal" id="settings-form">

0 commit comments

Comments
 (0)