File size: 3,925 Bytes
1124cb0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<html><head><base href="temporal://royalnavy/data/history"><title>Royal Navy Temporal Data Archives</title>
<style>
  body {
    font-family: 'Georgia', serif;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
  }
  .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
  }
  header {
    background-color: #003366;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
  }
  h1 {
    margin: 0;
    font-size: 2.5em;
  }
  h2 {
    color: #003366;
    border-bottom: 2px solid #003366;
    padding-bottom: 10px;
  }
  .timeline {
    position: relative;
    padding: 20px 0;
  }
  .timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: #003366;
  }
  .event {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 20px;
    position: relative;
    width: 45%;
  }
  .event::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -15px;
    width: 30px;
    height: 30px;
    background-color: #003366;
    border-radius: 50%;
  }
  .event:nth-child(even) {
    margin-left: 55%;
  }
  .event:nth-child(even)::after {
    left: -15px;
  }
  .year {
    font-weight: bold;
    color: #003366;
    margin-bottom: 10px;
  }
  #timeSelector {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }
  #yearInput {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #003366;
  }
  #jumpButton {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #003366;
    color: #fff;
    border: none;
    cursor: pointer;
  }
  #jumpButton:hover {
    background-color: #004c99;
  }
</style>
</head>
<body>
  <header>
    <h1>Royal Navy Temporal Data Archives</h1>
  </header>
  
  <div class="container">
    <div id="timeSelector">
      <input type="number" id="yearInput" min="1500" max="2100" value="1805" placeholder="Enter year">
      <button id="jumpButton">Jump to Year</button>
    </div>
    
    <h2>Historical Timeline</h2>
    
    <div class="timeline" id="timeline">
      <!-- Timeline events will be dynamically inserted here -->
    </div>
  </div>

  <script>
    const timeline = document.getElementById('timeline');
    const yearInput = document.getElementById('yearInput');
    const jumpButton = document.getElementById('jumpButton');
    
    const events = [
      { year: 1545, event: "Mary Rose sinks in the Solent" },
      { year: 1588, event: "Defeat of the Spanish Armada" },
      { year: 1805, event: "Battle of Trafalgar" },
      { year: 1914, event: "Beginning of World War I naval operations" },
      { year: 1939, event: "Start of World War II naval engagements" },
      { year: 1982, event: "Falklands War naval campaign" },
      { year: 2020, event: "HMS Queen Elizabeth becomes fleet flagship" },
      { year: 2050, event: "First AI-controlled naval fleet deployed" }
    ];
    
    function displayEvents(centerYear) {
      timeline.innerHTML = '';
      events.forEach(evt => {
        if (Math.abs(evt.year - centerYear) <= 100) {
          const eventEl = document.createElement('div');
          eventEl.className = 'event';
          eventEl.innerHTML = `
            <div class="year">${evt.year}</div>
            <div class="description">${evt.event}</div>
          `;
          timeline.appendChild(eventEl);
        }
      });
    }
    
    jumpButton.addEventListener('click', () => {
      const year = parseInt(yearInput.value);
      if (year >= 1500 && year <= 2100) {
        displayEvents(year);
      } else {
        alert("Please enter a year between 1500 and 2100.");
      }
    });
    
    // Initial display centered on 1805 (Battle of Trafalgar)
    displayEvents(1805);
  </script>
</body></html>