Actions

Template

JourneyPage: Difference between revisions

From Dune Awakening DB

mNo edit summary
mNo edit summary
Line 209: Line 209:
</div>
</div>


<script>
 
// Build journey data from HTML data attributes
(function() {
    var journeyData = {};
    document.querySelectorAll('.journey-card').forEach(function(card) {
        var group = card.getAttribute('data-group');
        var journey = {
            id: parseInt(card.getAttribute('data-journey-id')),
            name: card.getAttribute('data-name'),
            slug: card.getAttribute('data-slug'),
            description: card.getAttribute('data-description'),
            tier: parseInt(card.getAttribute('data-tier')),
            category: card.getAttribute('data-category'),
            location: card.getAttribute('data-location'),
            group: group,
            reward_json: {}
        };
       
        // Parse reward JSON
        var rewardStr = card.getAttribute('data-reward');
        if (rewardStr) {
            try {
                journey.reward_json = JSON.parse(rewardStr);
            } catch(e) {}
        }
       
        if (!journeyData[group]) {
            journeyData[group] = [];
        }
        journeyData[group].push(journey);
    });
   
    // Store in global variable for JavaScript to use
    window.journeyDataFromHTML = journeyData;
})();
</script>


<!-- Popup container will be added by JavaScript -->
<!-- Popup container will be added by JavaScript -->

Revision as of 01:51, 26 May 2025

Template:Documentation

Journey Page Template

This template displays the journey tracking system for Dune Awakening.

Usage

Simply add {{JourneyPage}} to any page where you want the journey tracker to appear.

Features

  • Displays all journeys grouped by category
  • Interactive journey cards that show details when clicked
  • Progress tracking with checkboxes
  • Material prep list for each journey
  • Video guide links (when available)
  • Responsive design for different screen sizes

Dependencies

  • Template:JourneyPage/styles.css - Styling
  • MediaWiki:Common.js - JavaScript functionality

Database Tables

This template pulls data from:

  • data_journeys - Main journey information
  • data_journey_objectives - Objectives for each journey
  • data_journey_tasks - Tasks within objectives
  • data_journey_task_components - Materials needed for tasks