diff --git a/CHANGES.txt b/CHANGES.txt new file mode 100644 index 0000000..35a34f3 --- /dev/null +++ b/CHANGES.txt @@ -0,0 +1,4 @@ +0.0 +--- + +- Initial version diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..285aabb --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include *.txt *.ini *.cfg *.rst +recursive-include wals3 *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..ba1c596 --- /dev/null +++ b/README.txt @@ -0,0 +1,14 @@ +wals3 README +================== + +Getting Started +--------------- + +- cd + +- $venv/bin/python setup.py develop + +- $venv/bin/initialize_wals3_db development.ini + +- $venv/bin/pserve development.ini + diff --git a/development.ini b/development.ini new file mode 100644 index 0000000..318fcd0 --- /dev/null +++ b/development.ini @@ -0,0 +1,72 @@ +### +# app configuration +# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html +### + +[app:main] +use = egg:wals3 + +pyramid.reload_templates = true +pyramid.debug_authorization = false +pyramid.debug_notfound = false +pyramid.debug_routematch = false +pyramid.default_locale_name = en +pyramid.includes = +# pyramid_debugtoolbar + pyramid_tm + +#sqlalchemy.url = sqlite:///%(here)s/wals3.sqlite +sqlalchemy.url = postgresql://robert@/wals3 + +# By default, the toolbar only appears for clients from IP addresses +# '127.0.0.1' and '::1'. +# debugtoolbar.hosts = 127.0.0.1 ::1 + +### +# wsgi server configuration +### + +[server:main] +use = egg:waitress#main +host = 0.0.0.0 +port = 6543 + +### +# logging configuration +# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html +### + +[loggers] +keys = root, wals3, sqlalchemy + +[handlers] +keys = console + +[formatters] +keys = generic + +[logger_root] +level = INFO +handlers = console + +[logger_wals3] +level = DEBUG +handlers = +qualname = wals3 + +[logger_sqlalchemy] +level = WARN +handlers = +qualname = sqlalchemy.engine +# "level = INFO" logs SQL queries. +# "level = DEBUG" logs SQL queries and results. +# "level = WARN" logs neither. (Recommended for production systems.) + +[handler_console] +class = StreamHandler +args = (sys.stderr,) +level = NOTSET +formatter = generic + +[formatter_generic] +format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..0f3e6d8 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,27 @@ +[nosetests] +match=^test +nocapture=1 +cover-package=wals3 +with-coverage=1 +cover-erase=1 + +[compile_catalog] +directory = wals3/locale +domain = clld +statistics = true + +[extract_messages] +add_comments = TRANSLATORS: +output_file = wals3/locale/wals3.pot +width = 80 + +[init_catalog] +domain = clld +input_file = wals3/locale/wals3.pot +output_dir = wals3/locale + +[update_catalog] +domain = clld +input_file = wals3/locale/wals3.pot +output_dir = wals3/locale +previous = true diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..218618f --- /dev/null +++ b/setup.py @@ -0,0 +1,45 @@ +import os + +from setuptools import setup, find_packages + +here = os.path.abspath(os.path.dirname(__file__)) +README = open(os.path.join(here, 'README.txt')).read() +CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() + +requires = [ + 'pyramid', + 'SQLAlchemy', + 'transaction', + 'pyramid_tm', + 'pyramid_debugtoolbar', + 'zope.sqlalchemy', + 'waitress', + ] + +setup(name='wals3', + version='0.0', + description='wals3', + long_description=README + '\n\n' + CHANGES, + classifiers=[ + "Programming Language :: Python", + "Framework :: Pyramid", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", + ], + author='', + author_email='', + url='', + keywords='web wsgi bfg pylons pyramid', + packages=find_packages(), + include_package_data=True, + zip_safe=False, + test_suite='wals3', + install_requires=requires, + entry_points="""\ + [paste.app_factory] + main = wals3:main + [console_scripts] + initialize_wals3_db = wals3.scripts.initializedb:main + """, + ) + diff --git a/wals3/__init__.py b/wals3/__init__.py new file mode 100644 index 0000000..4c9a146 --- /dev/null +++ b/wals3/__init__.py @@ -0,0 +1,77 @@ +from pyramid.config import Configurator +from sqlalchemy import engine_from_config, desc +from sqlalchemy.orm import joinedload +from mako.template import Template +from markupsafe import Markup + +from clld import interfaces +from clld.web import datatables +from clld.web.datatables.base import Col +from clld.web.adapters import GeoJson + +from wals3.models import WalsLanguage, Genus, Family +from wals3.adapters import GeoJsonFeature +from wals3.maps import FeatureMap + + +def _(s, *args, **kw): + return s + +_('Languages') + + +class GenusCol(Col): + def order(self, direction): + return desc(Genus.name) if direction == 'desc' else Genus.name + + def search(self, qs): + return Genus.name.contains(qs) + + def format(self, item): + return item.genus.name + + +class Languages(datatables.Languages): + def base_query(self, query): + return query.join(Genus).join(Family).options(joinedload(WalsLanguage.genus)) + + def col_defs(self): + cols = datatables.Languages.col_defs(self) + return cols[:2] + [GenusCol(self, 'genus')] + cols[2:] + + +def main(global_config, **settings): + """ This function returns a Pyramid WSGI application. + """ + settings['mako.directories'] = ['wals3:templates', 'clld:web/templates'] + settings['clld.app_template'] = "wals3.mako" + + config = Configurator(settings=settings) + + # + # must add project specific translation dir first + # + config.add_translation_dirs('wals3:locale') + + # + # then include clld, thereby adding the default translations + # + config.include('clld.web.app') + + config.register_datatable('languages', Languages) + config.register_map('parameter', FeatureMap) + + config.override_asset( + to_override='clld:web/templates/language/rdf.pt', + override_with='wals3:templates/language/rdf.pt') + + config.register_adapter( + GeoJsonFeature, + interfaces.IParameter, + interfaces.IRepresentation, + GeoJson.mimetype) + + config.add_static_view('static', 'static', cache_max_age=3600) + config.add_route('home', '/') + config.scan() + return config.make_wsgi_app() diff --git a/wals3/adapters.py b/wals3/adapters.py new file mode 100644 index 0000000..376a8bf --- /dev/null +++ b/wals3/adapters.py @@ -0,0 +1,15 @@ +from clld.web.adapters import GeoJsonParameter + + +class GeoJsonFeature(GeoJsonParameter): + + def feature_properties(self, ctx, req, feature): + language, values = feature + val = list(values)[0] + if val.domainelement.id == req.params.get('domainelement'): + res = GeoJsonParameter.feature_properties(self, ctx, req, feature) + res['icon_type'] = val.domainelement.icon_id[:1] + res['icon_color'] = '#%s' % ''.join(2*c for c in val.domainelement.icon_id[1:]) + res['value_numeric'] = val.domainelement.numeric + res['value_name'] = val.domainelement.name + return res diff --git a/wals3/locale/en/LC_MESSAGES/wotw.po b/wals3/locale/en/LC_MESSAGES/wotw.po new file mode 100644 index 0000000..e244c6c --- /dev/null +++ b/wals3/locale/en/LC_MESSAGES/wotw.po @@ -0,0 +1,23 @@ +# English translations for PROJECT. +# Copyright (C) 2012 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2012-11-11 17:31+0100\n" +"PO-Revision-Date: 2012-11-11 17:30+0100\n" +"Last-Translator: FULL NAME \n" +"Language-Team: en \n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 1.0dev\n" + +#: wals3/__init__.py:13 +msgid "Languages" +msgstr "WALS Languages" + diff --git a/wals3/locale/wals3.pot b/wals3/locale/wals3.pot new file mode 100644 index 0000000..4214171 --- /dev/null +++ b/wals3/locale/wals3.pot @@ -0,0 +1,23 @@ +# Translations template for wals3. +# Copyright (C) 2012 ORGANIZATION +# This file is distributed under the same license as the wals3 project. +# FIRST AUTHOR , 2012. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: wals3 0.0\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2012-11-11 17:31+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 1.0dev\n" + +#: wals3/__init__.py:13 +msgid "Languages" +msgstr "" + diff --git a/wals3/maps.py b/wals3/maps.py new file mode 100644 index 0000000..613deb8 --- /dev/null +++ b/wals3/maps.py @@ -0,0 +1,14 @@ +from clld.web.maps import ParameterMap, Map +from clld.web.util.htmllib import HTML + + +class FeatureMap(ParameterMap): + def get_layers(self): + res = [] + for layer, de in zip(ParameterMap.get_layers(self), self.ctx.domain): + layer['marker'] = HTML.img(src=self.req.static_url('wals3:static/icons/' + de.icon_id + '.png')) + res.append(layer) + return res + + def options(self): + return {'style_map': 'wals_feature'} diff --git a/wals3/models.py b/wals3/models.py new file mode 100644 index 0000000..5f57b83 --- /dev/null +++ b/wals3/models.py @@ -0,0 +1,91 @@ +from zope.interface import implementer +from sqlalchemy import ( + Column, + String, + Unicode, + Integer, + Boolean, + ForeignKey, + UniqueConstraint, +) +from sqlalchemy.orm import relationship, backref +from sqlalchemy.ext.declarative import declared_attr +from sqlalchemy.ext.hybrid import hybrid_property + +from clld import interfaces +from clld.db.meta import Base, CustomModelMixin +from clld.db.models.common import ( + Language, + Parameter, + DomainElement, + Contribution, + IdNameDescriptionMixin, +) + + +class Family(Base, IdNameDescriptionMixin): + pass + + +class Genus(Base, IdNameDescriptionMixin): + family_pk = Column(Integer, ForeignKey('family.pk')) + subfamily = Column(Unicode) + family = relationship(Family) + + +class Area(Base, IdNameDescriptionMixin): + dbpedia_url = Column(String) + + +#----------------------------------------------------------------------------- +# specialized common mapper classes +#----------------------------------------------------------------------------- +@implementer(interfaces.ILanguage) +class WalsLanguage(Language, CustomModelMixin): + pk = Column(Integer, ForeignKey('language.pk'), primary_key=True) + + ascii_name = Column(String) + genus_pk = Column(Integer, ForeignKey('genus.pk')) + samples_100 = Column(Boolean, default=False) + samples_200 = Column(Boolean, default=False) + + genus = relationship(Genus) + + +@implementer(interfaces.IContribution) +class Chapter(Contribution, CustomModelMixin): + """Contributions in WALS are chapters chapters. These comprise a set of features with + corresponding values and a descriptive text. + """ + pk = Column(Integer, ForeignKey('contribution.pk'), primary_key=True) + #id = Column(Integer, unique=True) + blog_title = Column(Unicode) + area_pk = Column(Integer, ForeignKey('area.pk')) + area = relationship(Area) + + +@implementer(interfaces.IParameter) +class Feature(Parameter, CustomModelMixin): + """Parameters in WALS are called feature. They are always related to one chapter. + """ + __table_args__ = (UniqueConstraint('contribution_pk', 'ordinal_qualifier'),) + + pk = Column(Integer, ForeignKey('parameter.pk'), primary_key=True) + contribution_pk = Column(Integer, ForeignKey('contribution.pk')) + id = Column(String(5), unique=True) + blog_title = Column(String(50), unique=True) + chapter = relationship(Chapter) + ordinal_qualifier = Column(String) + + @property + def sortkey(self): + return self.contribution_pk, self.ordinal_qualifier + + +@implementer(interfaces.IDomainElement) +class WalsValue(DomainElement, CustomModelMixin): + """All features in WALS have fixed lists of admissible values. + """ + pk = Column(Integer, ForeignKey('domainelement.pk'), primary_key=True) + icon_id = Column(String(4)) + numeric = Column(Integer) diff --git a/wals3/scripts/__init__.py b/wals3/scripts/__init__.py new file mode 100644 index 0000000..5bb534f --- /dev/null +++ b/wals3/scripts/__init__.py @@ -0,0 +1 @@ +# package diff --git a/wals3/scripts/initializedb.py b/wals3/scripts/initializedb.py new file mode 100644 index 0000000..e3898ff --- /dev/null +++ b/wals3/scripts/initializedb.py @@ -0,0 +1,120 @@ +from __future__ import unicode_literals +import os +import sys +import transaction +from collections import defaultdict + +from sqlalchemy import engine_from_config, create_engine + +from pyramid.paster import ( + get_appsettings, + setup_logging, + ) + +from clld.db.meta import ( + DBSession, + VersionedDBSession, + Base, +) +from clld.db.models import common + +from wals3 import models + + +DB = 'sqlite:////home/robert/old_projects/legacy/wals_pylons/trunk/wals2/db.sqlite' + + +def usage(argv): + cmd = os.path.basename(argv[0]) + print('usage: %s \n' + '(example: "%s development.ini")' % (cmd, cmd)) + sys.exit(1) + + +def main(argv=sys.argv): + if len(argv) != 2: + usage(argv) + + old_db = create_engine(DB) + + config_uri = argv[1] + setup_logging(config_uri) + settings = get_appsettings(config_uri) + engine = engine_from_config(settings, 'sqlalchemy.') + DBSession.configure(bind=engine) + Base.metadata.create_all(engine) + VersionedDBSession.configure(bind=engine) + + data = defaultdict(dict) + + def add(model, type, key, **kw): + new = model(**kw) + data[type][key] = new + VersionedDBSession.add(new) + return new + + with transaction.manager: + for row in old_db.execute("select * from family"): + add(models.Family, 'family', row['id'], id=row['id'], name=row['name'], description=row['comment']) + + for row in old_db.execute("select * from genus"): + genus = add(models.Genus, 'genus', row['id'], name=row['name']) + genus.family = data['family'][row['family_id']] + + for row in old_db.execute("select * from language"): + kw = dict((key, row[key]) for key in ['id', 'name', 'latitude', 'longitude']) + lang = add(models.WalsLanguage, 'language', row['id'], + samples_100=row['samples_100'] != 0, samples_200=row['samples_200'] != 0, **kw) + lang.genus = data['genus'][row['genus_id']] + + for row in old_db.execute("select * from author"): + add(common.Contributor, 'contributor', row['id'], name=row['name'], url=row['www'], id=row['id'], description=row['note']) + VersionedDBSession.flush() + + for row in old_db.execute("select * from chapter"): + add(models.Chapter, 'contribution', row['id'], id=row['id'], name=row['name']) + VersionedDBSession.flush() + + for row in old_db.execute("select * from feature"): + param = add(models.Feature, 'parameter', row['id'], id=row['id'], name=row['name'], ordinal_qualifier=row['id'][-1]) + param.chapter = data['contribution'][row['chapter_id']] + VersionedDBSession.flush() + + for row in old_db.execute("select * from value"): + desc = row['description'] + if desc == 'SOV & NegV/VNeg': + if row['icon_id'] != 's9ff': + desc += ' (a)' + else: + desc += ' (b)' + + domainelement = add( + models.WalsValue, 'domainelement', (row['feature_id'], row['numeric']), + id='%s-%s' % (row['feature_id'], row['numeric']), + name=desc, description=row['long_description'], icon_id=row['icon_id'], numeric=row['numeric']) + domainelement.parameter = data['parameter'][row['feature_id']] + VersionedDBSession.flush() + + for row in old_db.execute("select * from datapoint"): + value = add(common.Value, 'value', row['id'], id=row['id']) + value.language = data['language'][row['language_id']] + value.domainelement = data['domainelement'][(row['feature_id'], row['value_numeric'])] + value.parameter = data['parameter'][row['feature_id']] + value.contribution = data['parameter'][row['feature_id']].chapter + + VersionedDBSession.flush() + + for row in old_db.execute("select * from author_chapter"): + + new = common.ContributionContributor( + ord=row['order'], + primary=row['primary'] != 0, + contributor_pk=data['contributor'][row['author_id']].pk, + contribution_pk=data['contribution'][row['chapter_id']].pk) + VersionedDBSession.add(new) + + lang.name = 'SPECIAL--' + lang.name + + +if __name__ == '__main__': + main() diff --git a/wals3/static/header.gif b/wals3/static/header.gif new file mode 100644 index 0000000..4130f1b Binary files /dev/null and b/wals3/static/header.gif differ diff --git a/wals3/static/icons/a000.png b/wals3/static/icons/a000.png new file mode 100644 index 0000000..28aafd2 Binary files /dev/null and b/wals3/static/icons/a000.png differ diff --git a/wals3/static/icons/c000.png b/wals3/static/icons/c000.png new file mode 100644 index 0000000..e68ea32 Binary files /dev/null and b/wals3/static/icons/c000.png differ diff --git a/wals3/static/icons/c00d.png b/wals3/static/icons/c00d.png new file mode 100644 index 0000000..c623317 Binary files /dev/null and b/wals3/static/icons/c00d.png differ diff --git a/wals3/static/icons/c090.png b/wals3/static/icons/c090.png new file mode 100644 index 0000000..3e420d8 Binary files /dev/null and b/wals3/static/icons/c090.png differ diff --git a/wals3/static/icons/c6f3.png b/wals3/static/icons/c6f3.png new file mode 100644 index 0000000..4ec8365 Binary files /dev/null and b/wals3/static/icons/c6f3.png differ diff --git a/wals3/static/icons/c909.png b/wals3/static/icons/c909.png new file mode 100644 index 0000000..896b458 Binary files /dev/null and b/wals3/static/icons/c909.png differ diff --git a/wals3/static/icons/c99f.png b/wals3/static/icons/c99f.png new file mode 100644 index 0000000..2d8b164 Binary files /dev/null and b/wals3/static/icons/c99f.png differ diff --git a/wals3/static/icons/c9ff.png b/wals3/static/icons/c9ff.png new file mode 100644 index 0000000..3352160 Binary files /dev/null and b/wals3/static/icons/c9ff.png differ diff --git a/wals3/static/icons/ca00.png b/wals3/static/icons/ca00.png new file mode 100644 index 0000000..7d97cfd Binary files /dev/null and b/wals3/static/icons/ca00.png differ diff --git a/wals3/static/icons/cccc.png b/wals3/static/icons/cccc.png new file mode 100644 index 0000000..314711a Binary files /dev/null and b/wals3/static/icons/cccc.png differ diff --git a/wals3/static/icons/cd00.png b/wals3/static/icons/cd00.png new file mode 100644 index 0000000..92029d9 Binary files /dev/null and b/wals3/static/icons/cd00.png differ diff --git a/wals3/static/icons/cf40.png b/wals3/static/icons/cf40.png new file mode 100644 index 0000000..c14df51 Binary files /dev/null and b/wals3/static/icons/cf40.png differ diff --git a/wals3/static/icons/cf60.png b/wals3/static/icons/cf60.png new file mode 100644 index 0000000..746d5e9 Binary files /dev/null and b/wals3/static/icons/cf60.png differ diff --git a/wals3/static/icons/cf6f.png b/wals3/static/icons/cf6f.png new file mode 100644 index 0000000..726c50d Binary files /dev/null and b/wals3/static/icons/cf6f.png differ diff --git a/wals3/static/icons/cfc0.png b/wals3/static/icons/cfc0.png new file mode 100644 index 0000000..977ffef Binary files /dev/null and b/wals3/static/icons/cfc0.png differ diff --git a/wals3/static/icons/cff0.png b/wals3/static/icons/cff0.png new file mode 100644 index 0000000..d792b0f Binary files /dev/null and b/wals3/static/icons/cff0.png differ diff --git a/wals3/static/icons/cffc.png b/wals3/static/icons/cffc.png new file mode 100644 index 0000000..d67589c Binary files /dev/null and b/wals3/static/icons/cffc.png differ diff --git a/wals3/static/icons/cfff.png b/wals3/static/icons/cfff.png new file mode 100644 index 0000000..9342d64 Binary files /dev/null and b/wals3/static/icons/cfff.png differ diff --git a/wals3/static/icons/d000.png b/wals3/static/icons/d000.png new file mode 100644 index 0000000..b7f2d4e Binary files /dev/null and b/wals3/static/icons/d000.png differ diff --git a/wals3/static/icons/d00d.png b/wals3/static/icons/d00d.png new file mode 100644 index 0000000..83266b4 Binary files /dev/null and b/wals3/static/icons/d00d.png differ diff --git a/wals3/static/icons/d090.png b/wals3/static/icons/d090.png new file mode 100644 index 0000000..b87bd5e Binary files /dev/null and b/wals3/static/icons/d090.png differ diff --git a/wals3/static/icons/d6f3.png b/wals3/static/icons/d6f3.png new file mode 100644 index 0000000..5cacd53 Binary files /dev/null and b/wals3/static/icons/d6f3.png differ diff --git a/wals3/static/icons/d909.png b/wals3/static/icons/d909.png new file mode 100644 index 0000000..a2d38f9 Binary files /dev/null and b/wals3/static/icons/d909.png differ diff --git a/wals3/static/icons/d99f.png b/wals3/static/icons/d99f.png new file mode 100644 index 0000000..8f258ae Binary files /dev/null and b/wals3/static/icons/d99f.png differ diff --git a/wals3/static/icons/d9ff.png b/wals3/static/icons/d9ff.png new file mode 100644 index 0000000..244c671 Binary files /dev/null and b/wals3/static/icons/d9ff.png differ diff --git a/wals3/static/icons/da00.png b/wals3/static/icons/da00.png new file mode 100644 index 0000000..12691fe Binary files /dev/null and b/wals3/static/icons/da00.png differ diff --git a/wals3/static/icons/dccc.png b/wals3/static/icons/dccc.png new file mode 100644 index 0000000..b28c650 Binary files /dev/null and b/wals3/static/icons/dccc.png differ diff --git a/wals3/static/icons/dd00.png b/wals3/static/icons/dd00.png new file mode 100644 index 0000000..8ae8b1e Binary files /dev/null and b/wals3/static/icons/dd00.png differ diff --git a/wals3/static/icons/df40.png b/wals3/static/icons/df40.png new file mode 100644 index 0000000..cd7b11e Binary files /dev/null and b/wals3/static/icons/df40.png differ diff --git a/wals3/static/icons/df60.png b/wals3/static/icons/df60.png new file mode 100644 index 0000000..29ad238 Binary files /dev/null and b/wals3/static/icons/df60.png differ diff --git a/wals3/static/icons/df6f.png b/wals3/static/icons/df6f.png new file mode 100644 index 0000000..893f384 Binary files /dev/null and b/wals3/static/icons/df6f.png differ diff --git a/wals3/static/icons/dfc0.png b/wals3/static/icons/dfc0.png new file mode 100644 index 0000000..31fec30 Binary files /dev/null and b/wals3/static/icons/dfc0.png differ diff --git a/wals3/static/icons/dff0.png b/wals3/static/icons/dff0.png new file mode 100644 index 0000000..15b942f Binary files /dev/null and b/wals3/static/icons/dff0.png differ diff --git a/wals3/static/icons/dffc.png b/wals3/static/icons/dffc.png new file mode 100644 index 0000000..676d6a7 Binary files /dev/null and b/wals3/static/icons/dffc.png differ diff --git a/wals3/static/icons/dfff.png b/wals3/static/icons/dfff.png new file mode 100644 index 0000000..98687c5 Binary files /dev/null and b/wals3/static/icons/dfff.png differ diff --git a/wals3/static/icons/f000.png b/wals3/static/icons/f000.png new file mode 100644 index 0000000..1c595c9 Binary files /dev/null and b/wals3/static/icons/f000.png differ diff --git a/wals3/static/icons/f00d.png b/wals3/static/icons/f00d.png new file mode 100644 index 0000000..692c301 Binary files /dev/null and b/wals3/static/icons/f00d.png differ diff --git a/wals3/static/icons/f090.png b/wals3/static/icons/f090.png new file mode 100644 index 0000000..b1bc07a Binary files /dev/null and b/wals3/static/icons/f090.png differ diff --git a/wals3/static/icons/f6f3.png b/wals3/static/icons/f6f3.png new file mode 100644 index 0000000..deea8b5 Binary files /dev/null and b/wals3/static/icons/f6f3.png differ diff --git a/wals3/static/icons/f909.png b/wals3/static/icons/f909.png new file mode 100644 index 0000000..405e5d5 Binary files /dev/null and b/wals3/static/icons/f909.png differ diff --git a/wals3/static/icons/f99f.png b/wals3/static/icons/f99f.png new file mode 100644 index 0000000..ba67d0f Binary files /dev/null and b/wals3/static/icons/f99f.png differ diff --git a/wals3/static/icons/f9ff.png b/wals3/static/icons/f9ff.png new file mode 100644 index 0000000..c8d4201 Binary files /dev/null and b/wals3/static/icons/f9ff.png differ diff --git a/wals3/static/icons/fa00.png b/wals3/static/icons/fa00.png new file mode 100644 index 0000000..c793e63 Binary files /dev/null and b/wals3/static/icons/fa00.png differ diff --git a/wals3/static/icons/fccc.png b/wals3/static/icons/fccc.png new file mode 100644 index 0000000..bda0280 Binary files /dev/null and b/wals3/static/icons/fccc.png differ diff --git a/wals3/static/icons/fd00.png b/wals3/static/icons/fd00.png new file mode 100644 index 0000000..28280b0 Binary files /dev/null and b/wals3/static/icons/fd00.png differ diff --git a/wals3/static/icons/ff40.png b/wals3/static/icons/ff40.png new file mode 100644 index 0000000..5786efb Binary files /dev/null and b/wals3/static/icons/ff40.png differ diff --git a/wals3/static/icons/ff60.png b/wals3/static/icons/ff60.png new file mode 100644 index 0000000..dd2c5b6 Binary files /dev/null and b/wals3/static/icons/ff60.png differ diff --git a/wals3/static/icons/ff6f.png b/wals3/static/icons/ff6f.png new file mode 100644 index 0000000..793ee44 Binary files /dev/null and b/wals3/static/icons/ff6f.png differ diff --git a/wals3/static/icons/ffc0.png b/wals3/static/icons/ffc0.png new file mode 100644 index 0000000..7c0a3e1 Binary files /dev/null and b/wals3/static/icons/ffc0.png differ diff --git a/wals3/static/icons/fff0.png b/wals3/static/icons/fff0.png new file mode 100644 index 0000000..e4fb4e3 Binary files /dev/null and b/wals3/static/icons/fff0.png differ diff --git a/wals3/static/icons/fffc.png b/wals3/static/icons/fffc.png new file mode 100644 index 0000000..4196402 Binary files /dev/null and b/wals3/static/icons/fffc.png differ diff --git a/wals3/static/icons/ffff.png b/wals3/static/icons/ffff.png new file mode 100644 index 0000000..7b82f8d Binary files /dev/null and b/wals3/static/icons/ffff.png differ diff --git a/wals3/static/icons/s000.png b/wals3/static/icons/s000.png new file mode 100644 index 0000000..6e06c02 Binary files /dev/null and b/wals3/static/icons/s000.png differ diff --git a/wals3/static/icons/s00d.png b/wals3/static/icons/s00d.png new file mode 100644 index 0000000..70a6f70 Binary files /dev/null and b/wals3/static/icons/s00d.png differ diff --git a/wals3/static/icons/s090.png b/wals3/static/icons/s090.png new file mode 100644 index 0000000..a1caa6c Binary files /dev/null and b/wals3/static/icons/s090.png differ diff --git a/wals3/static/icons/s6f3.png b/wals3/static/icons/s6f3.png new file mode 100644 index 0000000..5cfe8f3 Binary files /dev/null and b/wals3/static/icons/s6f3.png differ diff --git a/wals3/static/icons/s909.png b/wals3/static/icons/s909.png new file mode 100644 index 0000000..53c06b5 Binary files /dev/null and b/wals3/static/icons/s909.png differ diff --git a/wals3/static/icons/s99f.png b/wals3/static/icons/s99f.png new file mode 100644 index 0000000..34e80db Binary files /dev/null and b/wals3/static/icons/s99f.png differ diff --git a/wals3/static/icons/s9ff.png b/wals3/static/icons/s9ff.png new file mode 100644 index 0000000..891f5d5 Binary files /dev/null and b/wals3/static/icons/s9ff.png differ diff --git a/wals3/static/icons/sa00.png b/wals3/static/icons/sa00.png new file mode 100644 index 0000000..1dc7eb9 Binary files /dev/null and b/wals3/static/icons/sa00.png differ diff --git a/wals3/static/icons/sccc.png b/wals3/static/icons/sccc.png new file mode 100644 index 0000000..82873aa Binary files /dev/null and b/wals3/static/icons/sccc.png differ diff --git a/wals3/static/icons/sd00.png b/wals3/static/icons/sd00.png new file mode 100644 index 0000000..e1fb0c7 Binary files /dev/null and b/wals3/static/icons/sd00.png differ diff --git a/wals3/static/icons/sf40.png b/wals3/static/icons/sf40.png new file mode 100644 index 0000000..1ebc0dd Binary files /dev/null and b/wals3/static/icons/sf40.png differ diff --git a/wals3/static/icons/sf60.png b/wals3/static/icons/sf60.png new file mode 100644 index 0000000..bce2d6b Binary files /dev/null and b/wals3/static/icons/sf60.png differ diff --git a/wals3/static/icons/sf6f.png b/wals3/static/icons/sf6f.png new file mode 100644 index 0000000..e9e25f9 Binary files /dev/null and b/wals3/static/icons/sf6f.png differ diff --git a/wals3/static/icons/sfc0.png b/wals3/static/icons/sfc0.png new file mode 100644 index 0000000..9cadf75 Binary files /dev/null and b/wals3/static/icons/sfc0.png differ diff --git a/wals3/static/icons/sff0.png b/wals3/static/icons/sff0.png new file mode 100644 index 0000000..08958f6 Binary files /dev/null and b/wals3/static/icons/sff0.png differ diff --git a/wals3/static/icons/sffc.png b/wals3/static/icons/sffc.png new file mode 100644 index 0000000..c3a7044 Binary files /dev/null and b/wals3/static/icons/sffc.png differ diff --git a/wals3/static/icons/sfff.png b/wals3/static/icons/sfff.png new file mode 100644 index 0000000..2aa511e Binary files /dev/null and b/wals3/static/icons/sfff.png differ diff --git a/wals3/static/icons/t000.png b/wals3/static/icons/t000.png new file mode 100644 index 0000000..1c49c00 Binary files /dev/null and b/wals3/static/icons/t000.png differ diff --git a/wals3/static/icons/t00d.png b/wals3/static/icons/t00d.png new file mode 100644 index 0000000..9dab424 Binary files /dev/null and b/wals3/static/icons/t00d.png differ diff --git a/wals3/static/icons/t090.png b/wals3/static/icons/t090.png new file mode 100644 index 0000000..14b6d84 Binary files /dev/null and b/wals3/static/icons/t090.png differ diff --git a/wals3/static/icons/t6f3.png b/wals3/static/icons/t6f3.png new file mode 100644 index 0000000..ecef0b7 Binary files /dev/null and b/wals3/static/icons/t6f3.png differ diff --git a/wals3/static/icons/t909.png b/wals3/static/icons/t909.png new file mode 100644 index 0000000..2671b34 Binary files /dev/null and b/wals3/static/icons/t909.png differ diff --git a/wals3/static/icons/t99f.png b/wals3/static/icons/t99f.png new file mode 100644 index 0000000..6a8a1cb Binary files /dev/null and b/wals3/static/icons/t99f.png differ diff --git a/wals3/static/icons/t9ff.png b/wals3/static/icons/t9ff.png new file mode 100644 index 0000000..d8e9865 Binary files /dev/null and b/wals3/static/icons/t9ff.png differ diff --git a/wals3/static/icons/ta00.png b/wals3/static/icons/ta00.png new file mode 100644 index 0000000..c7d0881 Binary files /dev/null and b/wals3/static/icons/ta00.png differ diff --git a/wals3/static/icons/tccc.png b/wals3/static/icons/tccc.png new file mode 100644 index 0000000..4ad958e Binary files /dev/null and b/wals3/static/icons/tccc.png differ diff --git a/wals3/static/icons/td00.png b/wals3/static/icons/td00.png new file mode 100644 index 0000000..b43a552 Binary files /dev/null and b/wals3/static/icons/td00.png differ diff --git a/wals3/static/icons/tf40.png b/wals3/static/icons/tf40.png new file mode 100644 index 0000000..b18001a Binary files /dev/null and b/wals3/static/icons/tf40.png differ diff --git a/wals3/static/icons/tf60.png b/wals3/static/icons/tf60.png new file mode 100644 index 0000000..2e2065c Binary files /dev/null and b/wals3/static/icons/tf60.png differ diff --git a/wals3/static/icons/tf6f.png b/wals3/static/icons/tf6f.png new file mode 100644 index 0000000..5f5988c Binary files /dev/null and b/wals3/static/icons/tf6f.png differ diff --git a/wals3/static/icons/tfc0.png b/wals3/static/icons/tfc0.png new file mode 100644 index 0000000..74a7173 Binary files /dev/null and b/wals3/static/icons/tfc0.png differ diff --git a/wals3/static/icons/tff0.png b/wals3/static/icons/tff0.png new file mode 100644 index 0000000..53c25c2 Binary files /dev/null and b/wals3/static/icons/tff0.png differ diff --git a/wals3/static/icons/tffc.png b/wals3/static/icons/tffc.png new file mode 100644 index 0000000..6108723 Binary files /dev/null and b/wals3/static/icons/tffc.png differ diff --git a/wals3/static/icons/tfff.png b/wals3/static/icons/tfff.png new file mode 100644 index 0000000..464cae2 Binary files /dev/null and b/wals3/static/icons/tfff.png differ diff --git a/wals3/static/transparent.gif b/wals3/static/transparent.gif new file mode 100644 index 0000000..0341802 Binary files /dev/null and b/wals3/static/transparent.gif differ diff --git a/wals3/static/wals.css b/wals3/static/wals.css new file mode 100644 index 0000000..85cb5c3 --- /dev/null +++ b/wals3/static/wals.css @@ -0,0 +1,929 @@ +/* + * general style for html elements: + */ +html, body +{ color: #222222; + background-color: #dfe8cc; + font-family: "Trebuchet MS", "Lucida Sans Unicode", geneva, verdana, sans-serif; + font-size: 0.9em; + margin: 0; + padding: 0; + padding-top: 3px; + line-height: 1.5em; + } + +#home p { font-size: 110%} + +h1,h2,h3,h4,h5,h6 { + font-weight: bold; + font-family: "Trebuchet MS", "Lucida Sans Unicode", geneva, verdana, sans-serif; +} +h1 { + font-size: 150%; + margin-top: 0.5em; + margin-bottom: 0.5em; +} +h2 { font-size: 130%; } +h3 { font-size: 110%; } + +*:link { text-decoration: none; color: #782a07; } +a:hover { text-decoration: none; color: #ab3a05; } +*:visited { text-decoration: none; color: #4a1c08; } + +/* + * style applied based on class attributes: + */ +/* for pages with long text paragraphs */ +div.narrow { margin-left: 5%; margin-right: 5%; } + +/* navigation */ +.nav ul +{ font-size: 90%; + list-style: none; + margin: 0; + text-align: right; + } +.nav li, .nav li span input +{ border-right: 1px solid #ab3a05; + display: inline; + padding: 0 .75em; + white-space: nowrap; + } +.nav li.last { + border-right: none; + } + +/* color coded typed links */ +a.Feature { text-decoration: none; color: #a81eaf; } +a.Feature:hover { text-decoration: none; color: #d38ed7; } +a.Feature:visited { text-decoration: none; color: #400044; } + +a.Chapter { text-decoration: none; color: #a81eaf; } +a.Chapter:hover { text-decoration: none; color: #400044; } +a.Chapter:visited { text-decoration: none; color: #d38ed7; } + +a.Supplement { text-decoration: none; color: #a81eaf; } +a.Supplement:hover { text-decoration: none; color: #400044; } +a.Supplement:visited { text-decoration: none; color: #d38ed7; } + +a.Reference { text-decoration: none; color: #782a07; } +a.Reference:hover { text-decoration: none; color: #ab3a05; } +a.Reference:visited { text-decoration: none; color: #4a1c08; } + +a.Country { text-decoration: none; color: #782a07; } +a.Country:hover { text-decoration: none; color: #ab3a05; } +a.Country:visited { text-decoration: none; color: #4a1c08; } + +a.Language { text-decoration: none; color: #80a532; } +a.Language:hover { text-decoration: underline; } +a.Language:visited { text-decoration: none; color: #2d4007; } + +.Genus { font-style: italic; } +a.Genus { text-decoration: none; color: #80a532; } +a.Genus:hover { text-decoration: underline; } +a.Genus:visited { text-decoration: none; color: #2d4007; } + +a.Family { text-decoration: none; color: #80a532; } +a.Family:hover { text-decoration: underline; } +a.Family:visited { text-decoration: none; color: #2d4007; } + +.ext-link +{ background: url(../../images/extlink.gif) no-repeat 0 58%; + padding-left: 18px; + } +* html .ext-link { background-position: 0 .35em } /* IE hack, see #937 */ + +/* + * sidebars and boxed content + */ +.sidebar { + float: right; + clear: right; + width: 38%; + margin-left: 1em; + margin-right: 0; + margin-top: 0.3em; + margin-bottom: 0.3em; +} +.narrow-main { width: 58%; } + +.narrow-sidebar { + float: right; + clear: right; + width: 30%; + margin-left: 1em; + margin-right: 0; + margin-top: 0.3em; + margin-bottom: 0.3em; +} + +.box, .box-white { + margin-top: 0.2em; + margin-bottom: 0.2em; + padding-left: 0.5em; + padding-right: 0.5em; + padding-top: 0.2em; + padding-bottom: 0.2em; + border: 1px solid #eacec0; +} +.box { background: #fbf5f2; } +.box-white { background: white; } + +.border { border: 1px solid #eacec0; } + +/* + * definition lists + */ +dl.table { + width: 100%; + list-style: none; + padding: none; +} +dl.table dt { + width: 13em; + float: left; + margin: 0 0 0 0; + padding: .5em; + font-weight: bold; +} +dl.table dd { + float: left; + margin: 0 0 0 0; + padding: .5em; +} + +/* + * selection by id: we list the elements identified by id according + * to the template (or script) which may create them. + */ + +/*---------------------------------------------------------------------------- + * standard components of each page (created by the master template) + */ +#header +{ width: 98%; + width: 96%; + padding-top: 0.5em; + padding-left: 1%; + padding-right: 1%; + height: 85px; + margin-top: 20px; + margin-bottom: 0; + margin-left: 1%; + margin-right: 1%; + background-color: white; +} +#header a img { border: none; float: left; } + +#footer a img { border: none; } +#footer +{ border-top: 0px none; + color: #222222; + background-color: white; + padding-left: 1%; + padding-right: 1%; + padding-bottom: 5px; + padding-top: 5px; + font-size: 16px; + font-weight: bold; + text-align: center; + width: 96%; + margin: 0 auto 1em auto; + } +#footerContent +{ padding-top: 1em; + clear: both; + width: 100%; + margin-bottom: 20px; +} +#footerContent .left +{ text-align: left; + float: left; + width: 250px; + padding-left: 2em; +} +#footerContent .right +{ text-align: right; + float: right; + width: 15em; + padding-right: 2em; +} +#license { + padding-top: 10px; +} + +.message { + border: 1px solid #a81eaf; + background: #e9c7ab; + color: #400044; + text-align: center; + margin: 0 auto 0 auto; + padding-left: 0.5em; + padding-right: 0.5em; + padding-top: 0.2em; + padding-bottom: 0.2em; + font-weight: bold; + } + +#content +{ color: #222222; + background-color: white; + width: 96%; + margin: 0 auto 0 auto; + padding-left: 1%; + padding-right: 1%; + padding-top: 5px; + padding-bottom: 5px; +} + +#mainnav +{ background-color: #80a532; + font-family: "Trebuchet MS", "Lucida Sans Unicode", geneva, verdana, sans-serif; + color: white; + font-size: 110%; + margin-bottom: .33em; + padding-top: 10px; + padding-bottom: 10px; + padding-right: 10px; + } +#mainnav li a +{ text-decoration: none; + color: white; + } +#mainnav li +{ border-right: none; + padding: .2em 0; +} +#mainnav :link, #mainnav :visited +{ color: white; + padding: .2em 20px; + } +#mainnav :link:hover, #mainnav :visited:hover +{ background-color: white; + color: #2d4007; + } + +/* + * created by templates from util.xhtml + */ +#contextnav +{ background-color:#bfd298; + font-family: "Trebuchet MS", "Lucida Sans Unicode", geneva, verdana, sans-serif; + font-weight: bold; + height: 1.5em; + padding-top: 0.2em; + font-size:105%; + margin-bottom: 0.5em; + } + +/*---------------------------------------------------------------------------- + * created by templates from map.xhtml + */ +#Map { border: 1px solid #EACEC0; } + +.resizeable { margin-bottom: 15px; overflow: hidden; height: 99%; width: 99%; } +.small-map-container { height: 300px; width: 100%; } +.medium-map-container { height: 400px; width: 750px; } +.big-map-container { height: 600px; width: 100%; } + +#mapUrl { margin-top: 0.5em; } +#mapUrl input { width: 100%; } + +/* the language display on map pages */ +div.ld-map { clear: right; width: 100%; } +.ld-map ul { list-style: none; } +.ld-map ul li { + display: inline; + border-right: 1px dotted #666; + margin-left: 0.5em; +} + +.info-window { width: auto; } +.info-window-references { font-size: 80%; } +.info-window-dplink { } + +/*---------------------------------------------------------------------------- + * created by templates from util.xhtml + */ +#SelectMap { border: 1px solid #EACEC0; height: 300px; width: 50%; } + + +/*---------------------------------------------------------------------------- + * created by templates from util.xhtml + */ +#valueDisplay td.feature-name { + border: 1px solid #EACEC0; + vertical-align: middle; + text-align: center; } +#valueDisplay td.value-description { border: 1px solid #EACEC0; } +#valueDisplay td { margin: 0.1em 0.3em 0.1em 0.3em; padding: 0.2em 0.5em 0.2em 0.5em; } +#valueDisplay td td { margin: 3px 3px 3px 3px; padding: 2px 2px 2px 2px; } + +/*--------------------------------------------------------------------------*/ + +#toc td.line { border-bottom: 1px dotted #999; } + + + + +/*#actions { border: 1px solid #EACEC0; }*/ + + +.authors .author { font-size: 100%; font-style: normal; font-weight: normal; } +span.authors { font-size: 100%; } + +.referencedIn ul +{ list-style: none; + margin: 0; + text-align: left; + } +.referencedIn li +{ display: inline; + padding: 0 .75em; + } + +span.reference { margin-left: 0.5em; } +span.note { margin-left: 0.5em; } + + + +#value-selection { float: right; width: 48%; } + + + +/* commented backslash hack for mac-ie5 \*/ +dl.table dt { clear: both; } +/* end hack */ + +/* home */ +/* feed control */ +div.gfc-resultsHeader div.gfc-title { + font-weight: bold; + color: #2d4007; +} +div.gfc-resultsRoot { + border-bottom: 1px solid #eacec0; + margin-bottom: 0.5em; +} +div.gfc-result div.gf-title { + margin-top: 0.5em; + height: auto; + overflow-x: auto; + overflow-y: auto; +} + +div.gfc-resultsRoot .gf-author, div.gfc-resultsRoot .gf-spacer { display: none; } +div.gfc-resultsRoot .gf-relativePublishedDate { color: #666; } + +/* search box */ +.gsc-ad-box {color: #AAAAAA; margin-top: 5em; border-top: solid 1px;} +.gs-result .gs-title, div.gs-result div.gs-title a.gs-title { text-decoration: none; color: #782a07; } +.gs-result .gs-title *, div.gs-result div.gs-title a.gs-title b { text-decoration: none; color: #782a07; } +div.gs-visibleUrl { color: #80a532; } + +/* + * autocomplete + */ +.yui-skin-sam .yui-ac-content li.yui-ac-highlight { + background-color: #a81eaf; + color: white; +} + +.yui-skin-sam .yui-ac-content .prehighlight { + background-color: #e9c7eb; +} + +/* examples */ +div.Example table td {margin-right: 2px; background-color: #eee;} +table.example td {margin-right: 2px; background-color: #eee;} + +/* IGTs in examples */ +table.IGT {margin-top: 0.6em; margin-bottom: 0.4em; } +table.IGT td {margin-right: 2px; background-color: #eee;} +table.IGT caption { + caption-side: bottom; + font-size: 0.9em; + font-style: italic; +} + +/* + * data table + */ +.yui-skin-sam .yui-dt caption { display: none; } + +.yui-skin-sam .yui-dt th, +.yui-skin-sam .yui-dt th a { + font-weight:normal;text-decoration:none;color:#222222; /* header text */ + vertical-align:bottom; +} +.yui-skin-sam .yui-dt th { + margin:0;padding:0; + border:none; + border-right:1px solid #CBCBCB;/* inner column border */ +} + +.yui-skin-sam .yui-dt tr.yui-dt-first td { + border-top:1px solid #7F7F7F; /* tbody top border */ +} + +.yui-skin-sam .yui-dt th .yui-dt-liner { + white-space:nowrap; +} +.yui-skin-sam .yui-dt-liner { + margin:0;padding:0; + padding:4px 10px 4px 10px; /* cell padding */ +} +.yui-skin-sam .yui-dt-coltarget { + width: 5px; + background-color: red; +} +.yui-skin-sam .yui-dt td { + margin:0;padding:0; + border:none; + border-right:1px solid #CBCBCB; /* inner column border */ + text-align:left; +} +.yui-skin-sam .yui-dt-list td { + border-right:none; /* disable inner column border in list mode */ +} +.yui-skin-sam .yui-dt-resizer { + width:6px; +} + +/* mask */ +.yui-skin-sam .yui-dt-mask { + background-color: #000; + opacity: .25; + *filter: alpha(opacity=25); /* Set opacity in IE */ +} + +/* messaging */ +.yui-skin-sam .yui-dt-message { + background-color:#FFF; +} + +/* scrolling */ +.yui-skin-sam .yui-dt-scrollable table {border:none;} +.yui-skin-sam .yui-dt-scrollable .yui-dt-hd {border-left:1px solid #7F7F7F;border-top:1px solid #7F7F7F;border-right:1px solid #7F7F7F;} +.yui-skin-sam .yui-dt-scrollable .yui-dt-bd {border-left:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;border-right:1px solid #7F7F7F;background-color:#FFF;} +.yui-skin-sam .yui-dt-scrollable .yui-dt-data tr.yui-dt-last td {border-bottom:1px solid #7F7F7F;} + +/* sortable columns */ +.yui-skin-sam thead .yui-dt-sortable { + cursor:pointer; +} +.yui-skin-sam th.yui-dt-asc, +/* +.yui-skin-sam th.yui-dt-desc { + background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -100px; +} +*/ +.yui-skin-sam thead tr th { border-bottom: 1px solid #bfd298; } + +.yui-skin-sam th.yui-dt-desc { background-color: white; } + +.yui-skin-sam th.yui-dt-sortable .yui-dt-label { + margin-right:10px; +} +.yui-skin-sam th.yui-dt-asc .yui-dt-liner { + background:url(../images/bullet_arrow_up.png) no-repeat right; /* sorted header gradient */ +} +.yui-skin-sam th.yui-dt-desc .yui-dt-liner { + background:url(../images/bullet_arrow_down.png) no-repeat right; /* sorted header gradient */ +} + +/* striping */ +.yui-skin-sam tr.yui-dt-even { background-color:#FFF; } /* white */ +.yui-skin-sam tr.yui-dt-odd { background-color:#eee; } +.yui-skin-sam tr.yui-dt-even td.yui-dt-asc, +.yui-skin-sam tr.yui-dt-even td.yui-dt-desc { background-color:#eee; } /* light blue sorted */ +.yui-skin-sam tr.yui-dt-odd td.yui-dt-asc, +.yui-skin-sam tr.yui-dt-odd td.yui-dt-desc { background-color:#ddd; } /* dark blue sorted */ + + +/* highlighting */ +.yui-skin-sam th.yui-dt-highlighted, +.yui-skin-sam th.yui-dt-highlighted a { + background-color:#B2D2FF; /* med blue hover */ +} +.yui-skin-sam tr.yui-dt-highlighted, +.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-asc, +.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-desc, +.yui-skin-sam tr.yui-dt-even td.yui-dt-highlighted, +.yui-skin-sam tr.yui-dt-odd td.yui-dt-highlighted { + cursor:pointer; + background-color:#B2D2FF; /* med blue hover */ +} + +/* enable highlighting in list mode */ +.yui-skin-sam .yui-dt-list th.yui-dt-highlighted, +.yui-skin-sam .yui-dt-list th.yui-dt-highlighted a { + background-color:#B2D2FF; /* med blue hover */ +} +.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted, +.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-asc, +.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-desc, +.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-highlighted, +.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-highlighted { + cursor:pointer; + background-color:#B2D2FF; /* med blue hover */ +} + +/* selection */ +.yui-skin-sam th.yui-dt-selected, +.yui-skin-sam th.yui-dt-selected a { + background-color:#446CD7; /* bright blue selected cell */ +} +.yui-skin-sam tr.yui-dt-selected td, +.yui-skin-sam tr.yui-dt-selected td.yui-dt-asc, +.yui-skin-sam tr.yui-dt-selected td.yui-dt-desc { + background-color:#426FD9; /* bright blue selected row */ + color:#FFF; +} +.yui-skin-sam tr.yui-dt-even td.yui-dt-selected, +.yui-skin-sam tr.yui-dt-odd td.yui-dt-selected { + background-color:#446CD7; /* bright blue selected cell */ + color:#FFF; +} + +/* enable selection in list mode */ +.yui-skin-sam .yui-dt-list th.yui-dt-selected, +.yui-skin-sam .yui-dt-list th.yui-dt-selected a { + background-color:#446CD7; /* bright blue selected cell */ +} +.yui-skin-sam .yui-dt-list tr.yui-dt-selected td, +.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-asc, +.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-desc { + background-color:#426FD9; /* bright blue selected row */ + color:#FFF; +} +.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-selected, +.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-selected { + background-color:#446CD7; /* bright blue selected cell */ + color:#FFF; +} + +/* pagination */ +.yui-skin-sam .yui-dt-paginator { + display:block;margin:6px 0;white-space:nowrap; +} +.yui-skin-sam .yui-dt-paginator .yui-dt-first, +.yui-skin-sam .yui-dt-paginator .yui-dt-last, +.yui-skin-sam .yui-dt-paginator .yui-dt-selected { + padding:2px 6px; +} +.yui-skin-sam .yui-dt-paginator a.yui-dt-first, +.yui-skin-sam .yui-dt-paginator a.yui-dt-last { + text-decoration:none; +} +.yui-skin-sam .yui-dt-paginator .yui-dt-previous, +.yui-skin-sam .yui-dt-paginator .yui-dt-next { + display:none; +} +.yui-skin-sam a.yui-dt-page { + border:1px solid #CBCBCB; + padding:2px 6px; + text-decoration:none; + background-color:#fff +} +.yui-skin-sam .yui-dt-selected { + border:1px solid #fff; + background-color:#fff; +} + + +/* + * styling yui panels + * see http://developer.yahoo.com/yui/examples/container/panelskin1.html + * for details + */ +#MetadataPanel.yui-panel .hd { font-size: 140%; } +#MetadataPanel.yui-panel .bd { font-size: 130%; } +#MetadataDisplay.yui-panel .hd { font-size: 140%; } +#MetadataDisplay.yui-panel .bd { font-size: 130%; } + + +/* refdb */ +div.pagination +{ text-align: center; + padding-bottom: 1em; + padding-top: 0.5em; + } +div.pagination ul { display: inline; } +div.pagination ul li +{ display: inline; + padding-left: 0.5em; + padding-right: 0.5em; + list-style: none; + } +div.pagination p { display: none; } +div.pagination a { text-decoration: underline; } + +div.pagination a.prev +{ background: url(../../wals/images/arrow_prev.gif) no-repeat 100% 58%; + padding-right: 18px; + } +* html div.pagination a.prev { background-position: 100% .35em } /* IE hack, see #937 */ + +div.pagination a.next +{ background: url(../../wals/images/arrow_next.gif) no-repeat 0 58%; + padding-left: 18px; + } +* html div.pagination a.next { background-position: 0 .35em } /* IE hack, see #937 */ + + + + +label.fieldlabel { font-weight: bold; } + +.hide { display: none; } +.show { display: block; } + +td.number { text-align: right; } + + + +table.three-cols td.first-char { + width: 1.5em; + font-weight: bold; + vertical-align: top; + padding-left: 1em; + padding-right: 0.5em; +} +table.three-cols td.entry { } +td.numeric { text-align: right; } + +td.icon +{ width: 24px; + height: 26px; + text-align: center; + vertical-align: middle; + } +td.languages +{ text-align: left; + vertical-align: middle; + padding-left: 0.3em; +} +th.icon { background-color: #fbf5f2; } + +td.value-description { background-color: #fbf5f2; } +td.feature-name +{ background-color: #fbf5f2; + font-size: 110%; + padding-left: 0.5em; + padding-right: 0.5em; + padding-top: 0.2em; + padding-bottom: 0.2em; +} +td.value-description, td.feature-name +{ padding-top: 2px; + padding-bottom: 2px; + padding-left: 0.2em; + padding-right: 0.2em; + } + +div.icon-select +{ position: absolute; +/* background-color: #FFFFFF; */ + text-align: left; +/* border: 1px solid #222222;*/ + overflow: auto; + z-index: 100; +/* width: 422px;*/ + display: none; + } +/*div.icon-select table { width: 420px; }*/ +div.icon-select table td { margin: 3px 3px 3px 3px; padding: 2px 2px 2px 2px; } +div.icon-select td.close { text-align: right; } + +tr.genus-head th { border: 1px solid #eacec0; } +tr.genus-head th.icon { + text-align: center; + vertical-align: middle; +} +tr.genus-head th.label { + text-align: left; + vertical-align: middle; +} +tr.genus-head th.icon div { + width: 100%; + text-align: center; + vertical-align: middle; +} + + +.close { color: #bb0000; cursor: pointer; } +div.close { text-align: right; } + +table.suggest { background-color: white; } +table.suggest td { cursor: pointer; background-color: white; } + +ol.breadcrumbs { list-style-type: none; margin-left: 0px; padding-left: 0px; text-align: left;} +ol.breadcrumbs li { display: inline; } +ol.breadcrumbs li:before { content: " > "; } + +/* chapter index */ +#toc th { + text-align: left; + font-size: 120%; + font-variant: small-caps; +} + +/* chapter descriptions */ +#chapter-meta { + font-family: "Charis SIL","Lucida Sans Unicode","Lucida Grande","Arial Unicode MS"; + margin-top: 1em; + margin-bottom: 0.5em; +} +.meta dt, #chapter-meta dt { + font-size: 110%; + font-weight: bold; +} +.meta dd, #chapter-meta dd { + margin-left: 2em; + margin-top: 0.2em; + margin-bottom: 0.2em; +} + +#description { font-family: "Charis SIL","Lucida Sans Unicode","Lucida Grande","Arial Unicode MS"; } +#description p { font-size: 110%; line-height: 1.5; } +#description h2 { font-size: 140%; } +#description h3 { font-size: 120%; font-style: normal;} +p.example-start + div { margin-left: 2em; margin-top: 1em; } +/*#description div.caption-figure { text-align: center; } do we still need this? */ +p.example-start + * { background-color: #dfe8cc; } + +table.alt-names th { text-align: left; margin-right: 1em; } +table.alt-names td { margin-bottom: 0.5em; } + +ul.alt-names, #ci { list-style: none; margin: 0; padding: 0; } +ul.alt-names li, #ci li +{ display: inline; + margin-right: 1em; + white-space: nowrap; + } +#ci, #ld li { margin-bottom: 0.5em; } + +/*table.features { width: 55%; }*/ +table.features td { vertical-align: top; padding-left: 0.5em; padding-right: 0.5em; } +/*table.features td.value { width: 33%; vertical-align: top; } +table.features td.references { width: 33%; vertical-align: top; } +table.features td { padding-left: 0.5em; padding-right: 0.5em; }*/ +table.features th.feature { text-align: left; } +table.features th.value { text-align: left; } +table.features th.references { text-align: left; } +table.features th.area, th.continent +{ background-color: #dfe8cc; + margin-top: 0.2em; + } +tr.odd { background-color: #eee; } + +table#features caption { display: none; } + +/* layout of the box with suggestions */ +.suggest_link +{ background-color: #FFFFFF; + padding: 2px 6px 2px 6px; + } +.suggest_link_over +{ background-color: #3366CC; + padding: 2px 6px 2px 6px; + } + +#actions p { margin: 2px; } +#actions label { width: 20em; margin-right: 2px; } +#actions fieldset legend { display: none; } +#actions .field { margin: 1px; } +#actions .buttons { text-align: right; } +/* #queryData { display: none; } */ +#actions dl, #actions dt { margin: 0; } +#actions dt { font-style: italic; } +#actions dd { margin-top: 0; margin-bottom: 0; } +#actions select { font-size: 85%; } + +#results { width: 68%; } +#results table.record-header, #results h3 +{ color: #222; + border: 1px solid #eacec0; + } +#results table.record-header +{ padding-right: 0.5em; + } +#results table.record-header h2 +{ margin: 0; + } +#results table.record-header td +{ padding-top: 0.1em; + padding-bottom: 0.2em; + } +#results h3 { + margin-bottom: 0.1em; + margin-right: 0.6em; + } +#results h2 +{ padding-left: 4px; + font-size: 100%; + } +#results h3 +{ padding-top: 3px; + margin-top: 0.1em; + padding-bottom: 3px; + padding-left: 4px; + font-weight: bold; + font-style: italic; + text-align: left; + } +#results caption { display: none; } +#results td.field +{ width: 10em; + border: 1px solid #eacec0; + padding-top: 2px; + padding-bottom: 2px; + padding-left: 4px; + vertical-align: top; + text-align: left; + } +#results dl { margin: 0; } +#results dt +{ margin: 0; + font-style: italic; + } +#noresults +{ text-align: center; + margin-top: 2em; + margin-bottom: 2em; + } + +span.booktitle {font-style: italic;} + +/*div.formatList { font-size: 90%; }*/ +div.formatList a { padding-right: 0.3em; } +table.form { width: 100%; } +table.form td { + margin-left: 0.5em; + margin-right: 0.5em; +} +th.form, td.form { + text-align: left; + vertical-align: middle; +} +.formButton { margin-top: 1em; margin-right: 1em } + +/* styling for the dragdrop sorting of icon layers */ +ul.draglist { + width: 100%; + background: #f7f7f7; + border: 1px solid gray; + list-style: none; + margin:0; + padding:0; +} + +ul.draglist li { + margin: 1px; + padding-left: 0.5em; + cursor: move; +} + +ul.draglist_alt { + position: relative; + list-style: none; + margin:0; + padding:0; + /* + The bottom padding provides the cushion that makes the empty + list targetable. Alternatively, we could leave the padding + off by default, adding it when we detect that the list is empty. + */ + padding-bottom:20px; +} + +ul.draglist_alt li { + margin: 1px; + cursor: move; +} + +li.dd_list { + background-color: #bfd298; + border:1px solid #2d4007; +} + +/* styling for the iconsize slider */ +#iconsize { margin-top: -10; } +#iconsize td { height: 50px; text-align: center; vertical-align: middle; } +#iconsize td.icon { width: 50px; } + +/* +.yui-resize-handle {z-index: 1000;} +div.yui-resize-handle-b { height: 15px; background: white url(../exhibit/api/images/down-arrow.png) center bottom no-repeat;} +div.yui-resize-handle-r { height: 100%; width: 15px; background: white url(../exhibit/api/images/right-arrow.png) right center no-repeat;} +*/ + +#genealogy ol {list-style: none; margin-left: 3em;} +#genealogy ul {list-style: none;} +#genealogy ul li:before { content: "["; } +#genealogy ul li:after { content: "]"; } +#genealogy ul li {display: inline;} + +#legend td.number { border-left: 1px solid #bfd298; } +#legend th.number { border-left: 1px solid #bfd298; } \ No newline at end of file diff --git a/wals3/static/wals3.css b/wals3/static/wals3.css new file mode 100644 index 0000000..99fbd1b --- /dev/null +++ b/wals3/static/wals3.css @@ -0,0 +1,13 @@ +.navbar-inner { + background-color: #80a532; + background-image: none; + background-image: none; + background-image: none; + background-image: none; + background-image: none; + background-image: none; + background-repeat: no-repeat; + filter: none; + border: none !important; + margin-top: 5px; +} diff --git a/wals3/static/wals3.js b/wals3/static/wals3.js new file mode 100644 index 0000000..813bcb9 --- /dev/null +++ b/wals3/static/wals3.js @@ -0,0 +1,44 @@ +WALS = {} + +WALS.make_style_map = function (name) { + var styles = new OpenLayers.StyleMap({ + "default": { + pointRadius: 8, + strokeColor: "black", + strokeWidth: 1, + fillColor: "${icon_color}", + fillOpacity: 0.9, + graphicXOffset: 50, + graphicYOffset: 50, + graphicZIndex: 20 + }, + "temporary": { + pointRadius: 12, + fillOpacity: 1, + label : "${name}", + fontColor: "black", + fontSize: "12px", + fontFamily: "Courier New, monospace", + fontWeight: "bold", + labelAlign: "cm", + labelOutlineColor: "white", + labelOutlineWidth: 3 + }, + "select": { + label: "", + pointRadius: 10 + } + }), + wals_icons = { + "s": {graphicName: "square"}, // square + "d": {graphicName: "square", rotation: 45}, // diamond + "t": {graphicName: "triangle"}, + "f": {graphicName: "triangle", rotation: 180}, + "c": {graphicName: "circle"} + }; + styles.addUniqueValueRules("default", "icon_type", wals_icons); + styles.addUniqueValueRules("select", "icon_type", wals_icons); + return styles; +} + +CLLD.Map.style_maps["wals_feature"] = WALS.make_style_map("wals_feature"); diff --git a/wals3/templates/home.mako b/wals3/templates/home.mako new file mode 100644 index 0000000..c8867d9 --- /dev/null +++ b/wals3/templates/home.mako @@ -0,0 +1,336 @@ +<%inherit file="wals.mako"/> + + + Open as dialog + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+ 4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+ +
+

