Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
65 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
require 'lib/helpers' | ||
helpers Helpers | ||
|
||
activate :minify_css | ||
activate :minify_javascript | ||
activate :directory_indexes | ||
|
||
set :haml, { :ugly => true, :format => :html5 } | ||
|
||
data.ingredients.each do |ingredient| | ||
proxy "/ingredients/#{ingredient.slug}.html", '/ingredient_template.html', locals: { ingredient: ingredient, title: "#{ingredient.name} - Skyrim Alchemy Potion Ingredients" } | ||
end | ||
|
||
data.effects.each do |effect| | ||
proxy "/effects/#{effect.slug}.html", '/effect_template.html', locals: { effect: effect, title: "#{effect.name} - Skyrim Alchemy Potion Effects" } | ||
end | ||
|
||
ignore '/effect_template.html' | ||
ignore '/ingredient_template.html' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
#top | ||
#main | ||
%h1 | ||
#{@effect.name} #{uesp_link(@effect)} | ||
#{effect.name} #{uesp_link(effect)} | ||
%h2 Ingredients: | ||
%p | ||
%i All ingredients for #{@effect.name}: | ||
%i All ingredients for #{effect.name}: | ||
%ul.ingredient-list.no-columns | ||
= render @effect.ingredients | ||
- ingredients_for(effect).each do |ingredient| | ||
%li | ||
%a.tooltip{ href: "/ingredients/#{ingredient.slug}", title: ingredient_tooltip(ingredient), class: ingredient.dlc.present? ? "dlc icon-#{ingredient.dlc.downcase}" : nil } | ||
= ingredient.name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,31 @@ | ||
#top | ||
#main | ||
%h1 | ||
#{@ingredient.name} #{uesp_link(@ingredient)} | ||
%h2 Where to find #{@ingredient.name}: | ||
%p= @ingredient.location | ||
#{ingredient.name} #{uesp_link(ingredient)} | ||
%h2 Where to find #{ingredient.name}: | ||
%p= ingredient.location | ||
%h2 Ideal ingredient matchers: | ||
- if @ingredient.matching_ingredients.any? | ||
- if matching_ingredients_for(ingredient).any? | ||
%p | ||
%i These are ingredients which have two or more effects in common with #{@ingredient.name}: | ||
%i These are ingredients which have two or more effects in common with #{ingredient.name}: | ||
%ul.ingredient-list.no-columns | ||
- @ingredient.matching_ingredients.each do |ingredient_with_effects| | ||
- matching_ingredients_for(ingredient).each do |matching_ingredient| | ||
%li | ||
%a.tooltip{ href: ingredient_path(ingredient_with_effects), title: tooltip(ingredient_with_effects), class: ingredient_with_effects.dlc.present? ? "dlc icon-#{ingredient_with_effects.dlc.name.downcase}" : nil } | ||
= ingredient_with_effects.name | ||
(#{effect_list(ingredient_with_effects)}) | ||
%a.tooltip{ href: "/ingredients/#{matching_ingredient.slug}", title: ingredient_tooltip(matching_ingredient), class: matching_ingredient.dlc.present? ? "dlc icon-#{matching_ingredient.dlc.downcase}" : nil } | ||
= matching_ingredient.name | ||
(#{matching_effects_list(ingredient, matching_ingredient)}) | ||
- else | ||
%p | ||
%i None | ||
%h2 Effects: | ||
%p | ||
%i All effects of #{@ingredient.name}, together with other ingredients that share the same effect: | ||
- @ingredient.effects.each do |effect| | ||
%i All effects of #{ingredient.name}, together with other ingredients that share the same effect: | ||
- effects_for(ingredient).each do |effect| | ||
%h3< | ||
= link_to effect.name, effect_path(effect), class: 'effect' | ||
= link_to effect.name, "/effects/#{effect.slug}", class: 'effect' | ||
= ':' | ||
%ul.ingredient-list | ||
= render (effect.ingredients - [@ingredient]) | ||
- ingredients_for(effect).each do |effect_ingredient| | ||
%li | ||
%a.tooltip{ href: "/ingredients/#{effect_ingredient.slug}", title: ingredient_tooltip(effect_ingredient), class: effect_ingredient.dlc.present? ? "dlc icon-#{effect_ingredient.dlc.downcase}" : nil } | ||
= effect_ingredient.name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters