commit 65de0a5f8ca0e792e4729536d9d9454b8d1d9cf7 Author: r Date: Thu Jul 6 14:28:42 2017 +0200 initial commit diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..758fab2 --- /dev/null +++ b/Makefile @@ -0,0 +1,124 @@ +PY?=python +PELICAN?=pelican +PELICANOPTS= + +BASEDIR=$(CURDIR) +INPUTDIR=$(BASEDIR)/content +OUTPUTDIR=$(BASEDIR)/output +CONFFILE=$(BASEDIR)/pelicanconf.py +PUBLISHCONF=$(BASEDIR)/publishconf.py + +FTP_HOST=localhost +FTP_USER=anonymous +FTP_TARGET_DIR=/ + +SSH_HOST=roelof.info +SSH_PORT=8282 +SSH_USER=r +SSH_TARGET_DIR=/opt/wisselwerking + +S3_BUCKET=my_s3_bucket + +CLOUDFILES_USERNAME=my_rackspace_username +CLOUDFILES_API_KEY=my_rackspace_api_key +CLOUDFILES_CONTAINER=my_cloudfiles_container + +DROPBOX_DIR=~/Dropbox/Public/ + +GITHUB_PAGES_BRANCH=gh-pages + +DEBUG ?= 0 +ifeq ($(DEBUG), 1) + PELICANOPTS += -D +endif + +RELATIVE ?= 0 +ifeq ($(RELATIVE), 1) + PELICANOPTS += --relative-urls +endif + +help: + @echo 'Makefile for a pelican Web site ' + @echo ' ' + @echo 'Usage: ' + @echo ' make html (re)generate the web site ' + @echo ' make clean remove the generated files ' + @echo ' make regenerate regenerate files upon modification ' + @echo ' make publish generate using production settings ' + @echo ' make serve [PORT=8000] serve site at http://localhost:8000' + @echo ' make serve-global [SERVER=0.0.0.0] serve (as root) to $(SERVER):80 ' + @echo ' make devserver [PORT=8000] start/restart develop_server.sh ' + @echo ' make stopserver stop local server ' + @echo ' make ssh_upload upload the web site via SSH ' + @echo ' make rsync_upload upload the web site via rsync+ssh ' + @echo ' make dropbox_upload upload the web site via Dropbox ' + @echo ' make ftp_upload upload the web site via FTP ' + @echo ' make s3_upload upload the web site via S3 ' + @echo ' make cf_upload upload the web site via Cloud Files' + @echo ' make github upload the web site via gh-pages ' + @echo ' ' + @echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html ' + @echo 'Set the RELATIVE variable to 1 to enable relative urls ' + @echo ' ' + +html: + $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) + +clean: + [ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR) + +regenerate: + $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) + +serve: +ifdef PORT + cd $(OUTPUTDIR) && $(PY) -m pelican.server $(PORT) +else + cd $(OUTPUTDIR) && $(PY) -m pelican.server +endif + +serve-global: +ifdef SERVER + cd $(OUTPUTDIR) && $(PY) -m pelican.server 80 $(SERVER) +else + cd $(OUTPUTDIR) && $(PY) -m pelican.server 80 0.0.0.0 +endif + + +devserver: +ifdef PORT + $(BASEDIR)/develop_server.sh restart $(PORT) +else + $(BASEDIR)/develop_server.sh restart +endif + +stopserver: + $(BASEDIR)/develop_server.sh stop + @echo 'Stopped Pelican and SimpleHTTPServer processes running in background.' + +publish: + $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS) + +ssh_upload: publish + scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) + +rsync_upload: publish + rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude + +dropbox_upload: publish + cp -r $(OUTPUTDIR)/* $(DROPBOX_DIR) + +ftp_upload: publish + lftp ftp://$(FTP_USER)@$(FTP_HOST) -e "mirror -R $(OUTPUTDIR) $(FTP_TARGET_DIR) ; quit" + +s3_upload: publish + s3cmd sync $(OUTPUTDIR)/ s3://$(S3_BUCKET) --acl-public --delete-removed --guess-mime-type --no-mime-magic --no-preserve + +cf_upload: publish + cd $(OUTPUTDIR) && swift -v -A https://auth.api.rackspacecloud.com/v1.0 -U $(CLOUDFILES_USERNAME) -K $(CLOUDFILES_API_KEY) upload -c $(CLOUDFILES_CONTAINER) . + +github: publish + ghp-import -m "Generate Pelican site" -b $(GITHUB_PAGES_BRANCH) $(OUTPUTDIR) + git push origin $(GITHUB_PAGES_BRANCH) + +.PHONY: html help clean regenerate serve serve-global devserver stopserver publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload cf_upload github diff --git a/content/first_post.md b/content/first_post.md new file mode 100644 index 0000000..9c03915 --- /dev/null +++ b/content/first_post.md @@ -0,0 +1,5 @@ +Title: first_post +Date: 2014-12-13 18:32 +Category: Test + +Hello world from Pelican! diff --git a/develop_server.sh b/develop_server.sh new file mode 100755 index 0000000..2661df3 --- /dev/null +++ b/develop_server.sh @@ -0,0 +1,103 @@ +#!/usr/bin/env bash +## +# This section should match your Makefile +## +PY=${PY:-python} +PELICAN=${PELICAN:-pelican} +PELICANOPTS= + +BASEDIR=$(pwd) +INPUTDIR=$BASEDIR/content +OUTPUTDIR=$BASEDIR/output +CONFFILE=$BASEDIR/pelicanconf.py + +### +# Don't change stuff below here unless you are sure +### + +SRV_PID=$BASEDIR/srv.pid +PELICAN_PID=$BASEDIR/pelican.pid + +function usage(){ + echo "usage: $0 (stop) (start) (restart) [port]" + echo "This starts Pelican in debug and reload mode and then launches" + echo "an HTTP server to help site development. It doesn't read" + echo "your Pelican settings, so if you edit any paths in your Makefile" + echo "you will need to edit your settings as well." + exit 3 +} + +function alive() { + kill -0 $1 >/dev/null 2>&1 +} + +function shut_down(){ + PID=$(cat $SRV_PID) + if [[ $? -eq 0 ]]; then + if alive $PID; then + echo "Stopping HTTP server" + kill $PID + else + echo "Stale PID, deleting" + fi + rm $SRV_PID + else + echo "HTTP server PIDFile not found" + fi + + PID=$(cat $PELICAN_PID) + if [[ $? -eq 0 ]]; then + if alive $PID; then + echo "Killing Pelican" + kill $PID + else + echo "Stale PID, deleting" + fi + rm $PELICAN_PID + else + echo "Pelican PIDFile not found" + fi +} + +function start_up(){ + local port=$1 + echo "Starting up Pelican and HTTP server" + shift + $PELICAN --debug --autoreload -r $INPUTDIR -o $OUTPUTDIR -s $CONFFILE $PELICANOPTS & + pelican_pid=$! + echo $pelican_pid > $PELICAN_PID + mkdir -p $OUTPUTDIR && cd $OUTPUTDIR + $PY -m pelican.server $port & + srv_pid=$! + echo $srv_pid > $SRV_PID + cd $BASEDIR + sleep 1 + if ! alive $pelican_pid ; then + echo "Pelican didn't start. Is the Pelican package installed?" + return 1 + elif ! alive $srv_pid ; then + echo "The HTTP server didn't start. Is there another service using port" $port "?" + return 1 + fi + echo 'Pelican and HTTP server processes now running in background.' +} + +### +# MAIN +### +[[ ($# -eq 0) || ($# -gt 2) ]] && usage +port='' +[[ $# -eq 2 ]] && port=$2 + +if [[ $1 == "stop" ]]; then + shut_down +elif [[ $1 == "restart" ]]; then + shut_down + start_up $port +elif [[ $1 == "start" ]]; then + if ! start_up $port; then + shut_down + fi +else + usage +fi diff --git a/fabfile.py b/fabfile.py new file mode 100644 index 0000000..042dfc1 --- /dev/null +++ b/fabfile.py @@ -0,0 +1,92 @@ +from fabric.api import * +import fabric.contrib.project as project +import os +import shutil +import sys +import SocketServer + +from pelican.server import ComplexHTTPRequestHandler + +# Local path configuration (can be absolute or relative to fabfile) +env.deploy_path = 'output' +DEPLOY_PATH = env.deploy_path + +# Remote server configuration +production = 'r@roelof.info:8282' +dest_path = '/opt/wisselwerking' + +# Rackspace Cloud Files configuration settings +env.cloudfiles_username = 'my_rackspace_username' +env.cloudfiles_api_key = 'my_rackspace_api_key' +env.cloudfiles_container = 'my_cloudfiles_container' + +# Github Pages configuration +env.github_pages_branch = "gh-pages" + +# Port for `serve` +PORT = 8000 + +def clean(): + """Remove generated files""" + if os.path.isdir(DEPLOY_PATH): + shutil.rmtree(DEPLOY_PATH) + os.makedirs(DEPLOY_PATH) + +def build(): + """Build local version of site""" + local('pelican -s pelicanconf.py') + +def rebuild(): + """`build` with the delete switch""" + local('pelican -d -s pelicanconf.py') + +def regenerate(): + """Automatically regenerate site upon file modification""" + local('pelican -r -s pelicanconf.py') + +def serve(): + """Serve site at http://localhost:8000/""" + os.chdir(env.deploy_path) + + class AddressReuseTCPServer(SocketServer.TCPServer): + allow_reuse_address = True + + server = AddressReuseTCPServer(('', PORT), ComplexHTTPRequestHandler) + + sys.stderr.write('Serving on port {0} ...\n'.format(PORT)) + server.serve_forever() + +def reserve(): + """`build`, then `serve`""" + build() + serve() + +def preview(): + """Build production version of site""" + local('pelican -s publishconf.py') + +def cf_upload(): + """Publish to Rackspace Cloud Files""" + rebuild() + with lcd(DEPLOY_PATH): + local('swift -v -A https://auth.api.rackspacecloud.com/v1.0 ' + '-U {cloudfiles_username} ' + '-K {cloudfiles_api_key} ' + 'upload -c {cloudfiles_container} .'.format(**env)) + +@hosts(production) +def publish(): + """Publish to production via rsync""" + local('pelican -s publishconf.py') + project.rsync_project( + remote_dir=dest_path, + exclude=".DS_Store", + local_dir=DEPLOY_PATH.rstrip('/') + '/', + delete=True, + extra_opts='-c', + ) + +def gh_pages(): + """Publish to GitHub Pages""" + rebuild() + local("ghp-import -b {github_pages_branch} {deploy_path} -p".format(**env)) diff --git a/pelicanconf.py b/pelicanconf.py new file mode 100644 index 0000000..6a5a707 --- /dev/null +++ b/pelicanconf.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- # +from __future__ import unicode_literals + +AUTHOR = u'team' +SITENAME = u'Centrum Alledaagse Tecnologie' +SITEURL = '' + +PATH = 'content' + +TIMEZONE = 'Europe/Amsterdam' + +DEFAULT_LANG = u'nl' + +# Feed generation is usually not desired when developing +FEED_ALL_ATOM = None +CATEGORY_FEED_ATOM = None +TRANSLATION_FEED_ATOM = None +AUTHOR_FEED_ATOM = None +AUTHOR_FEED_RSS = None + +# Blogroll +#LINKS = (('Pelican', 'http://getpelican.com/'), +# ('Python.org', 'http://python.org/'), +# ('Jinja2', 'http://jinja.pocoo.org/'), +# ('You can modify those links in your config file', '#'),) + +# Social widget +#SOCIAL = (('You can add links in your config file', '#'), + ('Another social link', '#'),) + +DEFAULT_PAGINATION = 5 + +# Uncomment following line if you want document-relative URLs when developing +#RELATIVE_URLS = True + +PLUGIN_PATHS = ['./plugins'] +PLUGINS = ['extract_toc'] +MD_EXTENSIONS = ['codehilite','extra','smarty', 'toc'] + +STATIC_PATHS = ['extra', 'images', 'pdfs'] +EXTRA_PATH_METADATA = { + 'extra/robots.txt': {'path': 'robots.txt'}, + 'extra/favicon.ico': {'path': 'favicon.ico'}, + 'extra/htaccess': {'path': '.htaccess'} + } + +MENUITEMS=( + # adds extra menu items, the others are automatically generated as pages + ('home', '/'), + ) + +THEME = 'themes/wisselwerking' + diff --git a/publishconf.py b/publishconf.py new file mode 100644 index 0000000..85ff8ef --- /dev/null +++ b/publishconf.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- # +from __future__ import unicode_literals + +# This file is only used if you use `make publish` or +# explicitly specify it as your config file. + +import os +import sys +sys.path.append(os.curdir) +from pelicanconf import * + +SITEURL = '' +RELATIVE_URLS = False + +FEED_ALL_ATOM = 'feeds/all.atom.xml' +CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml' + +DELETE_OUTPUT_DIRECTORY = True + +# Following items are often useful when publishing + +#DISQUS_SITENAME = "" +#GOOGLE_ANALYTICS = "" diff --git a/theme/wisselwerking/static/css/main.css b/theme/wisselwerking/static/css/main.css new file mode 100644 index 0000000..ac937ff --- /dev/null +++ b/theme/wisselwerking/static/css/main.css @@ -0,0 +1,228 @@ +/* +2k17 Homebrewserver.club Pelican theme +--- +Style sheet is ordered vertically, with declarations for the header on top and footer on the bottom. + +With contributions by club members: +http://roelof.info +http://randomiser.info/ +http://majesticmoo.se +*/ + +@font-face { + font-family: 'NowBlack'; + src: url('../fonts/Now-Black.otf') format('opentype'); + font-weight: normal; + font-style: normal; + } + +@font-face { + font-family: 'NowBold'; + src: url('../fonts/Now-Bold.otf') format('opentype'); + font-weight: bold; + font-style: normal; + } + +@font-face { + font-family: 'NowLight'; + src: url('../fonts/Now-Light.otf') format('opentype'); + font-weight: normal; + font-style: normal; + } + +@font-face { + font-family: 'NowMedium'; + src: url('../fonts/Now-Medium.otf') format('opentype'); + font-weight: normal; + font-style: normal; + } + +@font-face { + font-family: 'NowRegular'; + src: url('../fonts/Now-Regular.otf') format('opentype'); + font-weight: normal; + font-style: normal; + } + +@font-face { + font-family: 'NowThin'; + src: url('../fonts/Now-Thin.otf') format('opentype'); + font-weight: normal; + font-style: normal; + } + +header { + width:100%; +} + +#banner { + margin-top:1em; + font-size: 60px; + transform: rotate(5deg); +} + +hr { + background-color: #06061e; + color: #06061e; + height: 5px; +} +pre { +} +#menu{ + font-size:40px; + font-weight:bold; + margin-top: 1em; + text-align:center; +} + +body { + line-height:1.5em; + background-color: #06061e; + font-size: 16px; + margin: 0 auto; + width: 900px; + color:white; + font-family:"NowRegular"; + font-style: normal; +} + +a { + color:LimeGreen; + font-weight: bold; +} + +.paginator{ + float:right; + margin:0px; +} + +#index{ +} + +#post-list { + padding-left:0px; + margin-top:0px; +} + +ul { + padding-left:0px; +} + +.hentry{ + /*margin-top:2em;*/ + border-width: 1px; + border-color: #444; +} + +.article-info{ + clear: right; + display: inline; + float: left; + margin-bottom: 5em; + max-width: 150px; + padding-right: em; + transform: rotate(-3deg); +} + + + +.entry-title span{ + width:100%; + display:inline-block; +} + +.entry-content{ + display: inline; + float: right; + margin-bottom: 2.5em; + max-width: 700px; + padding-right: 1em; +} + +.entry-content pre{ + font-size:20px; + padding-left:1em; + overflow: auto; + background-color: #F8F8F8; + line-height:1.2em; +} + +.entry-content img{ + max-width:100%; + border: 2px solid white; +} + +p:nth-child(odd){ + -ms-transform: rotate(1deg); + -webkit-transform: rotate(1deg); + transform: rotate(1deg); + } + +p:nth-child(even){ + -ms-transform: rotate(-1deg); + -webkit-transform: rotate(-1deg); + transform: rotate(-1deg); + } + + +.entry-content ul { + font-size:20px; + line-height:1.5; + margin: auto; + max-width:800px; +} + +.highlight{ + margin: auto; + max-width:800px; +} + +#page-content img{ + max-width:100%; +} + +blockquote { + font-style:italic; +} + +#content{ + margin:auto; +} + +.divider { + font-size:12px; + width:100%; + line-height:1em; + background-color:white; +} + +.published{ + font-size:smaller; +} + +.article_tags{ + font-size:smaller; +} + + +#categories { + font-size: 40px; + margin-top: 2em; + text-align: center; +} +#pertaining{ + margin-top:2em; + text-align:center; + +} +.simple-footnotes{ + font-size:14px; + margin:auto; + max-width:800px; +} + +.author{ + font-size:smaller; +} + + diff --git a/theme/wisselwerking/static/css/pygment.css b/theme/wisselwerking/static/css/pygment.css new file mode 100644 index 0000000..ab96d84 --- /dev/null +++ b/theme/wisselwerking/static/css/pygment.css @@ -0,0 +1,437 @@ + +pre .hll { + background-color: #ffffcc; +} +pre .c { + color: #60a0b0; + font-style: italic; +} +pre .err { + border: 1px solid #ff0000; +} +pre .k { + color: #007020; + font-weight: bold; +} +pre .o { + color: #666666; +} +pre .ch { + color: #60a0b0; + font-style: italic; +} +pre .cm { + color: #60a0b0; + font-style: italic; +} +pre .cp { + color: #007020; +} +pre .cpf { + color: #60a0b0; + font-style: italic; +} +pre .c1 { + color: #60a0b0; + font-style: italic; +} +pre .cs { + background-color: #fff0f0; + color: #60a0b0; +} +pre .gd { + color: #a00000; +} +pre .ge { + font-style: italic; +} +pre .gr { + color: #ff0000; +} +pre .gh { + color: #000080; + font-weight: bold; +} +pre .gi { + color: #00a000; +} +pre .go { + color: #888888; +} +pre .gp { + color: #c65d09; + font-weight: bold; +} +pre .gs { + font-weight: bold; +} +pre .gu { + color: #800080; + font-weight: bold; +} +pre .gt { + color: #0044dd; +} +pre .kc { + color: #007020; + font-weight: bold; +} +pre .kd { + color: #007020; + font-weight: bold; +} +pre .kn { + color: #007020; + font-weight: bold; +} +pre .kp { + color: #007020; +} +pre .kr { + color: #007020; + font-weight: bold; +} +pre .kt { + color: #902000; +} +pre .m { + color: #40a070; +} +pre .s { + color: #4070a0; +} +pre .na { + color: #4070a0; +} +pre .nb { + color: #007020; +} +pre .nc { + color: #0e84b5; + font-weight: bold; +} +pre .no { + color: #60add5; +} +pre .nd { + color: #555555; + font-weight: bold; +} +pre .ni { + color: #d55537; + font-weight: bold; +} +pre .ne { + color: #007020; +} +pre .nf { + color: #06287e; +} +pre .nl { + color: #002070; + font-weight: bold; +} +pre .nn { + color: #0e84b5; + font-weight: bold; +} +pre .nt { + color: #062873; + font-weight: bold; +} +pre .nv { + color: #bb60d5; +} +pre .ow { + color: #007020; + font-weight: bold; +} +pre .w { + color: #bbbbbb; +} +pre .mb { + color: #40a070; +} +pre .mf { + color: #40a070; +} +pre .mh { + color: #40a070; +} +pre .mi { + color: #40a070; +} +pre .mo { + color: #40a070; +} +pre .sb { + color: #4070a0; +} +pre .sc { + color: #4070a0; +} +pre .sd { + color: #4070a0; + font-style: italic; +} +pre .s2 { + color: #4070a0; +} +pre .se { + color: #4070a0; + font-weight: bold; +} +pre .sh { + color: #4070a0; +} +pre .si { + color: #70a0d0; + font-style: italic; +} +pre .sx { + color: #c65d09; +} +pre .sr { + color: #235388; +} +pre .s1 { + color: #4070a0; +} +pre .ss { + color: #517918; +} +pre .bp { + color: #007020; +} +pre .vc { + color: #bb60d5; +} +pre .vg { + color: #bb60d5; +} +pre .vi { + color: #bb60d5; +} +pre .il { + color: #40a070; +} +.syntax pre .hll { + background-color: #ffffcc; +} +.syntax pre { + background: #f0f0f0 none repeat scroll 0 0; +} +.syntax pre .c { + color: #60a0b0; + font-style: italic; +} +.syntax pre .err { + border: 1px solid #ff0000; +} +.syntax pre .k { + color: #007020; + font-weight: bold; +} +.syntax pre .o { + color: #666666; +} +.syntax pre .ch { + color: #60a0b0; + font-style: italic; +} +.syntax pre .cm { + color: #60a0b0; + font-style: italic; +} +.syntax pre .cp { + color: #007020; +} +.syntax pre .cpf { + color: #60a0b0; + font-style: italic; +} +.syntax pre .c1 { + color: #60a0b0; + font-style: italic; +} +.syntax pre .cs { + background-color: #fff0f0; + color: #60a0b0; +} +.syntax pre .gd { + color: #a00000; +} +.syntax pre .ge { + font-style: italic; +} +.syntax pre .gr { + color: #ff0000; +} +.syntax pre .gh { + color: #000080; + font-weight: bold; +} +.syntax pre .gi { + color: #00a000; +} +.syntax pre .go { + color: #888888; +} +.syntax pre .gp { + color: #c65d09; + font-weight: bold; +} +.syntax pre .gs { + font-weight: bold; +} +.syntax pre .gu { + color: #800080; + font-weight: bold; +} +.syntax pre .gt { + color: #0044dd; +} +.syntax pre .kc { + color: #007020; + font-weight: bold; +} +.syntax pre .kd { + color: #007020; + font-weight: bold; +} +.syntax pre .kn { + color: #007020; + font-weight: bold; +} +.syntax pre .kp { + color: #007020; +} +.syntax pre .kr { + color: #007020; + font-weight: bold; +} +.syntax pre .kt { + color: #902000; +} +.syntax pre .m { + color: #40a070; +} +.syntax pre .s { + color: #4070a0; +} +.syntax pre .na { + color: #4070a0; +} +.syntax pre .nb { + color: #007020; +} +.syntax pre .nc { + color: #0e84b5; + font-weight: bold; +} +.syntax pre .no { + color: #60add5; +} +.syntax pre .nd { + color: #555555; + font-weight: bold; +} +.syntax pre .ni { + color: #d55537; + font-weight: bold; +} +.syntax pre .ne { + color: #007020; +} +.syntax pre .nf { + color: #06287e; +} +.syntax pre .nl { + color: #002070; + font-weight: bold; +} +.syntax pre .nn { + color: #0e84b5; + font-weight: bold; +} +.syntax pre .nt { + color: #062873; + font-weight: bold; +} +.syntax pre .nv { + color: #bb60d5; +} +.syntax pre .ow { + color: #007020; + font-weight: bold; +} +.syntax pre .w { + color: #bbbbbb; +} +.syntax pre .mb { + color: #40a070; +} +.syntax pre .mf { + color: #40a070; +} +.syntax pre .mh { + color: #40a070; +} +.syntax pre .mi { + color: #40a070; +} +.syntax pre .mo { + color: #40a070; +} +.syntax pre .sb { + color: #4070a0; +} +.syntax pre .sc { + color: #4070a0; +} +.syntax pre .sd { + color: #4070a0; + font-style: italic; +} +.syntax pre .s2 { + color: #4070a0; +} +.syntax pre .se { + color: #4070a0; + font-weight: bold; +} +.syntax pre .sh { + color: #4070a0; +} +.syntax pre .si { + color: #70a0d0; + font-style: italic; +} +.syntax pre .sx { + color: #c65d09; +} +.syntax pre .sr { + color: #235388; +} +.syntax pre .s1 { + color: #4070a0; +} +.syntax pre .ss { + color: #517918; +} +.syntax pre .bp { + color: #007020; +} +.syntax pre .vc { + color: #bb60d5; +} +.syntax pre .vg { + color: #bb60d5; +} +.syntax pre .vi { + color: #bb60d5; +} +.syntax pre .il { + color: #40a070; +} + diff --git a/theme/wisselwerking/static/fonts/Now-Black.otf b/theme/wisselwerking/static/fonts/Now-Black.otf new file mode 100644 index 0000000..230c97d Binary files /dev/null and b/theme/wisselwerking/static/fonts/Now-Black.otf differ diff --git a/theme/wisselwerking/static/fonts/Now-Bold.otf b/theme/wisselwerking/static/fonts/Now-Bold.otf new file mode 100644 index 0000000..bc28416 Binary files /dev/null and b/theme/wisselwerking/static/fonts/Now-Bold.otf differ diff --git a/theme/wisselwerking/static/fonts/Now-Light.otf b/theme/wisselwerking/static/fonts/Now-Light.otf new file mode 100644 index 0000000..6383e85 Binary files /dev/null and b/theme/wisselwerking/static/fonts/Now-Light.otf differ diff --git a/theme/wisselwerking/static/fonts/Now-Medium.otf b/theme/wisselwerking/static/fonts/Now-Medium.otf new file mode 100644 index 0000000..49aeb06 Binary files /dev/null and b/theme/wisselwerking/static/fonts/Now-Medium.otf differ diff --git a/theme/wisselwerking/static/fonts/Now-Regular.otf b/theme/wisselwerking/static/fonts/Now-Regular.otf new file mode 100644 index 0000000..97a8343 Binary files /dev/null and b/theme/wisselwerking/static/fonts/Now-Regular.otf differ diff --git a/theme/wisselwerking/static/fonts/Now-Thin.otf b/theme/wisselwerking/static/fonts/Now-Thin.otf new file mode 100644 index 0000000..112a515 Binary files /dev/null and b/theme/wisselwerking/static/fonts/Now-Thin.otf differ diff --git a/theme/wisselwerking/static/js/stars.js b/theme/wisselwerking/static/js/stars.js new file mode 100644 index 0000000..985acec --- /dev/null +++ b/theme/wisselwerking/static/js/stars.js @@ -0,0 +1,27 @@ +// stars.js +// Random Stars +var generateStars = function(){ + + var $galaxy = $(".galaxy"); + var iterator = 0; + + while (iterator <= 100){ + var xposition = Math.random(); + var yposition = Math.random(); + var star_type = Math.floor((Math.random() * 3) + 1); + var position = { + "x" : $galaxy.width() * xposition, + "y" : $galaxy.height() * yposition, + }; + + $('
').appendTo($galaxy).css({ + "top" : position.y, + "left" : position.x + }); + + iterator++; + } + +}; + +generateStars(); \ No newline at end of file diff --git a/theme/wisselwerking/templates/archives.html b/theme/wisselwerking/templates/archives.html new file mode 100644 index 0000000..050f268 --- /dev/null +++ b/theme/wisselwerking/templates/archives.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% block content %} +

