diff --git a/bricktracker/rebrickable_part.py b/bricktracker/rebrickable_part.py index b0282be..8224d98 100644 --- a/bricktracker/rebrickable_part.py +++ b/bricktracker/rebrickable_part.py @@ -134,6 +134,14 @@ class RebrickablePart(BrickRecord): spare=self.fields.spare, ) + # Compute the url for the original of the printed part + def url_for_print(self, /) -> str: + return url_for( + 'part.details', + part=self.fields.print, + color=self.fields.color, + ) + # Compute the url for the rebrickable page def url_for_rebrickable(self, /) -> str: if current_app.config['REBRICKABLE_LINKS']: diff --git a/bricktracker/sql/part/base/base.sql b/bricktracker/sql/part/base/base.sql index d9226b3..7849d4c 100644 --- a/bricktracker/sql/part/base/base.sql +++ b/bricktracker/sql/part/base/base.sql @@ -19,7 +19,7 @@ SELECT "rebrickable_parts"."image", "rebrickable_parts"."image_id", "rebrickable_parts"."url", - --"rebrickable_parts"."print", + "rebrickable_parts"."print", {% block total_missing %} NULL AS "total_missing", -- dummy for order: total_missing {% endblock %} diff --git a/static/styles.css b/static/styles.css index 9ac95de..af00525 100644 --- a/static/styles.css +++ b/static/styles.css @@ -59,3 +59,9 @@ .sortable thead th { font-weight: bold !important; } + +.color-rgb { + display: inline-block; + width: 15px; + height: 15px; +} \ No newline at end of file diff --git a/templates/macro/card.html b/templates/macro/card.html index 1cc92ac..7f2924f 100644 --- a/templates/macro/card.html +++ b/templates/macro/card.html @@ -1,11 +1,20 @@ -{% macro header(item, name, solo=false, identifier=none, color=none, icon='hashtag') %} +{% macro header(item, name, solo=false, identifier=none, icon='hashtag') %}