feat: replace hand-written CSS with Sass compilation and update site design with new fonts and layout

- Delete doc/site/style.css and add doc/site/style.scss with Sass variables, Dosis header font, box-sizing, absolute header positioning, and link hover effects
- Update template.html to reference Dosis font, lowercase nav headings, and change tagline to "a classy little scripting language"
- Add .sass-cache/ to .gitignore and rename Makefile phony target from docs to builtin
- Modify generate_docs.py to compile style.scss via sass subprocess instead of copying static CSS
- Tweak performance.markdown and qa.markdown for minor wording improvements
This commit is contained in:
Bob Nystrom
2014-04-05 22:39:02 +00:00
parent e3e9178f3a
commit e8d31eddaf
8 changed files with 228 additions and 213 deletions
+17 -9
View File
@@ -4,6 +4,7 @@ import glob
import markdown
import os
import shutil
import subprocess
import sys
import time
from datetime import datetime
@@ -78,19 +79,26 @@ def format_file(path, skip_up_to_date):
print "converted", basename
def check_sass():
source_mod = os.path.getmtime('doc/site/style.scss')
dest_mod = 0
if os.path.exists('build/docs/style.css'):
dest_mod = os.path.getmtime('build/docs/style.css')
if source_mod < dest_mod:
return
subprocess.call(['sass', 'doc/site/style.scss', 'build/docs/style.css'])
print "built css"
def format_files(skip_up_to_date):
check_sass()
for f in glob.iglob("doc/site/*.markdown"):
format_file(f, skip_up_to_date)
# Copy the CSS file.
css_in = "doc/site/style.css"
css_out = "build/docs/style.css"
if skip_up_to_date and is_up_to_date(css_in, css_out):
pass
else:
shutil.copyfile(css_in, css_out)
print "copied css"
# Clean the output directory.
if not os.path.exists("build"):