Archives for {{ SITENAME }}

+ +
+{% for article in dates %} +
{{ article.locale_date }}
+
{{ article.title }}
+{% endfor %} +
+{% endblock %} diff --git a/theme/wisselwerking/templates/article.html b/theme/wisselwerking/templates/article.html new file mode 100644 index 0000000..7847976 --- /dev/null +++ b/theme/wisselwerking/templates/article.html @@ -0,0 +1,50 @@ +{% extends "base.html" %} +{% block head %} + {{ super() }} + {% if article.description %} + + {% endif %} + + {% if article.tags or article.category or article.keywords %} + + {% endif %} + + +{% endblock %} +
+ ../ +
+ ../ + + +{% block content %} +
+ +
+ {{ article.content }} +
+
+{% endblock %} diff --git a/theme/wisselwerking/templates/author.html b/theme/wisselwerking/templates/author.html new file mode 100644 index 0000000..e9f7870 --- /dev/null +++ b/theme/wisselwerking/templates/author.html @@ -0,0 +1,7 @@ +{% extends "index.html" %} + +{% block title %}{{ SITENAME }} - Articles by {{ author }}{% endblock %} +{% block content_title %} +

Articles by {{ author }}

+{% endblock %} + diff --git a/theme/wisselwerking/templates/authors.html b/theme/wisselwerking/templates/authors.html new file mode 100644 index 0000000..4914904 --- /dev/null +++ b/theme/wisselwerking/templates/authors.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Authors{% endblock %} + +{% block content %} +

