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
76d358c7
Commit
76d358c7
authored
Feb 10, 2018
by
David Haynes
🙆
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '120-masonstrap-4' into 2.3-dev
parents
fd262ff6
d6f2bc64
Pipeline
#2110
passed with stages
in 3 minutes and 21 seconds
Changes
26
Pipelines
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
291 additions
and
3181 deletions
+291
-3181
.gitlab/issue_templates/default.md
.gitlab/issue_templates/default.md
+1
-1
CONTRIBUTING.md
CONTRIBUTING.md
+11
-7
README.md
README.md
+12
-0
docker-compose.yml
docker-compose.yml
+5
-5
go-cleanlinks.cron
go-cleanlinks.cron
+0
-7
go/go/management/commands/expirelinks.py
go/go/management/commands/expirelinks.py
+8
-12
go/go/management/commands/test_expirelinks.py
go/go/management/commands/test_expirelinks.py
+5
-10
go/go/templates/core/about.html
go/go/templates/core/about.html
+13
-93
go/go/templates/core/edit.html
go/go/templates/core/edit.html
+0
-0
go/go/templates/core/new.html
go/go/templates/core/new.html
+0
-0
go/go/templates/landing.html
go/go/templates/landing.html
+104
-0
go/go/templates/layouts/base.html
go/go/templates/layouts/base.html
+16
-30
go/go/templates/layouts/navbar.html
go/go/templates/layouts/navbar.html
+64
-0
go/go/templates/layouts/navigation.html
go/go/templates/layouts/navigation.html
+0
-71
go/go/templates/manage.html
go/go/templates/manage.html
+0
-0
go/go/templates/public_landing.html
go/go/templates/public_landing.html
+0
-108
go/go/views.py
go/go/views.py
+8
-6
go/settings/test_urls.py
go/settings/test_urls.py
+4
-4
go/static/css/bootswatch.min.css
go/static/css/bootswatch.min.css
+0
-11
go/static/css/global.css
go/static/css/global.css
+35
-0
go/static/css/styles.css
go/static/css/styles.css
+0
-56
go/static/js/bootstrap.js
go/static/js/bootstrap.js
+0
-2002
go/static/js/bootstrap.min.js
go/static/js/bootstrap.min.js
+0
-9
go/static/js/clipboard.js
go/static/js/clipboard.js
+0
-742
go/static/js/jquery.min.js
go/static/js/jquery.min.js
+0
-4
startup.sh
startup.sh
+5
-3
No files found.
.gitlab/issue_templates/default.md
View file @
76d358c7
...
...
@@ -5,7 +5,7 @@ about the current issue. Maybe a picture? Some details that could best help some
especially someone new, understand the goal of the issue and how they should best
approach the problem.
# Helpful Links
#
#
Helpful Links
Here you should include a bullet point list of links to documentation, stack overflow,
whatever, that could help guide someone on what it is they are trying to do.
...
...
CONTRIBUTING.md
View file @
76d358c7
...
...
@@ -18,13 +18,15 @@ the issues page.
If you decide to take on an issue for Go you will need to work in a branch off
of the current development branch (ie.
`2.3-dev`
with 2.3 being the version in
development).
development).
This can be done with the following chain of
`git`
commands within
`go/`
:
git pull
git checkout 2.3-dev
git checkout -B ##-shortdescription
```
sh
git pull
git checkout 2.3-dev
git checkout
-B
##-shortdescription
```
**Note:**
...
...
@@ -34,9 +36,11 @@ does.
**Example:**
git pull
git checkout 2.3-dev
git checkout -B 102-readmeUpdates
```
sh
git pull
git checkout 2.3-dev
git checkout
-B
102-readmeUpdates
```
If you are working on something that does not have an issue please open a new
issue before creating your branch.
...
...
README.md
View file @
76d358c7
...
...
@@ -221,6 +221,18 @@ repository and is named go-cleanlinks.cron. Drop this in cron.hourly and
change the paths so that they point to the virtualenv activate script and
manage.py.
## Production cron job
```
sh
#!/bin/bash
# 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
source
${
ACTIVATE_PATH
}
python
${
MANAGE_PATH
}
expirelinks
```
---
**Note:**
...
...
docker-compose.yml
View file @
76d358c7
...
...
@@ -7,7 +7,7 @@ services:
restart_policy
:
condition
:
on-failure
networks
:
-
go
net
-
go
ports
:
-
"
3306:3306"
environment
:
...
...
@@ -23,10 +23,10 @@ services:
restart_policy
:
condition
:
on-failure
networks
:
-
go
net
-
go
ports
:
-
'
8000:8000'
command
:
/bin/bash
./startup.sh
command
:
./startup.sh
volumes
:
-
.:/go
depends_on
:
...
...
@@ -46,7 +46,7 @@ services:
-
GO_EMAIL_HOST_PASSWORD=
-
GO_EMAIL_FROM=
-
GO_EMAIL_TO=
-
superuser
=dhaynes3
-
SUPERUSER
=dhaynes3
networks
:
go
net
:
go
:
go-cleanlinks.cron
deleted
100644 → 0
View file @
fd262ff6
#!/bin/bash
# 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
source
${
ACTIVATE_PATH
}
python
${
MANAGE_PATH
}
expirelinks
go/go/management/commands/expirelinks.py
View file @
76d358c7
"""
go/commands/expirelinks.py
"""
Remove expired links from the database.
"""
# Future Imports
from
__future__
import
(
absolute_import
,
division
,
print_function
,
unicode_literals
)
...
...
@@ -16,20 +17,15 @@ from go.models import URL
class
Command
(
BaseCommand
):
"""
Define a new custom django-admin command to remove expired links from the
database
database
.
"""
# Define help text for this command
help
=
'Removes expired links from the database'
def
handle
(
self
,
*
args
,
**
options
):
"""
The handle function handles the main component of the django-admin
command.
Handle the main component of the django-admin command. Loop
through a list of all URL objects that have expired (expires field is
less than or equal [lte] to today's date)
"""
# Loop through a list of all URL objects that have expired
# (expires field is less than or equal to today's date)
for
toexpire
in
URL
.
objects
.
filter
(
expires__lte
=
timezone
.
now
()):
# Delete the current URL
toexpire
.
delete
()
for
expired_url
in
URL
.
objects
.
filter
(
expires__lte
=
timezone
.
now
()):
expired_url
.
delete
()
go/go/management/commands/test_expirelinks.py
View file @
76d358c7
"""
go/commands/test_expirelinks.py
"""
Test that the function to expire Go links actually works.
"""
# Future Imports
from
__future__
import
(
absolute_import
,
division
,
print_function
,
unicode_literals
)
...
...
@@ -19,16 +20,11 @@ from django.utils import timezone
from
go.models
import
URL
,
RegisteredUser
class
ExpireLinksTest
(
TestCase
):
"""
Test cases for the functions in expirelinks
"""
def
setUp
(
self
):
"""
Set up any variables such as dummy objects that will be utili
s
ed in
Set up any variables such as dummy objects that will be utili
z
ed in
testing methods
"""
# Setup a blank URL object with an owner
User
.
objects
.
create
(
username
=
'dhaynes'
,
password
=
'password'
)
get_user
=
User
.
objects
.
get
(
username
=
'dhaynes'
)
...
...
@@ -52,9 +48,8 @@ class ExpireLinksTest(TestCase):
def
test_expirelinks
(
self
):
"""
Test that the expirelinks django admin command functions as intentioned.
Make a call to expire Go links and assert that the number of links has
been reduced.
"""
call_command
(
'expirelinks'
)
self
.
assertTrue
(
len
(
URL
.
objects
.
all
())
==
1
)
go/go/templates/core/about.html
View file @
76d358c7
<!-- include the base html template -->
{% extends 'layouts/base.html' %}
<!-- Tell Django to load static files -->
{% load staticfiles %}
<!-- define the page title block -->
{% block title %}
SRCT Go
•
About
{% endblock %}
<!-- define the content block for the page -->
{% block content %}
<!--
define the page header div
-->
<!--
page header
-->
<div
class=
"page-header"
id=
"banner"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
...
...
@@ -26,41 +23,32 @@ SRCT Go • About
</div>
</div>
<!--
define the terms of use div
-->
<!--
terms of use
-->
<div
class=
"row"
id=
"terms"
>
<div
class=
"col-md-12"
>
<h4>
Terms of Use
</h4>
<legend></legend>
<h2>
Terms of Use
</h2>
<p>
By using Go you acknowledge that you are a current George Mason Student or faculty
member.
<br></br>
Additionally, any link that you create is subject to removal by Go admins if it is
deemed to associate the univeristy with any
<br
/>
derogatory or controversial matters.
<br></br>
deemed to associate the univeristy with any derogatory or controversial matters.
Go admins also reserve the right to remove and ban any users who attempt to abuse
the link creation system in any manner.
<br></br>
Since Go falls under the gmu.edu domain, users who use this service will act in compliance
with the GMU
<a
href=
"https://universitypolicy.gmu.edu/policies/responsible-use-of-computing/"
>
Responsible Use of Computing
</a>
policies.
with the GMU
<a
href=
"https://universitypolicy.gmu.edu/policies/responsible-use-of-computing/"
>
Responsible Use of Computing
</a>
policies.
</p>
<br
/>
</div>
</div>
<!--
define the who made go? div
-->
<!--
who made go?
-->
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h4>
Who made Go?
</h4>
<legend></legend>
<h2>
Who made Go?
</h2>
<p>
Members of the
<a
href=
"//srct.gmu.edu"
>
Student-Run Computing and Technology
</a>
registered
student organization at
<a
href=
"//gmu.edu"
>
George Mason University
</a>
are
the clever,
<br
/>
talented student developers behind Go.
the clever, talented student developers behind Go.
</p>
<p>
We are a group of creative people that like making software and want to give back
...
...
@@ -68,22 +56,18 @@ SRCT Go • About
</p>
<p>
<a
href=
"//srct.gmu.edu/contact/"
>
Contact us
</a>
to get involved!
<p>
<br
/>
</p>
</div>
</div>
<!-- define the thanks! div -->
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h4>
Thanks!
</h4>
<legend></legend>
<h2>
Thanks!
</h2>
<p>
This project was made possible through the collective contributions of multiple Mason
SRCT members.
<br></br>
This project was made possible through the collective contributions of
multiple Mason SRCT members.
<a
href=
"https://git.gmu.edu/srct/go/milestones/3"
>
Go 2.2
</a>
:
<br
/>
<a
href=
"https://github.com/dhaynespls"
>
David Haynes
</a>
,
<a
href=
"https://github.com/ocelotsloth"
>
Mark Stenglein
</a>
,
<a
href=
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
>
Andres Villogas
</a>
,
...
...
@@ -97,9 +81,7 @@ SRCT Go • About
<a
href=
"https://github.com/nanderson94"
>
Nicholas Anderson
</a>
,
<a
href=
""
>
Kevin Mckigney
</a>
,
and
<a
href=
"https://github.com/dwbond"
>
Daniel Bond
</a>
.
<br></br>
<a
href=
"https://git.gmu.edu/srct/go/milestones/2"
>
Go 2.1
</a>
:
<br
/>
<a
href=
"https://github.com/dhaynespls"
>
David Haynes
</a>
,
<a
href=
"https://github.com/zosman1"
>
Zach Osman
</a>
,
<a
href=
"https://github.com/roberthitt"
>
Robert Hitt
</a>
,
...
...
@@ -109,85 +91,23 @@ SRCT Go • About
<a
href=
"https://github.com/mdsecurity"
>
Mattias Duffy
</a>
,
<a
href=
"https://github.com/IAmEyad"
>
Eyad Hasan
</a>
,
and
<a
href=
"https://github.com/danielkim1"
>
Danny Kim
</a>
.
<br></br>
<a
href=
"https://git.gmu.edu/srct/go/milestones/1"
>
Go 2.0
</a>
:
<br
/>
<a
href=
"https://github.com/dhaynespls"
>
David Haynes
</a>
,
<a
href=
""
>
Matthew Rodgers
</a>
,
<a
href=
"https://github.com/nanderson94"
>
Nicholas Anderson
</a>
,
and
<a
href=
"https://github.com/dwbond"
>
Daniel Bond
</a>
.
<br></br>
Go 1.0:
<br
/>
<a
href=
"https://github.com/jrouly"
>
Michel Rouly
</a>
,
<a
href=
"https://github.com/creffett"
>
Chris Reffett
</a>
,
<a
href=
"https://github.com/nanderson94"
>
Nicholas Anderson
</a>
, and
<a
href=
"https://github.com/akshaykarthik"
>
Akshay Karthik
</a>
.
<br></br>
</p>
<p>
Additional thanks are due to the
<a
href=
"https://wiki.srct.gmu.edu/Executive_Board"
>
Student-Run Computing and Technology executive
board from 2014-present
</a>
,
and our academic advisor,
board from 2014-present
</a>
,and our academic advisor,
<a
href=
"https://cs.gmu.edu/~kdobolyi/"
>
Professor Kinga Dobolyi
</a>
.
</p>
</div>
</div>
<!-- define the LibreJS License Table -->
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h4>
JavaScript License Information
</h4>
<legend></legend>
<table
class=
"table"
id=
"jslicense-labels1"
>
<thead>
<tr>
<th>
Source File
</th>
<th>
License
</th>
<th>
Uncompressed Source
</th>
</tr>
</thead>
<tr>
<td><a
href=
"{% static "
js
/
jquery.min.js
"
%}"
>
jquery.min.js
</a></td>
<td><a
href=
"http://jquery.org/license"
>
Expat
</a></td>
<td><a
href=
"http://code.jquery.com/jquery-2.1.1.js"
>
jquery-2.1.1.js
</a></td>
</tr>
<tr>
<td><a
href=
"{% static "
js
/
bootstrap.min.js
"
%}"
>
bootstrap.js
</a></td>
<td><a
href=
"http://www.apache.org/licenses/LICENSE-2.0"
>
Apache-2.0
</a></td>
<td><a
href=
"{% static "
js
/
bootstrap.js
"
%}"
>
bootstrap.js
</a></td>
</tr>
<tr>
<td><a
href=
"{% static "
js
/
clipboard.min.js
"
%}"
>
clipboard.min.js
</a></td>
<td><a
href=
"https://zenorocha.mit-license.org/"
>
Expat
</a></td>
<td><a
href=
"{% static "
js
/
clipboard.js
"
%}"
>
clipboard.js
</a></td>
</tr>
<tr>
<td><a
href=
"{% static "
js
/
copy.js
"
%}"
>
copy.js
</a></td>
<td><a
href=
"http://www.apache.org/licenses/LICENSE-2.0"
>
Apache-2.0
</a></td>
<td><a
href=
"{% static "
js
/
copy.js
"
%}"
>
copy.js
</a></td>
</tr>
<tr>
<td><a
href=
"{% static "
js
/
new_link.js
"
%}"
>
new_link.js
</a></td>
<td><a
href=
"http://www.apache.org/licenses/LICENSE-2.0"
>
Apache-2.0
</a></td>
<td><a
href=
"{% static "
js
/
new_link.js
"
%}"
>
new_link.js
</a></td>
</tr>
<tr>
<td><a
href=
"{% static "
js
/
tab.js
"
%}"
>
tab.js
</a></td>
<td><a
href=
"https://github.com/twbs/bootstrap/blob/master/LICENSE"
>
Expat
</a></td>
<td><a
href=
"{% static "
js
/
tab.js
"
%}"
>
tab.js
</a></td>
</tr>
<tr>
<td><a
href=
"{% static "
js
/
tooltip.js
"
%}"
>
tooltip.js
</a></td>
<td><a
href=
"https://github.com/twbs/bootstrap/blob/master/LICENSE"
>
Expat
</a></td>
<td><a
href=
"{% static "
js
/
tooltip.js
"
%}"
>
tooltip.js
</a></td>
</tr>
<tr>
<td><a
href=
"{% static "
js
/
useradmin.js
"
%}"
>
useradmin.js
</a></td>
<td><a
href=
"http://www.apache.org/licenses/LICENSE-2.0"
>
Apache-2.0
</a></td>
<td><a
href=
"{% static "
js
/
useradmin.js
"
%}"
>
useradmin.js
</a></td>
</tr>
</table>
</div>
</div>
{% endblock %}
go/go/templates/core/edit
_link
.html
→
go/go/templates/core/edit.html
View file @
76d358c7
File moved
go/go/templates/core/new
_link
.html
→
go/go/templates/core/new.html
View file @
76d358c7
File moved
go/go/templates/landing.html
0 → 100644
View file @
76d358c7
{% extends 'layouts/base.html' %}
{% block title %}
SRCT Go
•
Welcome
{% endblock %}
{% block content %}
<div
class=
"page-header mb-5"
>
<div
class=
"row"
>
<div
class=
"col"
>
<h1><i
class=
"fas fa-link"
></i>
Go
</h1>
<p
class=
"lead"
>
University-branded URL shortening
</p>
</div>
</div>
</div>
<div
class=
"row mb-5 "
>
<div
class=
"col-md-4 d-flex align-items-stretch"
>
<div
class=
"card landing-card shadow-hover mb-3"
>
<div
class=
"card-header"
>
<h5>
What is Go?
</h5>
</div>
<div
class=
"card-body"
>
<p
class=
"card-text"
>
Go provides University-branded URL shortening for student organizations, administration,
and ULife groups. Any approved user can generate a
<a
href=
"https://go.gmu.edu"
>
go.gmu.edu
</a>
address that can redirect to a longer URL.
</p>
<p
class=
"card-text"
>
Go is a product of the George Mason University
<a
href=
"https://srct.gmu.edu"
>
Student-Run Computing and Technology
</a>
student organization.
</p>
</div>
</div>
</div>
<div
class=
"col-md-4 d-flex align-items-stretch"
>
<div
class=
"card landing-card shadow-hover mb-3"
>
<div
class=
"card-header"
>
<h5>
Why should I use Go?
</h5>
</div>
<div
class=
"card-body"
>
<p
class=
"card-text"
>
Go features:
<ul
class=
"fa-ul"
>
<li>
<span
class=
"fa-li mt-1"
>
<i
class=
"fas fa-check-square"
></i>
</span>
Data tracking on the number of clicks a Go link gets.
</li>
<li>
<span
class=
"fa-li mt-1"
>
<i
class=
"fas fa-check-square"
></i>
</span>
Options to share Go links across various social media platforms.
</li>
<li>
<span
class=
"fa-li mt-1"
>
<i
class=
"fas fa-check-square"
></i>
</span>
QR Code generation at various resolutions, ready to be shared.
</li>
<li>
<span
class=
"fa-li mt-1"
>
<i
class=
"fas fa-check-square"
></i>
</span>
Optional expiration for links after particular times.
</li>
</ul>
</p>
</div>
</div>
</div>
<div
class=
"col-md-4 d-flex align-items-stretch"
>
<div
class=
"card landing-card shadow-hover mb-3"
>
<div
class=
"card-header"
>
<h5>
How do I access Go?
</h5>
</div>
<div
class=
"card-body"
>
<p
class=
"card-text"
>
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.
</p>
<p
class=
"card-text"
>
Additionally, only users with a current, valid Mason username and password may request
to be approved.
</p>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<a
href=
"{% url 'go_login' %}"
class=
"btn btn-outline-primary btn-block shadow-hover mb-3"
>
<i
class=
"fas fa-sign-in-alt"
></i>
Log In
</a>
</div>
<div
class=
"col-md-6"
>
<a
href=
"{% url 'signup' %}"
class=
"btn btn-outline-primary btn-block shadow-hover mb-3"
>
<i
class=
"fas fa-user-plus"
></i>
Sign Up
</a>
</div>
</div>
{% endblock %}
\ No newline at end of file
go/go/templates/layouts/base.html
View file @
76d358c7
<!-- Tell Django to load static files -->
{% load staticfiles %}
<!-- HTML 5 definition -->
<!DOCTYPE html>
<!-- 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 block defined on each html page -->
<title>
{% block title %}
{% endblock %}
</title>
<!-- Metatags -->
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"x-ua-compatible"
content=
"ie=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<!-- Chrome on Android navbar color -->
<meta
name=
"theme-color"
content=
"#006633"
>
<!-- FB/Opengraph tags -->
<meta
property=
"og:url"
content=
"https://go.gmu.edu/"
>
<meta
property=
"og:type"
content=
"website"
>
<meta
property=
"og:title"
content=
"SRCT Go"
>
<!--<meta property="og:image" content="https://git.gmu.edu/uploads/project/avatar/10/noun_534670_cc.png">-->
<meta
property=
"og:description"
content=
"University-branded URL shortening."
>
<meta
property=
"og:site_name"
content=
"SRCT Go"
>
<meta
property=
"og:locale"
content=
"en_US"
>
...
...
@@ -34,38 +27,31 @@
<meta
name=
"twitter:site"
content=
"@MasonSRCT"
>
<meta
name=
"twitter:creator"
content=
"@MasonSRCT"
>
<meta
name=
"twitter:url"
content=
"https://go.gmu.edu/"
>
<meta
name=
"twitter:title"
content=
"SRCT G
p
"
>
<meta
name=
"twitter:title"
content=
"SRCT G
o
"
>
<meta
name=
"twitter:description"
content=
"University-branded URL shortening."
>
<!--<meta name="twitter:image" content="https://git.gmu.edu/uploads/project/avatar/10/noun_534670_cc.png">-->
<!--
Load in our
icon -->
<!--
Global fav
icon -->
<link
rel=
"icon"
type=
"image/ico"
href=
"{% static "
img
/
favicon.ico
"
%}"
/>
<!-- Load in global CSS -->
<link
href=
"https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
rel=
"stylesheet"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"{% static "
css
/
bootswatch.min.css
"
%}"
/>
<link
rel=
"stylesheet"
href=
"{% static "
css
/
styles.css
"
%}"
/>
<!-- Load in global JS -->
<script
src=
"{% static "
js
/
jquery.min.js
"
%}"
></script>
<script
src=
"{% static "
js
/
bootstrap.min.js
"
%}"
></script>
<script
src=
"{% static "
js
/
clipboard.min.js
"
%}"
></script>
<!-- Global CSS -->
<link
href=
"https://srct.gmu.io/masonstrap/css/masonstrap.min.css"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
href=
"{% static "
css
/
global.css
"
%}"
/>
</head>
<!-- Load in the body of a Go page -->
<body>
<!-- Load in the navbar
template
-->
{% include 'layouts/nav
igation
.html' %}
<!-- Load in the navbar -->
{% include 'layouts/nav
bar
.html' %}
<!-- Wrap the page content in a bootstrap container -->
<div
class=
"container"
>
<div
class=
"container begin"
>
<!-- Load in the main page content -->
{% block content %}
{% endblock %}
</div>
<!-- Load in the footer template -->
{% include 'layouts/footer.html' %}
</body>
<!-- Load in the footer template -->
{% include 'layouts/footer.html' %}
<!-- Global JS -->
<script
src=
"https://srct.gmu.io/masonstrap/js/masonstrap.min.js"
></script>
</html>
\ No newline at end of file
go/go/templates/layouts/navbar.html
0 → 100644
View file @
76d358c7
<!-- load in go templatetags -->
{% load go_extras %}
<header
class=
"navbar fixed-top navbar-expand-lg navbar-dark bg-primary"
role=
"navigation"
>
<div
class=
"container"
>
<!-- Brand -->
<a
class=
"navbar-brand"
href=
"/"
>
<i
class=
"fas fa-link"
></i>
Go
</a>
<!-- Collapse button -->
<button
class=
"navbar-toggler collapsed"
type=
"button"
data-toggle=
"collapse"
data-target=
"#collapse"
aria-controls=
"collapse"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
<!-- -->
<div
class=
"collapse navbar-collapse"
id=
"collapse"
>
<!-- -->
<ul
class=
"navbar-nav mr-auto"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{% url 'about' %}"
>
About
</a>
</li>
<!-- -->
{% if user.is_authenticated %}
{% if user.registereduser.approved %}
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{% url 'new_link' %}"
>
New Link
</a>
</li>
{% endif %}
{% if not user.registereduser.registered %}
<li
class=
"nav-item"
>
<a
href=
"{% url 'signup' %}"
>
Register
</a>
</li>
{% endif %}
{% endif %}
</ul>
<!-- -->
<ul
class=
"navbar-nav ml-auto"
>
<!-- -->
{% if user.is_authenticated %}
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{% url 'go_logout' %}"
>
Log Out
<i
class=
"fa fa-sign-out fa-fw"
></i>
</a>
</li>
{% else %}
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{% url 'go_login' %}"
>
<i
class=
"fas fa-sign-in-alt"
></i>
Log In
</a>
</li>
{% endif %}
<!-- -->
{% if user.is_staff %}
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{% url 'useradmin' %}"
>
User Moderation
<i
class=
"fa fa-users fa-fw"
></i>