diff --git a/src/index.py b/src/index.py index c9c80d9..5e06d4e 100644 --- a/src/index.py +++ b/src/index.py @@ -26,6 +26,60 @@ def find_year(): now = datetime.datetime.now() return now.strftime('%Y') +def to_table(l, cols): + l.sort(key=str.lower) + + # Return it as one row here if the list is too small + if len(l) < cols: + return [l] + + newlist = [] + + + # Step over every row of the list + for i in range(0, len(l), cols): + + # Get the next row of the list + sublist = l[i : i + cols] + + # If it's too short, add it to the end of the last row + if len(sublist) < cols: + newlist[-1] += sublist + # Add the next row in the list to the table + else: + newlist += [sublist] + + return newlist + +def his_to_table(l, cols): + + l.sort(key=str.lower) + + # Return it as one row here if the list is too small + if len(l) < cols: + return [l] + + newlist = [] + + # Step over every row of the list + for i in range(0, len(l), cols): + + # Get the next row of the list + sublist = l[i : i + cols] + + # If it's too short, add it to the end of the last row + if len(sublist) < cols: + newlist[-1] += sublist + # Add the next row in the list to the table + else: + newlist += [sublist] + + return newlist + +def get_gdd_topics(topics, cols): + return to_table(topics, int(len(topics) / cols)) + + def find_gallery(name): gal = [name] if name == "Abbey": @@ -446,11 +500,13 @@ def entry(page): TEMPLATE_PATH.insert(0, abs_views_path ) return template(os.path.join(abs_views_path,'entry.tpl'), info) -# Blessfrey Game Design Document Page +# Blessfrey Game Design Document Page - change the 5 for more or less columns @route('/blessfrey-gdd') def gddbf(): """Game Design Document""" - info = {'css': 'doc', 'title': 'blessfrey gdd', 'year': find_year()} + info = {'css': 'doc', 'title': 'blessfrey gdd', 'year': find_year(), 'topics': get_gdd_topics( +["achievement", "ai", "armor-rating", "attack-loop", "attribute", "attribute-point", "cast", "character", "collision", "controls", "credits", "damage-type", "death-penalty", "design-philosophy", "dialogue", "docs", "environment-effect", "gear", "gig", "groups", "highlight", "ID", "inspect menu", "inventory", "item", "job", "keyword", "language", "life", "marketing", "mechanics", "Mercur", "milestones", "miracles", "pathfinding", "perk", "pip", "projectile", "proxemics", "punishment", "setting", "skill", "smartphone", "spirit", "status-effect", "story", "style guide", "terms", "vibe", "website", "xp", "xp-bar", "zone"],5 +)} return template('bf-gdd.tpl', info) @route('/gdd') def gdd(): diff --git a/src/static/img/gdd/animation.png-autosave.kra b/src/static/img/gdd/animation.png-autosave.kra deleted file mode 100644 index 271d464..0000000 Binary files a/src/static/img/gdd/animation.png-autosave.kra and /dev/null differ diff --git a/src/static/img/host/cole.png b/src/static/img/host/cole.png deleted file mode 100644 index 5f949a0..0000000 Binary files a/src/static/img/host/cole.png and /dev/null differ diff --git a/src/static/img/host/havelock.png b/src/static/img/host/havelock.png new file mode 100644 index 0000000..678f8bc Binary files /dev/null and b/src/static/img/host/havelock.png differ diff --git a/src/static/img/host/logo.png b/src/static/img/host/logo.png deleted file mode 100644 index fa94cc0..0000000 Binary files a/src/static/img/host/logo.png and /dev/null differ diff --git a/src/static/img/host/stilllife.png b/src/static/img/host/stilllife.png new file mode 100644 index 0000000..7a450e5 Binary files /dev/null and b/src/static/img/host/stilllife.png differ diff --git a/src/views/bf-gdd.tpl b/src/views/bf-gdd.tpl index d4c065f..79754de 100644 --- a/src/views/bf-gdd.tpl +++ b/src/views/bf-gdd.tpl @@ -2,13 +2,32 @@ % rebase('frame.tpl')

blessfrey game design document

-

The vision for Blessfrey

-
-
diff --git a/test.sh b/test.sh index 194d376..62c9ba7 100755 --- a/test.sh +++ b/test.sh @@ -2,5 +2,6 @@ python3 -m venv venv/ source venv/bin/activate +pip install -r requirements.txt cd src/ python3 index.py