Section 1

+
+

+ Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer + ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit + amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut + odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. +

+
+

Section 2

+
+

+ Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet + purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor + velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In + suscipit faucibus urna. +

+
+

Section 3

+
+

+ Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. + Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero + ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis + lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. +

+
    +
  • List item one
  • +
  • List item two
  • +
  • List item three
  • +
+
+

Section 4

+
+

+ Cras dictum. Pellentesque habitant morbi tristique senectus et netus + et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in + faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia + mauris vel est. +

+

+ Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. + Class aptent taciti sociosqu ad litora torquent per conubia nostra, per + inceptos himenaeos. +

+
+
+ +<%block name="javascript"> + $(function (){ + $('a.ajax').click(function() { + var url = this.href; + // show a spinner or something via css + var dialog = $('').appendTo('body'); + // open the dialog + dialog.dialog({ + // add a close listener to prevent adding multiple divs to the document + close: function(event, ui) { + // remove div with all data and events + dialog.remove(); + }, + modal: true + }); + // load remote content + dialog.load( + url, + {}, // omit this param object to issue a GET request instead a POST request, otherwise you may provide post parameters within the object + function (responseText, textStatus, XMLHttpRequest) { + // remove the loading class + dialog.removeClass('loading'); + } + ); + //prevent the browser to follow the link + return false; + }); + + $( "#accordion" ).accordion(); + + $('#example').dataTable({ + "bJQueryUI": true, + "sPaginationType": "full_numbers" + }); + }); + diff --git a/wals3/templates/language/rdf.pt b/wals3/templates/language/rdf.pt new file mode 100644 index 0000000..241dcfc --- /dev/null +++ b/wals3/templates/language/rdf.pt @@ -0,0 +1,13 @@ + + + + + diff --git a/wals3/templates/language/snippet_html.mako b/wals3/templates/language/snippet_html.mako new file mode 100644 index 0000000..3469472 --- /dev/null +++ b/wals3/templates/language/snippet_html.mako @@ -0,0 +1 @@ +

${ctx.name}

\ No newline at end of file diff --git a/wals3/templates/wals3.mako b/wals3/templates/wals3.mako new file mode 100644 index 0000000..621ce3a --- /dev/null +++ b/wals3/templates/wals3.mako @@ -0,0 +1,31 @@ +<%inherit file="app.mako"/> + +## +## define app-level blocks: +## + +<%block name="head"> + + + + +##<%block name="header">WALS + +<%block name="header"> + + + + + + +<%block name="footer"> + + + + + + +
publishedlicensedisclaimer
+ + +${next.body()} diff --git a/wals3/tests.py b/wals3/tests.py new file mode 100644 index 0000000..1a33947 --- /dev/null +++ b/wals3/tests.py @@ -0,0 +1,32 @@ +import unittest +import transaction + +from pyramid import testing + +#from .models import DBSession + +class TestMyView(unittest.TestCase): + def setUp(self): + self.config = testing.setUp() + from sqlalchemy import create_engine + engine = create_engine('sqlite://') + from .models import ( + Base, + MyModel, + ) + DBSession.configure(bind=engine) + Base.metadata.create_all(engine) + with transaction.manager: + model = MyModel(name='one', value=55) + DBSession.add(model) + + def tearDown(self): + DBSession.remove() + testing.tearDown() + + def test_it(self): + from .views import my_view + request = testing.DummyRequest() + info = my_view(request) + self.assertEqual(info['one'].name, 'one') + self.assertEqual(info['project'], 'wals3') diff --git a/wals3/views.py b/wals3/views.py new file mode 100644 index 0000000..5854b56 --- /dev/null +++ b/wals3/views.py @@ -0,0 +1,9 @@ +from pyramid.response import Response +from pyramid.view import view_config + +from sqlalchemy.exc import DBAPIError + + +@view_config(route_name='home', renderer='home.mako') +def my_view(request): + return {}