|
|
| 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,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 | | |data = ItemID=item_id,InternalName=internal_name, |
| |where = name={{PAGENAME}} | | 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}}' <!-- ← quoted --> |
| |limit = 1 | | |limit = 1 |
| |cache = yes | | |cache = yes |
| }} | | }} |
| {{#for_external_table:| | | {{#for_external_table:| |
| | <!-- all your #vardefine lines stay exactly the same --> |
| {{#vardefine:ItemID|{{{ItemID}}}}}{{#vardefine:InternalName|{{{InternalName}}}}} | | {{#vardefine:ItemID|{{{ItemID}}}}}{{#vardefine:InternalName|{{{InternalName}}}}} |
| {{#vardefine:ResourceClass|{{{ResourceClass}}}}}{{#vardefine:ResourceSubclass|{{{ResourceSubclass}}}}} | | {{#vardefine:ResourceClass|{{{ResourceClass}}}}}{{#vardefine:ResourceSubclass|{{{ResourceSubclass}}}}} |
| Line 23: |
Line 34: |
| {{#vardefine:Category2|{{{Category2}}}}}{{#vardefine:Category3|{{{Category3}}}}} | | {{#vardefine:Category2|{{{Category2}}}}}{{#vardefine:Category3|{{{Category3}}}}} |
| }} | | }} |
| <!-- Breadcrumb navigation -->
| |
| <span id="menuRadialTrigger" class="menu-button-wrapper" style="cursor:pointer;">
| |
| [[File:MenuButton.png|100px|link=|alt=Menu]]
| |
| </span>
| |
| <span class="dune-breadcrumb-separator">/</span>[[{{#var:Category1}}|{{#var:Category1}}]]
| |
| <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><span>{{PAGENAME}}</span>
| |
| </div>
| |
|
| |
|
| <div class="responsive-container"> | | <!-- Breadcrumbs and left-column markup unchanged … --> |
|
| |
|
| <!-- Left Column: Resource Information -->
| | <!-- ========= CRAFTED WITH THIS RESOURCE (ingredient) ========= --> |
| <div class="responsive-col col1">
| | {{#get_external_data: |
| <div class="skin-pivot">
| | source = externaldb |
| <div class="dune-card">
| | |from = vw_recipe_by_ingredient |
| <div class="dune-card-decoration"></div>
| | |data = OutputItem = output_item, |
| <div class="dune-card-inner">
| | Resources = resources, |
| <div class="dune-card-label">{{#var:ResourceClass}} - {{#var:ResourceSubclass}}</div>
| | Stations = stations |
| <div class="dune-card-title"><span class="icon">◆</span> Resource Information</div>
| | |where = ingredient = '{{PAGENAME}}' |
| <div style="padding:3px;"></div>
| | |order by = Stations |
|
| | |limit = 5 |
| <!-- Image Section -->
| | |cache = yes |
| <div class="dune-card-image" style="text-align: center;">
| | }} |
| <div class="has-border">{{#if:{{#var:ImageLink}}
| | <div class="dune-table-wrapper"> |
| | [[File:{{#var:ImageLink}}|200px|alt={{#var:Name}}]]
| | <table class="infobox-dune-standard-table recipe-table" id="craftedWithTable"> |
| | [[File:Placeholder.png|200px|alt=No image available]]}}
| | <thead> |
| </div>
| | <tr class="tr-dark"> |
| </div>
| | <th style="width:35%;">Item Created</th> |
| <div style="padding:3px;"></div>
| | <th style="width:40%;">Resources Needed</th> |
|
| | <th style="width:25%;">Stations</th> |
| <!-- Description -->
| | </tr> |
| <div class="dune-card-description">{{#invoke:DataTableParserV2|iconize|{{#var:Description}}}}</div>
| | </thead> |
|
| | <tbody> |
| <!-- How to Obtain -->
| | {{#for_external_table:| |
| {{#if:{{#var:HowToObtain}}|
| | <tr class="recipe-row"> |
| <div class="dune-card-locked">
| | <td>{{#invoke:DataTableParserV2|iconize|{{{OutputItem}}}}}</td> |
| <div class="dune-card-locked-label"><span class="dune-card-locked-icon">📍</span>How to Obtain</div>
| | <td>{{#invoke:DataTableParserV2|formatRecipeList|{{{Resources}}}}}</td> |
| <div class="dune-card-locked-value">{{#var:HowToObtain}}</div>
| | <td>{{{Stations}}}</td> |
| </div>
| | </tr> |
| |}}
| | }} |
| <!-- Resource Stats Table -->
| | </tbody> |
| <div class="dune-table-wrapper">
| | </table> |
| <table class="infobox-dune-two-column">
| | </div> |
| <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>
| |
|
| |
|
| <!-- Middle Column: Crafting Recipes -->
| | <!-- ========= CRAFTED FROM (output recipes) ========= --> |
| <div class="responsive-col col2">
| | {{#get_external_data: |
| <div class="skin-pivot">
| | source = externaldb |
| <div class="dune-card">
| | |from = vw_recipe_summary |
| <div class="dune-card-decoration"></div>
| | |data = OutputItem = output_item, |
| <div class="dune-card-inner">
| | Resources = resources, |
| <div class="dune-card-label">CRAFTING</div>
| | Stations = station, |
| <div class="dune-card-title"><span class="icon">⚒</span> Crafting Recipes</div>
| | WaterML = water_ml, |
| <div style="padding:3px;"></div>
| | CraftTime = craft_time, |
|
| | Schematic = schematic |
| <!-- Crafted With Section -->
| | |where = output_item = '{{PAGENAME}}' |
| <div class="crafting-section">
| | |order by = station |
| <h3 class="dune-section-header">Crafted With This Resource</h3>
| | |limit = 5 |
| <div class="dune-card-description">Items that require {{#var:Name}} as an ingredient</div>
| | |cache = yes |
| <div class="recipe-search-container">
| | }} |
| <input type="text" id="craftedWithSearch" class="recipe-search-input" placeholder="Search recipes...">
| | <div class="dune-table-wrapper"> |
| </div>
| | <table class="infobox-dune-standard-table recipe-table" id="craftedFromTable"> |
| <div id="craftedWithPreview" class="recipe-table-preview">
| | <thead> |
| {{#get_external_data:
| | <tr class="tr-dark"> |
| source = externaldb
| | <th style="width:35%;">Item Created</th> |
| |from = data_recipe_ingredients
| | <th style="width:40%;">Resources Needed</th> |
| JOIN data_recipes ON data_recipe_ingredients.recipe_id = data_recipes.id
| | <th style="width:25%;">Stations</th> |
| JOIN data_recipe_stations ON data_recipes.id = data_recipe_stations.recipe_id
| | </tr> |
| |data = OutputItem = primary_output_label,
| | </thead> |
| Resources = GROUP_CONCAT(\DISTINCT CONCAT(
| | <tbody> |
| ingredient_label\, CHAR(32)\, CHAR(120)\, amount
| | {{#for_external_table:| |
| ) SEPARATOR CHAR(59)),
| | <tr class="recipe-row"> |
| Stations = GROUP_CONCAT(\DISTINCT production_type SEPARATOR CHAR(59))
| | <td>{{#invoke:DataTableParserV2|iconize|{{{OutputItem}}}}}</td> |
| |where = ingredient_label = {{PAGENAME}}
| | <td>{{#invoke:DataTableParserV2|formatRecipeList|{{{Resources}}}}}</td> |
| |group by = primary_output_label
| | <td>{{{Stations}}}</td> |
| |order by = primary_output_label
| | </tr> |
| |limit = 5
| | }} |
| |cache = yes
| | </tbody> |
| }}
| | </table> |
| <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 -->
| |
| <div class="responsive-col col3">
| |
| <div class="skin-pivot">
| |
| <div class="dune-card">
| |
| <div class="dune-card-decoration"></div>
| |
| <div class="dune-card-inner">
| |
| <div class="dune-card-label">VIDEO TUTORIALS</div>
| |
| <div class="dune-card-title"><span class="icon">▶</span> Resource Guide</div>
| |
| <div style="padding:3px;"></div>
| |
| <div class="dune-card-video" style="border:2px solid #e2d3ae;border-radius:4px;padding:2px;background-color:#262626;">
| |
| {{#if:{{#var:GuideLink}}
| |
| | <youtube>{{#var:GuideLink}}</youtube>
| |
| | <youtube>r8lxVDqoHLQ</youtube>}}
| |
| </div>
| |
| <div style="clear:both; padding:10px;"></div>
| |
| <div class="dune-card-title"><span class="icon">≡</span> Notes</div>
| |
| <div style="padding:3px;"></div>
| |
| <div class="dune-card-description">{{#invoke:DataTableParserV2|iconize|{{#var:AdditionalNotes}}}}</div>
| |
| {{#if:{{#var:LocationsToHarvest}}|
| |
| <div style="clear:both; padding:10px;"></div>
| |
| <div class="dune-card-title"><span class="icon">🗺</span> Harvest Locations</div>
| |
| <div style="padding:3px;"></div>
| |
| <div class="dune-card-description">{{#invoke:DataTableParserV2|iconize|{{#var:LocationsToHarvest}}}}</div>
| |
| |}}
| |
| </div>
| |
| </div>
| |
| </div>
| |
| </div>
| |
| </div> | | </div> |
|
| |
|
| <!-- Recipe Popup Template --> | | <!-- right-column & popup markup stay unchanged … --> |
| <script id="recipePopupTemplate" type="text/template">
| |
| <div class="recipe-popup-overlay">
| |
| <div class="recipe-popup">
| |
| <div class="popup-header">
| |
| <h3 class="popup-title">{{title}}</h3>
| |
| <button class="popup-close">×</button>
| |
| </div>
| |
| <div class="popup-content">
| |
| <div class="popup-search-container">
| |
| <input type="text" class="popup-search-input" placeholder="Search recipes...">
| |
| </div>
| |
| <div class="popup-table-wrapper">
| |
| <table class="infobox-dune-standard-table recipe-popup-table">
| |
| <thead>
| |
| <tr class="tr-dark">
| |
| <th>Item Created</th>
| |
| <th>Resources Needed</th>
| |
| <th>Stations</th>
| |
| <th>Water (mL)</th>
| |
| <th>Craft Time</th>
| |
| <th>Schematic</th>
| |
| </tr>
| |
| </thead>
| |
| <tbody>
| |
| {{tableRows}}
| |
| </tbody>
| |
| </table>
| |
| </div>
| |
| </div>
| |
| </div>
| |
| </div>
| |
| </script>
| |
| </includeonly> | | </includeonly> |