Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
21
Issues
21
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
go
Commits
d9154d47
Commit
d9154d47
authored
Jun 03, 2018
by
David Haynes
🙆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We don't need these lines hehe
- Achieve MVP Closes
#181
parent
333539e7
Pipeline
#2490
passed with stage
in 1 minute and 25 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
119 additions
and
117 deletions
+119
-117
go/go/templates/crispy/accordian-group.html
go/go/templates/crispy/accordian-group.html
+3
-9
go/go/templates/link_box.html
go/go/templates/link_box.html
+116
-108
No files found.
go/go/templates/crispy/accordian-group.html
View file @
d9154d47
<!-- Custom definition for accordian-group -->
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h4
class=
"panel-title"
>
{{ div.name }}
</h4>
</div>
<div
id=
"{{ div.css_id }}"
class=
"panel-collapse collapse{% if div.active %} in{% endif %}"
>
<div
class=
"panel-body"
>
<div
id=
"{{ div.css_id }}"
class=
"}"
>
{{ fields|safe }}
</div>
</div>
</div>
<br
/>
go/go/templates/link_box.html
View file @
d9154d47
<!-- load in go templatetags -->
{% load go_extras %}
<!-- load in qr code lib -->
{% load qr_tags %}
<!-- CSS for page -->
<style>
a
.share
:link
{
...
...
@@ -45,21 +42,45 @@
padding-top
:
4px
;
}
#copy-button-
{
{url.short
}
}
{
#copy-button-
{
{
url.short
}
}
{
border
:
none
;
background-color
:
#eeeeee
;
padding-bottom
:
3px
;
}
#copy-button-
{
{url.short
}
}
:focus
{
#copy-button-
{
{
url.short
}
}
:focus
{
outline
:
none
;
}
#clipboard-icon-
{
{url.short
}
}
{
#clipboard-icon-
{
{
url.short
}
}
{
font-size
:
14px
;
}
#link-
{
{url.short
}
}
:visited
{
#link-
{
{
url.short
}
}
:visited
{
color
:
#006633
;
}
...
...
@@ -79,7 +100,8 @@
<div
class=
"input-group"
>
<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"
>
<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>
</button>
</div>
...
...
@@ -89,12 +111,10 @@
<h3>
Address Details:
</h3>
<strong>
Target URL:
</strong>
<a
href=
"{{url.target}}"
target=
"_blank"
>
{{url.target}}
</a>
<br
/>
{% if url.owner == request.user.registereduser and request.user.registereduser.approved
== True %}
<br
/>
{% if url.owner == request.user.registereduser and request.user.registereduser.approved
== True %}
<strong>
Clicks:
</strong>
{{url.clicks}}
<br
/>
<strong>
QR Code Uses:
</strong>
{{url.qrclicks}}
<br
/>
<strong>
Social Media Clicks:
</strong>
{{url.socialclicks}}
...
...
@@ -118,43 +138,33 @@
<div
class=
"col-md-6"
>
<h3>
Share Address:
</h3>
<!-- define the Go URL as `the_url` -->
{% with domain|add:url.short as the_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 %}
{% with domain|add:url.short as the_url %} {% with the_url|add:"?social" as social_url
%}
<!-- 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>
</a>
<!-- 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>
</a>
<!-- 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>
</a>
<!-- linkedin -->
<a
class=
"share"
href=
"https://www.linkedin.com/shareArticle?mini=true&url={{ social_url }}&ro=false&summary=&source="
target=
"_blank"
title=
"Share via LinkedIn"
>
<a
class=
"share"
href=
"https://www.linkedin.com/shareArticle?mini=true&url={{ social_url }}&ro=false&summary=&source="
target=
"_blank"
title=
"Share via LinkedIn"
>
<i
class=
"fa fa-linkedin-square fa-3x"
></i>
</a>
{% 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>
...
...
@@ -178,8 +188,6 @@
</div>
</div>
</div>
{% else %}
{% endif %}
<br></br>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment