Initialise wagtail
This commit is contained in:
parent
ccb0627ae7
commit
ba130f58c0
109 changed files with 672 additions and 2891 deletions
118
.gitignore
vendored
118
.gitignore
vendored
|
@ -1,6 +1,11 @@
|
||||||
|
|
||||||
|
# Created by https://www.gitignore.io
|
||||||
|
|
||||||
|
### Python ###
|
||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
# C extensions
|
# C extensions
|
||||||
*.so
|
*.so
|
||||||
|
@ -14,6 +19,7 @@ dist/
|
||||||
downloads/
|
downloads/
|
||||||
eggs/
|
eggs/
|
||||||
.eggs/
|
.eggs/
|
||||||
|
lib/
|
||||||
lib64/
|
lib64/
|
||||||
parts/
|
parts/
|
||||||
sdist/
|
sdist/
|
||||||
|
@ -34,13 +40,14 @@ pip-delete-this-directory.txt
|
||||||
|
|
||||||
# Unit test / coverage reports
|
# Unit test / coverage reports
|
||||||
htmlcov/
|
htmlcov/
|
||||||
coverage/
|
|
||||||
.tox/
|
.tox/
|
||||||
.coverage
|
.coverage
|
||||||
.coverage.*
|
.coverage.*
|
||||||
.cache
|
.cache
|
||||||
|
nosetests.xml
|
||||||
coverage.xml
|
coverage.xml
|
||||||
*,cover
|
*,cover
|
||||||
|
.hypothesis/
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
*.mo
|
*.mo
|
||||||
|
@ -48,8 +55,14 @@ coverage.xml
|
||||||
|
|
||||||
# Django stuff:
|
# Django stuff:
|
||||||
*.log
|
*.log
|
||||||
collected-static/
|
local_settings.py
|
||||||
node_modules/
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
# Sphinx documentation
|
# Sphinx documentation
|
||||||
docs/_build/
|
docs/_build/
|
||||||
|
@ -57,10 +70,97 @@ docs/_build/
|
||||||
# PyBuilder
|
# PyBuilder
|
||||||
target/
|
target/
|
||||||
|
|
||||||
# Pelican stuff
|
# Jupyter Notebook
|
||||||
output/
|
.ipynb_checkpoints
|
||||||
theme/static/build/
|
|
||||||
pelican_plugins/
|
|
||||||
|
|
||||||
theme/static/src/scss/pygment.css
|
# pyenv
|
||||||
deploy/
|
.python-version
|
||||||
|
|
||||||
|
# celery beat schedule file
|
||||||
|
celerybeat-schedule
|
||||||
|
|
||||||
|
# dotenv
|
||||||
|
.env
|
||||||
|
|
||||||
|
# virtualenv
|
||||||
|
.venv/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
|
||||||
|
### Django ###
|
||||||
|
*.pyc
|
||||||
|
db.sqlite3
|
||||||
|
media
|
||||||
|
|
||||||
|
|
||||||
|
### Node ###
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
npm-debug.log*
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules
|
||||||
|
jspm_packages
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Linux ###
|
||||||
|
*~
|
||||||
|
|
||||||
|
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||||
|
.fuse_hidden*
|
||||||
|
|
||||||
|
# KDE directory preferences
|
||||||
|
.directory
|
||||||
|
|
||||||
|
# Linux trash folder which might appear on any partition or disk
|
||||||
|
.Trash-*
|
||||||
|
|
||||||
|
# .nfs files are created when an open file is removed but is still being accessed
|
||||||
|
.nfs*
|
||||||
|
|
82
.spelling
82
.spelling
|
@ -1,82 +0,0 @@
|
||||||
# markdown-spellcheck spelling configuration file
|
|
||||||
# Format - lines beginning # are comments
|
|
||||||
# global dictionary is at the start, file overrides afterwards
|
|
||||||
# one word per line, to define a file override use ' - filename'
|
|
||||||
# where filename is relative to this configuration file
|
|
||||||
_enabler
|
|
||||||
_link
|
|
||||||
_list
|
|
||||||
_path
|
|
||||||
_title
|
|
||||||
120mm
|
|
||||||
16-core
|
|
||||||
A.L.I.C.E
|
|
||||||
AiO
|
|
||||||
astrill
|
|
||||||
backends
|
|
||||||
bsod-enabler
|
|
||||||
catalog
|
|
||||||
centers
|
|
||||||
collyer's
|
|
||||||
config
|
|
||||||
dabapps
|
|
||||||
desktop.txt
|
|
||||||
dotfiles
|
|
||||||
easter
|
|
||||||
ethernet
|
|
||||||
everyones
|
|
||||||
facepalm
|
|
||||||
fastmail
|
|
||||||
firefox
|
|
||||||
gists
|
|
||||||
gittime
|
|
||||||
header.jpg
|
|
||||||
hipchat
|
|
||||||
hotmail
|
|
||||||
iframe
|
|
||||||
img
|
|
||||||
Inspiron
|
|
||||||
jakesidsmith
|
|
||||||
javascript
|
|
||||||
jetpack
|
|
||||||
jQuery
|
|
||||||
jsfuckify
|
|
||||||
kickstart
|
|
||||||
LanSchool
|
|
||||||
lenovo
|
|
||||||
linux
|
|
||||||
morese-code-decoder
|
|
||||||
morse
|
|
||||||
morse-code
|
|
||||||
notsureif
|
|
||||||
olds
|
|
||||||
OpenVPN
|
|
||||||
openvpn-compatable
|
|
||||||
owncloud
|
|
||||||
PCPartPicker
|
|
||||||
plugin
|
|
||||||
protonmail
|
|
||||||
pygame
|
|
||||||
querystring
|
|
||||||
qwerks
|
|
||||||
rackspace
|
|
||||||
runbox
|
|
||||||
screenfetch
|
|
||||||
sitemap.xml
|
|
||||||
spec
|
|
||||||
swiss
|
|
||||||
TekSyndicate
|
|
||||||
til
|
|
||||||
txt
|
|
||||||
wat
|
|
||||||
wikipedia
|
|
||||||
stacktrace
|
|
||||||
iGPU
|
|
||||||
nodejs
|
|
||||||
securityheaders.io
|
|
||||||
nsp
|
|
||||||
npm.click
|
|
||||||
Django
|
|
||||||
dependancy-check
|
|
||||||
pypiup
|
|
||||||
seositecheckup
|
|
80
Makefile
80
Makefile
|
@ -1,80 +0,0 @@
|
||||||
BASEDIR=$(PWD)
|
|
||||||
ENV=$(BASEDIR)/env/bin
|
|
||||||
NODE_BIN=node_modules/.bin
|
|
||||||
PELICAN=$(ENV)/pelican
|
|
||||||
|
|
||||||
OUTPUTDIR=$(BASEDIR)/output
|
|
||||||
PLUGINS_DIR=$(BASEDIR)/pelican_plugins
|
|
||||||
DEPLOY_DIR=$(BASEDIR)/deploy
|
|
||||||
CONFIG_FILE=$(BASEDIR)/config/pelicanconf.py
|
|
||||||
|
|
||||||
FLAKE8_IGNORE=--ignore=E128,E501,E401,E402
|
|
||||||
|
|
||||||
build: install
|
|
||||||
rm -rf $(OUTPUTDIR)/*
|
|
||||||
@echo ">> Building static data..."
|
|
||||||
mkdir -p theme/static/build/js/lib theme/static/build/fonts theme/static/build/css theme/static/build/img
|
|
||||||
cp -R node_modules/font-awesome/fonts theme/static/build/
|
|
||||||
npm run build-js
|
|
||||||
npm run build-scss
|
|
||||||
@echo ">> Building pelican..."
|
|
||||||
$(PELICAN) -o $(OUTPUTDIR) -vs $(CONFIG_FILE)
|
|
||||||
mv $(OUTPUTDIR)/assets/robots.txt $(OUTPUTDIR)
|
|
||||||
cp -R $(OUTPUTDIR)/assets/* $(OUTPUTDIR)/static
|
|
||||||
rm -rf $(OUTPUTDIR)/assets
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -rf $(OUTPUTDIR)/*
|
|
||||||
rm -rf $(BASEDIR)/env/
|
|
||||||
rm -rf $(BASEDIR)/node_modules/
|
|
||||||
rm -rf $(PLUGINS_DIR)/*
|
|
||||||
|
|
||||||
|
|
||||||
install: env node_modules pelican_plugins
|
|
||||||
|
|
||||||
pelican_plugins: env
|
|
||||||
rm -rf $(PLUGINS_DIR) || "No existing extensions"
|
|
||||||
git clone --recursive https://github.com/getpelican/pelican-plugins $(PLUGINS_DIR) || "Git Fail"
|
|
||||||
@echo ">> Hotfixing..."
|
|
||||||
rm -rf $(PLUGINS_DIR)/pelican-jinja2content
|
|
||||||
git clone https://github.com/RealOrangeOne/pelican-jinja2content -b patch-1 --depth=1 $(PLUGINS_DIR)/pelican-jinja2content
|
|
||||||
|
|
||||||
env:
|
|
||||||
pyvenv env
|
|
||||||
$(ENV)/pip install -r requirements.txt --upgrade
|
|
||||||
|
|
||||||
node_modules:
|
|
||||||
npm install
|
|
||||||
|
|
||||||
|
|
||||||
test: unittest lint spellcheck securitycheck
|
|
||||||
|
|
||||||
unittest:
|
|
||||||
$(ENV)/nose2 --verbose
|
|
||||||
|
|
||||||
lint:
|
|
||||||
$(NODE_BIN)/eslint 'theme/static/src/js/'
|
|
||||||
$(NODE_BIN)/sass-lint -vqc .sass-lint.yml
|
|
||||||
$(ENV)/flake8 $(BASEDIR)/plugins/ $(FLAKE8_IGNORE)
|
|
||||||
$(ENV)/flake8 $(BASEDIR)/scripts/ $(FLAKE8_IGNORE)
|
|
||||||
$(ENV)/flake8 $(BASEDIR)/config/ $(FLAKE8_IGNORE)
|
|
||||||
$(ENV)/flake8 $(BASEDIR)/tests/ $(FLAKE8_IGNORE)
|
|
||||||
$(ENV)/yamllint config/config.yml
|
|
||||||
|
|
||||||
spellcheck:
|
|
||||||
$(NODE_BIN)/mdspell --en-gb -ranx theme/templates/**/*.* theme/templates/*.*
|
|
||||||
$(NODE_BIN)/mdspell --en-gb -ranx content/**/*.md content/*.md content/**/*.html content/*.html
|
|
||||||
|
|
||||||
securitycheck:
|
|
||||||
$(NODE_BIN)/nsp check
|
|
||||||
$(ENV)/bandit -r plugins/ config/ tests/
|
|
||||||
|
|
||||||
|
|
||||||
upload:
|
|
||||||
git clone https://github.com/RealOrangeOne/host-container.git $(DEPLOY_DIR)
|
|
||||||
cp -rf $(OUTPUTDIR)/. $(DEPLOY_DIR)/site/
|
|
||||||
@cd $(DEPLOY_DIR) && git remote add dokku $(DEPLOY_URL) && git add . && git commit -m "add files" && git push -f dokku master --quiet
|
|
||||||
rm -rf $(DEPLOY_DIR)
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: build clean test lint install upload
|
|
25
circle.yml
25
circle.yml
|
@ -1,25 +0,0 @@
|
||||||
machine:
|
|
||||||
python:
|
|
||||||
version: 3.5.1
|
|
||||||
node:
|
|
||||||
version: 5.11.1
|
|
||||||
environment:
|
|
||||||
BUILD_PRODUCTION: true
|
|
||||||
NODE_ENV: production
|
|
||||||
NPM_CONFIG_PRODUCTION: false
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
pre:
|
|
||||||
- make -B
|
|
||||||
|
|
||||||
test:
|
|
||||||
override:
|
|
||||||
- make test
|
|
||||||
|
|
||||||
deployment:
|
|
||||||
production:
|
|
||||||
branch: master
|
|
||||||
commands:
|
|
||||||
- git config --global user.email "git@theorangeone.net"
|
|
||||||
- git config --global user.name "TheOrangeOne"
|
|
||||||
- make upload
|
|
|
@ -1,30 +0,0 @@
|
||||||
import yaml
|
|
||||||
import os.path
|
|
||||||
|
|
||||||
|
|
||||||
class DotDictionary(dict):
|
|
||||||
def __getattr__(self, attr):
|
|
||||||
value = self[attr]
|
|
||||||
if type(value) == dict:
|
|
||||||
value = DotDictionary(value)
|
|
||||||
return value
|
|
||||||
__setattr__ = dict.__setitem__
|
|
||||||
__delattr__ = dict.__delitem__
|
|
||||||
|
|
||||||
|
|
||||||
class WrappedSettings:
|
|
||||||
def __init__(self):
|
|
||||||
self.settings_dir = os.path.join(os.path.dirname(__file__), 'config.yml')
|
|
||||||
settings = open(self.settings_dir)
|
|
||||||
self.settings = yaml.safe_load(settings)
|
|
||||||
|
|
||||||
def __getattr__(self, name):
|
|
||||||
value = self.settings[name]
|
|
||||||
if type(value) == dict:
|
|
||||||
value = DotDictionary(value)
|
|
||||||
return value
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return str(self.settings)
|
|
||||||
|
|
||||||
settings = WrappedSettings()
|
|
|
@ -1,109 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
author: Jake Howard
|
|
||||||
site_name: TheOrangeOne
|
|
||||||
url: https://theorangeone.net
|
|
||||||
timezone: Europe/London
|
|
||||||
language: en
|
|
||||||
|
|
||||||
pelican_plugins:
|
|
||||||
- sitemap
|
|
||||||
- filetime_from_git
|
|
||||||
- pelican-jinja2content
|
|
||||||
- metatags
|
|
||||||
- autopages
|
|
||||||
- screenfetch
|
|
||||||
|
|
||||||
sitemap_format: xml
|
|
||||||
|
|
||||||
|
|
||||||
accounts:
|
|
||||||
github:
|
|
||||||
- GitHub
|
|
||||||
- RealOrangeOne
|
|
||||||
- https://github.com/{0}/
|
|
||||||
- fa-github
|
|
||||||
|
|
||||||
twitter:
|
|
||||||
- Twitter
|
|
||||||
- RealOrangeOne
|
|
||||||
- https://twitter.com/{0}/
|
|
||||||
- fa-twitter
|
|
||||||
|
|
||||||
reddit:
|
|
||||||
- Reddit
|
|
||||||
- RealOrangeOne
|
|
||||||
- https://reddit.com/u/{0}/
|
|
||||||
- fa-reddit
|
|
||||||
|
|
||||||
instagram:
|
|
||||||
- Instagram
|
|
||||||
- RealOrangeOne
|
|
||||||
- https://instagram.com/{0}/
|
|
||||||
- fa-instagram
|
|
||||||
|
|
||||||
youtube:
|
|
||||||
- YouTube
|
|
||||||
- TheOrangeOneOfficial
|
|
||||||
- https://youtube.com/users/{0}/
|
|
||||||
- fa-youtube
|
|
||||||
|
|
||||||
flickr:
|
|
||||||
- Flickr
|
|
||||||
- TheOrangeOne
|
|
||||||
- https://flickr.com/photos/{0}/
|
|
||||||
- fa-flickr
|
|
||||||
|
|
||||||
bitbucket:
|
|
||||||
- BitBucket
|
|
||||||
- TheOrangeOne
|
|
||||||
- https://bitbucket.com/{0}/
|
|
||||||
- fa-bitbucket
|
|
||||||
|
|
||||||
trello:
|
|
||||||
- Trello
|
|
||||||
- TheOrangeOne
|
|
||||||
- https://trello.com/{0}/
|
|
||||||
- fa-trello
|
|
||||||
|
|
||||||
freenode:
|
|
||||||
- Freenode IRC
|
|
||||||
- TheOrangeOne
|
|
||||||
- https://webchat.freenode.net/
|
|
||||||
- fa-rss
|
|
||||||
|
|
||||||
atomio:
|
|
||||||
- AtomIO Slack
|
|
||||||
- TheOrangeOne
|
|
||||||
- https://atomio.slack.com/
|
|
||||||
- fa-slack
|
|
||||||
|
|
||||||
pcpartpicker:
|
|
||||||
- PCPartPicker
|
|
||||||
- TheOrangeOne97
|
|
||||||
- https://uk.pcpartpicker.com/user/{0}/
|
|
||||||
- fa-desktop
|
|
||||||
|
|
||||||
codepen:
|
|
||||||
- CodePen
|
|
||||||
- TheOrangeOne
|
|
||||||
- https://codepen.io/~{0}/
|
|
||||||
- fa-codepen
|
|
||||||
|
|
||||||
npm:
|
|
||||||
- npm
|
|
||||||
- TheOrangeOne
|
|
||||||
- https://www.npmjs.com/~{0}/
|
|
||||||
- fa-file-code-io
|
|
||||||
|
|
||||||
footer_accounts:
|
|
||||||
- github
|
|
||||||
- twitter
|
|
||||||
- reddit
|
|
||||||
- instagram
|
|
||||||
- youtube
|
|
||||||
- flickr
|
|
||||||
|
|
||||||
piwik:
|
|
||||||
url: piwik.theorangeone.net
|
|
||||||
site_id: 1
|
|
|
@ -1,98 +0,0 @@
|
||||||
# -*- coding: utf-8 -*- #
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
from git import Repo
|
|
||||||
import sys, os
|
|
||||||
sys.path.insert(0, os.path.realpath('./'))
|
|
||||||
|
|
||||||
from config import settings
|
|
||||||
|
|
||||||
# Global core settings
|
|
||||||
AUTHOR = settings.author
|
|
||||||
SITENAME = settings.site_name
|
|
||||||
SITEURL = settings.url
|
|
||||||
PATH = '../content'
|
|
||||||
TIMEZONE = settings.timezone
|
|
||||||
DEFAULT_LANG = settings.language
|
|
||||||
PAGE_PATHS = ["pages"]
|
|
||||||
THEME = "../theme"
|
|
||||||
THEME_STATIC_DIR = "static"
|
|
||||||
THEME_STATIC_PATHS = ["static/build"]
|
|
||||||
STATIC_PATHS = ["assets"]
|
|
||||||
|
|
||||||
USE_FOLDER_AS_CATEGORY = True
|
|
||||||
DEFAULT_PAGINATION = False
|
|
||||||
SLUGIFY_SOURCE = 'basename'
|
|
||||||
|
|
||||||
# Social widget
|
|
||||||
from plugins import links
|
|
||||||
ACCOUNTS = links.accounts()
|
|
||||||
FOOTER_LINKS = links.footer()
|
|
||||||
INDEX_PROJECTS = links.index_projects()
|
|
||||||
|
|
||||||
# Extra config
|
|
||||||
REPO = Repo(search_parent_directories=True)
|
|
||||||
BUILD_PRODUCTION = 'BUILD_PRODUCTION' in os.environ
|
|
||||||
from plugins import image_resizer
|
|
||||||
META_IMAGES = image_resizer.generate()
|
|
||||||
PIWIK = settings.piwik
|
|
||||||
|
|
||||||
# Disable some pages
|
|
||||||
TAG_URL = False
|
|
||||||
TAG_SAVE_AS = False
|
|
||||||
TAGS_SAVE_AS = False
|
|
||||||
AUTHORS_URL = False
|
|
||||||
AUTHORS_SAVE_AS = False
|
|
||||||
CATEGORIES_SAVE_AS = False
|
|
||||||
ARCHIVES_URL = False
|
|
||||||
ARCHIVES_SAVE_AS = False
|
|
||||||
AUTHOR_URL = False
|
|
||||||
AUTHOR_SAVE_AS = False
|
|
||||||
|
|
||||||
# Override page URLs
|
|
||||||
PAGE_SAVE_AS = "{slug}/index.html"
|
|
||||||
PAGE_URL = "{slug}/"
|
|
||||||
ARTICLE_SAVE_AS = "{category}/{slug}/index.html"
|
|
||||||
ARTICLE_URL = "{category}/{slug}/"
|
|
||||||
CATEGORY_SAVE_AS = "{slug}/index.html"
|
|
||||||
CATEGORY_URL = "{slug}/"
|
|
||||||
|
|
||||||
# Add ATOM feed
|
|
||||||
FEED_ATOM = 'feed.atom'
|
|
||||||
FEED_DOMAIN = SITEURL
|
|
||||||
|
|
||||||
# Setup plugins
|
|
||||||
PLUGIN_PATHS = ["../pelican_plugins", "../plugins"]
|
|
||||||
PLUGINS = settings.pelican_plugins
|
|
||||||
|
|
||||||
if BUILD_PRODUCTION:
|
|
||||||
PLUGINS.append("minify") # only minify on production build
|
|
||||||
|
|
||||||
SITEMAP = {
|
|
||||||
"format": settings.sitemap_format
|
|
||||||
}
|
|
||||||
CATEGORY_PAGE_PATH = "theme/templates/categories"
|
|
||||||
MINIFY = {
|
|
||||||
'remove_comments': True,
|
|
||||||
'remove_optional_attribute_quotes': False,
|
|
||||||
'reduce_boolean_attributes': True,
|
|
||||||
}
|
|
||||||
|
|
||||||
# Setup markdown extensions
|
|
||||||
from fontawesome_markdown import FontAwesomeExtension
|
|
||||||
from pyembed.markdown import PyEmbedMarkdown
|
|
||||||
from mkdcomments import CommentsExtension
|
|
||||||
MD_EXTENSIONS = [
|
|
||||||
FontAwesomeExtension(),
|
|
||||||
PyEmbedMarkdown(),
|
|
||||||
CommentsExtension(),
|
|
||||||
'codehilite(css_class=highlight)',
|
|
||||||
'extra'
|
|
||||||
]
|
|
||||||
|
|
||||||
# Setup jinja2 filters
|
|
||||||
from plugins import filters
|
|
||||||
JINJA_FILTERS = {
|
|
||||||
"datetime": filters.format_datetime,
|
|
||||||
"category_find": filters.category_find,
|
|
||||||
"limit": filters.limit
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 784 KiB |
Binary file not shown.
Before Width: | Height: | Size: 237 KiB |
|
@ -1,4 +0,0 @@
|
||||||
User-agent: *
|
|
||||||
Allow: /
|
|
||||||
|
|
||||||
Sitemap: /sitemap.xml
|
|
|
@ -1,7 +0,0 @@
|
||||||
---
|
|
||||||
title: 7 languages in 7 weeks
|
|
||||||
gittime: off
|
|
||||||
date: 2016-05-05
|
|
||||||
template: blog
|
|
||||||
status: draft
|
|
||||||
---
|
|
|
@ -1,7 +0,0 @@
|
||||||
---
|
|
||||||
title: My Level 3 Apprenticeship
|
|
||||||
gittime: off
|
|
||||||
date: 2016-07-06
|
|
||||||
template: blog
|
|
||||||
status: draft
|
|
||||||
---
|
|
|
@ -1,42 +0,0 @@
|
||||||
---
|
|
||||||
title: ProtonMail - Can it replace your email provider?
|
|
||||||
template: blog
|
|
||||||
date: 2016-06-28
|
|
||||||
image: https://protonmail.com/images/main-banner.jpg
|
|
||||||
summary: Incredibly secure, easy to use, but are it's trade-offs worth it?
|
|
||||||
---
|
|
||||||
|
|
||||||
Throughout my life, I've had many different email providers, starting with hotmail almost 10 years ago. In more recent years, I've been focusing more on ways I can secure my emails, both from potential intruders, or governments. No, I may not have anything to hide, but that doesn't mean I don't want the information I to have to be accessible easily.
|
|
||||||
|
|
||||||
Originally I thought the best way to keep things secure, and out of the hands of any government body was to host it all myself. This came with a number of problems, mostly due to my lack of experience running anything like this, which lead to problems with my spam filter not running, and any emails I did send ending up in peoples spam folders. It was after this I decided to look into hosted options, I'm happy to pay money to have someone else look after the email servers for me, even if that's at the cost of using another companies infrastructure.
|
|
||||||
|
|
||||||
After searching around for a while, I stumbled on a company called _ProtonMail_, who claimed to be the most secure email host ever. Reading into the technologies they use, and watching one of their team members on a TED talk, I realised they weren't lying, their platform really was secure!
|
|
||||||
|
|
||||||
ProtonMail use a combination of open-source technologies, a closed-access platform, and swiss data centers to protect emails better than anyone else! The only way you can access your emails is by using their custom apps for Android, iOS, and web. Whilst this is annoying, it does mean the system isn't accessible through conventional protocols such as IMAP and POP3, which would considerably lower the security. The web portal itself is entirely open-source, and highly encourages any contributions, which should help make the platform even more secure, and help pump out features fast.
|
|
||||||
|
|
||||||
In April 2016, I signed up to ProtonMail's _Plus_ tier, and switched all my domains to use their servers as an email provider. The setup process itself was incredibly simple, it showed you every DNS record you needed to create, so all you had to do was copy-paste! It also showed you extra records you could add to aid the security of your emails, and protect against people sending out emails using your domain, including DKIM signatures, and SPF records.
|
|
||||||
|
|
||||||
|
|
||||||
### The Problems
|
|
||||||
|
|
||||||
When I first started using ProtonMail, before I committed, I knew there were a lot of features missing, but I thought I wouldn't need these. Now my email traffic has increased, I'm starting to find myself needing / wanting these features more and more.
|
|
||||||
|
|
||||||
Now, 3 months on, I'm starting to get a little annoyed at ProtonMail, mainly at their lack of features. Yes the security is great, really great, but the fact I have to open a website and login every time I want to check my emails is a little tiring, and their mobile app, whilst fully functional and capable of the basics, has some bugs had glitches out sometimes.
|
|
||||||
|
|
||||||
Another problem is the lack of basic features. Whilst the client does have labels, and _'+ aliases'_, both of which are great features for those like me that like to keep things organised. The platform is missing out on some other key features, like:
|
|
||||||
|
|
||||||
- Custom message filter (currently in beta)
|
|
||||||
- IMAP / POP3 support, for external clients
|
|
||||||
- Custom PGP certificates
|
|
||||||
- Quick folder filters (see only unread...)
|
|
||||||
- Reading your emails offline (even through the mobile app)
|
|
||||||
|
|
||||||
|
|
||||||
These problems are taken for granted in most other mail platform, but because ProtonMail is built from the ground up, and is still a reasonably new product, it's missing a lot of these key features. I have no doubt that eventually, they will have all these features and more, but in the mean time, because I want these features now, I think it's time to look into another platform.
|
|
||||||
|
|
||||||
## _"Didn't you just waste your money?"_
|
|
||||||
|
|
||||||
Yes, this does mean I've paid for a service I'm technically no longer using. Which does annoy me, but considering it'll be used to help out the platform in the future, and I have every intention of switching back once it's got all the features I need, I can live with it.
|
|
||||||
|
|
||||||
## Next Steps
|
|
||||||
After looking around the internet for a suitable replacement, I settled on [FastMail](https://fastmail.com/?STKI=14665249). I've seen good things from RackSpace, OX and RunBox, but FastMail has all the features I need, with an easy-to-use interface, a cheap price tag, and a pretty decent security policy. For someone looking for a simple to use email provider, that's reasonably secure, and feature-rich, I can't recommend [FastMail](https://fastmail.com/?STKI=14665249) highly enough!
|
|
|
@ -1,19 +0,0 @@
|
||||||
---
|
|
||||||
title: React-Native intro dev meeting
|
|
||||||
gittime: off
|
|
||||||
date: 2016-03-16
|
|
||||||
template: blog
|
|
||||||
summary: Introducing React-Native to the rest of the office
|
|
||||||
---
|
|
||||||
|
|
||||||
Recently, at DabApps, we've been migrating our mobile app workflow over to using [react-native](https://facebook.github.io/react-native/) instead of [Ionic](http://ionicframework.com/), mainly because of its near native performance and cross-platform codebase. For the first few projects, there were only a couple of us that knew how to use React Native effectively, and work around the _qwerks_ it has. With the number of app projects growing, we needed to get more people up to speed with the react native workflow, as quickly as possible.
|
|
||||||
|
|
||||||
The workflow that we needed to adopt to use react native is an odd one. To keep the quality of our code at the highest possible, whilst keeping the codebase as maintainable as possible. The workflow we use was created by 4 of us, through experiences with both work and personal projects using the framework, and it works rather well. The only problem was that only 4 of us actually knew it very well.
|
|
||||||
|
|
||||||
After one of the developers wanted to know our workflow, with a couple of potential app projects on the horizon, I set about creating a talk for our (_usually_) bi-weekly dev meetings. With the aim of trying to get everyone up to speed all in 1 go.
|
|
||||||
|
|
||||||
The slides from my talk are available on my [GitHub](https://github.com/RealOrangeOne/react-native-intro-dev-meeting) page, and whilst they are primarily relevant to our workflow, I hope they will be able to help anyone else looking to get started with React Native.
|
|
||||||
|
|
||||||
React Native is a tricky platform to get started on, but once you understand the _qwerks_, it truly is the future of cross-platform mobile development!
|
|
||||||
|
|
||||||
[Click here to view the slides](http://realorangeone.github.io/react-native-intro-dev-meeting/)
|
|
|
@ -1,35 +0,0 @@
|
||||||
---
|
|
||||||
title: Cyber Security Month 2016
|
|
||||||
gittime: off
|
|
||||||
date: 2016-10-01
|
|
||||||
template: blog
|
|
||||||
summary: The best time to upgrade the security on my projects!
|
|
||||||
---
|
|
||||||
|
|
||||||
As it's [Cyber Security Month](https://cybersecuritymonth.eu/), now's the perfect time to work on improving the security on my websites, projects, and servers. But, upgrading them for now isn't good enough for me, I want to add a way of scanning projects automatically during unit tests, to check for any new vulnerabilities.
|
|
||||||
|
|
||||||
As most of my projects revolve around NodeJS and Python, these are the languages I'll be concentrating on.
|
|
||||||
|
|
||||||
## Express Server
|
|
||||||
Express is one the most popular JS servers, and fortunately, they have a [security guide](http://expressjs.com/en/advanced/best-practice-security.html), that contains some of the best ways to secure your server. One of the best and simplest ways is to add the [helmet](https://www.npmjs.com/package/helmet) middleware, which contains a load of other middleware that drastically increase its security. It's incredibly easy to add too, at just 3 lines of change, [like this](https://github.com/RealOrangeOne/host-container/commit/90adfd04aed2f2065d803623c297dc1a8ae71632)!
|
|
||||||
|
|
||||||
You can use [securityheaders.io](http://securityheaders.io/) to check if any headers are being sent by your server that shouldn't be. As well as see how you can improve.
|
|
||||||
|
|
||||||
## NodeJS Dependencies
|
|
||||||
One of the best and fastest ways to keep secure is make sure your dependencies are secure. If your code is secure, but one of your dependencies isn't, it wastes all your hard work! Fortunately there's a tool to check this, [nsp](https://www.npmjs.com/package/nsp). It checks the [Node Security Project](https://nodesecurity.io/) for known vulnerabilities in your dependencies, and reports them.
|
|
||||||
|
|
||||||
If you don't want to add `nsp` to your dependencies, they offer a [CI service for GitHub](https://nodesecurity.io/#pricing) which will run the checks for you on their own servers.
|
|
||||||
|
|
||||||
### Checking for updates
|
|
||||||
Generally, keeping things up to date is a good thing, fortunately, there's a website for that! Upload you `package.json` to [npm.click](http://npm.click/), and it'll tell you what's out of date!
|
|
||||||
|
|
||||||
## Python Code
|
|
||||||
Any of the projects I work on that are more advance that a simple static server, I use Django, written in Python. Checking your python code itself is nice and simple thanks to [bandit](https://github.com/openstack/bandit). It checks your code to make sure you're writing it properly, and are catching errors. It can check the dependencies too, but it takes a very long time, and you can't change the code in there, there isn't much point.
|
|
||||||
|
|
||||||
### Dependencies?
|
|
||||||
There is a tool, [dependancy-check](https://pypi.python.org/pypi/dependency-check/) that supposedly checks the security of python dependencies, but it didn't want to work for me, except display the help menu, which is useful.
|
|
||||||
|
|
||||||
Although, you check for updates to your dependencies with [pypiup](https://pypi.python.org/pypi/pypiup/). Working in much the same way as npm.click (and written by the same person), except it's a CLI instead of website.
|
|
||||||
|
|
||||||
## Checking
|
|
||||||
To check your hard work has made a difference, [seositecheckup](http://seositecheckup.com/) contains a helpful section on security, as well as [securityheaders.io](http://securityheaders.io/). I've enabled these tricks on my website, so you can see their results here for [securityheaders.io](https://securityheaders.io/?q=https%3A%2F%2Ftheorangeone.net&followRedirects=on) and [seositecheckup](http://seositecheckup.com/seo-audit/theorangeone.net).
|
|
|
@ -1,51 +0,0 @@
|
||||||
---
|
|
||||||
title: Fix steam under linux with an iGPU
|
|
||||||
template: blog
|
|
||||||
summary: Fixing "`libGL error: failed to load driver: i965`"
|
|
||||||
---
|
|
||||||
|
|
||||||
Running steam on linux is great, except for the game support obviously. But running it on an iGPU has recently been causing me problems, mainly under Arch.
|
|
||||||
|
|
||||||
## Stacktrace:
|
|
||||||
```
|
|
||||||
jake@***:~$ steam
|
|
||||||
~/.local/share/Steam/steam.sh: line 154: VERSION_ID: unbound variable
|
|
||||||
~/.local/share/Steam/steam.sh: line 154: VERSION_ID: unbound variable
|
|
||||||
Running Steam on antergos 64-bit
|
|
||||||
~/.local/share/Steam/steam.sh: line 154: VERSION_ID: unbound variable
|
|
||||||
STEAM_RUNTIME is enabled automatically
|
|
||||||
Installing breakpad exception handler for appid(steam)/version(1468023329)
|
|
||||||
libGL error: unable to load driver: i965_dri.so
|
|
||||||
libGL error: driver pointer missing
|
|
||||||
libGL error: failed to load driver: i965
|
|
||||||
libGL error: unable to load driver: i965_dri.so
|
|
||||||
libGL error: driver pointer missing
|
|
||||||
libGL error: failed to load driver: i965
|
|
||||||
libGL error: unable to load driver: swrast_dri.so
|
|
||||||
libGL error: failed to load driver: swrast
|
|
||||||
```
|
|
||||||
|
|
||||||
## The solution
|
|
||||||
I have no idea why it works, or why it works, but speaking to some people online, this is the best solution:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' /usr/bin/steam %U
|
|
||||||
```
|
|
||||||
|
|
||||||
I have no idea why it works, but it works perfectly for me! Steam client runs with no problems.
|
|
||||||
|
|
||||||
```
|
|
||||||
jake@***:~$ LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' /usr/bin/steam %U
|
|
||||||
~/.local/share/Steam/steam.sh: line 154: VERSION_ID: unbound variable
|
|
||||||
~/.local/share/Steam/steam.sh: line 154: VERSION_ID: unbound variable
|
|
||||||
Running Steam on antergos 64-bit
|
|
||||||
~/.local/share/Steam/steam.sh: line 154: VERSION_ID: unbound variable
|
|
||||||
STEAM_RUNTIME is enabled automatically
|
|
||||||
Installing breakpad exception handler for appid(steam)/version(1468023329)
|
|
||||||
```
|
|
||||||
|
|
||||||
Unfortunately, it doesn't seem to work if you add it to the `steam.desktop` file, for reasons I don't quite understand. But, just edit `/usr/bin/steam` to include the variable, and that works perfectly!
|
|
||||||
|
|
||||||
```bash
|
|
||||||
export LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so'
|
|
||||||
```
|
|
|
@ -1,20 +0,0 @@
|
||||||
---
|
|
||||||
title: Student Server
|
|
||||||
slug: student-server
|
|
||||||
summary: The college needed a server, but didn't have any server admins
|
|
||||||
---
|
|
||||||
|
|
||||||
Back when I was in college, we needed a server for computing students to learn how to use FTP, and script on a server using python CGI and [PHP](http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/#an-analogy), as well as possibly for some students coursework. Fortunately, the college already had one, running the IT students microsite for extra course information. The problem was that it was majorly out of date, and no one really new how to use it properly. It was up to me and my friend Alex to bring the server up to date, and get it ready for the students who needed it.
|
|
||||||
|
|
||||||
The original plan was to update the server's OS (at that stage running Ubuntu 12.04 LTS), install python and [PHP](http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/#an-analogy) backends, add student users, and then make sure they couldn't edit each others documents. In the end, because we had no idea how the server worked, because it was setup a long time ago, we decided it was just easier to backup what we needed, then do a complete fresh install. Meaning we could set things up exactly how we wanted them, and install the tools we needed.
|
|
||||||
|
|
||||||
## User Creation
|
|
||||||
I knew we would need user accounts for all the computing teachers, the students doing A2 computing. I wasn't expecting this to amount to over 50 user accounts that needed to be created, and permissions setup for their accounts. Fortunately Alex had started writing a basic script for this, which I quickly modified.
|
|
||||||
|
|
||||||
The basis of the script was to load information about the users from a database I had created (by hand) with all the required students in, create users based on this information, and configure the permissions for the user and their home directory. The script also allowed for manual entering of users with the same permission template, in case single users needed to be created. An additional feature that I added which has proved useful now that I've left is the ability to delete users manually, and from that original database, to make sure that no student will have access to the server once they have left, well, other than me that is!
|
|
||||||
|
|
||||||
### The script
|
|
||||||
Because a lot of the accounts are still active, and that new user accounts are being created in the same way the exact script cannot be shown, for security reasons.
|
|
||||||
|
|
||||||
## What next?
|
|
||||||
Now that I've left college, I've passed on the server to other people, although I do still have an account. From what I hear, fewer students are using the server. However, they have made the microsite look infinitely better!
|
|
|
@ -1,17 +0,0 @@
|
||||||
---
|
|
||||||
title: Wall of Sheep
|
|
||||||
slug: wall-of-sheep
|
|
||||||
summary: Hacking is fun!
|
|
||||||
---
|
|
||||||
|
|
||||||
Personally, I dislike being limited by technology. If there's a system in place like a proxy filter, network restrictions, or even any remote control software, I just have to try and break through it or work around it. This was mostly the case at college.
|
|
||||||
|
|
||||||
Throughout my time there, I was able to break through many parts of their network, mostly the sections involving keeping students on task. The hardest part of this was doing it in such a way that it couldn't be traced back to me, just in case they didn't appreciate me _testing_ their systems. Whilst I don't condone doing this, it is certainly a lot of fun, and I learnt a whole lot through it. To this day, they still have no idea I did any of it, unless they're reading this, in which case, __Hi__!
|
|
||||||
|
|
||||||
|
|
||||||
<!--- make this dynamic at some point! -->
|
|
||||||
|
|
||||||
## College Sheep
|
|
||||||
|
|
||||||
#### [LanSchool](/wall-of-sheep/LanSchool/)
|
|
||||||
The tool of choice of my college to monitor students usage of computers. Turns out it's not particularly robust!
|
|
|
@ -1,19 +0,0 @@
|
||||||
<head>
|
|
||||||
<meta name="save_as" content=".404.html" />
|
|
||||||
<meta name="title" content="Uh Oh - There's nothing here!" />
|
|
||||||
<meta name="html_title" content="404 - Page not found" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<section>
|
|
||||||
<div class="container text-center">
|
|
||||||
<h3>The page you were looking for could not be found.</h3>
|
|
||||||
<h1>¯\_(ツ)_/¯</h1>
|
|
||||||
<p>For now, here's a picture of a cat!</p>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<div class="container text-center">
|
|
||||||
<img src="https://2.bp.blogspot.com/-mh8wLBv3gzk/TcTXhBCp3oI/AAAAAAAAxGA/dE9RuE1bNdc/s1600/CaturdayTechSupport6.jpg" alt="Cat" style="width: 75%;" />
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</body>
|
|
|
@ -1,58 +0,0 @@
|
||||||
<head>
|
|
||||||
<meta name="slug" content="about" />
|
|
||||||
<meta name="title" content="About Me" />
|
|
||||||
<meta name="no_container" content="true" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<section class="bg-primary">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-8 col-lg-offset-2 text-center">
|
|
||||||
<h1 class="section-heading">About Me</h1>
|
|
||||||
<hr class="light">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section id="me">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<p>
|
|
||||||
Hi, I'm Jake, a software engineer currently working for a company in Brighton. I've been working as a developer since mid-2015, and have been studying IT and computer science since college.
|
|
||||||
I work as a full stack developer, but I prefer working on servers and mobile apps.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4 text-center">
|
|
||||||
<div data-theme="medium" data-github="RealOrangeOne" class="github-card"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script async defer src="//cdn.jsdelivr.net/github-cards/latest/widget.js"></script>
|
|
||||||
</section>
|
|
||||||
<section class="bg-primary" id="website">
|
|
||||||
<div class="container">
|
|
||||||
<h2>About my website</h2>
|
|
||||||
<p>
|
|
||||||
My website is the culmination of all my knowledge, compiled into 1 place. It not only contains all my projects, but it in itself is a project. Making sure this website works properly is a tall order, especially considering it's self hosted.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The site is primarily powered by <a href="http://getpelican.com">Pelican</a>, a static site generator. This converts markdown and HTML templates into static HTML files. The templates are generated using <a href="http://jinja.pocoo.org/">Jinja2</a>, a templating language similar to <a href="https://www.djangoproject.com/">Django</a>'s. This allows me to write nice clean, <i>DRY</i> content, and have it come out as clean HTML.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The static content (JS, CSS etc) is built using a custom build pipeline. The Javascript is built and compiled using <a href="https://babeljs.io/">Babel</a> and <a href="http://browserify.org/">Browserify</a>, and the CSS is written using <a href="https://github.com/sass/node-sass">node-SCSS</a> as a pre-processor.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section id="server">
|
|
||||||
<div class="container">
|
|
||||||
<h2>The Server</h2>
|
|
||||||
<p>
|
|
||||||
The website is hosted on my <a href="/setup/web-server/">UK VPS</a>. Previous versions have been hosted on <a href="https://www.1and1.com/">1&1</a> and <a href="http://www.myWindowsHosting.com/index?r=100196823">MyWindowsHosting</a>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The static files are served using a <a href="https://github.com/RealOrangeOne/host-container">custom Express server</a>, which allows me to auto-deploy the site from my <a href="https://circleci.com/">CI</a>. This is then served using a custom, closed-source reverse proxy, which makes local development and domain switching much easier. This is pointed to by <a href="https://www.nginx.com/">NGINX</a>, which actually serves port 80.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</body>
|
|
|
@ -1,157 +0,0 @@
|
||||||
<head>
|
|
||||||
<meta name="url" content="" />
|
|
||||||
<meta name="save_as" content="index.html" />
|
|
||||||
<meta name="title" content="Homepage" />
|
|
||||||
<meta name="template" content="page-home">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<header class="bg-primary">
|
|
||||||
<div class="header-content">
|
|
||||||
<div class="header-content-inner">
|
|
||||||
<h1>{{ AUTHOR }}</h1>
|
|
||||||
<hr>
|
|
||||||
<p>Full-stack Developer, Hardware tinkerer, <i>Hacker</i> of all the things</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a href="#about" class="page-scroll">
|
|
||||||
<i class="fa fa-chevron-down animated pulse infinite" aria-hidden="true"></i>
|
|
||||||
</a>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section class="bg-primary" id="about">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-8 col-lg-offset-2 text-center">
|
|
||||||
<h2 class="section-heading">About</h2>
|
|
||||||
<hr class="light">
|
|
||||||
<p>
|
|
||||||
Hi, I'm Jake. I've been working as a full-stack developer for just over a year. This is my website, where all my projects, blog posts, and other stuff live. Some of it useful, some not so much!
|
|
||||||
</p>
|
|
||||||
<a href="/about/" class="btn btn-primary-dark btn-xl">More Info</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="skills">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-12 text-center">
|
|
||||||
<h2 class="section-heading">Skills</h2>
|
|
||||||
<hr class="primary">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-3 col-md-6 text-center">
|
|
||||||
<div class="service-box">
|
|
||||||
<i class="fa fa-4x fa-server wow bounceIn text-primary" data-wow-delay=".3s"></i>
|
|
||||||
<h3>Server</h3>
|
|
||||||
<p>Designing and building high-performance server applications and environments</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-3 col-md-6 text-center">
|
|
||||||
<div class="service-box">
|
|
||||||
<i class="fa fa-4x fa-firefox wow bounceIn text-primary" data-wow-delay=".5s"></i>
|
|
||||||
<h3>Client</h3>
|
|
||||||
<p>Creating functional, fast, and responsive websites</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-3 col-md-6 text-center">
|
|
||||||
<div class="service-box">
|
|
||||||
<i class="fa fa-4x fa-mobile wow bounceIn text-primary" data-wow-delay=".7s"></i>
|
|
||||||
<h3>Mobile</h3>
|
|
||||||
<p>Building lightweight, cross-platform mobile applications</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-3 col-md-6 text-center">
|
|
||||||
<div class="service-box">
|
|
||||||
<i class="fa fa-4x fa-usb wow bounceIn text-primary" data-wow-delay=".9s"></i>
|
|
||||||
<h3>Hardware</h3>
|
|
||||||
<p>Constructing workflow-specific Desktops, Servers and Notebooks</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="projects">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row no-gutter">
|
|
||||||
{% for project in INDEX_PROJECTS %}
|
|
||||||
<div class="col-lg-4 col-sm-6">
|
|
||||||
<a href="{{ project.url }}" class="portfolio-box image" data-image="{{ project.image }}">
|
|
||||||
<div class="portfolio-box-caption">
|
|
||||||
<div class="portfolio-box-caption-content">
|
|
||||||
<div class="project-name">
|
|
||||||
<h2>
|
|
||||||
{{ project.name }}
|
|
||||||
</h2>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12 text-center">
|
|
||||||
<a href="/projects/" class="btn btn-primary btn-xl margin">
|
|
||||||
View all projects
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="bg-primary" id="blog">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-10 col-lg-offset-1 text-center">
|
|
||||||
<h2 class="section-heading">Blog</h2>
|
|
||||||
<hr class="light">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-10 col-sm-offset-1">
|
|
||||||
{% for article in categories|category_find("blog")|limit(4) %}
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<p class="h3"><a href="{{ article.url }}">{{ article.title }}</a></p>
|
|
||||||
<p>{{ article.summary|striptags|e }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr class="light">
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a href="/blog/" class="btn btn-primary-dark btn-xl">View all posts</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="more">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-8 col-lg-offset-2 text-center">
|
|
||||||
<h2 class="section-heading">More Content</h2>
|
|
||||||
<hr class="primary">
|
|
||||||
<p>There's more than just my project and blog!</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12 text-center">
|
|
||||||
<a class="btn btn-primary btn-xl margin" href="/college/">
|
|
||||||
College
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-primary btn-xl margin" href="/setup/">
|
|
||||||
Setup
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-primary btn-xl margin" href="/work/">
|
|
||||||
Work
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</body>
|
|
|
@ -1,18 +0,0 @@
|
||||||
---
|
|
||||||
title: Astrill Extractor
|
|
||||||
template: projects
|
|
||||||
slug: astrill-extractor
|
|
||||||
repo: https://gist.github.com/RealOrangeOne/050da86871fb952ba7bfe97eece8555c
|
|
||||||
---
|
|
||||||
|
|
||||||
Astrill, my VPN of choice, allows you to export OpenVPN config files for all it's VPNs, allowing you to connect on platforms it doesn't provide clients for. The AUR package `astrill` has started becoming really unstable on my machine, so I decided to switch it out for these VPN files, as gnome has excellent support for OpenVPN.
|
|
||||||
|
|
||||||
The export step is really simple, you just login to the web portal, create an entry for your machine, and export the config files. Their tutorial for this can be found [here](http://wiki.astrill.com/index.php/Astrill_Setup_Manual:How_to_configure_OpenVPN_with_Network_Manager_on_Linux). The problem with this is that some applications wont accept the certificates embedded into the file like this. (Gnome does, but I only realised that whilst writing this). So I started writing a simple parser to extract the certificates from the config files, and saving them as separate files.
|
|
||||||
|
|
||||||
|
|
||||||
<script src="https://gist.github.com/RealOrangeOne/050da86871fb952ba7bfe97eece8555c.js"></script>
|
|
||||||
|
|
||||||
The above script will split out the files and save them into separate directories for each config file. These files can then be imported and used in an openvpn-compatable application.
|
|
||||||
|
|
||||||
### Is it even needed?
|
|
||||||
Certain network-manager packages actually supports importing `.ovpn` files directly, and sets everything up for you, including the files for the keys etc, without needing to extract them before. This does make my script useless to me, but hopefully someone will find it useful!
|
|
|
@ -1,16 +0,0 @@
|
||||||
---
|
|
||||||
title: Attack on blocks game
|
|
||||||
template: projects
|
|
||||||
slug: attack-on-blocks
|
|
||||||
repo: https://github.com/RealOrangeOne/attack-on-blocks/
|
|
||||||
download_link: https://github.com/RealOrangeOne/attack-on-blocks/archive/master.zip
|
|
||||||
---
|
|
||||||
|
|
||||||
Attack on Blocks is a space invaders style game that I wrote for my IT coursework, for the games development unit. We were allowed to make any game that we wanted, provided it could be done within the time limits, be very easy to play, and easily run on the college computer (which were pretty terrible). I had never written a game before, so I knew this was going to be a challenge.
|
|
||||||
|
|
||||||
I decided to write the game in Python, seeing as there were other people in the class that could help me bug report and test features, and because it was easy to run on the college computers. I used PyGame for the graphics library, even though I had never used it before, because it was really simple to use, and there was a lot of support and documentation online.
|
|
||||||
|
|
||||||
## Easter Eggs
|
|
||||||
One of the key features of this take on space invaders (and unfortunately the thing I spent the most time on), is the easter eggs. There are a few dotted around the game, which make the game either much easier, or way more fun! At the moment, there are 3 main easter eggs, the first enabling the other 2. If you would like to know what they are, click the button below. If not, pay the game and try and find them, or search through the source to find them (it's not too hard through the source).
|
|
||||||
|
|
||||||
As you will see (If and when you find the easter eggs), most of them are completely useless, and completely unrelated to the game or anything else. The main reason they were put in was because I'm friends with people that pester to the point it's just easier to give in. Hence there are some really very odd ones!
|
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
title: BSOD Enabler
|
|
||||||
template: projects
|
|
||||||
slug: bsod-enabler
|
|
||||||
summary: Call a _Blue Screen of Death_ on demand! It's more fun than it sounds
|
|
||||||
---
|
|
||||||
|
|
||||||
For those that use Windows, the famous [Blue Screen of Death](https://en.wikipedia.org/wiki/Blue_Screen_of_Death) is an annoyance that plagues computers, causing error, frustration, and even data loss. They happened to me a lot whilst I was trying to configure my computer, and I thought _I wonder who else I can annoy with a BSOD_
|
|
||||||
|
|
||||||
__And thus the BSOD_Enabler was born!__
|
|
||||||
|
|
||||||
After researching into it for a while, it turns out that there are a few different ways to cause a BSOD, unfortunately most of which are by doing things that are meant to cause a BSOD, and can therefore be dangerous to a computer, something I didn't really want. Then I stumbled upon [this article](http://www.wikihow.com/Force-a-Blue-Screen-in-Windows), which shows that you can in fact raise a BSOD without causing any errors or damage to your computer. Now to write a program that can do it too!
|
|
||||||
|
|
||||||
Obviously there are many different ways, and probably far better ways of doing this, but I wanted something that was simple to use, fast, and could be done by anyone, no matter how technically illiterate. So I decided to write it in C#, and use a windows console interface.
|
|
|
@ -1,20 +0,0 @@
|
||||||
---
|
|
||||||
title: My Dotfiles
|
|
||||||
template: projects
|
|
||||||
slug: dotfiles
|
|
||||||
repo: https://github.com/RealOrangeOne/dotfiles/
|
|
||||||
summary: How I set up my machines just the way I like them!
|
|
||||||
---
|
|
||||||
|
|
||||||
### What are dotfiles?
|
|
||||||
Dotfiles are a way for people to store their settings and preferences to make setting up a new computer that much easier. They can usually be found in a persons VCS profile.
|
|
||||||
|
|
||||||
### Taking dotfiles 1 step further
|
|
||||||
I use both my laptop and work machines almost every day, and want them to be setup in an almost identical way, despite the fact that 1 runs Ubuntu, and the other runs Arch. The main things I needed synced over were my `.bashrc` file and my atom config.
|
|
||||||
|
|
||||||
## How I did it
|
|
||||||
Originally, I used my owncloud server to sync all my dotfiles between my computer, and then used symlinks to split out the relevant files into the relevant locations.
|
|
||||||
|
|
||||||
This worked brilliantly, config files were automatically synced as soon as I made a change. This was especially great for my `.bashrc` file! The main problem was with atom packages, I had to manually store what files were installed, then manually install them on the other machine from the saved file. This was made easier by `apm` allowing me to list them and automatically save them in a file, but it wasn't perfect.
|
|
||||||
|
|
||||||
Eventually, after looking into possible solutions, I came across the [`Sync settings`](https://atom.io/packages/sync-settings) package, which seemed to be the answer to my prayers! It saved all my config data for atom into a gist, which I could then backup and restore too from within the application. It also warned me when my local data was out of date from the remote, and prompt me to download the updated data.
|
|
|
@ -1,16 +0,0 @@
|
||||||
---
|
|
||||||
title: Hipchat emoticons for all
|
|
||||||
template: projects
|
|
||||||
slug: hipchat-emoticons-for-all
|
|
||||||
repo: https://github.com/RealOrangeOne/hipchat-emoticons-for-all/
|
|
||||||
---
|
|
||||||
|
|
||||||
After starting my new job at DabApps, I was introduced to the world of [Hipchat](https://hipchat.com), and it's wonderful array of emoticons, as well as the ones added. It was wonderful, it made communicating with friends and colleagues much more interesting!
|
|
||||||
|
|
||||||
Unfortunately, the emoticons on the other services we use, like [GitHub](https://github.com), were terrible in comparison. So it was after a discussion with [@JakeSidSmith](https://github.com/jakesidsmith) about him just using things like (facepalm), (notsureif), and (wat) in [Facebook messenger](https://www.messenger.com/) and hoping people understand what it means, that I decided to make 'Hipchat Emoticons for all', so people like him could use a much better set of emoticons.
|
|
||||||
|
|
||||||
The premiss is very simple, whenever it sees a hipchat emoticon code, like (notsureif), it replaces it with an emoticon. If only writing the code could have been this simple! I started writing the plugin in firefox, using [Jetpack](https://wiki.mozilla.org/Jetpack), which uses Javascript. The initial stages of the code were very simple, but I encountered problems making sure that anything loaded after the page was loaded (such as a Facebook message), be changed too.
|
|
||||||
|
|
||||||
Fortunately after many hours of testing, and changing the code, I finally got everything working perfectly, and in a way that made adding new sites incredibly easy! The code isn't the greatest in terms of performance, and there are some things that could have obviously been done better, but this was all done to help with a shared codebase between Chrome and Firefox, which don't play nice when it comes to extensions.
|
|
||||||
|
|
||||||
Currently the application is in very beta stages right now, only having tested partial support for GitHub, but the code is all available on GitHub, if people have their own suggestions of improvements.
|
|
|
@ -1,7 +0,0 @@
|
||||||
---
|
|
||||||
title: JSFuckify
|
|
||||||
template: projects
|
|
||||||
slug: jsfuckify
|
|
||||||
repo: https://github.com/RealOrangeOne/JSFuckify
|
|
||||||
status: draft
|
|
||||||
---
|
|
|
@ -1,20 +0,0 @@
|
||||||
---
|
|
||||||
title: Morse code decoder
|
|
||||||
template: projects
|
|
||||||
slug: morese-code-decoder
|
|
||||||
repo: https://gist.github.com/RealOrangeOne/6dc94875c93b787e5834
|
|
||||||
summary: A JSON file to help decode morse-code
|
|
||||||
---
|
|
||||||
|
|
||||||
It's not often someone will need to decode text into morse code (and visa-versa), but if I had something like this when I needed it, it would have saved me hours of time!
|
|
||||||
|
|
||||||
I originally wrote this code for the [Student Robotics 2015](/robotics/2015/) Entry, to convert a string message into a morse code message that would be transmitted using LEDs, for aesthetics and debugging. Unfortunately due to a fixed time frame, this idea was scraped before it could be fully implemented. Fortunately the decoder worked perfectly!
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
In order to make it accessible for as many people in as many different languages as possible, the data is in JSON format. Just find a JSON library for your desired language, and it'll work perfectly!
|
|
||||||
|
|
||||||
The source of the library is on GitHub as a gist. I recommend downloading the file to use yourself, however for testing you can use GitHub's raw view as a hotlink.
|
|
||||||
|
|
||||||
|
|
||||||
<script src="https://gist.github.com/RealOrangeOne/6dc94875c93b787e5834.js"></script>
|
|
|
@ -1,7 +0,0 @@
|
||||||
---
|
|
||||||
title: React native busy indicator
|
|
||||||
template: projects
|
|
||||||
slug: react-native-busy-indicator
|
|
||||||
repo: https://github.com/RealOrangeOne/react-native-busy-indicator
|
|
||||||
status: draft
|
|
||||||
---
|
|
|
@ -1,7 +0,0 @@
|
||||||
---
|
|
||||||
title: React native mock
|
|
||||||
template: projects
|
|
||||||
slug: react-native-mock
|
|
||||||
repo: https://github.com/lelandrichardson/react-native-mock
|
|
||||||
status: draft
|
|
||||||
---
|
|
|
@ -1,32 +0,0 @@
|
||||||
---
|
|
||||||
title: Wiki Game solver
|
|
||||||
template: projects
|
|
||||||
slug: wiki-game-solver
|
|
||||||
repo: https://gist.github.com/RealOrangeOne/7da9a3dd1bf90ecdf7be
|
|
||||||
summary: Simple script to win the Wiki Game
|
|
||||||
---
|
|
||||||
|
|
||||||
For those who don't know what the Wiki Game is: [The Wiki Game](http://thewikigame.com) is an online game where you attempt to navigate through wikipedia from a start page to a goal page using as few other pages as possible. Once I was shown the Wiki Game by my friend, and after I realised that I really wasn't very good at it, I looked into how the system worked, and how I could beat it.
|
|
||||||
|
|
||||||
I couldn't see how the back end worked, but after playing a few games and checking what happened on the page,the way that the game was won was when the iframe was at the final page location, or at least a clone of it on their servers with extra querystring information.
|
|
||||||
|
|
||||||
With this information, I started to write some javascript that would change the location of the iframe to the goal. Fortunately for me, there was already a link to the real winning page, so I could use that to construct the final URL, and direct the iframe to it, meaning I was able to win the game in 1 turn.
|
|
||||||
|
|
||||||
## Source
|
|
||||||
Naturally, the source for this was written in javascript, and relies heavily on the fact that the wiki game uses jQuery so I can plug into components and events really easily. The code can be found in the GitHub gists below. Both the standard and compact versions are available.
|
|
||||||
|
|
||||||
<script src="https://gist.github.com/RealOrangeOne/7da9a3dd1bf90ecdf7be.js"></script>
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
1. Start a new game on [Wiki Game](http://thewikigame.com/speed-race), __don't__ press start!
|
|
||||||
2. Open your browser's developers console. This will vary from browser.
|
|
||||||
3. Open the Javascript console
|
|
||||||
4. Paste the compact version of the code there, and execute it (press enter)
|
|
||||||
5. Congratulations, you just won!
|
|
||||||
|
|
||||||
If you want to win more games, just re-paste the code, it works as often as you like!
|
|
||||||
|
|
||||||
### Disclaimer
|
|
||||||
|
|
||||||
As I experienced whilst developing this, the people that play Wiki Game don't tend to like people cheating. There were a lot of people getting very annoyed whilst I was developing and testing. So please use this at your own risk! At the moment I don't think there is any kind of banning system, but be warned!
|
|
|
@ -1,13 +0,0 @@
|
||||||
---
|
|
||||||
title: Yoga Pal
|
|
||||||
template: projects
|
|
||||||
slug: yoga-pal
|
|
||||||
repo: https://github.com/RealOrangeOne/yoga-pal
|
|
||||||
summary: Control screen rotation, touch screen, and trackpad using the terminal
|
|
||||||
---
|
|
||||||
|
|
||||||
Once I started work, I bought myself a _Lenovo Yoga 3 14"_ laptop, because I needed a thin and light for trains etc. Unfortunately this came with windows, which within 10 minutes was running Ubuntu Gnome! Ubuntu greatly increased the performance, but I had to sacrifice all the screen, touchpad and keyboard customisation when changing 'modes'.
|
|
||||||
|
|
||||||
I found [this thread](https://askubuntu.com/questions/450066/rotate-touchscreen-and-disable-the-touchpad-on-yoga-2-pro-in-rotated-mode) on _Ask Ubuntu_ with someone else trying to find a solution to this, to find a nice way of rotating the screen when in tablet mode. On the thread was a really nice simple [script](https://askubuntu.com/a/485685/432138) that rotated the screen perfectly, and did the touchscreen too. This script worked great, doing exactly what it said it did, nicely and quickly, however it wasn't a great solution for me. Yes it worked, but it didn't allow me to change anything else, like the touchpad.
|
|
||||||
|
|
||||||
So I started working on my own CLI, based off the above script, to allow me to tweak everything, so the laptop can be used as it was intended.
|
|
|
@ -1,37 +0,0 @@
|
||||||
<head>
|
|
||||||
<meta name="title" content="Student Robotics 2014">
|
|
||||||
<meta name="slug" content="2014">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<img class="img-rounded" src="https://c2.staticflickr.com/8/7670/17115168179_1ef30ac6e9_b.jpg" />
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<p>
|
|
||||||
Welcome to the homepage of Collyer's Student Robotics 2014 team. Originally, this page was a part of the competition, but due to 3 different site rewrites, the original content and formatting has been lost.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<h2>The Competition</h2>
|
|
||||||
<p>
|
|
||||||
The game for this year was called <em>Slots</em>. Teams compeated to get as many of their tokens into a scoring zone in 3 minutes. Teams would also get extra points if they could get the token into a zones 'slot', an area the size of a token, raised by around 3 cm.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
To see a copy of the rules from the competition, <a href="https://www.studentrobotics.org/resources/2014/rulebook.pdf">Click Here!</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<div class="list-group">
|
|
||||||
<a class="list-group-item active h4">Quick Links</a>
|
|
||||||
<a href="https://github.com/SR-CLY/2014" class="list-group-item">The Code</a>
|
|
||||||
<a href="https://www.flickr.com/photos/theorangeone/albums/72157651820386449" class="list-group-item">Gallery</a>
|
|
||||||
<a href="http://collyers-robotics14.tumblr.com/" class="list-group-item">Blog</a>
|
|
||||||
<a href="https://www.studentrobotics.org/schools/game#2014" class="list-group-item">Competition Information</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
|
@ -1,25 +0,0 @@
|
||||||
---
|
|
||||||
title: The Code
|
|
||||||
html_title: The Code | SR2015
|
|
||||||
slug: 2015/code
|
|
||||||
---
|
|
||||||
|
|
||||||
The code used for this competition was by far the most complicated and advanced code that had ever been written by a Collyer's team.
|
|
||||||
|
|
||||||
The main change between any other year was using an entirely co-ordinate based movement system. Any input taken in from the camera was converted to co-ordinates in terms of the arena, so we could plot our movement more accurately and allow for any immovable objects such as the internal walls.
|
|
||||||
|
|
||||||
The addition of this coordinate system allowed us to create the killer feature of this year, the position correction code. This code allowed us to automatically correct our position after we scanned for a marker, meaning we could allow for any imperfections in the build.
|
|
||||||
|
|
||||||
There were a lot of really great features in this years code, that made our robot function much faster:
|
|
||||||
|
|
||||||
- Position correction
|
|
||||||
- co-ordinate based movement
|
|
||||||
- Arc movement
|
|
||||||
- Distance based movement
|
|
||||||
- _move 'til touch_
|
|
||||||
- Camera rotation
|
|
||||||
|
|
||||||
### So, where is this code?
|
|
||||||
Unfortunately, due to the number of features, we have decided to keep the source private, so that only other Collyer's teams may access it. A lot of blood, sweat and tears (not literally) went into writing this code, and it would be a shame if that were to be used to help any of our opponents.
|
|
||||||
|
|
||||||
You can however see the code from some of our other years on our [GitHub organisation](https://github.com/SR-CLY).
|
|
|
@ -1,42 +0,0 @@
|
||||||
<head>
|
|
||||||
<meta name="title" content="Student Robotics 2015">
|
|
||||||
<meta name="slug" content="2015">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<img class="img-rounded" src="https://c2.staticflickr.com/8/7726/17309695331_584e7de16c_z.jpg" />
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<p>
|
|
||||||
Welcome to the homepage of Collyer's Student Robotics Team 2015 (The 'A' Team) - Creators of 'A.L.I.C.E'! Here you can see everything that goes on throughout the competition.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<h2>The Competition</h2>
|
|
||||||
<p>
|
|
||||||
As was announced at kickstart, the game for this year is a take on the classic gamemode Capture the Flag. 4 teams compete over 5 flags to move as many of them as they can into their scoring zones. The person with the most flags in their scoring zone wins.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The 'flags' are 25cm cubes of wood on caster wheels weighing roughly 2kg. The rules prevent us from lifting them, so the idea is to drag them around!
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
To see a copy of the rules from the competition, <a href="https://www.studentrobotics.org/resources/2015/rulebook.pdf">Click Here!</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<div class="list-group">
|
|
||||||
<a class="list-group-item active h4">Quick Links</a>
|
|
||||||
<a href="/robotics/2015/robot/" class="list-group-item">The Robot - A.L.I.C.E</a>
|
|
||||||
<a href="/robotics/2015/code/" class="list-group-item">The Code</a>
|
|
||||||
<a href="https://flic.kr/s/aHska26DoH" class="list-group-item">Gallery</a>
|
|
||||||
<a href="http://collyersstudentrobotics.blogspot.co.uk/" class="list-group-item">Blog</a>
|
|
||||||
<a href="https://www.studentrobotics.org/schools/game#2015" class="list-group-item">Competition Information</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="image-panel" data-image="https://c2.staticflickr.com/8/7674/17308375182_a172a341d6_h.jpg"></div>
|
|
||||||
</body>
|
|
|
@ -1,46 +0,0 @@
|
||||||
---
|
|
||||||
title: The Robot - A.L.I.C.E
|
|
||||||
html_title: The Robot | SR2015
|
|
||||||
slug: 2015/robot
|
|
||||||
---
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<!-- Image of initial design (on paper) -->
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<p>
|
|
||||||
Our entry for 2015, named 'A.L.I.C.E', was a massive improvement over last years model, in both design, and the code for it. Before ALICE was built, the design team built us a very basic chassis usind scrap parts from 2014, which allowed us to write a large amount of the code base before we even had the robot built. Originally I wanted the final chassis to be built before the end of January, so we had a lot of time to test out the design for the robot and test using the final, in reality, it was closer to the middle of march before this was a reality.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
The entire chassis was made from sheets of plywood, which we laser cut in college, allowing us to be very precise in the design of the robot to make sure that all the pieces would fit together properly, making the chassis less likely to break.
|
|
||||||
|
|
||||||
|
|
||||||
The initial design was conceived by Ben, at kickstart, and was then refined over the coming weeks by me and the rest of the building team. This was made much easier from the use of the 3D model, that Ben made, which helped us visualize any changes that were to be made, as well as work out strategy by seeing the measurements we had to work with.
|
|
||||||
|
|
||||||
|
|
||||||
Once the build was completed, it was to a much higher design and quality than I could have ever imagined! It allowed us to forget about any shortcomings when it came to chassis, not having to compensate for weight distribution, or worry about the grip on the wheels.
|
|
||||||
|
|
||||||
<div class="image-panel" data-image="https://farm1.staticflickr.com/737/20984044320_ccbba155f9_o.gif"></div>
|
|
||||||
|
|
||||||
## Why call it _A.L.I.C.E_?
|
|
||||||
The decision to name the robot 'Alice' was a decision made by the whole group!
|
|
||||||
|
|
||||||
|
|
||||||
That's a lie, Ben suggested it and as no one had any better ideas and because he gets overruling vote on this, for some reason , it stuck.
|
|
||||||
|
|
||||||
|
|
||||||
After this decisions was made, I decided to set out to find the cheesiest acronym we could for 'Alice', to make the name slightly more interesting, and not some random girls name pulled from thin air on the bus ride home from kickstart. There were a few rather good ideas, most of them coming from Sam:
|
|
||||||
|
|
||||||
- 'Automated Laser-cut Interactive Capturing Entity'</li>
|
|
||||||
- 'Abnormally Lame and Inaccurate Control-less Engine'</li>
|
|
||||||
- 'Anti-Losing Immaculate Competitive Extravaganza'</li>
|
|
||||||
|
|
||||||
One idea was also suggested that we name the robot after the first sponsor we got, but as we didn't get one until after the team split, the other team took that name instead. In the end we decided to go with one that Sam initially suggested, so 'ALICE' officially stands for:
|
|
||||||
|
|
||||||
<h3 class="text-center">'Autonomous Logistics and Inevitable Collision Engine'</h3>
|
|
||||||
|
|
||||||
<div class="image-panel" data-image="https://c2.staticflickr.com/8/7656/16687742984_ee1c76d1d9_h.jpg"></div>
|
|
|
@ -1,35 +0,0 @@
|
||||||
---
|
|
||||||
title: Desktop
|
|
||||||
slug: custom-pc
|
|
||||||
screenfetch_path: setup/desktop.txt
|
|
||||||
image: /static/img/header.jpg
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
My setup is everything, I use my computer at least once a day to browse the internet, work on projects, even update this website, so it's very important that everything works perfectly and the fastest it can. Obviously this machine is probably a little too powerful for someone that does almost primarily software development, but it means when I want to do things like video editing, 3D modelling, or anything else that would require a high end computer, I can, because my computer is equipped to handle it.
|
|
||||||
|
|
||||||
Over the years, my setup has evolved from a single monitor i5 machine, to a triple monitor AMD FX-based monster of a computer.
|
|
||||||
|
|
||||||
{{ article.screenfetch }}
|
|
||||||
|
|
||||||
[Current Parts list]()
|
|
||||||
|
|
||||||
This generation of my build was in response to an updated workflow. I'd recently started working on 3D modelling, and found the wonderful world that is PC gaming, and needed something slightly more powerful. It hasn't changed much since I originally built it, besides storage. The CPU cooler was changed from a 120mm AiO to an air cooler to stop things overheating, and the case was changed so I could fit more stuff in, like a few more drives.
|
|
||||||
|
|
||||||
|
|
||||||
### Next Generation
|
|
||||||
|
|
||||||
I've been using the current generation for around 3 years now, and it's worked perfectly for all of this. The main reason I'm upgrading is to get more features, The 990FX chipset is very old, and my motherboard is missing a few key features, such as dynamic fan control.
|
|
||||||
|
|
||||||
The next generation of my build isn't actually a thing yet, but I'm actively working on what it's going to look like and the components inside it. Currently it's going to be an Intel based build, unless AMD release the reported 16-core monster, which I obviously have to have! You can find the current parts list at the link below, the list is always changing.
|
|
||||||
|
|
||||||
[Next-Gen Parts List]()
|
|
||||||
|
|
||||||
Recently, I've been using linux more and more, and have switched this machine to Arch Linux. But some days I miss my windows-only applications and games, so I'm going to be using a virtual machine running windows, with a graphics card hardware pass-through to it, so I can run windows applications, and play windows-only games. The best of both worlds! I got the idea for doing this from a video [TekSyndicate](https://www.youtube.com/user/razethew0rld) made, which is by far the single greatest example of tech wizardry I've ever seen. You can find the video [here](https://www.youtube.com/watch?v=16dbAUrtMX4).
|
|
||||||
|
|
||||||
|
|
||||||
## Previous Generations
|
|
||||||
|
|
||||||
The first generation of this was the first custom build I'd ever done. When I first built this, I wasn't really into gaming, programming, or any kind of heavy workflow for that matter, so this build isn't particularly powerful, although compared to my old [Dell Inspiron 1525](http://www.pcworld.com/product/31104/dell-inspiron-1525.html), it was pretty damn incredible!
|
|
||||||
|
|
||||||
You can find the full list of parts over on the PCPartPicker link below. Unfortunately due to the lack of catalog, or bad memory on my part, not all the parts are there, but there are as many as possible.
|
|
|
@ -1,19 +0,0 @@
|
||||||
[0m[34m `.-/::/-``[0m
|
|
||||||
[0m[34m .-/osssssssso/. [0m[1;34mjake[0m[1m@[0m[0m[1;34mTOO-Desktop[0m
|
|
||||||
[0m[34m :osyysssssssyyys+- [0m[1;34m OS:[0m Antergos [0m
|
|
||||||
[0m[34m `.+yyyysssssssssyyyyy+. [0m[1;34m Kernel:[0m x86_64 Linux 4.7.2-1-ARCH[0m
|
|
||||||
[0m[34m `/syyyyyssssssssssyyyyys-` [0m[1;34m Uptime:[0m
|
|
||||||
[0m[34m `/yhyyyyysss[0m[1;34m++[0m[34mssosyyyyhhy/` [0m[1;34m Packages:[0m
|
|
||||||
[0m[34m .ohhhyyyys[0m[1;34mo++/+o[0m[34mso[0m[1;34m+[0m[34msyy[0m[1;34m+[0m[34mshhhho. [0m[1;34m Shell:[0m bash 4.3.46[0m
|
|
||||||
[0m[34m .shhhhys[0m[1;34moo++//+[0m[34msss[0m[1;34m+++[0m[34myyy[0m[1;34m+s[0m[34mhhhhs. [0m[1;34m Resolution:[0m 6400x1440[0m
|
|
||||||
[0m[34m -yhhhhs[0m[1;34m+++++++o[0m[34mssso[0m[1;34m+++[0m[34myyy[0m[1;34ms+o[0m[34mhhddy: [0m[1;34m DE:[0m Gnome [0m
|
|
||||||
[0m[34m -yddhhy[0m[1;34mo+++++o[0m[34msyyss[0m[1;34m++++[0m[34myyy[0m[1;34myooy[0m[34mhdddy- [0m[1;34m WM:[0m GNOME Shell[0m
|
|
||||||
[0m[34m .yddddhs[0m[1;34mo++o[0m[34msyyyyys[0m[1;34m+++++[0m[34myyhh[0m[1;34msos[0m[34mhddddy` [0m[1;34m WM Theme:[0m Numix-Frost-Light[0m
|
|
||||||
[0m[34m`odddddhyosyhyyyyyy[0m[1;34m++++++[0m[34myhhhyosddddddo [0m[1;34m GTK Theme:[0m Numix [GTK2/3][0m
|
|
||||||
[0m[34m.dmdddddhhhhhhhyyyo[0m[1;34m+++++[0m[34mshhhhhohddddmmh. [0m[1;34m Icon Theme:[0m UltraFlatIconsOrangeDark[0m
|
|
||||||
[0m[34mddmmdddddhhhhhhhso[0m[1;34m++++++[0m[34myhhhhhhdddddmmdy [0m[1;34m Font:[0m Cantarell 11[0m
|
|
||||||
[0m[34mdmmmdddddddhhhyso[0m[1;34m++++++[0m[34mshhhhhddddddmmmmh [0m[1;34m CPU:[0m AMD FX-8350 Eight-Core @ 4.013GHz[0m
|
|
||||||
[0m[34m-dmmmdddddddhhys[0m[1;34mo++++o[0m[34mshhhhdddddddmmmmd- [0m[1;34m GPU:[0m GeForce GTX 660 Ti[0m
|
|
||||||
[0m[34m .smmmmddddddddhhhhhhhhhdddddddddmmmms. [0m[1;34m RAM:[0m 7887MiB
|
|
||||||
[0m[34m `+ydmmmdddddddddddddddddddmmmmdy/. [0m
|
|
||||||
[0m[34m `.:+ooyyddddddddddddyyso+:.`[0m
|
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
title: Laptop
|
|
||||||
slug: laptop
|
|
||||||
status: draft
|
|
||||||
---
|
|
|
@ -1,11 +0,0 @@
|
||||||
---
|
|
||||||
title: Public web server
|
|
||||||
slug: web-server
|
|
||||||
screenfetch_path: setup/web-server.txt
|
|
||||||
---
|
|
||||||
|
|
||||||
The server itself is a VPS hosted by [Inception hosting](https://clients.inceptionhosting.com/aff.php?aff=256). Obviously if I did more looking around I could probably find a slightly better deal, but these people have brilliant customer support, fast and customizable servers, that are also hosted in a data centre in the UK (a major bonus)!
|
|
||||||
|
|
||||||
The spec on this server are nothing special, but considering it wouldn't be running much, other than a web server, and a couple of other applications, it's plenty. The most important thing is that it is hosted in the UK, for connection speed, and for other applications like a VPN.
|
|
||||||
|
|
||||||
{{ article.screenfetch }}
|
|
|
@ -1,18 +0,0 @@
|
||||||
[0m[1;31m ./+o+- [0m[1;31mjake[0m[1m@[0m[0m[1;31mTOO-webserver[0m
|
|
||||||
[0m[1;37m yyyyy- [0m[1;31m-yyyyyy+ [0m[1;31m OS:[0m Ubuntu 14.04 trusty[0m
|
|
||||||
[0m[1;37m [0m[1;37m://+//////[0m[1;31m-yyyyyyo [0m[1;31m Kernel:[0m x86_64 Linux 3.13.0-93-generic[0m
|
|
||||||
[0m[1;33m .++ [0m[1;37m.:/++++++/-[0m[1;31m.+sss/` [0m[1;31m Uptime:[0m
|
|
||||||
[0m[1;33m .:++o: [0m[1;37m/++++++++/:--:/- [0m[1;31m Packages:[0m
|
|
||||||
[0m[1;33m o:+o+:++.[0m[1;37m`..```.-/oo+++++/ [0m[1;31m Shell:[0m bash 4.3.11[0m
|
|
||||||
[0m[1;33m .:+o:+o/.[0m[1;37m `+sssoo+/ [0m[1;31m CPU:[0m Intel Xeon CPU E5-2630 v2 @ 2.6GHz[0m
|
|
||||||
[0m[1;37m .++/+:[0m[1;33m+oo+o:`[0m[1;37m /sssooo. [0m[1;31m RAM:[0m 972MiB[0m
|
|
||||||
[0m[1;37m /+++//+:[0m[1;33m`oo+o[0m[1;37m /::--:. [0m
|
|
||||||
[0m[1;37m \+/+o+++[0m[1;33m`o++o[0m[1;31m ++////. [0m
|
|
||||||
[0m[1;37m .++.o+[0m[1;33m++oo+:`[0m[1;31m /dddhhh. [0m
|
|
||||||
[0m[1;33m .+.o+oo:.[0m[1;31m `oddhhhh+ [0m
|
|
||||||
[0m[1;33m \+.++o+o`[0m[1;31m`-````.:ohdhhhhh+ [0m
|
|
||||||
[0m[1;33m `:o+++ [0m[1;31m`ohhhhhhhhyo++os: [0m
|
|
||||||
[0m[1;33m .o:[0m[1;31m`.syhhhhhhh/[0m[1;33m.oo++o` [0m
|
|
||||||
[0m[1;31m /osyyyyyyo[0m[1;33m++ooo+++/ [0m
|
|
||||||
[0m[1;31m ````` [0m[1;33m+oo+++o\: [0m
|
|
||||||
[0m[1;33m `oo++. [0m
|
|
|
@ -1,43 +0,0 @@
|
||||||
---
|
|
||||||
title: LanSchool
|
|
||||||
slug: LanSchool
|
|
||||||
summary: The tool of choice of my college to monitor students usage of computers. Turns out it's not particularly robust!
|
|
||||||
---
|
|
||||||
|
|
||||||
LanSchool is the software of choice for my college to monitor and control computer usage. It allows teachers to see students screens, interact with them, and even block certain functionality like the internet and removable storage. My secondary school had a system much like this, but they weren't as active in using it.
|
|
||||||
|
|
||||||
By far the worst feature of LanSchool was the screen blocking. At will, a teacher could show an overlay on your screen, usually consisting of test saying _"Eyes front"_ etc. The problem with this pop up was there was no way to hide it, it just appeared suddenly and forced you to stop using your computer. This tool had to be stopped!
|
|
||||||
|
|
||||||
Within a few weeks of realising this tool, A friend of mine discovered how to get around it in a really primitive way: simply unplugging the ethernet. It's rather incredible this worked, but it had some problems:
|
|
||||||
|
|
||||||
- It took around 10 seconds after disconnect before the screen was restored, not a major problem, but still annoying.
|
|
||||||
- With all documents and programs bring stored on the network, you couldn't access any programs and documents you didn't already have open.
|
|
||||||
- When you reconnect the cable, the screen returns to the state of everyone else.
|
|
||||||
- Your computer would suddenly disappear from the list of machines on the teachers screen. If they were observant, they'd notice!
|
|
||||||
|
|
||||||
This solution worked, but wasn't ideal. Another solution was to log out (using the `ctrl + alt + delete` shortcut, which worked for some reason), and log in again. Our network was slow, so sometimes it wasn't worth the wait if your screens were only disabled for a short period of time. However the main problem with this was the fact it didn't always work, only around 30% of the time.
|
|
||||||
|
|
||||||
#### The best fix
|
|
||||||
|
|
||||||
The original idea for this came from someone else, but the implementation and refinement was mine, so I like to think it was mostly me.
|
|
||||||
|
|
||||||
Using an ubuntu live CD loaded onto a USB drive, we booted to ubuntu, and renamed the LanSchool executable. This meant the program wouldn't be able to run on start up, and so the client couldn't communicate with the teacher to lock our computers. __Result!__
|
|
||||||
|
|
||||||
This method worked almost perfectly, however had a few problems:
|
|
||||||
- It took at least 10 minutes to go from completely enabled, to completely disabled
|
|
||||||
- It worked for every user account on that computer, so it had to be done on each computer I used.
|
|
||||||
- A teacher would notice, as you would never show up on their list.
|
|
||||||
|
|
||||||
Fortunately this last point is a non-issue, as usually the teachers put it down to the software messing up, not a student breaking the install. Another key problem with this is that it's rather obvious when everyones computer other than yours is disabled, as you're still actively using yours, whilst everyone else is actually listening!
|
|
||||||
|
|
||||||
#### The silver lining
|
|
||||||
|
|
||||||
Disabling the client on a machine also allowed for another feature that I had never thought of, but was by far the greatest bi-product of disabling LanSchool: __Teacher Mode!__
|
|
||||||
|
|
||||||
Due to me being able to have access to a teachers computer one evening, I was able to copy the executables for the teachers console onto a USB drive, and then run them later on my computer. Obviously I know most software won't work in this way, but I'm so glad this one did!
|
|
||||||
|
|
||||||
Now, I had access to everything the teacher did, which made lessons much more exciting. I could block peoples screens, send them messages, or even take complete control of their computer, it was great! Eventually a few more in my class knew [I had the power](), and I became a tool for trolling people, which was made extra simple by the fact I had access to all student computers in the college, not just my class. The only downside to this (something I didn't realise until I tried to prank a friend), is that it comes up with your name on the client computer if you try and take control of one that's not in your class, an annoying and dangerous feature.
|
|
||||||
|
|
||||||
#### Phase 2
|
|
||||||
|
|
||||||
Whilst writing this article, over 2 years after all this, I realised I could improve it considerable. Writing some kind of wrapper program, to detect my username, and run LanSchool for users other than me, would be harder to work out there was a problem with the computer, as well as prevent it disabling LanSchool for every user.
|
|
1
environment/Procfile
Executable file
1
environment/Procfile
Executable file
|
@ -0,0 +1 @@
|
||||||
|
web: PYTHONUNBUFFERED=true python manage.py runserver 0.0.0.0:$PORT
|
3
environment/env
Executable file
3
environment/env
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
DEBUG=true
|
||||||
|
EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
|
||||||
|
SECRET_KEY=%*v!183hd8(4j)hg6ylyor34iq_um^&k!0pk_1efn_$j76=so2
|
|
@ -1 +0,0 @@
|
||||||
web: bash scripts/server.sh
|
|
12
manage.py
Executable file
12
manage.py
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
from __future__ import absolute_import, unicode_literals
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
|
||||||
|
|
||||||
|
from django.core.management import execute_from_command_line
|
||||||
|
|
||||||
|
execute_from_command_line(sys.argv)
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "TheOrangeOne-Site",
|
"name": "TheOrangeOne-Site",
|
||||||
"version": "4.0.0",
|
"version": "5.0.0",
|
||||||
"description": " Source code for TheOrangeOne.net",
|
"description": " Source code for TheOrangeOne.net",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build-js": "./scripts/build-js.sh",
|
"build-js": "./scripts/build-js.sh",
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
import iso8601
|
|
||||||
|
|
||||||
|
|
||||||
def format_datetime(value):
|
|
||||||
return iso8601.parse_date(str(value)).strftime("%x")
|
|
||||||
|
|
||||||
|
|
||||||
def category_find(categories, name):
|
|
||||||
for category_name, articles in categories:
|
|
||||||
if category_name == name:
|
|
||||||
return articles
|
|
||||||
return []
|
|
||||||
|
|
||||||
|
|
||||||
def limit(line, length):
|
|
||||||
if isinstance(line, str):
|
|
||||||
if len(line) <= length:
|
|
||||||
return line
|
|
||||||
return " ".join(line.split(" ")[:length]) + '...'
|
|
||||||
elif isinstance(line, list):
|
|
||||||
return line[:length]
|
|
|
@ -1,68 +0,0 @@
|
||||||
import os
|
|
||||||
from PIL import Image
|
|
||||||
from resizeimage import resizeimage
|
|
||||||
|
|
||||||
OUTPUT_DIR = os.path.realpath('theme/static/build/img')
|
|
||||||
ORIGINAL_IMAGE_PATH = os.path.realpath('content/assets/img/logo-transparent.png')
|
|
||||||
|
|
||||||
FAVICON_SIZES = (
|
|
||||||
(16, 16),
|
|
||||||
(32, 32),
|
|
||||||
(96, 96),
|
|
||||||
(128, 128),
|
|
||||||
(196, 196)
|
|
||||||
)
|
|
||||||
|
|
||||||
APPLE_SIZES = (
|
|
||||||
(152, 152),
|
|
||||||
(144, 144),
|
|
||||||
(120, 120),
|
|
||||||
(114, 114),
|
|
||||||
(72, 72),
|
|
||||||
(60, 60),
|
|
||||||
(57, 57)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def merge_dicts(*dict_args):
|
|
||||||
result = {}
|
|
||||||
for dictionary in dict_args:
|
|
||||||
result.update(dictionary)
|
|
||||||
return result
|
|
||||||
|
|
||||||
|
|
||||||
def get_size_string(w, h):
|
|
||||||
return "{0}x{1}".format(w, h)
|
|
||||||
|
|
||||||
|
|
||||||
def build_apple_filenames():
|
|
||||||
return {s: "apple-touch-icon-{0}.png".format(get_size_string(*s)) for s in FAVICON_SIZES}
|
|
||||||
|
|
||||||
|
|
||||||
def build_favicon_filenames():
|
|
||||||
return {s: "favicon-{0}.png".format(get_size_string(*s)) for s in APPLE_SIZES}
|
|
||||||
|
|
||||||
|
|
||||||
def get_all_files():
|
|
||||||
favicon_filenames = build_favicon_filenames()
|
|
||||||
apple_filenames = build_apple_filenames()
|
|
||||||
return merge_dicts(favicon_filenames, apple_filenames)
|
|
||||||
|
|
||||||
|
|
||||||
def generate():
|
|
||||||
for size, image_file in get_all_files().items():
|
|
||||||
try:
|
|
||||||
os.remove(os.path.join(OUTPUT_DIR, image_file))
|
|
||||||
except FileNotFoundError:
|
|
||||||
continue
|
|
||||||
|
|
||||||
with open(ORIGINAL_IMAGE_PATH, 'rb') as original_image_file:
|
|
||||||
with Image.open(original_image_file) as original_image:
|
|
||||||
for size, image_name in get_all_files().items():
|
|
||||||
new_image = resizeimage.resize_contain(original_image, size)
|
|
||||||
new_image.save(os.path.join(OUTPUT_DIR, image_name), original_image.format)
|
|
||||||
|
|
||||||
favicon_image_details = [('icon', get_size_string(*size), filename) for size, filename in build_favicon_filenames().items()]
|
|
||||||
apple_image_details = [('apple-touch-icon-precomposed', get_size_string(*size), filename) for size, filename in build_apple_filenames().items()]
|
|
||||||
|
|
||||||
return favicon_image_details + apple_image_details
|
|
|
@ -1,36 +0,0 @@
|
||||||
from collections import namedtuple
|
|
||||||
from random import shuffle
|
|
||||||
from config import settings, DotDictionary
|
|
||||||
|
|
||||||
|
|
||||||
ProjectLink = namedtuple("ProjectLink", ["name", "url", "image"])
|
|
||||||
|
|
||||||
|
|
||||||
def accounts():
|
|
||||||
links = {}
|
|
||||||
for key, (site, user, url, icon) in settings.accounts.items():
|
|
||||||
links[key] = DotDictionary({
|
|
||||||
'key': key,
|
|
||||||
'site': site,
|
|
||||||
'username': user,
|
|
||||||
'url': url.format(user),
|
|
||||||
'icon': icon
|
|
||||||
})
|
|
||||||
return links
|
|
||||||
|
|
||||||
|
|
||||||
def footer():
|
|
||||||
all_accounts = accounts()
|
|
||||||
return [all_accounts[account] for account in settings.footer_accounts]
|
|
||||||
|
|
||||||
|
|
||||||
def index_projects():
|
|
||||||
projects = [
|
|
||||||
ProjectLink("Student Robotics", "/robotics/", "https://c2.staticflickr.com/8/7711/17122633430_e1b599fe47.jpg"),
|
|
||||||
ProjectLink("Dotfiles", "/projects/dotfiles/", "http://jleajones.com/assets/images/dotfiles.png"),
|
|
||||||
ProjectLink("Custom PC", "/setup/custom-pc/", "https://c2.staticflickr.com/8/7083/27071954860_f6096ccce6.jpg"),
|
|
||||||
ProjectLink("Yoga-Pal", "/projects/yoga-pal/", "http://brain-images.cdn.dixons.com/8/1/10135218/l_10135218_002.jpg"),
|
|
||||||
ProjectLink("Wall of Sheep", "/wall-of-sheep/", "http://www.hackerstickers.com/uploaded/thumbnails/db_file_img_3582_475xauto.jpg")
|
|
||||||
]
|
|
||||||
shuffle(projects)
|
|
||||||
return projects
|
|
|
@ -1,107 +0,0 @@
|
||||||
from bs4 import BeautifulSoup
|
|
||||||
from pelican import signals
|
|
||||||
import os.path
|
|
||||||
|
|
||||||
|
|
||||||
def get_content_type(instance):
|
|
||||||
return type(instance).__name__
|
|
||||||
|
|
||||||
|
|
||||||
def html_to_raw(html):
|
|
||||||
parsed = BeautifulSoup(html, "html.parser")
|
|
||||||
for script in parsed(["script", "style"]): # Remove extra tags
|
|
||||||
script.extract()
|
|
||||||
return parsed.get_text()
|
|
||||||
|
|
||||||
|
|
||||||
def get_twiter_tags(instance):
|
|
||||||
return {
|
|
||||||
"twitter:card": "summary_large_image",
|
|
||||||
"twitter:site": instance.settings.get("ACCOUNTS")["twitter"].username,
|
|
||||||
"twitter:title": instance.metadata.get("title", ""),
|
|
||||||
"twitter:description": html_to_raw(instance.metadata.get("summary", "")),
|
|
||||||
"twitter:creator": instance.settings.get("ACCOUNTS")["twitter"].username,
|
|
||||||
"twitter:image": instance.metadata.get("image", ""),
|
|
||||||
"twitter:image:alt": html_to_raw(instance.metadata.get("summary", "")),
|
|
||||||
"twitter:url": os.path.join(instance.settings.get("SITEURL", ""), instance.url)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def get_og_tags(instance):
|
|
||||||
return {
|
|
||||||
"og:title": instance.metadata.get("title", ""),
|
|
||||||
"og:type": get_content_type(instance).lower(),
|
|
||||||
"og:url": os.path.join(instance.settings.get("SITEURL"), instance.url),
|
|
||||||
"og:image": instance.metadata.get("image", ""),
|
|
||||||
"og:description": html_to_raw(instance.metadata.get("summary", "")),
|
|
||||||
"og:site_name": instance.settings.get("SITENAME"),
|
|
||||||
"og:locale": instance.metadata.get("locale", "en_GB")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def get_schema_tags(instance):
|
|
||||||
return {
|
|
||||||
"name": instance.metadata.get("title", ""),
|
|
||||||
"description": html_to_raw(instance.metadata.get("summary", "")),
|
|
||||||
"image": instance.metadata.get("image", "")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def get_general_tags(instance):
|
|
||||||
return {
|
|
||||||
"article:author": instance.settings.get("AUTHOR"),
|
|
||||||
"article:modified_time": instance.metadata.get("modified", ""), # Set build time as default?
|
|
||||||
"article:published_time": instance.metadata.get("date", ""),
|
|
||||||
"article:section": instance.category.name if hasattr(instance, "category") else "",
|
|
||||||
"description": html_to_raw(instance.metadata.get("summary", "")),
|
|
||||||
"author": instance.metadata.get("author", instance.settings.get("AUTHOR")),
|
|
||||||
"canonical": instance.settings.get("SITEURL")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def tag_item(instance):
|
|
||||||
instance_type = get_content_type(instance)
|
|
||||||
|
|
||||||
if instance_type not in ['Article', 'Page', 'Draft']:
|
|
||||||
return
|
|
||||||
|
|
||||||
metatags = []
|
|
||||||
|
|
||||||
for tag, value in get_twiter_tags(instance).items():
|
|
||||||
if not value:
|
|
||||||
continue
|
|
||||||
metatags.append(
|
|
||||||
"<meta name=\"{0}\" content=\"{1}\" />".format(tag, value)
|
|
||||||
)
|
|
||||||
|
|
||||||
for tag, value in get_og_tags(instance).items():
|
|
||||||
if not value:
|
|
||||||
continue
|
|
||||||
metatags.append(
|
|
||||||
"<meta property=\"{0}\" content=\"{1}\" />".format(tag, value)
|
|
||||||
)
|
|
||||||
|
|
||||||
for tag, value in get_schema_tags(instance).items():
|
|
||||||
if not value:
|
|
||||||
continue
|
|
||||||
metatags.append(
|
|
||||||
"<meta itemprop=\"{0}\" content=\"{1}\" />".format(tag, value)
|
|
||||||
)
|
|
||||||
|
|
||||||
general_tags = get_general_tags(instance).items()
|
|
||||||
if hasattr(instance, 'tags'):
|
|
||||||
for tag in instance.tags:
|
|
||||||
general_tags.append(('article:tag', tag.name))
|
|
||||||
|
|
||||||
for tag, value in general_tags:
|
|
||||||
if not value:
|
|
||||||
continue
|
|
||||||
metatags.append(
|
|
||||||
"<meta name=\"{0}\" content=\"{1}\" />".format(tag, value)
|
|
||||||
)
|
|
||||||
|
|
||||||
instance.metatags = '\n'.join(metatags)
|
|
||||||
|
|
||||||
|
|
||||||
def register():
|
|
||||||
signals.content_object_init.connect(tag_item)
|
|
|
@ -1,20 +0,0 @@
|
||||||
from pelican import signals
|
|
||||||
import os.path
|
|
||||||
|
|
||||||
|
|
||||||
def screenfetch(instance):
|
|
||||||
base_path = os.path.dirname(os.path.abspath(__file__))
|
|
||||||
if type(instance).__name__ not in ['Article', 'Page', 'Draft']:
|
|
||||||
return
|
|
||||||
|
|
||||||
if not instance.metadata.get('screenfetch_path', False):
|
|
||||||
return
|
|
||||||
|
|
||||||
content_dir = os.path.join(base_path, instance.settings['PATH'])
|
|
||||||
|
|
||||||
file_data = open(os.path.join(content_dir, instance.metadata['screenfetch_path'])).read()
|
|
||||||
instance.screenfetch = "<pre class='highlight ansi-up'>{0}</pre>".format(file_data)
|
|
||||||
|
|
||||||
|
|
||||||
def register():
|
|
||||||
signals.content_object_init.connect(screenfetch)
|
|
0
project/__init__.py
Executable file
0
project/__init__.py
Executable file
0
project/home/__init__.py
Executable file
0
project/home/__init__.py
Executable file
24
project/home/migrations/0001_initial.py
Executable file
24
project/home/migrations/0001_initial.py
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('wagtailcore', '0029_unicode_slugfield_dj19'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='HomePage',
|
||||||
|
fields=[
|
||||||
|
('page_ptr', models.OneToOneField(on_delete=models.CASCADE, parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'abstract': False,
|
||||||
|
},
|
||||||
|
bases=('wagtailcore.page',),
|
||||||
|
),
|
||||||
|
]
|
59
project/home/migrations/0002_create_homepage.py
Executable file
59
project/home/migrations/0002_create_homepage.py
Executable file
|
@ -0,0 +1,59 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
def create_homepage(apps, schema_editor):
|
||||||
|
# Get models
|
||||||
|
ContentType = apps.get_model('contenttypes.ContentType')
|
||||||
|
Page = apps.get_model('wagtailcore.Page')
|
||||||
|
Site = apps.get_model('wagtailcore.Site')
|
||||||
|
HomePage = apps.get_model('home.HomePage')
|
||||||
|
|
||||||
|
# Delete the default homepage
|
||||||
|
# If migration is run multiple times, it may have already been deleted
|
||||||
|
Page.objects.filter(id=2).delete()
|
||||||
|
|
||||||
|
# Create content type for homepage model
|
||||||
|
homepage_content_type, __ = ContentType.objects.get_or_create(
|
||||||
|
model='homepage', app_label='home')
|
||||||
|
|
||||||
|
# Create a new homepage
|
||||||
|
homepage = HomePage.objects.create(
|
||||||
|
title="Homepage",
|
||||||
|
slug='home',
|
||||||
|
content_type=homepage_content_type,
|
||||||
|
path='00010001',
|
||||||
|
depth=2,
|
||||||
|
numchild=0,
|
||||||
|
url_path='/home/',
|
||||||
|
)
|
||||||
|
|
||||||
|
# Create a site with the new homepage set as the root
|
||||||
|
Site.objects.create(
|
||||||
|
hostname='localhost', root_page=homepage, is_default_site=True)
|
||||||
|
|
||||||
|
|
||||||
|
def remove_homepage(apps, schema_editor):
|
||||||
|
# Get models
|
||||||
|
ContentType = apps.get_model('contenttypes.ContentType')
|
||||||
|
HomePage = apps.get_model('home.HomePage')
|
||||||
|
|
||||||
|
# Delete the default homepage
|
||||||
|
# Page and Site objects CASCADE
|
||||||
|
HomePage.objects.filter(slug='home', depth=2).delete()
|
||||||
|
|
||||||
|
# Delete content type for homepage model
|
||||||
|
ContentType.objects.filter(model='homepage', app_label='home').delete()
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('home', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(create_homepage, remove_homepage),
|
||||||
|
]
|
21
project/home/migrations/0003_homepage_body.py
Executable file
21
project/home/migrations/0003_homepage_body.py
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.10.3 on 2016-11-18 22:28
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
import wagtail.wagtailcore.fields
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('home', '0002_create_homepage'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='homepage',
|
||||||
|
name='body',
|
||||||
|
field=wagtail.wagtailcore.fields.RichTextField(blank=True),
|
||||||
|
),
|
||||||
|
]
|
0
project/home/migrations/__init__.py
Executable file
0
project/home/migrations/__init__.py
Executable file
15
project/home/models.py
Executable file
15
project/home/models.py
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import models
|
||||||
|
|
||||||
|
from wagtail.wagtailcore.models import Page
|
||||||
|
from wagtail.wagtailcore.fields import RichTextField
|
||||||
|
from wagtail.wagtailadmin.edit_handlers import FieldPanel
|
||||||
|
|
||||||
|
|
||||||
|
class HomePage(Page):
|
||||||
|
body = RichTextField(blank=True)
|
||||||
|
|
||||||
|
content_panels = Page.content_panels + [
|
||||||
|
FieldPanel('body', classname="full")
|
||||||
|
]
|
9
project/home/templates/home/home_page.html
Executable file
9
project/home/templates/home/home_page.html
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% load wagtailcore_tags %}
|
||||||
|
|
||||||
|
{% block body_class %}template-homepage{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{{ page.body|richtext }}
|
||||||
|
{% endblock %}
|
0
project/search/__init__.py
Executable file
0
project/search/__init__.py
Executable file
38
project/search/templates/search/search.html
Executable file
38
project/search/templates/search/search.html
Executable file
|
@ -0,0 +1,38 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% load static wagtailcore_tags %}
|
||||||
|
|
||||||
|
{% block body_class %}template-searchresults{% endblock %}
|
||||||
|
|
||||||
|
{% block title %}Search{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>Search</h1>
|
||||||
|
|
||||||
|
<form action="{% url 'search' %}" method="get">
|
||||||
|
<input type="text" name="query"{% if search_query %} value="{{ search_query }}"{% endif %}>
|
||||||
|
<input type="submit" value="Search" class="button">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{% if search_results %}
|
||||||
|
<ul>
|
||||||
|
{% for result in search_results %}
|
||||||
|
<li>
|
||||||
|
<h4><a href="{% pageurl result %}">{{ result }}</a></h4>
|
||||||
|
{% if result.search_description %}
|
||||||
|
{{ result.search_description|safe }}
|
||||||
|
{% endif %}
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{% if search_results.has_previous %}
|
||||||
|
<a href="{% url 'search' %}?query={{ search_query|urlencode }}&page={{ search_results.previous_page_number }}">Previous</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if search_results.has_next %}
|
||||||
|
<a href="{% url 'search' %}?query={{ search_query|urlencode }}&page={{ search_results.next_page_number }}">Next</a>
|
||||||
|
{% endif %}
|
||||||
|
{% elif search_query %}
|
||||||
|
No results found
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
36
project/search/views.py
Executable file
36
project/search/views.py
Executable file
|
@ -0,0 +1,36 @@
|
||||||
|
from __future__ import absolute_import, unicode_literals
|
||||||
|
|
||||||
|
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
|
||||||
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
from wagtail.wagtailcore.models import Page
|
||||||
|
from wagtail.wagtailsearch.models import Query
|
||||||
|
|
||||||
|
|
||||||
|
def search(request):
|
||||||
|
search_query = request.GET.get('query', None)
|
||||||
|
page = request.GET.get('page', 1)
|
||||||
|
|
||||||
|
# Search
|
||||||
|
if search_query:
|
||||||
|
search_results = Page.objects.live().search(search_query)
|
||||||
|
query = Query.get(search_query)
|
||||||
|
|
||||||
|
# Record hit
|
||||||
|
query.add_hit()
|
||||||
|
else:
|
||||||
|
search_results = Page.objects.none()
|
||||||
|
|
||||||
|
# Pagination
|
||||||
|
paginator = Paginator(search_results, 10)
|
||||||
|
try:
|
||||||
|
search_results = paginator.page(page)
|
||||||
|
except PageNotAnInteger:
|
||||||
|
search_results = paginator.page(1)
|
||||||
|
except EmptyPage:
|
||||||
|
search_results = paginator.page(paginator.num_pages)
|
||||||
|
|
||||||
|
return render(request, 'search/search.html', {
|
||||||
|
'search_query': search_query,
|
||||||
|
'search_results': search_results,
|
||||||
|
})
|
157
project/settings.py
Executable file
157
project/settings.py
Executable file
|
@ -0,0 +1,157 @@
|
||||||
|
"""
|
||||||
|
Django settings for project project.
|
||||||
|
|
||||||
|
Generated by 'django-admin startproject' using Django 1.10.3.
|
||||||
|
|
||||||
|
For more information on this file, see
|
||||||
|
https://docs.djangoproject.com/en/1.10/topics/settings/
|
||||||
|
|
||||||
|
For the full list of settings and their values, see
|
||||||
|
https://docs.djangoproject.com/en/1.10/ref/settings/
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import absolute_import, unicode_literals
|
||||||
|
|
||||||
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||||
|
import os
|
||||||
|
|
||||||
|
PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
BASE_DIR = PROJECT_DIR
|
||||||
|
|
||||||
|
ALLOWED_HOSTS = ['*']
|
||||||
|
|
||||||
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
|
DEBUG = True
|
||||||
|
|
||||||
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
|
SECRET_KEY = 'n_v3f*dcdg=ni-9ftiyo@c2%gkcr=qg(2bni)4borex-$9&1$v'
|
||||||
|
|
||||||
|
|
||||||
|
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||||
|
|
||||||
|
# Quick-start development settings - unsuitable for production
|
||||||
|
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
|
||||||
|
|
||||||
|
|
||||||
|
# Application definition
|
||||||
|
|
||||||
|
INSTALLED_APPS = [
|
||||||
|
'project.home',
|
||||||
|
'project.search',
|
||||||
|
|
||||||
|
'wagtail.wagtailforms',
|
||||||
|
'wagtail.wagtailredirects',
|
||||||
|
'wagtail.wagtailembeds',
|
||||||
|
'wagtail.wagtailsites',
|
||||||
|
'wagtail.wagtailusers',
|
||||||
|
'wagtail.wagtailsnippets',
|
||||||
|
'wagtail.wagtaildocs',
|
||||||
|
'wagtail.wagtailimages',
|
||||||
|
'wagtail.wagtailsearch',
|
||||||
|
'wagtail.wagtailadmin',
|
||||||
|
'wagtail.wagtailcore',
|
||||||
|
|
||||||
|
'wagtail.contrib.settings',
|
||||||
|
|
||||||
|
'modelcluster',
|
||||||
|
'taggit',
|
||||||
|
|
||||||
|
'django.contrib.admin',
|
||||||
|
'django.contrib.auth',
|
||||||
|
'django.contrib.contenttypes',
|
||||||
|
'django.contrib.sessions',
|
||||||
|
'django.contrib.messages',
|
||||||
|
'django.contrib.staticfiles',
|
||||||
|
]
|
||||||
|
|
||||||
|
MIDDLEWARE = [
|
||||||
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
|
'django.middleware.common.CommonMiddleware',
|
||||||
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
|
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
||||||
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
|
'django.middleware.security.SecurityMiddleware',
|
||||||
|
|
||||||
|
'whitenoise.middleware.WhiteNoiseMiddleware',
|
||||||
|
|
||||||
|
'wagtail.wagtailcore.middleware.SiteMiddleware',
|
||||||
|
'wagtail.wagtailredirects.middleware.RedirectMiddleware',
|
||||||
|
]
|
||||||
|
|
||||||
|
ROOT_URLCONF = 'project.urls'
|
||||||
|
|
||||||
|
TEMPLATES = [
|
||||||
|
{
|
||||||
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
|
'DIRS': [
|
||||||
|
os.path.join(PROJECT_DIR, 'templates'),
|
||||||
|
],
|
||||||
|
'APP_DIRS': True,
|
||||||
|
'OPTIONS': {
|
||||||
|
'context_processors': [
|
||||||
|
'django.template.context_processors.debug',
|
||||||
|
'django.template.context_processors.request',
|
||||||
|
'django.contrib.auth.context_processors.auth',
|
||||||
|
'django.contrib.messages.context_processors.messages',
|
||||||
|
'wagtail.contrib.settings.context_processors.settings'
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
WSGI_APPLICATION = 'project.wsgi.application'
|
||||||
|
|
||||||
|
|
||||||
|
# Database
|
||||||
|
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
'default': {
|
||||||
|
'ENGINE': 'django.db.backends.sqlite3',
|
||||||
|
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Internationalization
|
||||||
|
# https://docs.djangoproject.com/en/1.10/topics/i18n/
|
||||||
|
|
||||||
|
LANGUAGE_CODE = 'en-us'
|
||||||
|
|
||||||
|
TIME_ZONE = 'UTC'
|
||||||
|
|
||||||
|
USE_I18N = True
|
||||||
|
|
||||||
|
USE_L10N = True
|
||||||
|
|
||||||
|
USE_TZ = True
|
||||||
|
|
||||||
|
|
||||||
|
STATICFILES_DIRS = [
|
||||||
|
os.path.join(PROJECT_DIR, 'static'),
|
||||||
|
]
|
||||||
|
|
||||||
|
STATIC_ROOT = os.path.join(BASE_DIR, 'collected-static')
|
||||||
|
STATIC_URL = '/static/'
|
||||||
|
|
||||||
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
||||||
|
MEDIA_URL = '/media/'
|
||||||
|
|
||||||
|
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
|
||||||
|
|
||||||
|
|
||||||
|
# Wagtail settings
|
||||||
|
|
||||||
|
WAGTAIL_SITE_NAME = "project"
|
||||||
|
|
||||||
|
WAGTAILSEARCH_BACKENDS = {
|
||||||
|
'default': {
|
||||||
|
'BACKEND': 'wagtail.wagtailsearch.backends.db',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Base URL to use when referring to full URLs within the Wagtail admin backend -
|
||||||
|
# e.g. in notification emails. Don't include '/admin' or a trailing slash
|
||||||
|
BASE_URL = 'http://example.com'
|
30
project/urls.py
Executable file
30
project/urls.py
Executable file
|
@ -0,0 +1,30 @@
|
||||||
|
from __future__ import absolute_import, unicode_literals
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from django.conf.urls import include, url
|
||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
from project.search import views as search_views
|
||||||
|
from wagtail.wagtailadmin import urls as wagtailadmin_urls
|
||||||
|
from wagtail.wagtailcore import urls as wagtail_urls
|
||||||
|
from wagtail.wagtaildocs import urls as wagtaildocs_urls
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
url(r'^django-admin/', include(admin.site.urls)),
|
||||||
|
|
||||||
|
url(r'^admin/', include(wagtailadmin_urls)),
|
||||||
|
url(r'^documents/', include(wagtaildocs_urls)),
|
||||||
|
|
||||||
|
url(r'^search/$', search_views.search, name='search'),
|
||||||
|
|
||||||
|
url(r'', include(wagtail_urls)),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
if settings.DEBUG:
|
||||||
|
from django.conf.urls.static import static
|
||||||
|
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||||
|
|
||||||
|
# Serve static and media files from development server
|
||||||
|
urlpatterns += staticfiles_urlpatterns()
|
||||||
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
18
project/wsgi.py
Executable file
18
project/wsgi.py
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
"""
|
||||||
|
WSGI config for project project.
|
||||||
|
|
||||||
|
It exposes the WSGI callable as a module-level variable named ``application``.
|
||||||
|
|
||||||
|
For more information on this file, see
|
||||||
|
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import absolute_import, unicode_literals
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
from django.core.wsgi import get_wsgi_application
|
||||||
|
|
||||||
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings.dev")
|
||||||
|
|
||||||
|
application = get_wsgi_application()
|
|
@ -1,16 +1,6 @@
|
||||||
bandit==1.1.0
|
coverage==4.2
|
||||||
flake8==3.0.4
|
Django>=1.10,<1.11
|
||||||
fontawesome_markdown==0.2.5
|
flake8==3.2.1
|
||||||
git+https://github.com/ryneeverett/python-markdown-comments.git
|
honcho==0.7.1
|
||||||
gitpython==2.0.8
|
wagtail>=1.7,<1.8
|
||||||
iso8601==0.1.11
|
whitenoise==3.2.2
|
||||||
markdown==2.6.7
|
|
||||||
nose2==0.6.5
|
|
||||||
pelican-minify==0.9
|
|
||||||
pelican==3.6.3
|
|
||||||
pyembed-markdown==1.1.0
|
|
||||||
pygments-style-github==0.4
|
|
||||||
python-resize-image==1.1.3
|
|
||||||
pyyaml==3.12
|
|
||||||
sh==1.11
|
|
||||||
yamllint==1.4.1
|
|
||||||
|
|
31
scripts/build
Executable file
31
scripts/build
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -z "$NVM_DIR" ]
|
||||||
|
then
|
||||||
|
NVM_DIR="$HOME/.nvm"
|
||||||
|
fi
|
||||||
|
|
||||||
|
. $NVM_DIR/nvm.sh
|
||||||
|
nvm install
|
||||||
|
nvm use
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if hash pyenv 2>/dev/null;
|
||||||
|
then
|
||||||
|
echo "using pyenv wrapper"
|
||||||
|
pyenv install --skip-existing
|
||||||
|
pyenv exec pyvenv env
|
||||||
|
else
|
||||||
|
echo "using pyvenv (Built in python)"
|
||||||
|
pyvenv env
|
||||||
|
fi
|
||||||
|
|
||||||
|
export PATH=env/bin:${PATH}
|
||||||
|
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
honcho --app-root environment --env env run env/bin/python manage.py collectstatic --noinput
|
7
scripts/migrate
Executable file
7
scripts/migrate
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
export PATH=env/bin:${PATH}
|
||||||
|
|
||||||
|
honcho --app-root environment --env env run python manage.py migrate
|
7
scripts/run
Executable file
7
scripts/run
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
export PATH=env/bin:${PATH}
|
||||||
|
|
||||||
|
honcho --app-root environment --env env run $@
|
7
scripts/runserver
Executable file
7
scripts/runserver
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
export PATH=env/bin:${PATH}
|
||||||
|
|
||||||
|
honcho --app-root environment --env env start
|
14
scripts/runtests
Executable file
14
scripts/runtests
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
export PATH=env/bin:${PATH}
|
||||||
|
export DEBUG=true
|
||||||
|
export IN_TEST=true
|
||||||
|
export SECRET_KEY='secrit'
|
||||||
|
|
||||||
|
flake8 project --ignore=E128,E501 --exclude=migrations,settings,wsgi.py
|
||||||
|
coverage run --source=project --omit='*/wsgi.py,*/settings.py,*/migrations/*.py,*__init__.py' manage.py test $@
|
||||||
|
coverage report
|
||||||
|
|
||||||
|
npm test
|
|
@ -1,4 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
cd output/
|
|
||||||
python3 -m pelican.server $PORT
|
|
6
scripts/shell
Executable file
6
scripts/shell
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
export PATH=env/bin:${PATH}
|
||||||
|
|
||||||
|
honcho --app-root environment --env env run python manage.py shell
|
0
static/css/project.css
Executable file
0
static/css/project.css
Executable file
0
static/js/project.js
Executable file
0
static/js/project.js
Executable file
9
templates/404.html
Executable file
9
templates/404.html
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block body_class %}template-404{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>Page not found</h1>
|
||||||
|
|
||||||
|
<h2>Sorry, this page could not be found.</h2>
|
||||||
|
{% endblock %}
|
17
templates/500.html
Executable file
17
templates/500.html
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
||||||
|
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||||||
|
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
||||||
|
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<title>Internal server error</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Internal server error</h1>
|
||||||
|
|
||||||
|
<h2>Sorry, there seems to be an error. Please try again soon.</h2>
|
||||||
|
</body>
|
||||||
|
</html>
|
35
templates/base.html
Executable file
35
templates/base.html
Executable file
|
@ -0,0 +1,35 @@
|
||||||
|
{% load static wagtailuserbar %}
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
||||||
|
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||||||
|
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
||||||
|
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<title>{% block title %}{% if self.seo_title %}{{ self.seo_title }}{% else %}{{ self.title }}{% endif %}{% endblock %}{% block title_suffix %}{% endblock %}</title>
|
||||||
|
<meta name="description" content="" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
{# Global stylesheets #}
|
||||||
|
<link rel="stylesheet" type="text/css" href="{% static 'css/project.css' %}">
|
||||||
|
|
||||||
|
{% block extra_css %}
|
||||||
|
{# Override this in templates to add extra stylesheets #}
|
||||||
|
{% endblock %}
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="{% block body_class %}{% endblock %}">
|
||||||
|
{% wagtailuserbar %}
|
||||||
|
|
||||||
|
{% block content %}{% endblock %}
|
||||||
|
|
||||||
|
{# Global javascript #}
|
||||||
|
<script type="text/javascript" src="{% static 'js/project.js' %}"></script>
|
||||||
|
|
||||||
|
{% block extra_js %}
|
||||||
|
{# Override this in templates to add extra javascript #}
|
||||||
|
{% endblock %}
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,39 +0,0 @@
|
||||||
import unittest
|
|
||||||
import os.path
|
|
||||||
from bs4 import BeautifulSoup
|
|
||||||
|
|
||||||
|
|
||||||
class TestClient:
|
|
||||||
output_path = os.path.realpath('./output')
|
|
||||||
|
|
||||||
def get(self, path, JS=True):
|
|
||||||
file_path = self.build_path(path)
|
|
||||||
content = "".join(open(file_path).readlines())
|
|
||||||
if path.endswith('html'):
|
|
||||||
content = BeautifulSoup(content, 'html.parser')
|
|
||||||
if JS:
|
|
||||||
for script in content(["noscript"]): # Remove noscript tags
|
|
||||||
script.extract()
|
|
||||||
return content
|
|
||||||
|
|
||||||
def build_path(self, path):
|
|
||||||
if path.startswith('/'):
|
|
||||||
path = path[1:]
|
|
||||||
return os.path.join(self.output_path, path)
|
|
||||||
|
|
||||||
def exists(self, path):
|
|
||||||
return os.path.exists(self.build_path(path))
|
|
||||||
|
|
||||||
|
|
||||||
class TestCase(unittest.TestCase):
|
|
||||||
client = TestClient()
|
|
||||||
|
|
||||||
def get_children(self, content):
|
|
||||||
return str(list(content.children)[0])
|
|
||||||
|
|
||||||
def assertTitle(self, content, title):
|
|
||||||
self.assertIn(title, content.title.string)
|
|
||||||
|
|
||||||
def assertHeaderTitle(self, content, title):
|
|
||||||
header_title = content.find('h1', class_="section-heading")
|
|
||||||
self.assertIn(title, self.get_children(header_title))
|
|
|
@ -1,131 +0,0 @@
|
||||||
from tests import TestCase
|
|
||||||
from config import settings, DotDictionary
|
|
||||||
from bs4 import BeautifulSoup
|
|
||||||
from unittest import skipIf
|
|
||||||
from os import environ
|
|
||||||
|
|
||||||
|
|
||||||
class CorePagesTestCase(TestCase):
|
|
||||||
def test_has_index(self):
|
|
||||||
content = self.client.get('index.html')
|
|
||||||
self.assertTitle(content, 'Homepage')
|
|
||||||
|
|
||||||
def test_has_robots(self):
|
|
||||||
content = self.client.get('robots.txt')
|
|
||||||
self.assertIn('Allow: /', content)
|
|
||||||
|
|
||||||
def test_has_sitemap(self):
|
|
||||||
content = self.client.get('sitemap.xml')
|
|
||||||
self.assertIn(settings.url, content)
|
|
||||||
|
|
||||||
def test_has_atom_feed(self):
|
|
||||||
content = self.client.get('feed.atom')
|
|
||||||
self.assertIn(settings.url, content)
|
|
||||||
|
|
||||||
def test_has_404_page(self):
|
|
||||||
content = self.client.get('.404.html')
|
|
||||||
self.assertTitle(content, '404')
|
|
||||||
|
|
||||||
def test_has_scripts(self):
|
|
||||||
content = self.client.get('index.html')
|
|
||||||
for script in content.find_all('script'):
|
|
||||||
if script.attrs.get('id') == 'piwik':
|
|
||||||
continue
|
|
||||||
self.client.exists(script.attrs['src'])
|
|
||||||
|
|
||||||
def test_has_stylesheet(self):
|
|
||||||
content = self.client.get('index.html')
|
|
||||||
for script in content.find_all('link', rel='stylesheet'):
|
|
||||||
self.assertTrue(self.client.exists(script.attrs['href']))
|
|
||||||
|
|
||||||
def test_has_link_icons(self):
|
|
||||||
content = self.client.get('index.html')
|
|
||||||
for script in content.find_all('link', rel='icon'):
|
|
||||||
self.assertTrue(self.client.exists(script.attrs['href']))
|
|
||||||
for script in content.find_all('link', rel='apple-touch-icon-precomposed'):
|
|
||||||
self.assertTrue(self.client.exists(script.attrs['href']))
|
|
||||||
|
|
||||||
def test_footer_links(self):
|
|
||||||
content = self.client.get('index.html')
|
|
||||||
footer = content.footer
|
|
||||||
for link in footer.find('p', class_="social").find_all('a'):
|
|
||||||
self.assertIn(link.attrs['alt'], settings.footer_accounts)
|
|
||||||
self.assertIn("fa fa-", str(list(link.children)[0]))
|
|
||||||
|
|
||||||
@skipIf(not environ.get('BUILD_PRODUCTION', False), 'Not building production')
|
|
||||||
def test_has_analytics(self):
|
|
||||||
content = self.client.get('index.html', False)
|
|
||||||
piwik_script_tag = content.find('script', id='piwik')
|
|
||||||
self.assertNotEqual(piwik_script_tag, None)
|
|
||||||
piwik_script = self.get_children(piwik_script_tag)
|
|
||||||
self.assertIn('piwik.js', piwik_script)
|
|
||||||
self.assertIn(str(settings.piwik.site_id), piwik_script)
|
|
||||||
piwik_img = content.find('noscript', id='piwik').find('img')
|
|
||||||
self.assertIn(settings.piwik.url, piwik_img.attrs['src'])
|
|
||||||
self.assertIn(str(settings.piwik.site_id), piwik_img.attrs['src'])
|
|
||||||
|
|
||||||
|
|
||||||
class DotDictionaryTestCase(TestCase):
|
|
||||||
def setUp(self):
|
|
||||||
self.test_dict = DotDictionary({
|
|
||||||
'foo': 'bar',
|
|
||||||
'bar': {
|
|
||||||
'foo': 'bar'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
def test_returns_value(self):
|
|
||||||
self.assertEqual(self.test_dict.foo, 'bar')
|
|
||||||
|
|
||||||
def test_returns_self_on_dict(self):
|
|
||||||
self.assertEqual(self.test_dict.bar, {
|
|
||||||
'foo': 'bar'
|
|
||||||
})
|
|
||||||
self.assertIsInstance(self.test_dict.bar, DotDictionary)
|
|
||||||
|
|
||||||
def test_set(self):
|
|
||||||
self.test_dict.baz = 'foo'
|
|
||||||
self.assertEqual(self.test_dict, {
|
|
||||||
'foo': 'bar',
|
|
||||||
'baz': 'foo',
|
|
||||||
'bar': {
|
|
||||||
'foo': 'bar'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
def test_delete(self):
|
|
||||||
del self.test_dict.bar
|
|
||||||
with self.assertRaises(KeyError):
|
|
||||||
print(self.test_dict.bar)
|
|
||||||
self.assertEqual(self.test_dict, {
|
|
||||||
'foo': 'bar'
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
class WrappedSettingTestCase(TestCase):
|
|
||||||
def test_has_data(self):
|
|
||||||
self.assertIsInstance(settings.settings, dict)
|
|
||||||
self.assertTrue(len(settings.settings))
|
|
||||||
|
|
||||||
def test_returns_values(self):
|
|
||||||
self.assertEqual(settings.language, 'en')
|
|
||||||
self.assertEqual(settings.timezone, 'Europe/London')
|
|
||||||
|
|
||||||
def test_returns_dict(self):
|
|
||||||
self.assertIsInstance(settings.accounts, DotDictionary)
|
|
||||||
|
|
||||||
|
|
||||||
class TestClientTestCase(TestCase):
|
|
||||||
def test_client_fails(self):
|
|
||||||
with self.assertRaises(FileNotFoundError):
|
|
||||||
self.client.get('foo.bar')
|
|
||||||
|
|
||||||
def test_client_gets_data(self):
|
|
||||||
content = self.client.get('index.html')
|
|
||||||
self.assertIsInstance(content, BeautifulSoup)
|
|
||||||
|
|
||||||
def test_file_exists(self):
|
|
||||||
self.assertTrue(self.client.exists('index.html'))
|
|
||||||
|
|
||||||
def test_file_doesnt_exist(self):
|
|
||||||
self.assertFalse(self.client.exists('foo.bar'))
|
|
|
@ -1,59 +0,0 @@
|
||||||
from tests import TestCase
|
|
||||||
from config import settings
|
|
||||||
import os.path
|
|
||||||
|
|
||||||
|
|
||||||
class HomepageTestCase(TestCase):
|
|
||||||
def test_blog_links(self):
|
|
||||||
content = self.client.get('index.html')
|
|
||||||
blogs = content.find('section', id='blog').find_all('div', class_="col-xs-12")
|
|
||||||
self.assertTrue(len(blogs) <= 4)
|
|
||||||
for post in blogs:
|
|
||||||
url = os.path.join(post.find('a').attrs['href'], 'index.html')
|
|
||||||
self.assertTrue(self.client.exists(url))
|
|
||||||
|
|
||||||
def test_projects(self):
|
|
||||||
content = self.client.get('index.html')
|
|
||||||
projects = content.find('section', id='projects').find_all('a', class_='portfolio-box')
|
|
||||||
for project in projects:
|
|
||||||
url = os.path.join(project.attrs['href'], 'index.html')
|
|
||||||
self.assertTrue(self.client.exists(url))
|
|
||||||
|
|
||||||
|
|
||||||
class AboutPageTestCase(TestCase):
|
|
||||||
def test_title(self):
|
|
||||||
content = self.client.get('about/index.html')
|
|
||||||
self.assertHeaderTitle(content, 'About Me')
|
|
||||||
self.assertTitle(content, 'About')
|
|
||||||
|
|
||||||
def test_website_section(self):
|
|
||||||
content = self.client.get('about/index.html')
|
|
||||||
section = content.find('section', id='website')
|
|
||||||
subtitle = section.find('h2')
|
|
||||||
self.assertEqual('About my website', self.get_children(subtitle))
|
|
||||||
|
|
||||||
def test_server_section(self):
|
|
||||||
content = self.client.get('about/index.html')
|
|
||||||
section = content.find('section', id='server')
|
|
||||||
subtitle = section.find('h2')
|
|
||||||
self.assertEqual('The Server', self.get_children(subtitle))
|
|
||||||
|
|
||||||
def test_github_card(self):
|
|
||||||
content = self.client.get('about/index.html')
|
|
||||||
tags = content.find_all('div', class_='github-card')
|
|
||||||
self.assertEqual(len(tags), 1)
|
|
||||||
tag = tags[0]
|
|
||||||
self.assertEqual('medium', tag.attrs['data-theme'])
|
|
||||||
self.assertEqual(settings.accounts.github[1], tag.attrs['data-github'])
|
|
||||||
|
|
||||||
|
|
||||||
class Page404TestCase(TestCase):
|
|
||||||
def test_title(self):
|
|
||||||
content = self.client.get('.404.html')
|
|
||||||
self.assertHeaderTitle(content, 'Uh Oh - There\'s nothing here!')
|
|
||||||
self.assertTitle(content, '404 - Page not found')
|
|
||||||
|
|
||||||
def test_image(self):
|
|
||||||
content = self.client.get('.404.html')
|
|
||||||
img = content.find('img')
|
|
||||||
self.assertEqual('Cat', img.attrs['alt'])
|
|
|
@ -1,17 +0,0 @@
|
||||||
import './creative';
|
|
||||||
import ansi_up from 'ansi_up';
|
|
||||||
|
|
||||||
|
|
||||||
$('.image').each(function () { // setup div-image hybrids
|
|
||||||
const ele = $(this);
|
|
||||||
if (ele.data('image')) {
|
|
||||||
ele.css('background-image', 'url(' + ele.data('image') + ')');
|
|
||||||
} else {
|
|
||||||
ele.removeClass('image');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.ansi-up').each(function () {
|
|
||||||
const ele = $(this);
|
|
||||||
ele.html(ansi_up.ansi_to_html(ele.html()));
|
|
||||||
});
|
|
|
@ -1,37 +0,0 @@
|
||||||
/*!
|
|
||||||
* Start Bootstrap - Creative Bootstrap Theme (http://startbootstrap.com)
|
|
||||||
* Code licensed under the Apache License v2.0.
|
|
||||||
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// jQuery for page scrolling feature - requires jQuery Easing plugin
|
|
||||||
$('a.page-scroll').bind('click', function(event) {
|
|
||||||
const anchor = $(this);
|
|
||||||
$('html, body').stop().animate(
|
|
||||||
{
|
|
||||||
scrollTop: ($(anchor.attr('href')).offset().top - 50)
|
|
||||||
},
|
|
||||||
1250,
|
|
||||||
'easeInOutExpo'
|
|
||||||
);
|
|
||||||
event.preventDefault();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Highlight the top nav as scrolling occurs
|
|
||||||
$('body').scrollspy({
|
|
||||||
target: '.navbar-fixed-top',
|
|
||||||
offset: 51
|
|
||||||
});
|
|
||||||
|
|
||||||
// Closes the Responsive Menu on Menu Item Click
|
|
||||||
$('.navbar-collapse ul li a').click(function() {
|
|
||||||
$('.navbar-toggle:visible').click();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// Offset for Main Navigation
|
|
||||||
$('#main-nav').affix({
|
|
||||||
offset: {
|
|
||||||
top: 50
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,6 +0,0 @@
|
||||||
import 'jquery.easing';
|
|
||||||
import './creative';
|
|
||||||
|
|
||||||
import WOW from 'wow.js';
|
|
||||||
|
|
||||||
new WOW().init();
|
|
|
@ -1,344 +0,0 @@
|
||||||
@import "mixins";
|
|
||||||
|
|
||||||
// Global Components
|
|
||||||
html,
|
|
||||||
body {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
font-family: $font-family-base;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr {
|
|
||||||
border-width: 3px;
|
|
||||||
border-color: $brand-orange;
|
|
||||||
max-width: 50px;
|
|
||||||
|
|
||||||
&.light {
|
|
||||||
border-color: $white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
transition: all 0.35s;
|
|
||||||
color: $brand-orange;
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus {
|
|
||||||
color: $brand-orange-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6 {
|
|
||||||
font-family: $font-family-heading;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
line-height: 1.5;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-primary {
|
|
||||||
background-color: $brand-orange;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-dark {
|
|
||||||
background-color: $brand-grey-dark;
|
|
||||||
color: $white;
|
|
||||||
}
|
|
||||||
|
|
||||||
section {
|
|
||||||
padding: 100px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
aside {
|
|
||||||
padding: 50px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-padding {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Navigation
|
|
||||||
|
|
||||||
.navbar-default {
|
|
||||||
transition: all 0.35s;
|
|
||||||
border-color: opacify($brand-grey-dark, 0.05);
|
|
||||||
background-color: $white;
|
|
||||||
font-family: $font-family-heading;
|
|
||||||
|
|
||||||
.navbar-header .navbar-brand {
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: $brand-orange;
|
|
||||||
font-family: $font-family-heading;
|
|
||||||
font-weight: 700;
|
|
||||||
|
|
||||||
&:hover, &:focus {
|
|
||||||
color: darken($brand-orange, 10%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav {
|
|
||||||
& > li {
|
|
||||||
& > a,
|
|
||||||
& > a:focus {
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: $brand-grey-dark;
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 700;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: $brand-orange;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
& > a,
|
|
||||||
& > a:focus {
|
|
||||||
background-color: transparent;
|
|
||||||
color: $brand-orange !important;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
border-color: opacify($white, 0.3);
|
|
||||||
background-color: transparent;
|
|
||||||
|
|
||||||
.navbar-header .navbar-brand {
|
|
||||||
color: opacify($white, 0.7);
|
|
||||||
|
|
||||||
&:hover, &:focus {
|
|
||||||
color: $white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav > li > a,
|
|
||||||
.nav > li > a:focus {
|
|
||||||
color: opacify($white, 0.7);
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: $white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.affix {
|
|
||||||
border-color: opacify($brand-grey-dark, 0.05);
|
|
||||||
background-color: $white;
|
|
||||||
|
|
||||||
.navbar-header .navbar-brand {
|
|
||||||
color: $brand-orange;
|
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
&:hover, &:focus {
|
|
||||||
color: darken($brand-orange, 10%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav > li > a,
|
|
||||||
.nav > li > a:focus {
|
|
||||||
color: $brand-grey-dark;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: $brand-orange;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Homepage Header
|
|
||||||
|
|
||||||
header {
|
|
||||||
position: relative;
|
|
||||||
background-image: url("../img/header.jpg");
|
|
||||||
background-position: center;
|
|
||||||
background-size: cover;
|
|
||||||
width: 100%;
|
|
||||||
min-height: auto;
|
|
||||||
text-align: center;
|
|
||||||
color: $white;
|
|
||||||
|
|
||||||
.header-content {
|
|
||||||
position: relative;
|
|
||||||
padding: 100px 15px;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
.header-content-inner {
|
|
||||||
h1 {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr {
|
|
||||||
margin: 30px auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin-bottom: 50px;
|
|
||||||
color: opacify($white, 0.7);
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 300;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
min-height: 100%;
|
|
||||||
|
|
||||||
.header-content {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
padding: 0 50px;
|
|
||||||
|
|
||||||
.header-content-inner {
|
|
||||||
margin-right: auto;
|
|
||||||
margin-left: auto;
|
|
||||||
max-width: 1000px;
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin-right: auto;
|
|
||||||
margin-left: auto;
|
|
||||||
max-width: 80%;
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sections
|
|
||||||
|
|
||||||
.section-heading {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.service-box {
|
|
||||||
margin: 50px auto 0;
|
|
||||||
max-width: 400px;
|
|
||||||
|
|
||||||
@media (min-width: 992px) {
|
|
||||||
margin: 20px auto 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.portfolio-box {
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
margin: 0 auto;
|
|
||||||
max-width: 650px;
|
|
||||||
|
|
||||||
.portfolio-box-caption {
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
transition: all 0.35s;
|
|
||||||
opacity: 0;
|
|
||||||
background: opacify($brand-orange, 0.9);
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
text-align: center;
|
|
||||||
color: $white;
|
|
||||||
|
|
||||||
.portfolio-box-caption-content {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
.project-category,
|
|
||||||
.project-name {
|
|
||||||
padding: 0 15px;
|
|
||||||
font-family: $font-family-heading;
|
|
||||||
}
|
|
||||||
|
|
||||||
.project-category {
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.project-name {
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
.portfolio-box-caption {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
.portfolio-box-caption {
|
|
||||||
.portfolio-box-caption-content {
|
|
||||||
.project-category {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.project-name {
|
|
||||||
font-size: 22px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.call-to-action h2 {
|
|
||||||
margin: 0 auto 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-primary {
|
|
||||||
color: $brand-orange;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-gutter > [class*="col-"] {
|
|
||||||
padding-right: 0;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-default {
|
|
||||||
@include button-variant($brand-grey-dark, $white, $white);
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary {
|
|
||||||
@include button-variant($white, $brand-orange, $brand-orange);
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
border: 0;
|
|
||||||
border-radius: 300px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-family: $font-family-heading;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-xl {
|
|
||||||
padding: 15px 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Extras
|
|
||||||
// -- Highlight Color Customization
|
|
||||||
::selection {
|
|
||||||
background: $brand-grey-dark;
|
|
||||||
text-shadow: none;
|
|
||||||
color: $white;
|
|
||||||
}
|
|
||||||
|
|
||||||
img::selection {
|
|
||||||
background: transparent;
|
|
||||||
color: $white;
|
|
||||||
}
|
|
|
@ -1,43 +0,0 @@
|
||||||
// Mixins
|
|
||||||
|
|
||||||
@mixin button-variant($color, $background, $border) {
|
|
||||||
border-color: $border;
|
|
||||||
background-color: $background;
|
|
||||||
color: $color;
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus,
|
|
||||||
&.focus,
|
|
||||||
&:active,
|
|
||||||
&.active,
|
|
||||||
.open > .dropdown-toggle & {
|
|
||||||
border-color: darken($border, 7%);
|
|
||||||
background-color: darken($background, 5%);
|
|
||||||
color: $color;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active,
|
|
||||||
&.active,
|
|
||||||
.open > .dropdown-toggle & {
|
|
||||||
background-image: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.disabled,
|
|
||||||
&[disabled],
|
|
||||||
fieldset[disabled] & {
|
|
||||||
&,
|
|
||||||
&:hover,
|
|
||||||
&:focus,
|
|
||||||
&.focus,
|
|
||||||
&:active,
|
|
||||||
&.active {
|
|
||||||
border-color: $border;
|
|
||||||
background-color: $background;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge {
|
|
||||||
background-color: $color;
|
|
||||||
color: $background;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,49 +0,0 @@
|
||||||
footer {
|
|
||||||
background-color: $brand-grey-dark;
|
|
||||||
padding-top: 20px;
|
|
||||||
width: 100%;
|
|
||||||
height: $footer-height;
|
|
||||||
text-align: center;
|
|
||||||
color: $white;
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: $brand-orange-light;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.powered-by p {
|
|
||||||
font-size: $font-size-base;
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: inherit;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: $brand-orange;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.social {
|
|
||||||
margin: 0;
|
|
||||||
padding: 7px;
|
|
||||||
font-size: 23px;
|
|
||||||
|
|
||||||
a {
|
|
||||||
margin: 0 4px;
|
|
||||||
color: $white;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: $brand-orange-light;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ci-badge {
|
|
||||||
margin-top: 10px;
|
|
||||||
height: $font-size-h3;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
.margin {
|
|
||||||
margin: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-bg {
|
|
||||||
background-image: url("../img/header.jpg");
|
|
||||||
background-position: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-shadow {
|
|
||||||
text-shadow: 0 5px 3px $brand-grey-dark;
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
header {
|
|
||||||
background-image: url("../img/header.jpg");
|
|
||||||
min-height: 100%;
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
@extend .text-shadow;
|
|
||||||
font-size: $font-size-h1 * 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-scroll {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 10%;
|
|
||||||
color: $white;
|
|
||||||
|
|
||||||
& > i {
|
|
||||||
font-size: $font-size-h1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-content-inner p {
|
|
||||||
@extend .text-shadow;
|
|
||||||
font-size: $font-size-h3 !important;
|
|
||||||
font-weight: 400 !important;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,101 +0,0 @@
|
||||||
@import "variables"; // Import variables before anything else
|
|
||||||
|
|
||||||
|
|
||||||
/* @group Fonts */
|
|
||||||
@import url("https://fonts.googleapis.com/css?family=Roboto:400,700,300,300italic,400italic,700italic");
|
|
||||||
@import url("http://fonts.googleapis.com/css?family=Open+Sans:400,700,300,300italic,400italic,700italic");
|
|
||||||
/* @end Fonts */
|
|
||||||
|
|
||||||
|
|
||||||
/* @group Libraries */
|
|
||||||
@import "node_modules/bootstrap-sass/assets/stylesheets/_bootstrap";
|
|
||||||
@import "node_modules/animate.css/animate";
|
|
||||||
|
|
||||||
$fa-font-path: "../fonts";
|
|
||||||
@import "node_modules/font-awesome/scss/font-awesome";
|
|
||||||
/* @end Libraries */
|
|
||||||
|
|
||||||
|
|
||||||
/* @group Other Imports */
|
|
||||||
@import "creative/creative";
|
|
||||||
@import "pygment";
|
|
||||||
@import "homepage";
|
|
||||||
@import "footer";
|
|
||||||
@import "library-overrides";
|
|
||||||
@import "functional";
|
|
||||||
/* @end Other Imports */
|
|
||||||
|
|
||||||
|
|
||||||
hr.wide {
|
|
||||||
width: 100%;
|
|
||||||
max-width: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
p a {
|
|
||||||
text-decoration: underline;
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn i {
|
|
||||||
margin: 0 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image {
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: center;
|
|
||||||
background-size: cover;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container > img,
|
|
||||||
.container p > img,
|
|
||||||
.row > div > img {
|
|
||||||
margin: 10px 0;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.portfolio-box {
|
|
||||||
background-color: $brand-grey-dark;
|
|
||||||
max-width: initial;
|
|
||||||
min-height: 300px;
|
|
||||||
|
|
||||||
&.show .portfolio-box-caption {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.portfolio-box-caption {
|
|
||||||
background-color: transparentize($brand-orange, 0.2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.category-item {
|
|
||||||
padding: 1px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
&.image .section-heading {
|
|
||||||
@extend .text-shadow;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-height: $screen-xs-max) {
|
|
||||||
height: 40vh;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.highlight.ansi-up {
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.media.category {
|
|
||||||
.media-left {
|
|
||||||
min-width: 100px;
|
|
||||||
height: 100px;
|
|
||||||
|
|
||||||
.image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,60 +0,0 @@
|
||||||
.panel-green {
|
|
||||||
@include panel-variant(#139F5B, $white, #139F5B, #139F5B);
|
|
||||||
}
|
|
||||||
|
|
||||||
.panel-blue {
|
|
||||||
@include panel-variant(#337AB7, $white, #337AB7, #337AB7);
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
border-radius: 0;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn.btn-github {
|
|
||||||
@include button-variant(#333, #F5F5F5, #D8D8D8);
|
|
||||||
}
|
|
||||||
|
|
||||||
$btn-srobo-bg: #253571;
|
|
||||||
$btn-srobo-border: darken($btn-srobo-bg, 5%);
|
|
||||||
|
|
||||||
.btn-srobo {
|
|
||||||
@include button-variant(#DADADA, $btn-srobo-bg, $btn-srobo-border);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.highlight > pre {
|
|
||||||
font-size: $font-size-base;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary-dark {
|
|
||||||
@include button-variant($white, $brand-orange-dark, $brand-orange-dark);
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-primary p {
|
|
||||||
a:hover {
|
|
||||||
color: $brand-grey-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
section {
|
|
||||||
padding: 75px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr {
|
|
||||||
max-width: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes pulse {
|
|
||||||
from {
|
|
||||||
transform: scale3d(1, 1, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
50% {
|
|
||||||
transform: scale3d(1.1, 1.1, 1.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
to {
|
|
||||||
transform: scale3d(1, 1, 1);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
$brand-orange-light: #FF7F00;
|
|
||||||
$brand-orange: #F05F40;
|
|
||||||
$brand-orange-dark: darken($brand-orange, 10%);
|
|
||||||
$brand-grey-dark: #333;
|
|
||||||
|
|
||||||
|
|
||||||
/* @group General Colours */
|
|
||||||
$white: #FFF;
|
|
||||||
/* @end General Colours */
|
|
||||||
|
|
||||||
|
|
||||||
$footer-height: 175px;
|
|
||||||
$font-family-heading: "Open Sans", "Helvetica Neue", Arial, sans-serif;
|
|
||||||
|
|
||||||
|
|
||||||
/* @group Bootstrap Overrides */
|
|
||||||
$font-family-base: "Roboto", "Helvetica Neue", Arial, sans-serif;
|
|
||||||
$brand-primary: $brand-orange;
|
|
||||||
/* @end Bootstrap Overrides */
|
|
|
@ -1,18 +0,0 @@
|
||||||
{% extends "base.html" %}
|
|
||||||
|
|
||||||
{% block htmltitle %}
|
|
||||||
{{ article.html_title or article.title }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block metadata %}
|
|
||||||
{{ article.metatags }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
{% include 'extras/header.html' with context %}
|
|
||||||
<section>
|
|
||||||
<div class="container">
|
|
||||||
{{ article.content }}
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
|
@ -1,37 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="{{ DEFAULT_LANG }}">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
||||||
<meta http-equiv="Content-Language" content="{{ DEFAULT_LANG }}" />
|
|
||||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width" />
|
|
||||||
<link rel="alternate" type="application/atom+xml" href="/{{ FEED_ATOM }}" />
|
|
||||||
<meta name="superfish" content="nofish" />
|
|
||||||
<meta name="application-name" content="{{ SITENAME }}" />
|
|
||||||
|
|
||||||
{% block metadata %}{% endblock %}
|
|
||||||
|
|
||||||
{% for rel, size, filename in META_IMAGES %}
|
|
||||||
<link rel="{{ rel }}" sizes="{{ size }}" href="/static/img/{{ filename }}" />
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
<title>{% block htmltitle %}Page{% endblock %} - {{ SITENAME }}</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="/static/css/index.css" type="text/css" />
|
|
||||||
|
|
||||||
{% include "extras/piwik.html" with context %}
|
|
||||||
</head>
|
|
||||||
<body id="page-top">
|
|
||||||
{% block navbar %}
|
|
||||||
{% include "extras/navbar.html" %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}{% endblock %}
|
|
||||||
|
|
||||||
{% include "extras/footer.html" %}
|
|
||||||
|
|
||||||
<script src="/static/js/jquery.js" type="text/javascript"></script>
|
|
||||||
<script src="/static/js/libs.js" type="text/javascript"></script>
|
|
||||||
<script src="/static/js/app.js" type="text/javascript"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,21 +0,0 @@
|
||||||
{% extends "base.html" %}
|
|
||||||
|
|
||||||
{% block htmltitle %}
|
|
||||||
{{ article.title }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block metadata %}
|
|
||||||
{{ article.metatags }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
{% include 'extras/header.html' with context %}
|
|
||||||
<section>
|
|
||||||
<div class="container">
|
|
||||||
<p class="text-right small">
|
|
||||||
Published: {{ article.date|datetime }}
|
|
||||||
</p>
|
|
||||||
{{ article.content }}
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
|
@ -1 +0,0 @@
|
||||||
My college years were where I really started to develop my knowledge. I found my love for technology, security and robotics, all in 2 short years! Whilst most of what I did is private, there are still some parts I can share.
|
|
|
@ -1,44 +0,0 @@
|
||||||
---
|
|
||||||
hide_list: true
|
|
||||||
---
|
|
||||||
|
|
||||||
Student Robotics is the the place where my development knowledge really started to grow. Thanks to the other people in my team teaching me. I had never done anything robotics related, and so when my computing teacher initially told us about it, I wasn't really interested. After I found out that my friend was also doing it, I signed up, and went along to the kickstart. From then on I was hooked, getting involved with all aspects of the development and design, as well as helping out other teams on the IRC room.
|
|
||||||
|
|
||||||
## What is Student Robotics?
|
|
||||||
> Student Robotics is a volunteer organisation that runs an annual robotics competition for 16-18 year olds. It was originally founded by students from the University of Southampton in 2006, and now includes volunteers (“Blue Shirts”) from multiple other universities, including the University of Bristol and Grenoble INP. It primarily takes teams and volunteers from the UK, but also some from Germany and France.
|
|
||||||
|
|
||||||
More information can be found on [their website](https://studentrobotics.org).
|
|
||||||
|
|
||||||
## My Entries
|
|
||||||
Being at college for 2 years, meant I was able to enter 2 years of competitions, SR14, and SR15. We were encouraged to gain an online presence for our team, so I created a website for both years. Unfortunately due to account inactivity, and me changing my website 3 times since, The original pages have been lost, however a large amount of the content the content still remains.
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="thumbnail">
|
|
||||||
<img src="https://c2.staticflickr.com/8/7670/17115168179_1ef30ac6e9_b.jpg" alt="Lucy">
|
|
||||||
<div class="caption">
|
|
||||||
<h3>Student Robotics 2014</h3>
|
|
||||||
<p><strong>Robot Name:</strong> Lucy
|
|
||||||
<br /><small>(No, it doesn't stand for anything)</small>
|
|
||||||
<p><a href="/robotics/2014/" class="btn btn-srobo btn-block">More Info</a></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="thumbnail">
|
|
||||||
<img src="https://c2.staticflickr.com/8/7726/17309695331_584e7de16c_b.jpg" alt="A.L.I.C.E">
|
|
||||||
<div class="caption">
|
|
||||||
<h3>Student Robotics 2015</h3>
|
|
||||||
<p><strong>Robot Name : </strong> A.L.I.C.E
|
|
||||||
<br /><small>(<strong>A</strong>utonomous <strong>L</strong>ogistics and <strong>I</strong>nevitable <strong>C</strong>ollision <strong>E</strong>ngine)</small></p>
|
|
||||||
<p><a href="/robotics/2015/" class="btn btn-srobo btn-block" >More Info</a></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## Adult volunteer
|
|
||||||
Unfortunately, after I left college, I also left behind entering Student Robotics as a competitor. Fortunately for me however, they're always looking for volunteers to help run the competition itself.
|
|
||||||
#### Years
|
|
||||||
- 2016
|
|
|
@ -1,3 +0,0 @@
|
||||||
My setup is much more of a project than something that is stable and constant. I am constantly upgrading, and changing things, whether it's on my main machine (which most of it is), my desk at work, or just a standard upgrade to my phone. As I use technology every day, for many, __Many__ hours, I need it to work brilliantly, and not hold me back from anything I want to do.
|
|
||||||
|
|
||||||
As well as my main desk, there are a few other machines I use often, namely my laptop, work rig, and my phone. All of which follow the same criteria of not holding me back from whatever I to do.
|
|
|
@ -1,3 +0,0 @@
|
||||||
I've always had a keen interest with security and privacy. Whether it's protecting my personal information, or needlessly encrypting things, security is very important to me. With an interest in keeping things secure, comes an interest in breaking through others security.
|
|
||||||
|
|
||||||
Whenever I start using a new tool, or piece of software, I almost instantly go to the security settings and check out what it supports. The same goes for making the software, I've been known to spend a lot of extra time working on the security aspect more than actual features.
|
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue