Commit d9154d47 authored by David Haynes's avatar David Haynes 🙆

We don't need these lines hehe

- Achieve MVP

Closes #181
parent 333539e7
Pipeline #2490 passed with stage
in 1 minute and 25 seconds
<!-- Custom definition for accordian-group --> <!-- Custom definition for accordian-group -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
{{ div.name }} {{ div.name }}
</h4> <div id="{{ div.css_id }}" class="}">
</div>
<div id="{{ div.css_id }}" class="panel-collapse collapse{% if div.active %} in{% endif %}" >
<div class="panel-body">
{{ fields|safe }} {{ fields|safe }}
</div> </div>
</div>
</div> </div>
<br /> <br />
<!-- load in go templatetags --> <!-- load in go templatetags -->
{% load go_extras %} {% load go_extras %}
<!-- load in qr code lib -->
{% load qr_tags %}
<!-- CSS for page --> <!-- CSS for page -->
<style> <style>
a.share:link { a.share:link {
...@@ -45,21 +42,45 @@ ...@@ -45,21 +42,45 @@
padding-top: 4px; padding-top: 4px;
} }
#copy-button-{{url.short}} { #copy-button- {
{
url.short
}
}
{
border: none; border: none;
background-color: #eeeeee; background-color: #eeeeee;
padding-bottom: 3px; padding-bottom: 3px;
} }
#copy-button-{{url.short}}:focus { #copy-button- {
{
url.short
}
}
:focus {
outline: none; outline: none;
} }
#clipboard-icon-{{url.short}} { #clipboard-icon- {
{
url.short
}
}
{
font-size: 14px; font-size: 14px;
} }
#link-{{url.short}}:visited { #link- {
{
url.short
}
}
:visited {
color: #006633; color: #006633;
} }
...@@ -79,7 +100,8 @@ ...@@ -79,7 +100,8 @@
<div class="input-group"> <div class="input-group">
<a id="link-{{url.short}}" class="form-control" href="{{domain}}{{url.short}}" target="_blank">{{domain}}{{url.short}}</a> <a id="link-{{url.short}}" class="form-control" href="{{domain}}{{url.short}}" target="_blank">{{domain}}{{url.short}}</a>
<div id="button-container" class="input-group-addon"> <div id="button-container" class="input-group-addon">
<button id="copy-button-{{url.short}}" type="button" class="button btn btn-default btn-xs fa" role="button" data-clipboard-target="#link-{{url.short}}" title="Copy to Clipboard"> <button id="copy-button-{{url.short}}" type="button" class="button btn btn-default btn-xs fa"
role="button" data-clipboard-target="#link-{{url.short}}" title="Copy to Clipboard">
<i id="clipboard-icon-{{url.short}}" class="fa fa-clipboard fa-1g" aria-hidden="true"></i> <i id="clipboard-icon-{{url.short}}" class="fa fa-clipboard fa-1g" aria-hidden="true"></i>
</button> </button>
</div> </div>
...@@ -89,12 +111,10 @@ ...@@ -89,12 +111,10 @@
<h3>Address Details:</h3> <h3>Address Details:</h3>
<strong>Target URL:</strong> <strong>Target URL:</strong>
<a href="{{url.target}}" target="_blank">{{url.target}}</a> <a href="{{url.target}}" target="_blank">{{url.target}}</a>
<br /> <br /> {% if url.owner == request.user.registereduser and request.user.registereduser.approved
{% if url.owner == request.user.registereduser and request.user.registereduser.approved == True %} == True %}
<strong>Clicks:</strong> {{url.clicks}} <strong>Clicks:</strong> {{url.clicks}}
<br /> <br />
<strong>QR Code Uses:</strong> {{url.qrclicks}}
<br /> <br />
<strong>Social Media Clicks:</strong> {{url.socialclicks}} <strong>Social Media Clicks:</strong> {{url.socialclicks}}
...@@ -118,43 +138,33 @@ ...@@ -118,43 +138,33 @@
<div class="col-md-6"> <div class="col-md-6">
<h3>Share Address:</h3> <h3>Share Address:</h3>
<!-- define the Go URL as `the_url` --> <!-- define the Go URL as `the_url` -->
{% with domain|add:url.short as the_url %} {% with domain|add:url.short as the_url %} {% with the_url|add:"?social" as social_url
<!-- some goofy code to use the qr lib and show the image --> %}
{% with the_url|add:"?qr" as qr_url%}
{% qr_from_text qr_url 's' %}
{% endwith %}
{% with the_url|add:"?social" as social_url %}
<!-- twitter --> <!-- twitter -->
<a class="share" href="https://twitter.com/share?url={{ social_url }}" target="_blank" title="Share via Twitter"> <a class="share" href="https://twitter.com/share?url={{ social_url }}" target="_blank"
title="Share via Twitter">
<i class="fa fa-twitter-square fa-3x"></i> <i class="fa fa-twitter-square fa-3x"></i>
</a> </a>
<!-- facebook --> <!-- facebook -->
<a class="share" href="https://www.facebook.com/share.php?u={{ social_url }}" target="_blank" title="Share via Facebook"> <a class="share" href="https://www.facebook.com/share.php?u={{ social_url }}" target="_blank"
title="Share via Facebook">
<i class="fa fa-facebook-square fa-3x"></i> <i class="fa fa-facebook-square fa-3x"></i>
</a> </a>
<!-- g+ --> <!-- g+ -->
<a class="share" href="https://plus.google.com/share?url={{ social_url }}" target="_blank" title="Share via Google+"> <a class="share" href="https://plus.google.com/share?url={{ social_url }}" target="_blank"
title="Share via Google+">
<i class="fa fa-google-plus-square fa-3x"></i> <i class="fa fa-google-plus-square fa-3x"></i>
</a> </a>
<!-- linkedin --> <!-- linkedin -->
<a class="share" href="https://www.linkedin.com/shareArticle?mini=true&amp;url={{ social_url }}&amp;ro=false&amp;summary=&amp;source=" target="_blank" title="Share via LinkedIn"> <a class="share" href="https://www.linkedin.com/shareArticle?mini=true&amp;url={{ social_url }}&amp;ro=false&amp;summary=&amp;source="
target="_blank" title="Share via LinkedIn">
<i class="fa fa-linkedin-square fa-3x"></i> <i class="fa fa-linkedin-square fa-3x"></i>
</a> </a>
{% endwith %} {% endwith %}
<!-- list out qr downloads -->
{% with the_url|add:"?qr" as qr_url %}
<!-- spacing matters with <pre>, ignore the ugliness -->
<pre><strong>QR Downloads:</strong>
<a href="https://chart.googleapis.com/chart?cht=qr&chs=268x268&chl={{ qr_url }}" target="_blank">Small (268x268)</a>
<a href="https://chart.googleapis.com/chart?cht=qr&chs=383x383&chl={{ qr_url }}" target="_blank">Medium (383x383)</a>
<a href="https://chart.googleapis.com/chart?cht=qr&chs=547x547&chl={{ qr_url }}" target="_blank">Large (547x547)</a></pre>
{% endwith %}
{% endwith %}
</div> </div>
</div> </div>
...@@ -178,8 +188,6 @@ ...@@ -178,8 +188,6 @@
</div> </div>
</div> </div>
</div> </div>
{% else %}
{% endif %}
<br></br> <br></br>
</div> </div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment