Skip to content

Commit

Permalink
Merge pull request #4 from staffanm/feature/responsive-theme
Browse files Browse the repository at this point in the history
Feature/responsive theme
  • Loading branch information
staffanm committed Nov 11, 2013
2 parents 10380bf + 4482695 commit 7cad7ca
Show file tree
Hide file tree
Showing 27 changed files with 8,837 additions and 4,882 deletions.
14 changes: 11 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Copyright and license
Most of the code written by Staffan Malmgren, licensed under the main
2-clause BSD license.

Some bundled code is written by other authors, included in accordance
with their respective licenses:
Some bundled code and other creative works are written by other
authors, included in accordance with their respective licenses:

* cssmin by Zachary Voase (https://pypi.python.org/pypi/cssmin/), BSD
* rdflib-sqlite by Graham Higgins
Expand All @@ -55,4 +55,12 @@ with their respective licenses:
(http://code.google.com/p/oort/wiki/Grit), BSD
* httpheader by Deron Meranda
(http://deron.meranda.us/python/httpheader/), LGPL

* normalize.css (git.io/normalize), MIT
* responsive template (verekia.com/initializr/responsive-template), PD
* jquery (http://jquery.com), MIT
* modernizr (http://modernizr.com), MIT
* respond.js (http://github.com/scottjehl/Respond), MIT/GPL
* Gentleface wireframe toolbar icons
(http://gentleface.com/free_icon_set.html), CC-BY-NC


7 changes: 4 additions & 3 deletions doc/examples/firststeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,12 @@ data/rsrc
data/rsrc/css
data/rsrc/css/ferenda.css
data/rsrc/css/main.css
data/rsrc/css/normalize.css
data/rsrc/css/normalize-1.1.3.css
data/rsrc/js
data/rsrc/js/ferenda.js
data/rsrc/js/jquery-1.9.0.js
data/rsrc/js/modernizr-2.6.2-respond-1.1.0.min.js
data/rsrc/js/jquery-1.10.2.js
data/rsrc/js/modernizr-2.6.3.js
data/rsrc/js/respond-1.3.0.js
data/rsrc/resources.xml
# end makeresources

Expand Down
7 changes: 4 additions & 3 deletions ferenda/documentrepository.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,12 @@ def get_default_options(self):
'republishsource': False,
'combineresources': False,
'cssfiles': ['http://fonts.googleapis.com/css?family=Raleway:200,100',
'res/css/normalize.css',
'res/css/normalize-1.1.3.css',
'res/css/main.css',
'res/css/ferenda.css'],
'jsfiles': ['res/js/jquery-1.9.0.js',
'res/js/modernizr-2.6.2-respond-1.1.0.min.js',
'jsfiles': ['res/js/jquery-1.10.2.js',
'res/js/modernizr-2.6.3.js',
'res/js/respond-1.3.0.js',
'res/js/ferenda.js'],
'staticsite': False,
'class': self.qualified_class_name()
Expand Down
17 changes: 16 additions & 1 deletion ferenda/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ def makeresources(repos,
tabs = ET.SubElement(
ET.SubElement(ET.SubElement(root, "tabs"), "nav"), "ul")

l = ET.Element("a", **{'href': "#menu",
'class': "navbutton"})
ET.SubElement(l, "img", src="rsrc/img/navmenu.png")
root.find("tabs/nav").insert(0, l)

sitetabs = []
for inst in repos:
if hasattr(inst, 'tabs'):
Expand Down Expand Up @@ -219,10 +224,20 @@ def makeresources(repos,
link.text = text
link.attrib['href'] = href

tocbutton = ET.SubElement(
ET.SubElement(ET.SubElement(root, "tocbutton"),
"a", {'href':'#menu',
'class': 'tocbutton'}),
"img", {'src':'rsrc/img/navmenu-small-black.png'})

if not staticsite:
search = ET.SubElement(
ET.SubElement(ET.SubElement(root, "search"), "form", action="/search/"), "input", type="search", name="q")

l = ET.Element("a", **{'href': "#search",
'class': "searchbutton"})
ET.SubElement(l, "img", src="rsrc/img/search.png")
root.find("search/form").append(l)

stylesheets = ET.SubElement(root, "stylesheets")
log.debug("Adding %s stylesheets to resources.xml" % len(res['css']))
for f in res['css']:
Expand Down
Loading

0 comments on commit 7cad7ca

Please sign in to comment.