Add mod version selector to browse page tiles

This commit is contained in:
Andrew Miner
2017-03-31 20:47:39 -07:00
parent 3d9895a6d5
commit 407e3fca5d
4 changed files with 58 additions and 41 deletions
@@ -6,9 +6,12 @@
//- //-
.view__mod_tile .view__mod_tile
.tile
a a
.left .left
img img
.right .right
p.title p.title
p.description p.description
.view__mod_version_selector
@@ -6,15 +6,21 @@
// //
.view__mod_tile { .view__mod_tile {
display: flex;
.tile {
flex: 1 1 auto;
@include floating-panel;
min-width : $size-minecraft-block * 9; min-width : $size-minecraft-block * 9;
display: flex; display: flex;
flex-direction: column;
a {
@include floating-panel;
flex: 1 1 auto;
border : $size-border-medium solid $color-background-panel; border : $size-border-medium solid $color-background-panel;
a {
flex: 1 1 auto;
color : $color-text; color : $color-text;
text-decoration : none; text-decoration : none;
@@ -50,18 +56,24 @@
line-height : $font-size-medium * 1.5; line-height : $font-size-medium * 1.5;
} }
} }
}
&:hover { &:hover {
background: $color-blue-faint; background: $color-blue-faint;
border-color: $color-link-normal; border-color: $color-link-normal;
& > .right { & a > .right {
.title { .title {
color: $color-link-normal; color: $color-link-normal;
text-decoration: underline; text-decoration: underline;
} }
} }
} }
.view__mod_version_selector {
margin: 0;
padding: $size-margin-small $size-margin-medium;
}
} }
&.disabled { &.disabled {
@@ -6,6 +6,7 @@
# #
BaseController = require '../../base_controller' BaseController = require '../../base_controller'
ModVersionSelectorController = require '../../common/mod_version_selector/mod_version_selector_controller'
######################################################################################################################## ########################################################################################################################
@@ -19,6 +20,8 @@ module.exports = class ModTileController extends BaseController
# BaseController Overrides ##################################################################### # BaseController Overrides #####################################################################
onDidRender: -> onDidRender: ->
@modVersionSelector = @addChild ModVersionSelectorController, '.view__mod_version_selector', model:@model
@$link = @$('a') @$link = @$('a')
@$logoImage = @$('img') @$logoImage = @$('img')
@$title = @$('p.title') @$title = @$('p.title')
@@ -3,8 +3,7 @@
span.checkbox span.checkbox
span.label I have this mod in my modpack span.label I have this mod in my modpack
.version .version
span I'm using version: span Version:
select select
.warning. .warning.
<b>PLEASE NOTE:</b> By selecting "no", crafting plans, search, and other features will ignore items <b>PLEASE NOTE:</b> Crafting plans, search, and other features will ignore items and recipes from this mod.
and recipes from this mod.