First real version of item detail page
* Split the InventoryTable view/controller out from the existing inventory view/controller. This is a simpler component which only includes the table itself, and not the scrollbox, panel or header used on the crafting page. * Create the FullRecipe view/controller to represent the expanded version of a recipe shown on the item page (as compared to the terser version on the crafting page). * Rename the existing Recipe view/controller to MinimalRecipe to avoid confusing the two. * Refactor the CSS for the Stack view/controller so that it can be shared between the Inventory and InventoryTable views. * Incorporate all these new controllers into the item page and hook up the necessary model logic to drive them.
This commit is contained in:
+5
-3
@@ -65,10 +65,12 @@ h2 {
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-family: $font-family-normal;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.5em;
|
||||
|
||||
p { font-size: $font-size-normal; }
|
||||
p {
|
||||
font-family: $font-family-header;
|
||||
font-size: $font-size-normal;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
|
||||
@@ -18,4 +18,4 @@ All rights reserved.
|
||||
border: 0.1em solid $color-gray-light;
|
||||
padding: 0.1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ All rights reserved.
|
||||
}
|
||||
}
|
||||
|
||||
.view__recipe {
|
||||
.view__minimal_recipe {
|
||||
position: absolute; top: 50%; left: 50%;
|
||||
@include transform(translate(-50%, -50%));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
Crafting Table - full_recipe.scss
|
||||
|
||||
Copyright (c) 2014-2015 by Redwood Labs
|
||||
All rights reserved.
|
||||
*/
|
||||
|
||||
.view__full_recipe {
|
||||
& > div {
|
||||
position: relative; width: 33%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.pattern {
|
||||
.view__crafting_grid {
|
||||
position: relative; left: 50%;
|
||||
@include transform(translateX(-50%));
|
||||
}
|
||||
|
||||
.tool {
|
||||
margin-top: 0.5em;
|
||||
text-align: center;
|
||||
|
||||
p {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.input {
|
||||
.view__inventory {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.output {
|
||||
}
|
||||
}
|
||||
@@ -6,14 +6,16 @@ All rights reserved.
|
||||
*/
|
||||
|
||||
@import 'crafting_grid';
|
||||
@import 'crafting_page';
|
||||
@import 'crafting_table';
|
||||
@import 'feedback';
|
||||
@import 'full_recipe';
|
||||
@import 'inventory';
|
||||
@import 'inventory_table';
|
||||
@import 'item';
|
||||
@import 'item_page';
|
||||
@import 'crafting_page';
|
||||
@import 'minimal_recipe';
|
||||
@import 'mod';
|
||||
@import 'mod_pack';
|
||||
@import 'mod_page';
|
||||
@import 'recipe';
|
||||
@import 'stack';
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
Crafting Guide - inventory_table.scss
|
||||
|
||||
Copyright (c) 2014-2015 by Redwood Labs
|
||||
All rights reserved.
|
||||
*/
|
||||
|
||||
.view__inventory_table {
|
||||
table {
|
||||
width: 100%;
|
||||
|
||||
td {
|
||||
height: 2.4em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
td.quantity {
|
||||
position: relative;
|
||||
width: 2.4em;
|
||||
|
||||
input {
|
||||
position: absolute; top: 50%; height: $font-size-small; width: 100%;
|
||||
@include transform(translateY(-50%));
|
||||
border-radius: 0.75em;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
max-width: 2.8em;
|
||||
}
|
||||
}
|
||||
|
||||
td.name {
|
||||
text-align: left;
|
||||
padding-right: 1em;
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
border: 0;
|
||||
border-bottom: 1px dashed $color-gray-light;
|
||||
outline: 0;
|
||||
|
||||
&:focus {
|
||||
border: 1px solid $color-gray-light;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
td.action {
|
||||
width: 4em;
|
||||
}
|
||||
|
||||
.edit td {
|
||||
padding-top: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
position: relative; width: 100%;
|
||||
background: $color-background-toolbar;
|
||||
border-top: 1px solid $color-gray-light;
|
||||
}
|
||||
|
||||
button:disabled {
|
||||
background: white;
|
||||
color: $color-gray-light;
|
||||
}
|
||||
|
||||
button[name="clear"] {
|
||||
position: absolute; bottom: 0.5em; right: 0.5em;
|
||||
}
|
||||
|
||||
input {
|
||||
border: 1px solid $color-gray-light;
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ All rights reserved.
|
||||
padding: 1em;
|
||||
padding-top: 2em;
|
||||
|
||||
.name {
|
||||
h1.name {
|
||||
font-family: $font-family-header;
|
||||
font-size: $font-size-x-large;
|
||||
margin: 0;
|
||||
@@ -57,12 +57,20 @@ All rights reserved.
|
||||
}
|
||||
}
|
||||
|
||||
.usedInMaking {
|
||||
.recipe {
|
||||
display: none;
|
||||
|
||||
.view__full_recipe {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.similar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.usedInMaking {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
Crafting Table - recipe.scss
|
||||
Crafting Table - minimal_recipe.scss
|
||||
|
||||
Copyright (c) 2014-2015 by Redwood Labs
|
||||
All rights reserved.
|
||||
*/
|
||||
|
||||
.view__recipe {
|
||||
.view__minimal_recipe {
|
||||
position: relative; height: 20em; width: 26em;
|
||||
|
||||
.input {
|
||||
@@ -8,7 +8,11 @@ All rights reserved.
|
||||
.view__stack {
|
||||
font-family: $font-family-normal;
|
||||
|
||||
.quantity p {
|
||||
td {
|
||||
padding: 0.2em 0;
|
||||
}
|
||||
|
||||
td.quantity p {
|
||||
border-radius: 0.75em;
|
||||
background: $color-ice;
|
||||
color: $color-background-panel;
|
||||
@@ -19,12 +23,23 @@ All rights reserved.
|
||||
padding: 0.1em 0.5em;
|
||||
}
|
||||
|
||||
.name p {
|
||||
td.icon {
|
||||
width: 4.6em;
|
||||
padding: 0.2em 0.5em;
|
||||
|
||||
img {
|
||||
width: 100%; height: auto;
|
||||
max-height: 4.8em;
|
||||
@include pixel-image;
|
||||
}
|
||||
}
|
||||
|
||||
td.name p {
|
||||
display: inline;
|
||||
font-size: $font-size-normal;
|
||||
}
|
||||
|
||||
.action {
|
||||
td.action {
|
||||
text-align: right;
|
||||
|
||||
button.remove {
|
||||
|
||||
Reference in New Issue
Block a user