Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
349e6f5b
Commit
349e6f5b
authored
Dec 03, 2016
by
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
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
go-cleanlinks.cron
View file @
349e6f5b
#!/bin/sh
#!/bin/
ba
sh
# Cron job to automatically expire outdated links, put this in cron.hourly
ACTIVATE_PATH
=
/path/to/virtualenv/activate
MANAGE_PATH
=
/path/to/go/manage.py
...
...
go/go/templates/layouts/base.html
View file @
349e6f5b
...
...
@@ -7,10 +7,10 @@
<!-- Start the HTML page for Go -->
<html>
<!-- -->
<!--
load in our header content for every page
-->
<head>
<!-- load in the title block defined on each html page -->
<title>
<!-- load in the title block defined on each html page -->
{% block title %}
{% endblock %}
</title>
...
...
@@ -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
"%}"
/>
...
...
go/go/templates/link_box.html
View file @
349e6f5b
...
...
@@ -4,6 +4,56 @@
<!-- load in qr code lib -->
{% load qr_tags %}
<!-- CSS for page -->
<style>
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
;
}
</style>
<!-- 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}}"
>
{{domain}}{{url.short}}
</a>
<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>
</button>
</div>
</div>
...
...
@@ -45,9 +95,8 @@
<strong>
Expires:
</strong>
{{url.expires|default_if_none:"Never"}}
<br></br>
<!-- 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
</a>
...
...
@@ -57,9 +106,8 @@
contribute code, head to git.gmu.edu/srct/go"
>
<i
class=
"fa fa-cog"
></i>
Edit
</a>
<!-- 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 perm
ena
nt and can not be undone!
</h6>
Deleting a link is perm
ane
nt and can not be undone!
</h6>
</div>
<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 @@
$
(
'
[data-toggle="popover"]
'
).
popover
(
option
)
})
</script>
<!-- script for copying text an displaying a tooltip -->
<script>
var
clipboard
=
new
Clipboard
(
'
#copy-button-{{url.short}}
'
);
$
(
'
#copy-button-{{url.short}}
'
).
tooltip
({
trigger
:
'
hover
'
,
placement
:
'
bottom
'
});
$
(
'
#copy-button-{{url.short}}
'
).
on
(
'
hidden.bs.tooltip
'
,
function
()
{
$
(
'
#copy-button-{{url.short}}
'
).
attr
(
'
data-original-title
'
,
'
Copy to Clipboard
'
);
});
clipboard
.
on
(
'
success
'
,
function
(
e
)
{
e
.
clearSelection
();
$
(
'
#copy-button-{{url.short}}
'
).
attr
(
'
data-original-title
'
,
'
Copied!
'
).
tooltip
(
'
show
'
);
});
</script>
go/go/templates/public_landing.html
View file @
349e6f5b
...
...
@@ -81,7 +81,7 @@ SRCT Go • Welcome
<h3><i
class=
"fa"
>
How do I access Go?
</i></h3>
<legend></legend>
<p>
In order to prevent abuse of the URL shortner, access to Go
In order to prevent abuse of the URL short
e
ner, 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.
<br></br>
...
...
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