diff --git a/app/Resources/assets/style/colors.scss b/app/Resources/assets/style/colors.scss new file mode 100644 index 0000000..9d79fc6 --- /dev/null +++ b/app/Resources/assets/style/colors.scss @@ -0,0 +1,139 @@ +$alpha = 0.7; + +$colors: ( + -1: #0033B2, + 0: #05131D, + 1: #0055BF, + 2: #237841, + 3: #008F9B, + 4: #C91A09, + 5: #C870A0, + 6: #583927, + 7: #9BA19D, + 8: #6D6E5C, + 9: #B4D2E3, + 10: #4B9F4A, + 11: #55A5AF, + 12: #F2705E, + 13: #FC97AC, + 14: #F2CD37, + 15: #FFFFFF, + 17: #C2DAB8, + 18: #FBE696, + 19: #E4CD9E, + 20: #C9CAE2, + 21: #D4D5C9, + 22: #81007B, + 23: #2032B0, + 25: #FE8A18, + 26: #923978, + 27: #BBE90B, + 28: #958A73, + 29: #E4ADC8, + 30: #AC78BA, + 31: #E1D5ED, + 32: transparentize(#635F52,$alpha), + 33: transparentize(#0020A0,$alpha), + 34: transparentize(#84B68D,$alpha), + 35: transparentize(#D9E4A7,$alpha), + 36: transparentize(#C91A09,$alpha), + 40: transparentize(#635F52,$alpha), + 41: transparentize(#AEEFEC,$alpha), + 42: transparentize(#F8F184,$alpha), + 43: transparentize(#C1DFF0,$alpha), + 45: transparentize(#DF6695,$alpha), + 46: transparentize(#F5CD2F,$alpha), + 47: transparentize(#FCFCFC,$alpha), + 52: transparentize(#A5A5CB,$alpha), + 54: transparentize(#DAB000,$alpha), + 57: transparentize(#FF800D,$alpha), + 60: #645A4C, + 61: #6C96BF, + 62: #3CB371, + 63: #AA4D8E, + 64: #1B2A34, + 68: #F3CF9B, + 69: #CD6298, + 70: #582A12, + 71: #A0A5A9, + 72: #6C6E68, + 73: #5A93DB, + 74: #73DCA1, + 75: #000000, + 76: #635F61, + 77: #FECCCF, + 78: #F6D7B3, + 79: #FFFFFF, + 80: #A5A9B4, + 81: #899B5F, + 82: #DBAC34, + 84: #CC702A, + 85: #3F3691, + 86: #7C503A, + 89: #4C61DB, + 92: #D09168, + 100: #FEBABD, + 110: #4354A3, + 112: #6874CA, + 114: transparentize(#DF6695,$alpha), + 115: #C7D23C, + 117: transparentize(#FFFFFF,$alpha), + 118: #B3D7D1, + 120: #D9E4A7, + 125: #F9BA61, + 129: transparentize(#A5A5CB,$alpha), + 132: #000000, + 133: #000000, + 134: #AE7A59, + 135: #9CA3A8, + 137: #7988A1, + 142: #DCBC81, + 143: transparentize(#CFE2F7,$alpha), + 148: #575857, + 150: #ABADAC, + 151: #E6E3E0, + 158: #DFEEA5, + 178: #B48455, + 179: #898788, + 182: transparentize(#F08F1C,$alpha), + 183: #F2F3F2, + 191: #F8BB3D, + 212: #9FC3E9, + 216: #B31004, + 226: #FFF03A, + 230: transparentize(#E4ADC8,$alpha), + 232: #7DBFDD, + 236: transparentize(#96709F,$alpha), + 272: #0A3463, + 288: #184632, + 294: transparentize(#BDC6AD,$alpha), + 297: #AA7F2E, + 308: #352100, + 313: #3592C3, + 320: #720E0F, + 321: #078BC9, + 322: #36AEBF, + 323: #ADC3C0, + 326: #9B9A5A, + 334: #BBA53D, + 335: #D67572, + 351: #F785B1, + 366: #FA9C1C, + 373: #845E84, + 378: #A0BCAC, + 379: #6074A1, + 383: #E0E0E0, + 450: #B67B50, + 462: #FFA70B, + 484: #A95500, + 503: #E6E3DA, + 1000: #D9D9D9, + 1001: #9391E4, + 1002: transparentize(#C0F500,$alpha), + 1003: transparentize(#68BCC5,$alpha), + 1004: transparentize(#FCB76D,$alpha), + 1005: transparentize(#FBE890,$alpha), + 1006: transparentize(#B4D4F7,$alpha), + 1007: #8E5597, + 9999: #05131D, +); \ No newline at end of file diff --git a/app/Resources/assets/style/main.scss b/app/Resources/assets/style/main.scss index 5f2e904..8477e93 100644 --- a/app/Resources/assets/style/main.scss +++ b/app/Resources/assets/style/main.scss @@ -6,11 +6,15 @@ box-shadow: none; } + .ui.menu .ui.search .prompt { + border-radius: 0; + } + .item-info { min-height: 300px; } - .ui.fixed + .ui.main { + .ui.fixed + .ui.header { margin-top: 3em; padding-bottom: 4em; } diff --git a/app/Resources/views/macros/elements.html.twig b/app/Resources/views/macros/elements.html.twig index 4a28385..24094dd 100644 --- a/app/Resources/views/macros/elements.html.twig +++ b/app/Resources/views/macros/elements.html.twig @@ -2,11 +2,8 @@
-
- - {#
#} - {##} - {#
#} +
+
{{ model.number }}
diff --git a/app/Resources/views/menu/knp_menu.html.twig b/app/Resources/views/menu/knp_menu.html.twig index 18007fd..051e3b5 100644 --- a/app/Resources/views/menu/knp_menu.html.twig +++ b/app/Resources/views/menu/knp_menu.html.twig @@ -22,9 +22,9 @@ {% block list %} {% if item.hasChildren and options.depth is not same as(0) and item.displayChildren %} {% import _self as knp_menu %} -
+ {#
#} {{ block('children') }} -
+ {#
#} {% endif %} {% endblock %} diff --git a/app/Resources/views/model/detail.html.twig b/app/Resources/views/model/detail.html.twig index 4600a22..7f61bf5 100644 --- a/app/Resources/views/model/detail.html.twig +++ b/app/Resources/views/model/detail.html.twig @@ -26,6 +26,9 @@ author{{ model.author.name }} + + sets{{ sets|length }} +
@@ -38,27 +41,16 @@
aliases:
{% for alias in model.aliases %} - {{ alias.number }}{% if not loop.last %},{% endif %} + {{ alias.number }}{% if not loop.last %},{% endif %} {% endfor %}
Download:
{{ model.number }}
-
rebrickable parts ({{ rbParts|length }}):
-
- {#

#} - {#

#} - {#{% for alias in rbParts %}#} - {#{{ alias.number }}#} - {#{% endfor %}#} - {#
#} - {#

#} -
-

Related Models

@@ -72,6 +64,8 @@ {% for subpart in model.subparts %}
{{ elements.part(subpart.subpart) }} +

{{ subpart.count }}

+

color: {{ subpart.color.name }}

{% endfor %} @@ -105,7 +99,7 @@ {% for set in sets %} - {{ set.number }} + {{ set.number }} {% endfor %} diff --git a/app/Resources/views/model/index.html.twig b/app/Resources/views/model/index.html.twig index f175824..b6a06b6 100644 --- a/app/Resources/views/model/index.html.twig +++ b/app/Resources/views/model/index.html.twig @@ -7,32 +7,42 @@ {% block header %}{{ 'page.model.index' | trans }}{% endblock %} {% block content %} -
-
-
- {{ form_start(form) }} +
+
+
+ + {{ form_start(form) }} - {{ form_row(form.search) }} - -
- -
- {{ form_end(form) }} - -
-
- {{ knp_pagination_render(models) }} -

{{ models.getTotalItemCount }}

-
- {% for model in models %} - {{ elements.part(model) }} - {% endfor %} -
+ {{ form_row(form.search) }} + +
+ +
+ {{ form_end(form) }} + +
+
+
+ {% for model in models %} + + {% endfor %} +
- {{ knp_pagination_render(models) }} + {{ knp_pagination_render(models) }} +

{{ models.getTotalItemCount }}

+
+
-
{% endblock %} diff --git a/app/Resources/views/rebrickable/part/detail.html.twig b/app/Resources/views/rebrickable/part/detail.html.twig index 31a2e4a..d8d7e1f 100644 --- a/app/Resources/views/rebrickable/part/detail.html.twig +++ b/app/Resources/views/rebrickable/part/detail.html.twig @@ -17,7 +17,12 @@ {% endif %} {% if part.model %} - {{ elements.part(part.model) }} + +
+ +
+
{{ part.model.number }}
+
{% endif %}

@@ -29,7 +34,9 @@
diff --git a/src/AppBundle/Controller/Rebrickable/PartController.php b/src/AppBundle/Controller/Rebrickable/PartController.php index 421251c..6715b07 100644 --- a/src/AppBundle/Controller/Rebrickable/PartController.php +++ b/src/AppBundle/Controller/Rebrickable/PartController.php @@ -18,28 +18,6 @@ use Symfony\Component\HttpFoundation\Request; */ class PartController extends Controller { - /** - * @Route("/", name="part_index") - */ - public function indexAction(Request $request) - { - $em = $this->getDoctrine()->getManager(); - - $queryBuilder = $em->getRepository(Part::class)->createQueryBuilder('part'); - $queryBuilder->where('part.category = 17'); - - $paginator = $this->get('knp_paginator'); - $sets = $paginator->paginate( - $queryBuilder->getQuery(), - $request->query->getInt('page', 1)/*page number*/, - $request->query->getInt('limit', 30)/*limit per page*/ - ); - - return $this->render(':rebrickable/part:index.html.twig', [ - 'parts' => $sets, - ]); - } - /** * Finds and displays a part entity. *