Add initial version of the home page
This commit is contained in:
+53
-6
@@ -22,6 +22,48 @@ All rights reserved.
|
||||
|
||||
.error-new { background: $color-error-new !important; }
|
||||
|
||||
.sidebar {
|
||||
position: relative; width: 18.75%;
|
||||
|
||||
display: inline-block;
|
||||
padding: 1em;
|
||||
vertical-align: top;
|
||||
|
||||
.titleImage {
|
||||
position: relative; height: 16em; width: 16em;
|
||||
margin-bottom: 2em;
|
||||
|
||||
a {
|
||||
position: relative; width: 100%;
|
||||
|
||||
img {
|
||||
@include pixel-image;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.externalLink {
|
||||
position: relative; width: 80%;
|
||||
margin: 0 10%;
|
||||
display: none;
|
||||
|
||||
p {
|
||||
font-family: $font-family-normal;
|
||||
font-size: $font-size-normal;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mainBody {
|
||||
position: relative; width: 81.25%;
|
||||
|
||||
display: inline-block;
|
||||
padding: 1em;
|
||||
padding-top: 2em;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-top: 3em;
|
||||
|
||||
@@ -31,14 +73,19 @@ All rights reserved.
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-family: $font-family-header;
|
||||
font-size: $font-size-normal;
|
||||
margin: 2em 0 0 0.5em;
|
||||
}
|
||||
|
||||
.entry {
|
||||
position: relative; width: 100%;
|
||||
padding: 0 2em;
|
||||
}
|
||||
|
||||
.panel {
|
||||
background: white;
|
||||
padding: 1em;
|
||||
|
||||
& > div {
|
||||
position: relative; width: 33%;
|
||||
display: inline-block;
|
||||
padding: 0.5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
Crafting Guide - home_page.scss
|
||||
|
||||
Copyright (C) 2015 by Redwood Labs
|
||||
All rights reserved.
|
||||
*/
|
||||
|
||||
.view__home_page {
|
||||
h2 {
|
||||
font-size: $font-size-x-large;
|
||||
}
|
||||
|
||||
p {
|
||||
font-family: $font-family-normal;
|
||||
font-size: $font-size-normal;
|
||||
line-height: 1.25em;
|
||||
margin: 1em 0;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
font-family: $font-family-normal;
|
||||
font-size: $font-size-normal;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
ol {
|
||||
list-style-type: decimal;
|
||||
margin: 0.5em 4em 2em 4em;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: disc outside;
|
||||
margin: 0.5em 4em 2em 4em;
|
||||
}
|
||||
|
||||
.intro {
|
||||
font-size: $font-size-large;
|
||||
}
|
||||
|
||||
.section:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.section-link {
|
||||
color: $color-active;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ All rights reserved.
|
||||
@import 'crafting_table';
|
||||
@import 'feedback';
|
||||
@import 'full_recipe';
|
||||
@import 'home_page';
|
||||
@import 'inventory';
|
||||
@import 'inventory_table';
|
||||
@import 'item';
|
||||
|
||||
@@ -13,38 +13,7 @@ All rights reserved.
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: relative; width: 18.75%;
|
||||
padding: 1em;
|
||||
|
||||
.titleImage {
|
||||
position: relative; height: 16em; width: 16em;
|
||||
margin-bottom: 2em;
|
||||
|
||||
img {
|
||||
position: relative; width: 100%;
|
||||
@include pixel-image;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
position: relative; width: 80%;
|
||||
margin: 0 10%;
|
||||
display: none;
|
||||
|
||||
p {
|
||||
font-family: $font-family-normal;
|
||||
font-size: $font-size-normal;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mainBody {
|
||||
position: relative; width: 81.25%;
|
||||
padding: 1em;
|
||||
padding-top: 2em;
|
||||
|
||||
h1.name {
|
||||
font-family: $font-family-header;
|
||||
font-size: $font-size-x-large;
|
||||
@@ -92,4 +61,12 @@ All rights reserved.
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.panel {
|
||||
& > div {
|
||||
position: relative; width: 33%;
|
||||
display: inline-block;
|
||||
padding: 0.5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,42 +14,15 @@ All rights reserved.
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: relative; width: 18.75%;
|
||||
padding: 1em;
|
||||
|
||||
.titleImage {
|
||||
position: relative; height: 16em; width: 16em;
|
||||
margin-bottom: 2em;
|
||||
|
||||
img {
|
||||
position: relative; width: 100%;
|
||||
@include pixel-image;
|
||||
}
|
||||
}
|
||||
|
||||
.version {
|
||||
position: relative; width: 80%;
|
||||
margin: 0 10%;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
a {
|
||||
position: relative; width: 80%;
|
||||
margin: 0 10%;
|
||||
display: none;
|
||||
|
||||
p {
|
||||
font-family: $font-family-normal;
|
||||
font-size: $font-size-normal;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mainBody {
|
||||
position: relative; width: 81.25%;
|
||||
padding: 1em;
|
||||
padding-top: 2em;
|
||||
|
||||
.name {
|
||||
font-family: $font-family-header;
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
.divider.bottom
|
||||
|
||||
.navBar
|
||||
a(data-page="whats_new", href="/")
|
||||
p What's New?
|
||||
a(data-page="home", href="/")
|
||||
p Home
|
||||
.dot
|
||||
a(data-page="configure", href="/configure")
|
||||
p Configure
|
||||
|
||||
@@ -10,7 +10,7 @@ CraftingTableController = require './crafting_table_controller'
|
||||
{Event} = require '../constants'
|
||||
ImageLoader = require './image_loader'
|
||||
InventoryController = require './inventory_controller'
|
||||
CraftingPage = require '../models/craft_page'
|
||||
CraftPage = require '../models/craft_page'
|
||||
ModPackController = require './mod_pack_controller'
|
||||
NameFinder = require '../models/name_finder'
|
||||
Storage = require '../models/storage'
|
||||
@@ -19,13 +19,13 @@ Storage = require '../models/storage'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
module.exports = class CraftingPageController extends BaseController
|
||||
module.exports = class CraftPageController extends BaseController
|
||||
|
||||
constructor: (options={})->
|
||||
if not options.imageLoader? then throw new Error 'options.imageLoader is required'
|
||||
if not options.modPack? then throw new Error 'options.modPack is required'
|
||||
|
||||
options.model ?= new CraftingPage modPack:options.modPack
|
||||
options.model ?= new CraftPage modPack:options.modPack
|
||||
options.storage ?= new Storage storage:window.localStorage
|
||||
options.templateName = 'craft_page'
|
||||
super options
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
###
|
||||
Crafting Guide - home_page_controller.coffee
|
||||
|
||||
Copyright (c) 2015 by Redwood Labs
|
||||
All rights reserved.
|
||||
###
|
||||
|
||||
BaseController = require './base_controller'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
module.exports = class HomeController extends BaseController
|
||||
|
||||
constructor: (options={})->
|
||||
options.templateName = 'home_page'
|
||||
super options
|
||||
|
||||
# Backbone.View Overrides ######################################################################
|
||||
|
||||
events: ->
|
||||
return _.extend super,
|
||||
'click .mainBody a': 'routeLinkClick'
|
||||
@@ -1,16 +0,0 @@
|
||||
###
|
||||
Crafting Guide - whats_new_page_controller.coffee
|
||||
|
||||
Copyright (c) 2015 by Redwood Labs
|
||||
All rights reserved.
|
||||
###
|
||||
|
||||
BaseController = require './base_controller'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
module.exports = class WhatsNewController extends BaseController
|
||||
|
||||
constructor: (options={})->
|
||||
options.templateName = 'whats_new_page'
|
||||
super options
|
||||
@@ -23,7 +23,7 @@ ModPageController = require './controllers/mod_page_controller'
|
||||
Storage = require './models/storage'
|
||||
{Url} = require './constants'
|
||||
UrlParams = require './url_params'
|
||||
WhatsNewPageController = require './controllers/whats_new_page_controller'
|
||||
HomePageController = require './controllers/home_page_controller'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
@@ -64,7 +64,7 @@ module.exports = class CraftingGuideRouter extends Backbone.Router
|
||||
@_recordPageView()
|
||||
|
||||
routes:
|
||||
'': 'route__whats_new'
|
||||
'': 'route__home'
|
||||
'browse': 'route__browse'
|
||||
'browse/:modSlug': 'route__browseMod'
|
||||
'browse/:modSlug/:itemSlug': 'route__browseModItem'
|
||||
@@ -78,13 +78,13 @@ module.exports = class CraftingGuideRouter extends Backbone.Router
|
||||
|
||||
# Route Methods ################################################################################
|
||||
|
||||
route__whats_new: ->
|
||||
route__home: ->
|
||||
params = new UrlParams recipeName:{type:'string'}, count:{type:'integer'}
|
||||
if params.recipeName?
|
||||
@deprecated__v1_root params
|
||||
return
|
||||
|
||||
@_setPage 'whats_new', new WhatsNewPageController _.extend {}, @_defaultOptions
|
||||
@_setPage 'home', new HomePageController _.extend {}, @_defaultOptions
|
||||
|
||||
route__browse: ->
|
||||
@_setPage 'browse', new BrowsePageController _.extend {}, @_defaultOptions
|
||||
|
||||
@@ -14,7 +14,7 @@ ModPack = require './mod_pack'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
module.exports = class CraftingPage extends BaseModel
|
||||
module.exports = class CraftPage extends BaseModel
|
||||
|
||||
constructor: (attributes={}, options={})->
|
||||
attributes.modPack ?= new ModPack
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
//-
|
||||
//- Crafting Guide - home_page.jade
|
||||
//-
|
||||
//- Copyright (c) 2015 by Redwood Labs
|
||||
//- All rights reserved.
|
||||
//-
|
||||
|
||||
.view__home_page
|
||||
.sidebar
|
||||
.titleImage <a href="/browse/minecraft"><img src="/data/minecraft/logo.png"></a>
|
||||
.titleImage: img(src='/data/buildcraft/logo.png')
|
||||
.titleImage: img(src='/data/industrial_craft_2/logo.png')
|
||||
.titleImage: img(src='/data/applied_energistics_2/logo.png')
|
||||
.titleImage: img(src='/data/thermal_expansion/logo.png')
|
||||
.titleImage: img(src='/data/enderio/logo.png')
|
||||
.titleImage: img(src='/data/railcraft/logo.png')
|
||||
|
||||
.mainBody
|
||||
.section
|
||||
h2 Welcome!
|
||||
.panel
|
||||
.entry
|
||||
p.intro.
|
||||
Crafting Guide is the ultimate resource for Minecraft. Whether you're punching trees or building
|
||||
reactors, you'll find everything you need right here.
|
||||
ul
|
||||
li.intro Can't remember the recipe for a <a href="/browse/buildcraft/quarry">BuildCraft Quarry</a>?
|
||||
li.intro Curious to see all the blocks added by <a href="/browse/railcraft">Railcraft</a>?
|
||||
li.intro Want step-by-step directions for making a full <a
|
||||
| href="/craft/quantumsuit_bodyarmor:quantumsuit_boots:quantumsuit_helmet:quantumsuit_leggings"
|
||||
| >IC2 QuantumSuit</a>?
|
||||
p.intro No problem. Crafting Guide can do it all.
|
||||
p.
|
||||
<a class="section-link" href='/configure'>Configure<a> which mods you're using, and the entire
|
||||
site will update itself to your mod pack.
|
||||
p.
|
||||
<a class="section-link" href='/browse'>Browse<a> through your own customized item catalog to
|
||||
see full recipe lists, related items, recipes added by each tool, and even which items can be
|
||||
made from the item you're looking at.
|
||||
p.
|
||||
<a class="section-link" href='/craft'>Craft<a> any number of items from your mod pack to see a
|
||||
full list of raw ingredients, and recipe-by-recipe instructions on how to make everything on
|
||||
your list. No item is too complex, and no build is too big.
|
||||
|
||||
.section
|
||||
h2 What's new?
|
||||
.panel
|
||||
h3 2015-02-28
|
||||
.entry
|
||||
p.
|
||||
This release delivers the second major expansion of Crafting Guide! Here's the list of what's
|
||||
new:
|
||||
ul
|
||||
li New home page!
|
||||
li Moved the crafting planner (the old home page) to its own <a href="/craft">Craft</a> page
|
||||
li Moved mod pack management to the new <a href="/configure">Configure</a> page
|
||||
li Added a <a href="/browse">Browse</a> page where you can peruse the list of supported mods
|
||||
|
||||
h3 2015-02-26
|
||||
.entry
|
||||
p.
|
||||
This release adds a new section to the item pages called "Used as Tool to Make". The new section
|
||||
shows all the other items which can be made by that tool. For example, the IC2 Macerator shows
|
||||
a bunch of things like Iron Dust, Gold Dust, etc.
|
||||
|
||||
h3 2015-02-24
|
||||
.entry
|
||||
p.
|
||||
This release changes the crafting page to let you modify the quantity of items in the "Items You
|
||||
Want" and "Items You Have" section. Let's say you want to make <a
|
||||
href="/craft/64.potion_of_healing">64 Potions of Healing</a>. You add "Potion of Healing" just
|
||||
as as you always did, but now you can click on the quantity to change it to whatever you want.
|
||||
p.
|
||||
At the same time, I've changed the quantity field to allow up to 9999 of any item. Have fun with
|
||||
those huge builds!
|
||||
|
||||
h3 2015-02-22
|
||||
.entry
|
||||
p.
|
||||
Woo hoo! Or, should I say: Choo choo! I just added support for RailCraft! I also pushed up lots
|
||||
of performance improvements (55% faster at computing crafting plans)! Hopefully, you won't
|
||||
really notice anything except that entering new items and computing really complicated crafting
|
||||
plans don't take so long.
|
||||
|
||||
h3 2015-02-19
|
||||
.entry
|
||||
p.
|
||||
I just made some major updates to the crafting algorithm. Without getting into details, I'll say
|
||||
that there are a few things you should notice:
|
||||
ol
|
||||
li it will favor recipes which produce more of an item versus those which produce fewer (e.g.,
|
||||
| IC2 plates get made with the Block Cutter instead of the Forge Hammer)
|
||||
li metal ingots will frequently (but not always) get crafted using 2x recipes instead of
|
||||
| smelting ore directly in a furnace
|
||||
li recipes for vanilla items added by mods are now available (e.g., smelting Iron Dust into Iron
|
||||
| ingots)
|
||||
|
||||
h3 2015-02-10
|
||||
.entry
|
||||
p.
|
||||
I just pushed up some fixes to avoid confusing various items of the same name from different
|
||||
mods. The best example of this are the two Wrenches from Buildcraft and IC2, but there are a
|
||||
bunch of others.
|
||||
|
||||
h3 2015-02-09
|
||||
.entry
|
||||
p.
|
||||
This release fixes a number of small issues and improves performance in a number of places. Most
|
||||
especially, all links within the site have been changed to update the page in place without the
|
||||
need to re-download anything. This should make browsing between item pages <i>much</i> faster.
|
||||
|
||||
h3 2015-02-08
|
||||
.entry
|
||||
p.
|
||||
This is the singlest largest expansion of the website yet! Each item from each mod now has its
|
||||
own page! This will expand in the future, but for now this shows all the recipes for the item as
|
||||
well as all the closely related items and the others items that can be made using the item.
|
||||
p.
|
||||
This also changes things so that links to Crafting Guide from other sites will first go to the
|
||||
item's page (instead of to the crafting plan). Not to worry though... there's still a direct
|
||||
link from each item to the full crafting plan for that item.
|
||||
|
||||
h3 2015-02-02
|
||||
.entry
|
||||
p.
|
||||
Crafting Guide now has support for EnderIO! I tend to add new mods in order of those with the
|
||||
most votes, so remember to suggest your favorites!
|
||||
|
||||
h3 2015-01-30
|
||||
.entry
|
||||
p.
|
||||
I've just updated the mod pages to allow the items to be grouped into logical sections. This
|
||||
makes it a lot easier to get a feel for what kinds of things a mod adds and it makes it a lot
|
||||
easier to find things.
|
||||
@@ -1,8 +0,0 @@
|
||||
//-
|
||||
//- Crafting Guide - whats_new_page.jade
|
||||
//-
|
||||
//- Copyright (c) 2015 by Redwood Labs
|
||||
//- All rights reserved.
|
||||
//-
|
||||
|
||||
h1 What's new?
|
||||
Reference in New Issue
Block a user