Authors on {{ SITENAME }}

+ + +{% endblock %} diff --git a/theme/wisselwerking/templates/base.html b/theme/wisselwerking/templates/base.html new file mode 100644 index 0000000..81c2692 --- /dev/null +++ b/theme/wisselwerking/templates/base.html @@ -0,0 +1,69 @@ + + + + {% block head %} + {% block title %}{{ SITENAME }}{% endblock title %} + + + + + {% if FEED_ALL_ATOM %} + + {% endif %} + {% if FEED_ALL_RSS %} + + {% endif %} + {% if FEED_ATOM %} + + {% endif %} + {% if FEED_RSS %} + + {% endif %} + {% if CATEGORY_FEED_ATOM and category %} + + {% endif %} + {% if CATEGORY_FEED_RSS and category %} + + {% endif %} + {% if TAG_FEED_ATOM and tag %} + + {% endif %} + {% if TAG_FEED_RSS and tag %} + + {% endif %} + + {% from 'syndication.html' import syndication with context %} + {{ syndication(article) }} + + + + {% endblock head %} + + + +
+ + + {% block content %} + {% endblock %} + + + diff --git a/theme/wisselwerking/templates/categories.html b/theme/wisselwerking/templates/categories.html new file mode 100644 index 0000000..789cfa1 --- /dev/null +++ b/theme/wisselwerking/templates/categories.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} +{% block content %} +
+{% for category, articles in categories %} + {{ category }} +{% endfor %} +
+{% endblock %} diff --git a/theme/wisselwerking/templates/category.html b/theme/wisselwerking/templates/category.html new file mode 100644 index 0000000..39a8439 --- /dev/null +++ b/theme/wisselwerking/templates/category.html @@ -0,0 +1,5 @@ +{% extends "index.html" %} +{% block content_title %} +
Everything pertaining to {{ category }}
+{% endblock %} + diff --git a/theme/wisselwerking/templates/gosquared.html b/theme/wisselwerking/templates/gosquared.html new file mode 100644 index 0000000..49ccbbe --- /dev/null +++ b/theme/wisselwerking/templates/gosquared.html @@ -0,0 +1,14 @@ +{% if GOSQUARED_SITENAME %} + +{% endif %} diff --git a/theme/wisselwerking/templates/index.html b/theme/wisselwerking/templates/index.html new file mode 100644 index 0000000..c9df275 --- /dev/null +++ b/theme/wisselwerking/templates/index.html @@ -0,0 +1,29 @@ +{% extends "base.html" %} +{% block content %} +
+{% block content_title %} +{% endblock %} +{% if articles_page.has_other_pages() %} + {% include 'pagination.html' %} +{% endif %} +
+{% for article in articles_page.object_list %} +
+ +
{{ article.content }} +

