ResourcePage: Difference between revisions
From Dune Awakening DB
mNo edit summary |
mNo edit summary |
||
| Line 2: | Line 2: | ||
<div class="dune-breadcrumb-nav"> | <div class="dune-breadcrumb-nav"> | ||
<templatestyles src="Template:ResourcePage/styles.css" /> | <templatestyles src="Template:ResourcePage/styles.css" /> | ||
{{#get_external_data: | {{#get_external_data: | ||
source=externaldb | source = externaldb | ||
|from=data_items | |from = data_items | ||
|data=ItemID=item_id,InternalName=internal_name,ResourceClass=resource_class, | |data = ItemID=item_id,InternalName=internal_name,ResourceClass=resource_class,ResourceSubclass=resource_subclass,Tier=tier,Rarity=rarity,Faction=faction,Name=name,Description=description,HowToObtain=how_to_obtain,Notes=notes,AdditionalNotes=additional_notes,Weight=weight,MaxStacks=max_stacks,XPPerHarvest=xp_per_harvest,BaseVendorPrice=base_vendor_price,LocationsToHarvest=locations_to_harvest,GuideLink=guide_link,IconLink=icon_link,ImageLink=image_link,Category1=category_1,Category2=category_2,Category3=category_3 | ||
|where = name={{PAGENAME}} | |||
|limit = 1 | |||
|cache = yes | |||
|where=name={{PAGENAME}} | |||
|limit=1 | |||
|cache=yes | |||
}} | }} | ||
{{#for_external_table:| | {{#for_external_table:| | ||
| Line 32: | Line 23: | ||
{{#vardefine:Category2|{{{Category2}}}}}{{#vardefine:Category3|{{{Category3}}}}} | {{#vardefine:Category2|{{{Category2}}}}}{{#vardefine:Category3|{{{Category3}}}}} | ||
}} | }} | ||
<!-- Breadcrumb navigation --> | |||
<!-- Breadcrumb --> | |||
<span id="menuRadialTrigger" class="menu-button-wrapper" style="cursor:pointer;"> | <span id="menuRadialTrigger" class="menu-button-wrapper" style="cursor:pointer;"> | ||
[[File:MenuButton.png|100px|link=|alt=Menu]] | [[File:MenuButton.png|100px|link=|alt=Menu]] | ||
| Line 40: | Line 30: | ||
<span class="dune-breadcrumb-separator">/</span>[[{{#var:Category2}}|{{#var:Category2}}]] | <span class="dune-breadcrumb-separator">/</span>[[{{#var:Category2}}|{{#var:Category2}}]] | ||
<span class="dune-breadcrumb-separator">/</span>[[{{#var:Category3}}|{{#var:Category3}}]] | <span class="dune-breadcrumb-separator">/</span>[[{{#var:Category3}}|{{#var:Category3}}]] | ||
<span class="dune-breadcrumb-separator">/</span><span>{{PAGENAME}}</span></div> | <span class="dune-breadcrumb-separator">/</span><span>{{PAGENAME}}</span> | ||
</div> | |||
<div class="responsive-container"> | <div class="responsive-container"> | ||
<!-- | <!-- Left Column: Resource Information --> | ||
<div class="responsive-col col1"> | |||
<div class="skin-pivot"> | |||
<div class="dune-card"> | |||
< | <div class="dune-card-decoration"></div> | ||
<div class="dune-card-inner"> | |||
<div class="dune-card-label">{{#var:ResourceClass}} - {{#var:ResourceSubclass}}</div> | |||
<div class="dune-card-title"><span class="icon">◆</span> Resource Information</div> | |||
<div style="padding:3px;"></div> | |||
<!-- Image Section --> | |||
<div class="dune-card-image" style="text-align: center;"> | |||
<div class="has-border">{{#if:{{#var:ImageLink}} | |||
| [[File:{{#var:ImageLink}}|200px|alt={{#var:Name}}]] | |||
| [[File:Placeholder.png|200px|alt=No image available]]}} | |||
</div> | |||
</div> | |||
<div style="padding:3px;"></div> | |||
<!-- Description --> | |||
<div class="dune-card-description">{{#invoke:DataTableParserV2|iconize|{{#var:Description}}}}</div> | |||
<!-- How to Obtain --> | |||
<div class="dune- | {{#if:{{#var:HowToObtain}}| | ||
< | <div class="dune-card-locked"> | ||
<div class="dune-card-locked-label"><span class="dune-card-locked-icon">📍</span>How to Obtain</div> | |||
<div class="dune-card-locked-value">{{#var:HowToObtain}}</div> | |||
</div> | |||
|}} | |||
<!-- Resource Stats Table --> | |||
<div class="dune-table-wrapper"> | |||
<table class="infobox-dune-two-column"> | |||
<tr><th><span class="icon">{{#if:{{#var:IconLink}}|[[File:{{#var:IconLink}}|16px]]|}}</span> Tier</th><td>{{#var:Tier}}</td></tr> | |||
<tr><th><span class="icon">✦</span> Rarity</th><td>{{#var:Rarity}}</td></tr> | |||
<tr><th><span class="icon">🏛</span> Faction</th><td>{{#var:Faction}}</td></tr> | |||
<tr><th><span class="icon">⚖</span> Weight</th><td>{{#var:Weight}} kg</td></tr> | |||
<tr><th><span class="icon">📦</span> Max Stacks</th><td>{{#var:MaxStacks}}</td></tr> | |||
<tr><th><span class="icon">💰</span> Base Vendor Price</th><td>{{#var:BaseVendorPrice}} Solaris</td></tr> | |||
<tr><th><span class="icon">⭐</span> XP per Harvest</th><td>{{#var:XPPerHarvest}}</td></tr> | |||
</ | </table> | ||
</div> | </div> | ||
</div> | |||
</div> | |||
< | </div> | ||
{{# | </div> | ||
}} | |||
<div class="dune-table-wrapper"> | |||
<table class="infobox-dune- | |||
</table> | |||
</div> | |||
< | |||
</div | |||
</ | |||
<!-- Middle Column: Crafting Recipes --> | |||
<div class="responsive-col col2"> | |||
<div class="skin-pivot"> | |||
<div class="dune-card"> | |||
<div class="dune-card-decoration"></div> | |||
<div class="dune-card-inner"> | |||
<div class="dune-card-label">CRAFTING</div> | |||
<div class="dune-card-title"><span class="icon">⚒</span> Crafting Recipes</div> | |||
<div style="padding:3px;"></div> | |||
<!-- Crafted With Section --> | |||
<div class="crafting-section"> | |||
<h3 class="dune-section-header">Crafted With This Resource</h3> | |||
<div class="dune-card-description">Items that require {{#var:Name}} as an ingredient</div> | |||
<div class="recipe-search-container"> | |||
<input type="text" id="craftedWithSearch" class="recipe-search-input" placeholder="Search recipes..."> | |||
</div> | |||
<div id="craftedWithPreview" class="recipe-table-preview"> | |||
{{#get_external_data: | |||
source = externaldb | |||
|from = data_recipe_ingredients | |||
JOIN data_recipes ON data_recipe_ingredients.recipe_id = data_recipes.id | |||
JOIN data_recipe_stations ON data_recipes.id = data_recipe_stations.recipe_id | |||
|data = OutputItem = primary_output_label, | |||
Resources = GROUP_CONCAT(\DISTINCT CONCAT( | |||
ingredient_label\, CHAR(32)\, CHAR(120)\, amount | |||
) SEPARATOR CHAR(59)), | |||
Stations = GROUP_CONCAT(\DISTINCT production_type SEPARATOR CHAR(59)) | |||
|where = ingredient_label = {{PAGENAME}} | |||
|group by = primary_output_label | |||
|order by = primary_output_label | |||
|limit = 5 | |||
|cache = yes | |||
}} | |||
<div class="dune-table-wrapper"> | |||
<table class="infobox-dune-standard-table recipe-table" id="craftedWithTable"> | |||
<thead> | |||
<tr class="tr-dark"> | |||
<th style="width:35%;">Item Created</th> | |||
<th style="width:40%;">Resources Needed</th> | |||
<th style="width:25%;">Stations</th> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
{{#for_external_table:| | |||
<tr class="recipe-row"> | |||
<td>{{#invoke:DataTableParserV2|iconize|{{{OutputItem}}}}}</td> | |||
<td>{{#invoke:DataTableParserV2|formatRecipeList|{{{Resources}}}}}</td> | |||
<td>{{{Stations}}}</td> | |||
</tr> | |||
}} | |||
</tbody> | |||
</table> | |||
</div> | |||
</div> | |||
<div class="recipe-actions"> | |||
<button class="dune-action-button view-all-crafted-with" data-resource="{{PAGENAME}}"> | |||
<span class="icon">📋</span> View All Recipes | |||
</button> | |||
</div> | |||
</div> | |||
<div style="clear:both; padding:10px;"></div> | |||
<!-- Crafted From Section --> | |||
<div class="crafting-section"> | |||
<h3 class="dune-section-header">Crafted From</h3> | |||
<div class="dune-card-description">Recipes that produce {{#var:Name}}</div> | |||
<div class="recipe-search-container"> | |||
<input type="text" id="craftedFromSearch" class="recipe-search-input" placeholder="Search recipes..."> | |||
</div> | |||
<div id="craftedFromPreview" class="recipe-table-preview"> | |||
{{#get_external_data: | |||
source = externaldb | |||
|from = data_recipe_outcomes | |||
JOIN data_recipes ON data_recipe_outcomes.recipe_id = data_recipes.id | |||
JOIN data_recipe_ingredients ON data_recipes.id = data_recipe_ingredients.recipe_id | |||
JOIN data_recipe_stations ON data_recipes.id = data_recipe_stations.recipe_id | |||
|data = OutputItem = output_label, | |||
Resources = GROUP_CONCAT(\DISTINCT CONCAT( | |||
ingredient_label\, CHAR(32)\, CHAR(120)\, amount | |||
) SEPARATOR CHAR(59)), | |||
Stations = GROUP_CONCAT(\DISTINCT production_type SEPARATOR CHAR(59)) | |||
|where = output_label = {{PAGENAME}} | |||
|group by = output_label | |||
|order by = output_label | |||
|limit = 5 | |||
|cache = yes | |||
}} | |||
<div class="dune-table-wrapper"> | |||
<table class="infobox-dune-standard-table recipe-table" id="craftedFromTable"> | |||
<thead> | |||
<tr class="tr-dark"> | |||
<th style="width:35%;">Item Created</th> | |||
<th style="width:40%;">Resources Needed</th> | |||
<th style="width:25%;">Stations</th> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
{{#for_external_table:| | |||
<tr class="recipe-row"> | |||
<td>{{#invoke:DataTableParserV2|iconize|{{{OutputItem}}}}}</td> | |||
<td>{{#invoke:DataTableParserV2|formatRecipeList|{{{Resources}}}}}</td> | |||
<td>{{{Stations}}}</td> | |||
</tr> | |||
}} | |||
</tbody> | |||
</table> | |||
</div> | |||
</div> | |||
<div class="recipe-actions"> | |||
<button class="dune-action-button view-all-crafted-from" data-resource="{{PAGENAME}}"> | |||
<span class="icon">📋</span> View All Recipes | |||
</button> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<!-- Right Column: Resource Guide --> | <!-- Right Column: Resource Guide --> | ||
| Line 149: | Line 216: | ||
| <youtube>r8lxVDqoHLQ</youtube>}} | | <youtube>r8lxVDqoHLQ</youtube>}} | ||
</div> | </div> | ||
<div style="clear:both; padding:10px;"></div> | <div style="clear:both; padding:10px;"></div> | ||
<div class="dune-card-title"><span class="icon">≡</span> Notes</div> | <div class="dune-card-title"><span class="icon">≡</span> Notes</div> | ||
<div style="padding:3px;"></div> | <div style="padding:3px;"></div> | ||
<div class="dune-card-description">{{#invoke:DataTableParserV2|iconize|{{#var:AdditionalNotes}}}}</div> | <div class="dune-card-description">{{#invoke:DataTableParserV2|iconize|{{#var:AdditionalNotes}}}}</div> | ||
{{#if:{{#var:LocationsToHarvest}}| | {{#if:{{#var:LocationsToHarvest}}| | ||
<div style="clear:both; padding:10px;"></div> | <div style="clear:both; padding:10px;"></div> | ||
<div class="dune-card-title"><span class="icon">🗺</span> Harvest Locations</div> | <div class="dune-card-title"><span class="icon">🗺</span> Harvest Locations</div> | ||
<div style="padding:3px;"></div> | <div style="padding:3px;"></div> | ||
| Line 203: | Line 265: | ||
</div> | </div> | ||
</script> | </script> | ||
</includeonly> | |||
