User:Dr ishmael/Template:Recipe

From Guild Wars 2 Wiki
Jump to navigationJump to search

CSS for this template:

div.recipe-box {
  /* from div.infobox.recipe */
  width: 350px;
  display: inline-block;
  float: none;
  clear: none;
  vertical-align: top;
  font-size: 1em;
  margin: 0 1em 1em 0;
  
  /* from div.infobox */
  position: relative;
  background: #FFF;
  border: 1px solid #aaa;
  padding: 0;
  
  /* from div.infobox, div.nav .box */
  filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#ffffffff,EndColorStr=#ffeeeeee);
  background-image: linear-gradient(top,#fff 0%,#eee 100%);
  background-image: -o-linear-gradient(top,#fff 0%,#eee 100%);
  background-image: -moz-linear-gradient(top,#fff 0%,#eee 100%);
  background-image: -webkit-linear-gradient(top,#fff 0%,#eee 100%);
  background-image: -ms-linear-gradient(top,#fff 0%,#eee 100%);
  background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(1,#eee));
}

div.recipe-box::after {
  /* from div.infobox:after ... */
  bottom: -4px;
  content: "";
  position: absolute;
  width: 100%;
  left: 0;
  height: 3px;
  background-image: url(http://wiki.guildwars2.com/images/4/45/Shadow_after.png);
  background-size: 100% 3px;
}

div.recipe-box .heading {
  text-align: center;
  margin: 5px;
  background: #acbbc2;
  padding: 2px;
  font-weight: bold;
}

div.recipe-box dl {
  margin: 10px 0;
}

div.recipe-box dt {
  float: left;
  text-align: right;
  width: 78px;
  line-height: 1em;
  font-weight: 700;
  clear: left;
  border-right: 2px solid #acbbc2;
  margin: 0 -2px 0 0;
  padding: 2px 8px 2px 3px;
  line-height: 1.667em;
}

div.recipe-box dd {
  float: left;
  border-left: 2px solid #999;
  margin: 0;
  padding: 2px 7px;
}

/* For generic ingredient lists anywhere on the wiki */
div.ingredients dt {
  float: left;
  clear: left;
  text-align: right;
  font-weight: normal;
  width: 25px;  
  margin: 0 -2px 0 0;
  padding: 2px 2px 2px 3px;
  line-height: 1.667em;
  border: none;
}

div.ingredients dd {
  float: left;
  margin: 0;
  padding: 2px 7px;
  border: none;
}

div.ingredients dl {
  margin: 2px 0;
}


Parameters[edit]

id
The recipe ID
name
The recipe name (defaults to PAGENAME)
source
How the recipe is learned:
  • automatic - Learned automatically by gaining ranks in a discipline.
  • discovery - Learned by discovering the recipe.
  • <name of recipe sheet> - Learned from a recipe sheet.
type
The recipe type, i.e. the header it appears under in the recipe list.
discipline
The discipline(s) that can use the recipe. Accepts a comma-separated list (e.g. discipline = artificer, chef).
rating
The rating required in a discipline to use the recipe.
ingredient1
ingredient2
ingredient3
ingredient4
The ingredients of the recipe. Use the format: <quantity> <item name>, e.g. 1 Jug of Water

Example[edit]

{{User:Dr ishmael/Template:Recipe
| id = 1234
| name = Berserker's Orichalcum Sage-Stuffed Sapphire
| source = Discovery
| type = Dessert
| discipline = Chef, Weaponsmith
| rating = 400
| quantity = 1
| ingredient1 = 1 Sapphire Orb
| ingredient2 = 5 Orichalcum Setting
| ingredient3 = 250 Bowl of Sage Stuffing
| ingredient4 = 100 Berserker's Orichalcum Imbued Inscription
}}
Berserker's Orichalcum Sage-Stuffed Sapphire
Source
Discovery
Type
Dessert
Output qty.
1
Discipline
Chef tango icon 20px.png Chef
Weaponsmith tango icon 20px.png Weaponsmith
Req. rating
400
Chat link
1234
Ingredients