+
+
+{% endfor %} +
+ +
+{% endblock content %} diff --git a/theme/wisselwerking/templates/page.html b/theme/wisselwerking/templates/page.html new file mode 100644 index 0000000..5ce1974 --- /dev/null +++ b/theme/wisselwerking/templates/page.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} +{% block title %}{{ page.title }}{%endblock%} +{% block content %} + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} + +
+ {{ page.content }} + + {% if page.modified %} +

+ Last updated: {{ page.locale_modified }} +

+ {% endif %} +
+{% endblock %} diff --git a/theme/wisselwerking/templates/pagination.html b/theme/wisselwerking/templates/pagination.html new file mode 100644 index 0000000..4219a5c --- /dev/null +++ b/theme/wisselwerking/templates/pagination.html @@ -0,0 +1,11 @@ +{% if DEFAULT_PAGINATION %} +

+ {% if articles_page.has_previous() %} + « + {% endif %} + Page {{ articles_page.number }} / {{ articles_paginator.num_pages }} + {% if articles_page.has_next() %} + » + {% endif %} +

+{% endif %} diff --git a/theme/wisselwerking/templates/period_archives.html b/theme/wisselwerking/templates/period_archives.html new file mode 100644 index 0000000..d930dbb --- /dev/null +++ b/theme/wisselwerking/templates/period_archives.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% block content %} +

