| updating gog type and UI changes - linuxgaming - Linux gaming aggregate tool, b… | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| commit f1830964e2f2a24fab826cbdc8bac5ce3f3548a7 | |
| parent bcd750407cb02ea658cae5cb7d67d04f41faa3d6 | |
| Author: Jay Scott <[email protected]> | |
| Date: Wed, 18 Jul 2018 14:47:22 +0100 | |
| updating gog type and UI changes | |
| Diffstat: | |
| M CHANGELOG | 1 + | |
| A hb | 77 +++++++++++++++++++++++++++++… | |
| M linuxgaming/search.py | 4 +++- | |
| M linuxgaming/templates/base.html | 7 ++----- | |
| M linuxgaming/templates/macros/items… | 13 ++++++++----- | |
| M linuxgaming/update.py | 2 +- | |
| 6 files changed, 92 insertions(+), 12 deletions(-) | |
| --- | |
| diff --git a/CHANGELOG b/CHANGELOG | |
| @@ -7,6 +7,7 @@ Wed 18 Jul | |
| - Added new source "Xpenguin" | |
| - RSS description check added. | |
| - Refactored search page. | |
| + - Changed gog to type game. | |
| Tue 17 Jul | |
| diff --git a/hb b/hb | |
| @@ -0,0 +1,77 @@ | |
| +https://www.humblebundle.com/store/api/search?sort=newest&filter=all&search=&p… | |
| + | |
| +{ | |
| + "num_results":2150, | |
| + "page_index":0, | |
| + "request":6, | |
| + "num_pages":2150, | |
| + "results":[ | |
| + { | |
| + "featured_image_small":"https://humblebundle.imgix.net/misc/files/has… | |
| + "standard_carousel_image":"https://humblebundle.imgix.net/misc/files/… | |
| + "delivery_methods":[ | |
| + "download", | |
| + "steam" | |
| + ], | |
| + "machine_name":"chickenassassin_reloaded_storefront", | |
| + "featured_image_large":"https://humblebundle.imgix.net/misc/files/has… | |
| + "featured_image_recommendation":"https://humblebundle.imgix.net/misc/… | |
| + "xray_traits_thumbnail":"https://humblebundle.imgix.net/misc/files/ha… | |
| + "content_types":[ | |
| + "game" | |
| + ], | |
| + "human_url":"chicken-assassin-reloaded", | |
| + "platforms":[ | |
| + "mac", | |
| + "linux", | |
| + "windows" | |
| + ], | |
| + "icon_dict":{ | |
| + "download":{ | |
| + "available":[ | |
| + "windows", | |
| + "mac", | |
| + "linux" | |
| + ], | |
| + "unavailable":[ | |
| + | |
| + ] | |
| + }, | |
| + "steam":{ | |
| + "available":[ | |
| + "windows", | |
| + "mac", | |
| + "linux" | |
| + ], | |
| + "unavailable":[ | |
| + | |
| + ] | |
| + } | |
| + }, | |
| + "featured_image_medium":"https://humblebundle.imgix.net/misc/files/ha… | |
| + "large_capsule":"https://humblebundle.imgix.net/misc/files/hashed/94b… | |
| + "human_name":"Chicken Assassin: Reloaded", | |
| + "product_background_image":null, | |
| + "type":"product", | |
| + "icon":"https://humblebundle.imgix.net/misc/files/hashed/94bf921f2dcc… | |
| + "non_cyoc_charity_split":0.0, | |
| + "cyoc_split":0.050000000000000003, | |
| + "non_cyoc_charity_names":[ | |
| + | |
| + ], | |
| + "full_price":[ | |
| + 3.9900000000000002, | |
| + "GBP" | |
| + ], | |
| + "keep_split":0.050000000000000003, | |
| + "current_price":[ | |
| + 3.9900000000000002, | |
| + "GBP" | |
| + ], | |
| + "cta_badge":"new", | |
| + "rating_for_current_region":"pegi" | |
| + } | |
| + ] | |
| +} | |
| + | |
| + | |
| diff --git a/linuxgaming/search.py b/linuxgaming/search.py | |
| @@ -12,10 +12,11 @@ bp = Blueprint('search', __name__, url_prefix='/search') | |
| @bp.route("/<path:path>", methods=('GET', 'POST')) | |
| def test(path): | |
| - pages = ['gog', 'twitch', 'youtube', 'article', 'podcast', 'allthethings'] | |
| + pages = ['game', 'twitch', 'youtube', 'article', 'podcast'] | |
| if any(x in path for x in pages): | |
| result = current_app.mongo.db.items.find( | |
| {"type": path}).sort('date', -1) | |
| + | |
| return render_template( | |
| 'pages/search.html', | |
| entries=result, | |
| @@ -23,4 +24,5 @@ def test(path): | |
| else: | |
| flash('1337 Hacks in progress...') | |
| current_app.logger.info('Manual search probe %s', path) | |
| + | |
| return redirect(url_for('home')) | |
| diff --git a/linuxgaming/templates/base.html b/linuxgaming/templates/base.html | |
| @@ -36,14 +36,11 @@ | |
| <a class="item" href="/search/podcast" data-content="Filter by Podcast… | |
| <i class="soundcloud blue large icon"></i> | |
| </a> | |
| - <a class="item" href="/search/gog" data-content="Filter all GoG Games"> | |
| - <img class="ui mini bordered image" alt="GoG Logo" src="{{ url_for('… | |
| + <a class="item" href="/search/game" data-content="Filter all games"> | |
| + <i class="game blue large icon"></i> | |
| </a> | |
| <div class="right item"> | |
| - <a class="item" href="/search/allthethings" data-title="Show EVERYTH… | |
| - <i class="exclamation red large icon" ></i> | |
| - </a> | |
| <div class="item"> | |
| <i class="ellipsis vertical disabled icon"></i> | |
| </div> | |
| diff --git a/linuxgaming/templates/macros/items.html b/linuxgaming/templates/ma… | |
| @@ -5,20 +5,23 @@ | |
| <i text='twitch' class="twitch inverted purple bordered icon"></i> | |
| {% elif "youtube" in item.type %} | |
| <i class="youtube red bordered inverted icon"></i> | |
| - {% elif "gog" in item.type %} | |
| + {% elif "game" in item.type %} | |
| <i class="game blue bordered inverted icon"></i> | |
| {% elif "article" in item.type %} | |
| <i class="rss orange bordered inverted icon"></i> | |
| - {% elif "gog" in item.type %} | |
| - <i class="game grey bordered inverted icon"></i> | |
| {% else %} | |
| <i class="soundcloud blue bordered inverted icon"></i> | |
| {% endif %} | |
| </td> | |
| <td> | |
| - <a href="/details/{{ item.name }}"> | |
| - <img alt="{{ item.name }} icon" src="{{ url_for('static', filena… | |
| + {% if not "gog" in item.name %} | |
| + <a href="/details/{{ item.name }}"> | |
| + <img alt="{{ item.name }} icon" src="{{ url_for('static', filename… | |
| </a> | |
| + {% else %} | |
| + <img alt="{{ item.name }} icon" src="{{ url_for('static', filename='… | |
| + {% endif %} | |
| + | |
| </td> | |
| <td> | |
| {{ item.title }} | |
| diff --git a/linuxgaming/update.py b/linuxgaming/update.py | |
| @@ -213,7 +213,7 @@ def gog_update(): | |
| data = { | |
| "name": "gog", | |
| "icon": "gog.png", | |
| - "type": "gog", | |
| + "type": "game", | |
| "title": search_result['title'], | |
| "image": "https:" + search_result['image'] + ".png", | |
| "publisher": search_result['publisher'], |