Commit 349e6f5b authored by David Haynes's avatar David Haynes
Browse files

Merge branch 'master' into docker-and-stuff

parents 1b8e73e5 c266a4ef
Pipeline #574 passed with stage
in 7 minutes and 29 seconds
# Cron job to automatically expire outdated links, put this in cron.hourly
......@@ -7,10 +7,10 @@
<!-- Start the HTML page for Go -->
<!-- -->
<!-- load in our header content for every page -->
<!-- load in the title block defined on each html page -->
<!-- load in the title block defined on each html page -->
{% block title %}
{% endblock %}
......@@ -22,6 +22,7 @@
<meta name="author" content="Mason SRCT">
<meta name="robots" content="all">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#006633">
<!-- Load in our icon -->
<link rel="icon" type="image/ico" href="{% static "img/favicon.ico"%}" />
......@@ -4,6 +4,56 @@
<!-- load in qr code lib -->
{% load qr_tags %}
<!-- CSS for page -->
a.share:link {color:#000000;}
a.share:visited {color:#000000;}
a.share:hover {color:#000000;}
a.share {text-decoration:none;}
a.button:link {color:#FFF;}
a.button:visited {color:#FFF;}
a.button:hover {color:#FFF;}
legend {
font-size: inherit;
#button-container {
padding-bottom: 4px;
padding-left: 6px;
padding-right: 6px;
padding-top: 4px;
#copy-button-{{url.short}} {
border: none;
background-color: #eeeeee;
padding-bottom: 3px;
#copy-button-{{url.short}}:focus {
outline: none;
#clipboard-icon-{{url.short}} {
font-size: 14px;
#link-{{url.short}}:visited {
color: #006633;
#link-container-{{url.short}} {
width: 400px;
.tooltip-inner {
white-space: nowrap;
max-width: none;
<!-- each link_box is a container of a bunch of elements -->
<div class="container">
......@@ -12,13 +62,13 @@
<!-- what is the address? -->
<h3>Go Address:</h3>
<div id="link-container" class="input-group">
<a id="link" class="form-control" href="{{domain}}{{url.short}}">
<a id="link-{{url.short}}" class="form-control" href="{{domain}}{{url.short}}">
<div id="button-container" class="input-group-addon">
<button id="copy-button" type="button" class="button btn btn-default btn-xs fa" role="button"
data-clipboard-target="#link" title="Copy to Clipboard">
<i id="clipboard-icon" class="fa fa-clipboard fa-1g" aria-hidden="true"></i>
<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>
......@@ -45,9 +95,8 @@
<strong>Expires:</strong> {{url.expires|default_if_none:"Never"}}
<!-- delete button -->
<a class="button btn btn-danger btn-sm fa" data-target="#deletionModal" data-toggle="modal">
<!-- Delete Button -->
<a class="button btn btn-danger btn-sm fa" data-target="#deletionModal-{{url.short}}" data-toggle="modal">
<i class="fa fa-trash-o fa-lg"></i> Delete
......@@ -57,9 +106,8 @@
contribute code, head to">
<i class="fa fa-cog"></i> Edit
<!-- define delete modal -->
<div id="deletionModal" class="modal fade" role="dialog" tabindex="-1">
<!--Define Delete Modal-->
<div id="deletionModal-{{url.short}}" class="modal fade" role="dialog" tabindex="-1">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content" style="background-color:#f5f5f5; border-radius: 7px">
......@@ -68,7 +116,7 @@
style="font-weight:bold; font-size: 21px !important;">
Are you sure you would like to delete this link?</h4>
<h6 style="font-weight:500; margin-top: 0px; margin-bottom: 0px;">
Deleting a link is permenant and can not be undone!</h6>
Deleting a link is permanent and can not be undone!</h6>
<div class="modal-body" style="padding-bottom: 80px">
<a type="button" class="btn btn-success btn-lg" style="border-width: 0px;float:left; width:49%; background-color: #A9B0AD; color: #ffffff; border-radius: 4px;" data-dismiss="modal">Cancel</a>
......@@ -132,3 +180,22 @@
<!-- script for copying text an displaying a tooltip -->
var clipboard = new Clipboard('#copy-button-{{url.short}}');
trigger: 'hover',
placement: 'bottom'
$('#copy-button-{{url.short}}').on('', function () {
$('#copy-button-{{url.short}}').attr('data-original-title', 'Copy to Clipboard');
clipboard.on('success', function(e) {
$('#copy-button-{{url.short}}').attr('data-original-title', 'Copied!').tooltip('show');
......@@ -81,7 +81,7 @@ SRCT Go &bull; Welcome
<h3><i class="fa">How do I access Go?</i></h3>
In order to prevent abuse of the URL shortner, access to Go
In order to prevent abuse of the URL shortener, access to Go
is moderated by SRCT administrators. New users will need to fill out
a registration form in order to become an approved user.
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