Archives for {{ period | reverse | join(' ') }}

+ +
+{% for article in dates %} +
{{ article.locale_date }}
+
{{ article.title }}
+{% endfor %} +
+{% endblock %} diff --git a/theme/wisselwerking/templates/syndication.html b/theme/wisselwerking/templates/syndication.html new file mode 100644 index 0000000..dbff099 --- /dev/null +++ b/theme/wisselwerking/templates/syndication.html @@ -0,0 +1,57 @@ +{#This template is for syndicating across the fucked up part of the web. It implements Open Graph and Twitter Card metadata to display links to HBSC well on social media +# This code is mostly taken from Talha Mansoor's Elegant pelican theme https://github.com/talha131/pelican-elegant +#} + +{# Thumbnail image to show when homepage is shared on social media. It also +serves as the default image for posts whose featured_image is not set. #} +{% if not FEATURED_IMAGE %} +{% set FEATURED_IMAGE = 'https://keet.space/images/keet.jpg' %} +{% else %} +{% set FEATURED_IMAGE = FEATURED_IMAGE %} +{% endif %} + + +{% macro syndication(article) %} +{% if article %} + + + + + +{% if article.date %} + +{% endif %} +{% if article.locale_modified and article.modified %} + +{% endif %} + + + +{% if article.featured_image %} + + + +{% else %} + {% if FEATURED_IMAGE %} + + + {% endif %} +{% endif %} +{% endif %} +{% if not article %} + + + + + + + + +{% if FEATURED_IMAGE %} + + +{% endif %} +{% endif %} +{% endmacro %} + + diff --git a/theme/wisselwerking/templates/tag.html b/theme/wisselwerking/templates/tag.html new file mode 100644 index 0000000..e69de29 diff --git a/theme/wisselwerking/templates/tags.html b/theme/wisselwerking/templates/tags.html new file mode 100644 index 0000000..b5d1482 --- /dev/null +++ b/theme/wisselwerking/templates/tags.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Tags{% endblock %} + +{% block content %} +

Tags for {{ SITENAME }}

+ {%- for tag, articles in tags|sort %} +
  • {{ tag }} ({{ articles|count }})
  • + {% endfor %} +{% endblock %} diff --git a/theme/wisselwerking/templates/translations.html b/theme/wisselwerking/templates/translations.html new file mode 100644 index 0000000..db8c372 --- /dev/null +++ b/theme/wisselwerking/templates/translations.html @@ -0,0 +1,9 @@ +{% macro translations_for(article) %} +{% if article.translations %} +Translations: +{% for translation in article.translations %} +{{ translation.lang }} +{% endfor %} +{% endif %} +{% endmacro %} +