add website framework
parent
dd4e0ae165
commit
12a9c394cc
|
@ -0,0 +1,6 @@
|
|||
[submodule "plugins/ipynb"]
|
||||
path = plugins/ipynb
|
||||
url = git://github.com/danielfrg/pelican-ipynb.git
|
||||
[submodule "plugins/pelican-plugins"]
|
||||
path = plugins/pelican-plugins
|
||||
url = git://github.com/getpelican/pelican-plugins.git
|
|
@ -0,0 +1,132 @@
|
|||
PY?=python3
|
||||
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=localhost
|
||||
SSH_PORT=22
|
||||
SSH_USER=root
|
||||
SSH_TARGET_DIR=/var/www
|
||||
|
||||
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_REMOTE=git@github.com:jakevdp/jakevdp.github.io.git
|
||||
GITHUB_PAGES_BRANCH=master
|
||||
|
||||
GIT_COMMIT_HASH = $(shell git rev-parse HEAD)
|
||||
|
||||
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) .
|
||||
|
||||
publish-to-github: publish
|
||||
ghp-import -n -m "publish-to-github from $(GIT_COMMIT_HASH)" -b blog-build $(OUTPUTDIR)
|
||||
git push $(GITHUB_PAGES_REMOTE) blog-build:$(GITHUB_PAGES_BRANCH)
|
||||
|
||||
publish-to-github-force: publish
|
||||
ghp-import -n -m "publish-to-github-force from $(GIT_COMMIT_HASH)" -b blog-build $(OUTPUTDIR)
|
||||
git push -f $(GITHUB_PAGES_REMOTE) blog-build:$(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
|
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
Binary file not shown.
After Width: | Height: | Size: 94 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.0 KiB |
|
@ -0,0 +1,63 @@
|
|||
"""
|
||||
This script copies all notebooks from the book into the website directory, and
|
||||
creates pages which wrap them and link together.
|
||||
"""
|
||||
import os
|
||||
import nbformat
|
||||
|
||||
PAGEFILE = """title: {title}
|
||||
slug: {slug}
|
||||
Template: page
|
||||
|
||||
{{% notebook notebooks/{notebook_file} cells[2:] %}}
|
||||
"""
|
||||
|
||||
|
||||
def abspath_from_here(*args):
|
||||
here = os.path.dirname(__file__)
|
||||
path = os.path.join(here, *args)
|
||||
return os.path.abspath(path)
|
||||
|
||||
NB_SOURCE_DIR = abspath_from_here('..', 'notebooks')
|
||||
NB_DEST_DIR = abspath_from_here('content', 'notebooks')
|
||||
PAGE_DEST_DIR = abspath_from_here('content', 'pages')
|
||||
|
||||
|
||||
def copy_notebooks():
|
||||
nblist = sorted(os.listdir(NB_SOURCE_DIR))
|
||||
name_map = {nb: nb.rsplit('.', 1)[0] + '.html'
|
||||
for nb in nblist}
|
||||
|
||||
for nb in nblist:
|
||||
base, ext = os.path.splitext(nb)
|
||||
if ext != '.ipynb':
|
||||
continue
|
||||
print('-', nb)
|
||||
|
||||
content = nbformat.read(os.path.join(NB_SOURCE_DIR, nb),
|
||||
as_version=4)
|
||||
title = content.cells[2].source
|
||||
if not title.startswith('#'):
|
||||
raise ValueError('title not found in third cell')
|
||||
title = title.lstrip('#').strip()
|
||||
|
||||
# put nav below title
|
||||
content.cells[1], content.cells[2] = content.cells[2], content.cells[1]
|
||||
|
||||
for cell in content.cells:
|
||||
if cell.cell_type == 'markdown':
|
||||
for nbname, htmlname in name_map.items():
|
||||
if nbname in cell.source:
|
||||
cell.source = cell.source.replace(nbname, htmlname)
|
||||
nbformat.write(content, os.path.join(NB_DEST_DIR, nb))
|
||||
|
||||
pagefile = os.path.join(PAGE_DEST_DIR, base + '.md')
|
||||
with open(pagefile, 'w') as f:
|
||||
f.write(PAGEFILE.format(title=title,
|
||||
slug=base.lower(),
|
||||
notebook_file=nb))
|
||||
|
||||
if __name__ == '__main__':
|
||||
copy_notebooks()
|
||||
|
||||
|
|
@ -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 = 'root@localhost:22'
|
||||
dest_path = '/var/www'
|
||||
|
||||
# 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 = "master"
|
||||
|
||||
# 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))
|
|
@ -0,0 +1,68 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*- #
|
||||
from __future__ import unicode_literals
|
||||
|
||||
AUTHOR = 'Jake VanderPlas'
|
||||
SITENAME = 'Python Data Science Handbook'
|
||||
SITESUBTITLE = u'Essential Tools for Working with Data'
|
||||
SITEURL = ''
|
||||
PATH = 'content'
|
||||
TIMEZONE = 'America/Los_Angeles'
|
||||
DEFAULT_LANG = 'en'
|
||||
|
||||
# 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
|
||||
|
||||
# Set the article URL
|
||||
ARTICLE_URL = 'blog/{date:%Y}/{date:%m}/{date:%d}/{slug}/'
|
||||
ARTICLE_SAVE_AS = 'blog/{date:%Y}/{date:%m}/{date:%d}/{slug}/index.html'
|
||||
|
||||
DEFAULT_PAGINATION = 10
|
||||
|
||||
# Uncomment following line if you want document-relative URLs when developing
|
||||
#RELATIVE_URLS = True
|
||||
|
||||
#MARKUP = ('md', 'ipynb')
|
||||
#PLUGINS = ['ipynb.markup']
|
||||
|
||||
MARKUP = ['md']
|
||||
PLUGIN_PATHS = ['./plugins', './plugins/pelican-plugins']
|
||||
PLUGINS = [
|
||||
'summary', # auto-summarizing articles
|
||||
'feed_summary', # use summaries for RSS, not full articles
|
||||
'ipynb.liquid', # for embedding notebooks
|
||||
'liquid_tags.img', # embedding images
|
||||
'liquid_tags.video', # embedding videos
|
||||
'liquid_tags.include_code', # including code blocks
|
||||
'liquid_tags.literal'
|
||||
]
|
||||
IGNORE_FILES = ['.ipynb_checkpoints']
|
||||
|
||||
# for liquid tags
|
||||
CODE_DIR = 'downloads/code'
|
||||
NOTEBOOK_DIR = 'downloads/notebooks'
|
||||
|
||||
# THEME SETTINGS
|
||||
THEME = './theme/'
|
||||
|
||||
ABOUT_PAGE = '/pages/about.html'
|
||||
TWITTER_USERNAME = 'jakevdp'
|
||||
GITHUB_USERNAME = 'jakevdp'
|
||||
STACKOVERFLOW_ADDRESS = 'http://stackoverflow.com/users/2937831/jakevdp'
|
||||
AUTHOR_WEBSITE = 'http://vanderplas.com'
|
||||
AUTHOR_CV = "http://staff.washington.edu/jakevdp/media/pdfs/CV.pdf"
|
||||
SHOW_ARCHIVES = True
|
||||
SHOW_FEED = False # Need to address large feeds
|
||||
|
||||
ENABLE_MATHJAX = True
|
||||
|
||||
STATIC_PATHS = ['images', 'figures', 'videos', 'downloads', 'favicon.ico']
|
||||
|
||||
# Footer info
|
||||
|
||||
LICENSE_URL = "https://github.com/jakevdp/jakevdp.github.io-source/blob/master/LICENSE"
|
||||
LICENSE = "MIT"
|
|
@ -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 = 'http://jakevdp.github.io'
|
||||
RELATIVE_URLS = False
|
||||
|
||||
SHOW_FEED = True
|
||||
FEED_ALL_ATOM = 'feeds/all.atom.xml'
|
||||
CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
|
||||
FEED_USE_SUMMARY = True # from the feed_summary plugin
|
||||
|
||||
DELETE_OUTPUT_DIRECTORY = True
|
||||
|
||||
DISQUS_SITENAME = "pythonicperambulations"
|
||||
GOOGLE_ANALYTICS = "UA-34061646-1"
|
|
@ -0,0 +1,4 @@
|
|||
# Pythonic Perambulations Theme
|
||||
|
||||
This theme was adapted from that at https://github.com/danielfrg/danielfrg.github.io-source; the original is released under the Apache v2.0 license.
|
||||
Adaptations are contained in this directory.
|
|
@ -0,0 +1,60 @@
|
|||
/* Copied from https://github.com/porterjamesj/crowsfoot */
|
||||
|
||||
@font-face {
|
||||
font-family: 'icons';
|
||||
src: url('../font/icons.eot?79801659');
|
||||
src: url('../font/icons.eot?79801659#iefix') format('embedded-opentype'),
|
||||
url('../font/icons.woff?79801659') format('woff'),
|
||||
url('../font/icons.ttf?79801659') format('truetype'),
|
||||
url('../font/icons.svg?79801659#icons') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
|
||||
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
|
||||
/*
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
@font-face {
|
||||
font-family: 'icons';
|
||||
src: url('../font/icons.svg?79801659#icons') format('svg');
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
[class^="icon-"]:before, [class*=" icon-"]:before {
|
||||
font-family: "icons";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
/* opacity: .8; */
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
|
||||
/* fix buttons height, for twitter bootstrap */
|
||||
line-height: 1em;
|
||||
|
||||
/* Animation center compensation - margins should be symmetric */
|
||||
/* remove if not needed */
|
||||
margin-left: .2em;
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
|
||||
/* Uncomment for 3D effect */
|
||||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
|
||||
.icon-stackoverflow:before { content: '\e032'; } /* '' */
|
||||
.icon-twitter:before { content: '\e801'; } /* '' */
|
||||
.icon-facebook:before { content: '\e802'; } /* '' */
|
||||
.icon-rss:before { content: '\e800'; } /* '' */
|
||||
.icon-mail-alt:before { content: '\f0e0'; } /* '' */
|
||||
.icon-github:before { content: '\f113'; } /* '' */
|
Binary file not shown.
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Copyright (C) 2012 by original authors @ fontello.com</metadata>
|
||||
<defs>
|
||||
<font id="icons" horiz-adv-x="1000" >
|
||||
<font-face font-family="icons" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
||||
<missing-glyph horiz-adv-x="1000" />
|
||||
<glyph glyph-name="stackoverflow" unicode="" d="M0-150l0 395 64 0 0-328 492 0 0 328 66 0 0-395-623 0z m113 133l0 80 395 0 0-80-395 0z m2 146l6 80 393-27-6-80z m16 176l20 78 383-94-20-80z m62 205l41 70 340-199-41-70z m182 213l66 45 221-326-68-45z m250 117l82 10 47-391-80-10z" horiz-adv-x="754" />
|
||||
<glyph glyph-name="twitter" unicode="" d="M904 622q-37-55-90-93 1-8 1-23 0-73-21-145t-64-139-103-117-144-81-180-30q-151 0-277 81 20-2 44-2 126 0 224 77-59 1-105 36t-64 89q18-3 34-3 24 0 47 6-62 13-104 62t-41 115l0 2q38-21 81-23-37 25-59 64t-22 86q0 49 25 91 68-83 164-133t207-56q-4 21-4 41 0 75 53 128t128 53q78 0 132-57 61 12 114 44-21-64-79-99 52 6 104 28z" horiz-adv-x="928.571" />
|
||||
<glyph glyph-name="facebook" unicode="" d="M285 540l143 0-17-158-127 0 0-460-190 0 0 460-95 0 0 158 95 0 0 95q0 102 48 154t158 52l127 0 0-158-79 0q-22 0-35-4t-19-13-8-19-2-28l0-79z" horiz-adv-x="428.571" />
|
||||
<glyph glyph-name="rss" unicode="" d="M214 100q0-45-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m286-69q1-16-9-27-10-12-26-12l-75 0q-14 0-24 9t-11 23q-12 128-103 218t-218 103q-14 1-23 11t-9 24l0 75q0 16 12 26 9 9 24 9l3 0q89-7 171-45t145-101q64-63 101-145t45-171z m286-1q1-15-10-26-10-11-26-11l-80 0q-15 0-25 10t-11 24q-7 120-56 228t-129 187-187 129-228 57q-14 1-24 11t-10 24l0 80q0 16 11 26 10 10 25 10l2 0q146-7 280-67t237-164q104-104 164-237t67-280z" horiz-adv-x="785.714" />
|
||||
<glyph glyph-name="mail-alt" unicode="" d="M1000 454l0-443q0-37-26-63t-63-26l-821 0q-37 0-63 26t-26 63l0 443q25-27 56-49 202-137 277-193 32-23 52-37t53-27 61-14l1 0q28 0 61 14t53 27 52 37q95 69 278 193 32 22 56 49z m0 164q0-44-27-84t-68-69q-210-146-261-181-6-4-24-17t-30-21-29-18-32-15-28-5l-1 0q-13 0-28 5t-32 15-29 18-30 21-24 17q-51 36-146 102t-114 80q-35 23-65 64t-31 76q0 44 23 73t66 29l821 0q36 0 63-26t27-63z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="github" unicode="" d="M357 171q0-22-7-46t-24-42-40-19-40 19-24 42-7 46 7 46 24 42 40 19 40-19 24-42 7-46z m357 0q0-22-7-46t-24-42-40-19-40 19-24 42-7 46 7 46 24 42 40 19 40-19 24-42 7-46z m89 0q0 67-39 114t-104 47q-23 0-109-12-40-6-88-6t-88 6q-85 12-109 12-66 0-104-47t-39-114q0-49 18-86t45-57 68-33 78-16 83-4l94 0q46 0 83 4t78 16 68 33 45 57 18 86z m125 98q0-116-34-185-21-43-59-74t-79-48-95-27-96-12-93-3q-44 0-79 2t-82 7-85 17-76 29-68 45-48 64q-35 69-35 185 0 132 76 221-15 46-15 95 0 65 28 122 60 0 106-22t105-69q82 20 172 20 83 0 156-18 59 46 104 68t105 22q28-57 28-122 0-49-15-94 76-89 76-222z" horiz-adv-x="928.571" />
|
||||
</font>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,30 @@
|
|||
{% if GOOGLE_UNIVERSAL_ANALYTICS %}
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '{{GOOGLE_UNIVERSAL_ANALYTICS}}', '{{GOOGLE_UNIVERSAL_ANALYTICS_COOKIEDOMAIN|default("auto")}}');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
{% elif GOOGLE_ANALYTICS %}
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', '{{GOOGLE_ANALYTICS}}']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '{{GOOGLE_ANALYTICS}}');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
{% endif %}
|
|
@ -0,0 +1,17 @@
|
|||
{% if DISQUS_SITENAME and SITEURL and article.status != "draft" %}
|
||||
<section>
|
||||
<h1>Comments</h1>
|
||||
<div id="disqus_thread" aria-live="polite"><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript></div>
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = '{{ DISQUS_SITENAME }}';
|
||||
var disqus_identifier = '/{{ article.url }}';
|
||||
var disqus_url = '{{ SITEURL }}/{{ article.url }}';
|
||||
var disqus_title = '{{ article.title | replace("'", "\\'")}}';
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = "//" + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
</section>
|
||||
{% endif %}
|
|
@ -0,0 +1,40 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}{{ page.title }}{% endblock %}
|
||||
{% block headerimg %}{% if page.headerimg %}{{ page.headerimg }}{% else %}{{ DEFAULT_HEADER_BG }}{% endif %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="container post">
|
||||
<article>
|
||||
<header class="about">
|
||||
<h1>{{ page.title }}</h1>
|
||||
{% if page.date %}
|
||||
<time datetime="page.date.isoformat()" pubdate>{{ page.locale_date }}</time>
|
||||
{% endif %}
|
||||
<div class="social-links">
|
||||
<ul>
|
||||
{% if AUTHOR_WEBSITE %}
|
||||
<li><a href="{{ AUTHOR_WEBSITE }}" rel="me">website</a></li>
|
||||
{% endif %}
|
||||
{% if AUTHOR_CV %}
|
||||
<li><a href="{{ AUTHOR_CV }}" rel="me">CV</a></li>
|
||||
{% endif %}
|
||||
{% if TWITTER_USERNAME %}
|
||||
<li><a class="nodec icon-twitter" href="http://twitter.com/{{ TWITTER_USERNAME }}" rel="me"></a></li>
|
||||
{% endif %}
|
||||
{% if GITHUB_USERNAME %}
|
||||
<li><a class="nodec icon-github" href="http://github.com/{{ GITHUB_USERNAME }}" rel="me"></a></li>
|
||||
{% endif %}
|
||||
{% if STACKOVERFLOW_ADDRESS %}
|
||||
<li><a class="nodec icon-stackoverflow" href="{{ STACKOVERFLOW_ADDRESS }}" rel="me"></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
<div class="article_content">
|
||||
{{ page.content }}
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -0,0 +1,28 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Archives{% endblock %}
|
||||
{% block headerimg %}{{ DEFAUT_HEADER_BG }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container list">
|
||||
<article>
|
||||
<h1 style="margin-bottom: 30px;">Archives and tags</h1>
|
||||
|
||||
<div class="meta" style="margin-bottom: 30px;">
|
||||
{% for tag, articles in tags %}
|
||||
<a href="{{ SITEURL }}/{{ tag.url }}" class="tag">{{ tag }} ({{ articles | length }})</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<ul class="double-list">
|
||||
{% for article in articles %}
|
||||
<li>
|
||||
<a href='/{{ article.url }}'>
|
||||
<h2>{{ article.title }}</h2>
|
||||
<span>{{ article.date.strftime('%d.%m.%Y') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</article>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -0,0 +1,43 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}{{ article.title }}{% endblock %}
|
||||
{% block headerimg %}{% if article.headerimg %}{{ article.headerimg }}{% else %}{{ DEFAULT_HEADER_BG }}{% endif %}{% endblock %}
|
||||
|
||||
{% block extra_head %}
|
||||
{% if 'angular' in article.include %}
|
||||
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
|
||||
{% endif %}
|
||||
{% if 'jquery' in article.include %}
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container post">
|
||||
<article>
|
||||
<header>
|
||||
<h1>{{ article.title }}</h1>
|
||||
<time datetime="article.date.isoformat()" pubdate>{{ article.locale_date }}</time>
|
||||
</header>
|
||||
|
||||
<div class="article_content">
|
||||
{{ article.content }}
|
||||
</div>
|
||||
|
||||
<div class="meta">
|
||||
<div>
|
||||
{% for tag in article.tags %}
|
||||
<a href="{{ SITEURL }}/{{ tag.url }}" class="tag">{{ tag }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
{% include '_includes/disqus_thread.html' %}
|
||||
|
||||
</div>
|
||||
|
||||
<style type="text/css">
|
||||
{% include 'ipynb.css' %}
|
||||
</style>
|
||||
|
||||
{% endblock %}
|
|
@ -0,0 +1,94 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="author" content="{{ AUTHOR }}">
|
||||
<meta name="description" content="{% block description %}{%endblock%}">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>{% block title %}{% endblock %} | {{ SITENAME }}</title>
|
||||
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||||
<link rel="alternate" type="application/atom+xml" title="{{ SITENAME }} blog atom feed" href="/feeds/all.atom.xml" />
|
||||
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700' rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
<link rel="stylesheet" type="text/css" href="/theme/css/icons.css"/>
|
||||
<style>{% include 'pygments.css' %}</style>
|
||||
<style>{% include 'main.css' %}</style>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||
|
||||
{% if ENABLE_MATHJAX %}
|
||||
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
init_mathjax = function() {
|
||||
if (window.MathJax) {
|
||||
// MathJax loaded
|
||||
MathJax.Hub.Config({
|
||||
tex2jax: {
|
||||
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
|
||||
displayMath: [ ['$$','$$'], ["\\[","\\]"] ]
|
||||
},
|
||||
displayAlign: 'left', // Change this to 'center' to center equations.
|
||||
"HTML-CSS": {
|
||||
styles: {'.MathJax_Display': {"margin": 0}}
|
||||
}
|
||||
});
|
||||
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
|
||||
}
|
||||
}
|
||||
init_mathjax();
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% block extra_head %}{%endblock%}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header class="navbar navbar-inverse bs-docs-nav">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#theNavbar">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/" title="Home" class="title">{{ SITENAME }}</a>
|
||||
</div>
|
||||
<nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation" id="theNavbar">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{% if ABOUT_PAGE %}
|
||||
<li><a href="{{ ABOUT_PAGE }}" title="About">About</a></li>
|
||||
{% endif %}
|
||||
{% if PHOTOS_PAGE %}
|
||||
<li><a href="{{ PHOTOS_PAGE }}" title="Photos">Photos</a></li>
|
||||
{% endif %}
|
||||
{% if SHOW_ARCHIVES %}
|
||||
<li><a href="/archives.html" title="Archive">Archive</a></li>
|
||||
{% endif %}
|
||||
{% if SHOW_FEED %}
|
||||
<li><a class="nodec icon-rss" href="{{ FEED_ALL_ATOM }}" title="jakevdp.github.io RSS feed" rel="me"></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div id="wrap">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<!--
|
||||
<footer>
|
||||
<p>
|
||||
© 2012-2017 {{ AUTHOR }}, license <a href="{{ LICENSE_URL}}"> {{LICENSE_NAME }}</a>
|
||||
unless otherwise noted.
|
||||
Generated by <a href= "http://docs.getpelican.com/">Pelican</a>.
|
||||
</p>
|
||||
</footer>
|
||||
-->
|
||||
{% include '_includes/analytics.html' %}
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,53 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Home{% endblock %}
|
||||
{% block headerimg %}{{ DEFAULT_HEADER_BG }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container index">
|
||||
|
||||
{% for article in articles_page.object_list %}
|
||||
<article>
|
||||
<header>
|
||||
<h2><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h2>
|
||||
<time datetime="" title="{{ article.date.isoformat() }}" pubdate>{{ article.locale_date }}</time>
|
||||
</header>
|
||||
|
||||
<div class="article_content">
|
||||
{{ article.summary }}
|
||||
</div>
|
||||
|
||||
<div class="meta">
|
||||
<div>
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" class="read_more">Read more →</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{% for tag in article.tags %}
|
||||
<a href="{{ SITEURL }}/{{ tag.url }}" class="tag">{{ tag }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<div class="separator"></div>
|
||||
{% endfor %}
|
||||
|
||||
<nav class="pagination row">
|
||||
<div class="col-xs-6 left">
|
||||
{% if articles_page.has_next() %}
|
||||
<a class="prev" href="{{ SITEURL }}/{{ articles_next_page.url }}">← Past</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-xs-6 right">
|
||||
{% if articles_page.has_previous() %}
|
||||
<a class="next" href="{{ SITEURL }}/{{ articles_previous_page.url }}">Future →</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
max-width: 700px;
|
||||
}
|
||||
|
||||
.text_cell .prompt {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.cell {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.text_cell_render {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.prompt {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
div.input_prompt {
|
||||
padding: .7em 0.2em;
|
||||
}
|
||||
|
||||
div.output_prompt {
|
||||
padding: .4em .2em;
|
||||
}
|
||||
|
||||
div.input_area {
|
||||
margin: .2em 0.4em;
|
||||
max-width: 580px;
|
||||
}
|
||||
|
||||
table.dataframe {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
table.dataframe th, td {
|
||||
padding: 4px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
pre code {
|
||||
background-color: inherit;
|
||||
}
|
|
@ -0,0 +1,300 @@
|
|||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font: 15px 'Source Sans Pro', sans-serif;
|
||||
line-height: 1.6em;
|
||||
color: #222;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
a {
|
||||
color: #007EE5;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
color: #007EE5;
|
||||
text-decoration: none;
|
||||
}
|
||||
header.main-header {
|
||||
background: none repeat scroll 0% 0% #205F29;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
header.main-header a {
|
||||
color: #fff;
|
||||
}
|
||||
header.main-header .container {
|
||||
max-width: 1000px;
|
||||
}
|
||||
header.main-header .container nav a:hover {
|
||||
background-color: #5C881C;
|
||||
}
|
||||
article {
|
||||
margin: 0;
|
||||
}
|
||||
article header.about {
|
||||
margin-bottom: 0px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
article header {
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
article header h1 {
|
||||
margin-bottom: 2px;
|
||||
font-weight: 700;
|
||||
color: #000;
|
||||
}
|
||||
article header time {
|
||||
color: #9E9E9E;
|
||||
font-size: 0.85em;
|
||||
float: right;
|
||||
}
|
||||
article header time.left {
|
||||
color: #9E9E9E;
|
||||
font-size: 0.85em;
|
||||
float: left;
|
||||
}
|
||||
article div.social-links ul {
|
||||
padding: 0px;
|
||||
}
|
||||
article div.social-links li {
|
||||
display: inline;
|
||||
font-size: 20px;
|
||||
}
|
||||
article div.social-links li a {
|
||||
color: #000;
|
||||
padding: 10px;
|
||||
}
|
||||
article div.social-links li a:hover {
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
}
|
||||
article p {
|
||||
font-size: 16px;
|
||||
margin-bottom: 20px;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
article p.note {
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #ddd;
|
||||
padding: 0.533em 0.733em;
|
||||
}
|
||||
article p.update {
|
||||
background-color: #FEEFB3;
|
||||
border: 1px solid #e6e68a;
|
||||
padding: 0.533em 0.733em;
|
||||
}
|
||||
article p.alert {
|
||||
background-color: #ffe2e2;
|
||||
border: 1px solid #ffb2b2;
|
||||
padding: 0.533em 0.733em;
|
||||
}
|
||||
article ul,
|
||||
article ol {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
article li {
|
||||
font-size: 16px;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
article a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
article blockquote {
|
||||
border-left: 2px solid #c7c7cc;
|
||||
color: #666;
|
||||
margin: 30px 0;
|
||||
padding: 0 0 0 25px;
|
||||
}
|
||||
article img {
|
||||
max-width: 100%;
|
||||
}
|
||||
article code {
|
||||
color: #333;
|
||||
background-color: #EEE;
|
||||
border-radius: 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
article .meta {
|
||||
font-size: 11px;
|
||||
}
|
||||
article .meta a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
article .meta div {
|
||||
margin-bottom: 20px;
|
||||
display: block;
|
||||
}
|
||||
article .meta a.tag {
|
||||
margin: 0 10px 10px 0;
|
||||
padding: 1px 12px;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
article .meta a.tag:hover {
|
||||
background: rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
article .meta a.read_more,
|
||||
article .meta a.comments_btn {
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
padding: 10px 20px;
|
||||
color: #205F29;
|
||||
background: #FFF;
|
||||
border: 1px solid #205F29;
|
||||
}
|
||||
article .meta a.read_more:hover,
|
||||
article .meta a.comments_btn:hover {
|
||||
color: #FFF;
|
||||
background: #5C881C;
|
||||
}
|
||||
.index {
|
||||
max-width: 700px;
|
||||
}
|
||||
.index article header h2 {
|
||||
font-size: 36px;
|
||||
margin-bottom: 2px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.index article header h2 a {
|
||||
color: #000;
|
||||
}
|
||||
.index article header h2 a:hover {
|
||||
color: #007EE5;
|
||||
text-decoration: none;
|
||||
}
|
||||
.index .separator {
|
||||
padding: 40px 0 0 0;
|
||||
margin: 0 0 40px 0;
|
||||
height: 10px;
|
||||
border-bottom: solid 1px #CCC;
|
||||
}
|
||||
.index .pagination {
|
||||
display: block;
|
||||
margin-bottom: 100px;
|
||||
}
|
||||
.index .pagination .left {
|
||||
text-align: right;
|
||||
}
|
||||
.index .pagination .right {
|
||||
text-align: left;
|
||||
}
|
||||
.index .pagination a {
|
||||
display: inline-block;
|
||||
border: 2px solid #5C881C;
|
||||
margin: 0 5px;
|
||||
padding: 8px 20px;
|
||||
font-weight: bold;
|
||||
color: #5C881C;
|
||||
}
|
||||
.index .pagination a:hover {
|
||||
color: #FFF;
|
||||
background: #5C881C;
|
||||
}
|
||||
.post {
|
||||
max-width: 700px;
|
||||
}
|
||||
.post h2:before {
|
||||
content: "# ";
|
||||
font-weight: bold;
|
||||
color: #DDD;
|
||||
}
|
||||
.post h3:before {
|
||||
content: "## ";
|
||||
font-weight: bold;
|
||||
color: #DDD;
|
||||
}
|
||||
.post h4:before {
|
||||
content: "### ";
|
||||
font-weight: bold;
|
||||
color: #DDD;
|
||||
}
|
||||
.post article .meta {
|
||||
margin: 50px 0 100px;
|
||||
}
|
||||
.list {
|
||||
max-width: 700px;
|
||||
}
|
||||
.list ul.double-list {
|
||||
margin: 0 auto 60px;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
.list ul.double-list li {
|
||||
padding: 5px 0;
|
||||
}
|
||||
.list ul.double-list li h2 {
|
||||
font-size: 1em;
|
||||
display: inline;
|
||||
font-weight: normal;
|
||||
}
|
||||
.list ul.double-list li span {
|
||||
font-family: sans-serif;
|
||||
text-transform: uppercase;
|
||||
text-align: right;
|
||||
float: right;
|
||||
padding-top: 3px;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
.full-width-content {
|
||||
padding-top: 10px;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
margin-left: -20px;
|
||||
margin-right: -20px;
|
||||
}
|
||||
.col-xs-1,
|
||||
.col-sm-1,
|
||||
.col-md-1,
|
||||
.col-lg-1,
|
||||
.col-xs-2,
|
||||
.col-sm-2,
|
||||
.col-md-2,
|
||||
.col-lg-2,
|
||||
.col-xs-3,
|
||||
.col-sm-3,
|
||||
.col-md-3,
|
||||
.col-lg-3,
|
||||
.col-xs-4,
|
||||
.col-sm-4,
|
||||
.col-md-4,
|
||||
.col-lg-4,
|
||||
.col-xs-5,
|
||||
.col-sm-5,
|
||||
.col-md-5,
|
||||
.col-lg-5,
|
||||
.col-xs-6,
|
||||
.col-sm-6,
|
||||
.col-md-6,
|
||||
.col-lg-6,
|
||||
.col-xs-7,
|
||||
.col-sm-7,
|
||||
.col-md-7,
|
||||
.col-lg-7,
|
||||
.col-xs-8,
|
||||
.col-sm-8,
|
||||
.col-md-8,
|
||||
.col-lg-8,
|
||||
.col-xs-9,
|
||||
.col-sm-9,
|
||||
.col-md-9,
|
||||
.col-lg-9,
|
||||
.col-xs-10,
|
||||
.col-sm-10,
|
||||
.col-md-10,
|
||||
.col-lg-10,
|
||||
.col-xs-11,
|
||||
.col-sm-11,
|
||||
.col-md-11,
|
||||
.col-lg-11,
|
||||
.col-xs-12,
|
||||
.col-sm-12,
|
||||
.col-md-12,
|
||||
.col-lg-12 {
|
||||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
}
|
|
@ -0,0 +1,316 @@
|
|||
// out: ./main.css, compress: true
|
||||
|
||||
@text-color: #222;
|
||||
@link-color: #007EE5;
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font: 15px 'Source Sans Pro', sans-serif;
|
||||
line-height: 1.6em;
|
||||
color: @text-color;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
a {
|
||||
color: @link-color;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: @link-color;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
header.main-header {
|
||||
background: none repeat scroll 0% 0% #205F29;
|
||||
margin-bottom: 0px;
|
||||
|
||||
a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1000px;
|
||||
|
||||
nav {
|
||||
a:hover {
|
||||
background-color: #5C881C;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
article {
|
||||
margin: 0;
|
||||
|
||||
header.about {
|
||||
margin-bottom: 0px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
header {
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 20px;
|
||||
|
||||
h1 {
|
||||
margin-bottom: 2px;
|
||||
font-weight: 700;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
time {
|
||||
color: #9E9E9E;
|
||||
font-size: 0.85em;
|
||||
float: right;
|
||||
}
|
||||
|
||||
time.left {
|
||||
color: #9E9E9E;
|
||||
font-size: 0.85em;
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
div.social-links {
|
||||
ul {
|
||||
padding: 0px;
|
||||
}
|
||||
li {
|
||||
display: inline;
|
||||
font-size: 20px;
|
||||
a {
|
||||
color: #000;
|
||||
padding: 10px;
|
||||
}
|
||||
a:hover {
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 16px;
|
||||
margin-bottom: 20px;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
p.note {
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #ddd;
|
||||
padding: 0.533em 0.733em;
|
||||
}
|
||||
|
||||
p.update {
|
||||
background-color: #FEEFB3;
|
||||
border: 1px solid #e6e68a;
|
||||
padding: 0.533em 0.733em;
|
||||
}
|
||||
|
||||
p.alert {
|
||||
background-color: #ffe2e2;
|
||||
border: 1px solid #ffb2b2;
|
||||
padding: 0.533em 0.733em;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
li {
|
||||
font-size: 16px;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 2px solid #c7c7cc;
|
||||
color: #666;
|
||||
margin: 30px 0;
|
||||
padding: 0 0 0 25px;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
code {
|
||||
color: #333;
|
||||
background-color: #EEE;
|
||||
border-radius: 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.meta {
|
||||
font-size: 11px;
|
||||
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div {
|
||||
margin-bottom: 20px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
a.tag {
|
||||
margin: 0 10px 10px 0;
|
||||
padding: 1px 12px;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
color: rgba(0,0,0,0.8);;
|
||||
background: rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
a.tag:hover {
|
||||
background: rgba(0,0,0,0.15);
|
||||
}
|
||||
|
||||
a.read_more, a.comments_btn {
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
padding: 10px 20px;
|
||||
color: #205F29;
|
||||
background: #FFF;
|
||||
border: 1px solid #205F29;
|
||||
}
|
||||
|
||||
a.read_more:hover, a.comments_btn:hover {
|
||||
color: #FFF;
|
||||
background: #5C881C;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.index {
|
||||
max-width: 700px;
|
||||
|
||||
article {
|
||||
header {
|
||||
h2 {
|
||||
font-size: 36px;
|
||||
margin-bottom: 2px;
|
||||
font-weight: 700;
|
||||
|
||||
a {
|
||||
color: #000;
|
||||
}
|
||||
a:hover {
|
||||
color: @link-color;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.separator {
|
||||
padding: 40px 0 0 0;
|
||||
margin: 0 0 40px 0;
|
||||
height: 10px;
|
||||
border-bottom: solid 1px #CCC;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
display: block;
|
||||
margin-bottom: 100px;
|
||||
|
||||
.left {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.right {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
border: 2px solid #5C881C;
|
||||
margin: 0 5px;
|
||||
padding: 8px 20px;
|
||||
font-weight: bold;
|
||||
color: #5C881C;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #FFF;
|
||||
background: #5C881C;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.post {
|
||||
max-width: 700px;
|
||||
|
||||
h2:before {
|
||||
content: "# ";
|
||||
font-weight: bold;
|
||||
color: #DDD;
|
||||
}
|
||||
|
||||
h3:before {
|
||||
content: "## ";
|
||||
font-weight: bold;
|
||||
color: #DDD;
|
||||
}
|
||||
|
||||
h4:before {
|
||||
content: "### ";
|
||||
font-weight: bold;
|
||||
color: #DDD;
|
||||
}
|
||||
|
||||
article {
|
||||
.meta {
|
||||
margin: 50px 0 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
max-width: 700px;
|
||||
|
||||
ul.double-list {
|
||||
margin: 0 auto 60px;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
|
||||
li {
|
||||
padding: 5px 0;
|
||||
|
||||
h2 {
|
||||
font-size: 1em;
|
||||
display: inline;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
span {
|
||||
font-family: sans-serif;
|
||||
text-transform: uppercase;
|
||||
text-align: right;
|
||||
float: right;
|
||||
padding-top: 3px;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.full-width-content {
|
||||
padding-top: 10px;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
margin-left: -20px;
|
||||
margin-right: -20px;
|
||||
}
|
||||
|
||||
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
|
||||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}{{ page.title }}{% endblock %}
|
||||
{% block headerimg %}{% if page.headerimg %}{{ page.headerimg }}{% else %}{{ DEFAULT_HEADER_BG }}{% endif %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container post">
|
||||
|
||||
<article>
|
||||
<header>
|
||||
<h1>{{ page.title }}</h1>
|
||||
{% if page.date %}
|
||||
<time datetime="page.date.isoformat()" pubdate>{{ page.locale_date }}</time>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<div class="article_content">
|
||||
{{ page.content }}
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -0,0 +1,61 @@
|
|||
.highlight .hll { background-color: #ffffcc }
|
||||
.highlight .c { color: #60a0b0; font-style: italic } /* Comment */
|
||||
.highlight .err { border: 1px solid #FF0000 } /* Error */
|
||||
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
|
||||
.highlight .o { color: #666666 } /* Operator */
|
||||
.highlight .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */
|
||||
.highlight .cp { color: #007020 } /* Comment.Preproc */
|
||||
.highlight .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */
|
||||
.highlight .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */
|
||||
.highlight .gd { color: #A00000 } /* Generic.Deleted */
|
||||
.highlight .ge { font-style: italic } /* Generic.Emph */
|
||||
.highlight .gr { color: #FF0000 } /* Generic.Error */
|
||||
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||
.highlight .gi { color: #00A000 } /* Generic.Inserted */
|
||||
.highlight .go { color: #808080 } /* Generic.Output */
|
||||
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
|
||||
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
||||
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
||||
.highlight .gt { color: #0040D0 } /* Generic.Traceback */
|
||||
.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
|
||||
.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
|
||||
.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
|
||||
.highlight .kp { color: #007020 } /* Keyword.Pseudo */
|
||||
.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
|
||||
.highlight .kt { color: #902000 } /* Keyword.Type */
|
||||
.highlight .m { color: #40a070 } /* Literal.Number */
|
||||
.highlight .s { color: #4070a0 } /* Literal.String */
|
||||
.highlight .na { color: #4070a0 } /* Name.Attribute */
|
||||
.highlight .nb { color: #007020 } /* Name.Builtin */
|
||||
.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
|
||||
.highlight .no { color: #60add5 } /* Name.Constant */
|
||||
.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
|
||||
.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
|
||||
.highlight .ne { color: #007020 } /* Name.Exception */
|
||||
.highlight .nf { color: #06287e } /* Name.Function */
|
||||
.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
|
||||
.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
|
||||
.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
|
||||
.highlight .nv { color: #bb60d5 } /* Name.Variable */
|
||||
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
|
||||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.highlight .mf { color: #40a070 } /* Literal.Number.Float */
|
||||
.highlight .mh { color: #40a070 } /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #40a070 } /* Literal.Number.Integer */
|
||||
.highlight .mo { color: #40a070 } /* Literal.Number.Oct */
|
||||
.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #4070a0 } /* Literal.String.Char */
|
||||
.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
|
||||
.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
|
||||
.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
|
||||
.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
|
||||
.highlight .sx { color: #c65d09 } /* Literal.String.Other */
|
||||
.highlight .sr { color: #235388 } /* Literal.String.Regex */
|
||||
.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
|
||||
.highlight .ss { color: #517918 } /* Literal.String.Symbol */
|
||||
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
|
||||
.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
|
||||
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
|
||||
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
|
||||
.highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */
|
|
@ -0,0 +1,22 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Archives{% endblock %}
|
||||
{% block headerimg %}{{ DEFAUT_HEADER_BG }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container list">
|
||||
<article>
|
||||
<h1 style="margin-bottom: 30px;">Tag: {{ tag }}</h1>
|
||||
|
||||
<ul class="double-list">
|
||||
{% for article in articles %}
|
||||
<li>
|
||||
<a href='/{{ article.url }}'>
|
||||
<h2>{{ article.title }}</h2>
|
||||
<span>{{ article.date.strftime('%d.%m.%Y') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</article>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue