added fancies
This commit is contained in:
parent
d071ec88a9
commit
f9487a48b9
9 changed files with 195 additions and 40 deletions
4
feed.xml
4
feed.xml
|
@ -1,11 +1,11 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||||
<title>Juli's site</title>
|
<title>Juli's site</title>
|
||||||
<link>https://julimiro.eu</link>
|
<link>http://localhost:8000</link>
|
||||||
<updated>2024-09-14</updated>
|
<updated>2024-09-14</updated>
|
||||||
<entry>
|
<entry>
|
||||||
<title>silly test page</title>
|
<title>silly test page</title>
|
||||||
<link href="https://julimiro.eu/posts/test"/>
|
<link href="http://localhost:8000/posts/test"/>
|
||||||
<updated>2024-09-14</updated>
|
<updated>2024-09-14</updated>
|
||||||
<summary></summary>
|
<summary></summary>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
17
index.html
17
index.html
|
@ -15,6 +15,7 @@
|
||||||
<meta name="twitter:description" content="a silly fur's page" />
|
<meta name="twitter:description" content="a silly fur's page" />
|
||||||
<script src="/static/particles.js"></script>
|
<script src="/static/particles.js"></script>
|
||||||
<script src="/static/animal.js"></script>
|
<script src="/static/animal.js"></script>
|
||||||
|
<script src="/static/info.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="/static/oneko.js"></script>
|
<script src="/static/oneko.js"></script>
|
||||||
|
@ -63,24 +64,30 @@
|
||||||
</header>
|
</header>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/">Home</a></li>
|
<li><a href="http://localhost:8000/">Home</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/posts.html">Posts</a></li>
|
<li><a href="http://localhost:8000/posts.html">Posts</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/contact">Contact</a></li>
|
<li><a href="http://localhost:8000/pages/contact">Contact</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/feed">Feed</a></li>
|
<li><a href="http://localhost:8000/pages/feed">Feed</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/license">License info</a></li>
|
<li><a href="http://localhost:8000/pages/license">License info</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="sidebar_box container">
|
||||||
|
<p id="time">Current time could not be loaded.</p>
|
||||||
|
<div id="song"><p>Current song could not be loaded.</p></div>
|
||||||
|
<div id="weather"><p>Current weather could not be loaded.</p></div>
|
||||||
|
</div>
|
||||||
<div class="sidebar_box container">
|
<div class="sidebar_box container">
|
||||||
<div class="animal_div">
|
<div class="animal_div">
|
||||||
<img src="" id="animal_img" alt="randomly picked image of cute animal">
|
<img src="" id="animal_img" alt="randomly picked image of cute animal">
|
||||||
<p id="animal_subtitle"></p>
|
<p id="animal_subtitle"></p>
|
||||||
<p>Images stolen from <a target="_blank" href="https://tinyfox.dev/image-list/">tinyfox.dev</a></p>
|
<p>Images stolen from <a target="_blank" href="https://tinyfox.dev/image-list/">tinyfox.dev</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<meta name="twitter:description" content="a silly fur's page" />
|
<meta name="twitter:description" content="a silly fur's page" />
|
||||||
<script src="/static/particles.js"></script>
|
<script src="/static/particles.js"></script>
|
||||||
<script src="/static/animal.js"></script>
|
<script src="/static/animal.js"></script>
|
||||||
|
<script src="/static/info.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="/static/oneko.js"></script>
|
<script src="/static/oneko.js"></script>
|
||||||
|
@ -42,24 +43,30 @@
|
||||||
</header>
|
</header>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/">Home</a></li>
|
<li><a href="http://localhost:8000/">Home</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/posts.html">Posts</a></li>
|
<li><a href="http://localhost:8000/posts.html">Posts</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/contact">Contact</a></li>
|
<li><a href="http://localhost:8000/pages/contact">Contact</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/feed">Feed</a></li>
|
<li><a href="http://localhost:8000/pages/feed">Feed</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/license">License info</a></li>
|
<li><a href="http://localhost:8000/pages/license">License info</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="sidebar_box container">
|
||||||
|
<p id="time">Current time could not be loaded.</p>
|
||||||
|
<div id="song"><p>Current song could not be loaded.</p></div>
|
||||||
|
<div id="weather"><p>Current weather could not be loaded.</p></div>
|
||||||
|
</div>
|
||||||
<div class="sidebar_box container">
|
<div class="sidebar_box container">
|
||||||
<div class="animal_div">
|
<div class="animal_div">
|
||||||
<img src="" id="animal_img" alt="randomly picked image of cute animal">
|
<img src="" id="animal_img" alt="randomly picked image of cute animal">
|
||||||
<p id="animal_subtitle"></p>
|
<p id="animal_subtitle"></p>
|
||||||
<p>Images stolen from <a target="_blank" href="https://tinyfox.dev/image-list/">tinyfox.dev</a></p>
|
<p>Images stolen from <a target="_blank" href="https://tinyfox.dev/image-list/">tinyfox.dev</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<meta name="twitter:description" content="a silly fur's page" />
|
<meta name="twitter:description" content="a silly fur's page" />
|
||||||
<script src="/static/particles.js"></script>
|
<script src="/static/particles.js"></script>
|
||||||
<script src="/static/animal.js"></script>
|
<script src="/static/animal.js"></script>
|
||||||
|
<script src="/static/info.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="/static/oneko.js"></script>
|
<script src="/static/oneko.js"></script>
|
||||||
|
@ -39,24 +40,30 @@
|
||||||
</header>
|
</header>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/">Home</a></li>
|
<li><a href="http://localhost:8000/">Home</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/posts.html">Posts</a></li>
|
<li><a href="http://localhost:8000/posts.html">Posts</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/contact">Contact</a></li>
|
<li><a href="http://localhost:8000/pages/contact">Contact</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/feed">Feed</a></li>
|
<li><a href="http://localhost:8000/pages/feed">Feed</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/license">License info</a></li>
|
<li><a href="http://localhost:8000/pages/license">License info</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="sidebar_box container">
|
||||||
|
<p id="time">Current time could not be loaded.</p>
|
||||||
|
<div id="song"><p>Current song could not be loaded.</p></div>
|
||||||
|
<div id="weather"><p>Current weather could not be loaded.</p></div>
|
||||||
|
</div>
|
||||||
<div class="sidebar_box container">
|
<div class="sidebar_box container">
|
||||||
<div class="animal_div">
|
<div class="animal_div">
|
||||||
<img src="" id="animal_img" alt="randomly picked image of cute animal">
|
<img src="" id="animal_img" alt="randomly picked image of cute animal">
|
||||||
<p id="animal_subtitle"></p>
|
<p id="animal_subtitle"></p>
|
||||||
<p>Images stolen from <a target="_blank" href="https://tinyfox.dev/image-list/">tinyfox.dev</a></p>
|
<p>Images stolen from <a target="_blank" href="https://tinyfox.dev/image-list/">tinyfox.dev</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<meta name="twitter:description" content="a silly fur's page" />
|
<meta name="twitter:description" content="a silly fur's page" />
|
||||||
<script src="/static/particles.js"></script>
|
<script src="/static/particles.js"></script>
|
||||||
<script src="/static/animal.js"></script>
|
<script src="/static/animal.js"></script>
|
||||||
|
<script src="/static/info.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="/static/oneko.js"></script>
|
<script src="/static/oneko.js"></script>
|
||||||
|
@ -42,24 +43,30 @@
|
||||||
</header>
|
</header>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/">Home</a></li>
|
<li><a href="http://localhost:8000/">Home</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/posts.html">Posts</a></li>
|
<li><a href="http://localhost:8000/posts.html">Posts</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/contact">Contact</a></li>
|
<li><a href="http://localhost:8000/pages/contact">Contact</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/feed">Feed</a></li>
|
<li><a href="http://localhost:8000/pages/feed">Feed</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/license">License info</a></li>
|
<li><a href="http://localhost:8000/pages/license">License info</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="sidebar_box container">
|
||||||
|
<p id="time">Current time could not be loaded.</p>
|
||||||
|
<div id="song"><p>Current song could not be loaded.</p></div>
|
||||||
|
<div id="weather"><p>Current weather could not be loaded.</p></div>
|
||||||
|
</div>
|
||||||
<div class="sidebar_box container">
|
<div class="sidebar_box container">
|
||||||
<div class="animal_div">
|
<div class="animal_div">
|
||||||
<img src="" id="animal_img" alt="randomly picked image of cute animal">
|
<img src="" id="animal_img" alt="randomly picked image of cute animal">
|
||||||
<p id="animal_subtitle"></p>
|
<p id="animal_subtitle"></p>
|
||||||
<p>Images stolen from <a target="_blank" href="https://tinyfox.dev/image-list/">tinyfox.dev</a></p>
|
<p>Images stolen from <a target="_blank" href="https://tinyfox.dev/image-list/">tinyfox.dev</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
19
posts.html
19
posts.html
|
@ -15,6 +15,7 @@
|
||||||
<meta name="twitter:description" content="a silly fur's page" />
|
<meta name="twitter:description" content="a silly fur's page" />
|
||||||
<script src="/static/particles.js"></script>
|
<script src="/static/particles.js"></script>
|
||||||
<script src="/static/animal.js"></script>
|
<script src="/static/animal.js"></script>
|
||||||
|
<script src="/static/info.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="/static/oneko.js"></script>
|
<script src="/static/oneko.js"></script>
|
||||||
|
@ -30,7 +31,7 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h2>
|
<h2>
|
||||||
<a href="https://julimiro.eu/posts/test">silly test page</a>
|
<a href="http://localhost:8000/posts/test">silly test page</a>
|
||||||
</h2>
|
</h2>
|
||||||
<h5>Sat 14 Sep 2024</h5>
|
<h5>Sat 14 Sep 2024</h5>
|
||||||
<p>
|
<p>
|
||||||
|
@ -50,24 +51,30 @@
|
||||||
</header>
|
</header>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/">Home</a></li>
|
<li><a href="http://localhost:8000/">Home</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/posts.html">Posts</a></li>
|
<li><a href="http://localhost:8000/posts.html">Posts</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/contact">Contact</a></li>
|
<li><a href="http://localhost:8000/pages/contact">Contact</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/feed">Feed</a></li>
|
<li><a href="http://localhost:8000/pages/feed">Feed</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/license">License info</a></li>
|
<li><a href="http://localhost:8000/pages/license">License info</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="sidebar_box container">
|
||||||
|
<p id="time">Current time could not be loaded.</p>
|
||||||
|
<div id="song"><p>Current song could not be loaded.</p></div>
|
||||||
|
<div id="weather"><p>Current weather could not be loaded.</p></div>
|
||||||
|
</div>
|
||||||
<div class="sidebar_box container">
|
<div class="sidebar_box container">
|
||||||
<div class="animal_div">
|
<div class="animal_div">
|
||||||
<img src="" id="animal_img" alt="randomly picked image of cute animal">
|
<img src="" id="animal_img" alt="randomly picked image of cute animal">
|
||||||
<p id="animal_subtitle"></p>
|
<p id="animal_subtitle"></p>
|
||||||
<p>Images stolen from <a target="_blank" href="https://tinyfox.dev/image-list/">tinyfox.dev</a></p>
|
<p>Images stolen from <a target="_blank" href="https://tinyfox.dev/image-list/">tinyfox.dev</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<meta name="twitter:description" content="a silly fur's page" />
|
<meta name="twitter:description" content="a silly fur's page" />
|
||||||
<script src="/static/particles.js"></script>
|
<script src="/static/particles.js"></script>
|
||||||
<script src="/static/animal.js"></script>
|
<script src="/static/animal.js"></script>
|
||||||
|
<script src="/static/info.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="/static/oneko.js"></script>
|
<script src="/static/oneko.js"></script>
|
||||||
|
@ -29,7 +30,7 @@
|
||||||
<p>Tags:</p>
|
<p>Tags:</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/tags/test">#test</a></li>
|
<li><a href="http://localhost:8000/tags/test">#test</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -46,24 +47,30 @@
|
||||||
</header>
|
</header>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/">Home</a></li>
|
<li><a href="http://localhost:8000/">Home</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/posts.html">Posts</a></li>
|
<li><a href="http://localhost:8000/posts.html">Posts</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/contact">Contact</a></li>
|
<li><a href="http://localhost:8000/pages/contact">Contact</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/feed">Feed</a></li>
|
<li><a href="http://localhost:8000/pages/feed">Feed</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/license">License info</a></li>
|
<li><a href="http://localhost:8000/pages/license">License info</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="sidebar_box container">
|
||||||
|
<p id="time">Current time could not be loaded.</p>
|
||||||
|
<div id="song"><p>Current song could not be loaded.</p></div>
|
||||||
|
<div id="weather"><p>Current weather could not be loaded.</p></div>
|
||||||
|
</div>
|
||||||
<div class="sidebar_box container">
|
<div class="sidebar_box container">
|
||||||
<div class="animal_div">
|
<div class="animal_div">
|
||||||
<img src="" id="animal_img" alt="randomly picked image of cute animal">
|
<img src="" id="animal_img" alt="randomly picked image of cute animal">
|
||||||
<p id="animal_subtitle"></p>
|
<p id="animal_subtitle"></p>
|
||||||
<p>Images stolen from <a target="_blank" href="https://tinyfox.dev/image-list/">tinyfox.dev</a></p>
|
<p>Images stolen from <a target="_blank" href="https://tinyfox.dev/image-list/">tinyfox.dev</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
106
static/info.js
Normal file
106
static/info.js
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
function getCurrentTime() {
|
||||||
|
const date = new Date();
|
||||||
|
const options = {
|
||||||
|
timeZone: "Europe/Helsinki",
|
||||||
|
hour: 'numeric',
|
||||||
|
minute: 'numeric',
|
||||||
|
second: 'numeric',
|
||||||
|
hour: '2-digit',
|
||||||
|
minute: '2-digit',
|
||||||
|
second: '2-digit',
|
||||||
|
hour12: false //
|
||||||
|
};
|
||||||
|
document.getElementById('time').innerText = "Time: "+date.toLocaleTimeString('en-US', options)
|
||||||
|
}
|
||||||
|
|
||||||
|
function lastfm() {
|
||||||
|
const url = 'https://api.julimiro.eu/lastfmproxy.php';
|
||||||
|
fetch(url)
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
const recenttracks = data.recenttracks;
|
||||||
|
const tracks = recenttracks.track;
|
||||||
|
for (const track of tracks) {
|
||||||
|
if (track["@attr"] && track["@attr"].nowplaying === "true") {
|
||||||
|
const artist = track.artist["#text"];
|
||||||
|
const song = track.name;
|
||||||
|
const songUrl = track.url;
|
||||||
|
|
||||||
|
console.log(`Artist: ${artist}`);
|
||||||
|
console.log(`Song: ${song}`);
|
||||||
|
console.log(`Song URL: ${songUrl}`);
|
||||||
|
document.getElementById('song').innerHTML = `<p>Now playing: <a href="${songUrl}"<b>${song}</b> by ${artist}</a></p>`
|
||||||
|
} else {
|
||||||
|
// document.getElementById('song').innerText = ""
|
||||||
|
}}
|
||||||
|
})
|
||||||
|
.catch(error => console.error('Error:', error));
|
||||||
|
}
|
||||||
|
|
||||||
|
function getweather() {
|
||||||
|
const apiUrl = 'https://api.open-meteo.com/v1/forecast';
|
||||||
|
const params = {
|
||||||
|
latitude: 61.4833,
|
||||||
|
longitude: 21.7833,
|
||||||
|
current: 'temperature_2m,precipitation,weather_code,wind_speed_10m',
|
||||||
|
timeformat: 'unixtime',
|
||||||
|
forecast_days: 1
|
||||||
|
};
|
||||||
|
|
||||||
|
fetch(`${apiUrl}?${new URLSearchParams(params)}`)
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
const weatherCodes = [
|
||||||
|
"unknown", "clearing","unknown","clouds forming","smoke","haze",
|
||||||
|
"dust","dust","dust whirls","duststorm","mist","patches of fog","continuous fog",
|
||||||
|
"visible lightning", "precipitation that doesn't reach ground","precipitation at distance",
|
||||||
|
"precipitation nearby","thunderstorm but no precipitation","squalls","funnel clouds",
|
||||||
|
"drizzle","rain","snow","rain and snow/ice pellets","freezing rain","showers of rain",
|
||||||
|
"showers of snow", "showers of hail","fog","thunderstorm","decreasing slight dust storm",
|
||||||
|
"slight dust storm","beginning severe dust storm","decreasing severe dust storm",
|
||||||
|
"severe dust storm","beginning severe dust storm","blowing snow below eye level",
|
||||||
|
"heavy drifting snow below eye level", "blowing snow above eye level",
|
||||||
|
"heavy drifting snow above eye level", "fog at distance","fog in patches",
|
||||||
|
"lessening fog with visible sky", "lessening fog without visible sky","fog with sky visible",
|
||||||
|
"fog without sky visible", "beginning fog with sky visible","beginning fog without sky visible",
|
||||||
|
"fog with rime and sky visible","fog with rime and without sky visible",
|
||||||
|
"sligth intermittent drizzle", "slight continuous drizzle", "moderate intermittent drizzle",
|
||||||
|
"moderate continuous drizzle", "heavy intermittent drizzle", "heavy continuous drizzle",
|
||||||
|
"slight freezing drizzle", "moderate or heavy freezing drizzle", "slight drizzle and rain",
|
||||||
|
"moderate or heavy drizzle and rain", "slight intermittent rain", "slight continuous rain",
|
||||||
|
"moderate intermittent rain", "moderate continuos rain","heavy intermittent rain",
|
||||||
|
"heavy continous rain", "slight freezing rain","moderate or heavy freezing rain",
|
||||||
|
"slight rain and snow", "moderate or heavy rain and snow", "slight intermittent snowfall",
|
||||||
|
"slight continuous snowfall", "moderate intermittent snowfall", "moderate continuous snowfall",
|
||||||
|
"heavy intermittent snowfall", "heavy continuous snowfall", "diamond dust", "snow grains",
|
||||||
|
"star-like crystals of snow"," ice pellets", "slight rain showers", "moderate or heavy rain showers",
|
||||||
|
"violent rain showers", "slight showers of rain and snow", "moderate or heavy showers of snow and rain",
|
||||||
|
"slight snow showers", "moderate or heavy snow showers", "slight showers of small hail",
|
||||||
|
"moderate or heavy small hail","slight showers of hail", "moderate or heavy showers of hail",
|
||||||
|
"slight rain with thunderstorms earlier", "moderate or heavy rain with thunderstorms earlier",
|
||||||
|
"slight snow or rain and hail mixed, thunderstorms earlier",
|
||||||
|
"moderate or heavy rain or snow and hail mixed, thunderstorms earlier",
|
||||||
|
"slight or moderate thunderstorm without hail","slight or moderate thunderstorm with hail",
|
||||||
|
"heavy thunderstorm with rain or snow", "heavy thunderstorm with duststorm", "heavy thunderstorm with hail"
|
||||||
|
];
|
||||||
|
|
||||||
|
const currentWeatherCode = data.current.weather_code;
|
||||||
|
const currentWeather = weatherCodes[currentWeatherCode - 1];
|
||||||
|
|
||||||
|
console.log(`Current Weather: ${currentWeather}`);
|
||||||
|
console.log(`Temperature: ${data.current.temperature_2m}°C`);
|
||||||
|
console.log(`Precipitation: ${data.current.precipitation} mm`);
|
||||||
|
console.log(`Wind Speed: ${data.current.wind_speed_10m} km/h`);
|
||||||
|
document.getElementById('weather').innerHTML = `<p>Weather: ${currentWeather}</p><p>Temperature: ${data.current.temperature_2m}°C</p><p>Wind speed: ${data.current.wind_speed_10m} m/s`
|
||||||
|
})
|
||||||
|
.catch(error => console.error('Error:', error));
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('load', function () {
|
||||||
|
setInterval(getCurrentTime, 1000);
|
||||||
|
setInterval(lastfm, 15000);
|
||||||
|
setInterval(lastfm, 300000);
|
||||||
|
lastfm()
|
||||||
|
getCurrentTime()
|
||||||
|
getweather()
|
||||||
|
})
|
|
@ -15,6 +15,7 @@
|
||||||
<meta name="twitter:description" content="a silly fur's page" />
|
<meta name="twitter:description" content="a silly fur's page" />
|
||||||
<script src="/static/particles.js"></script>
|
<script src="/static/particles.js"></script>
|
||||||
<script src="/static/animal.js"></script>
|
<script src="/static/animal.js"></script>
|
||||||
|
<script src="/static/info.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="/static/oneko.js"></script>
|
<script src="/static/oneko.js"></script>
|
||||||
|
@ -30,7 +31,7 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h2>
|
<h2>
|
||||||
<a href="https://julimiro.eu/posts/test">silly test page</a>
|
<a href="http://localhost:8000/posts/test">silly test page</a>
|
||||||
</h2>
|
</h2>
|
||||||
<h5>Sat 14 Sep 2024</h5>
|
<h5>Sat 14 Sep 2024</h5>
|
||||||
<p>
|
<p>
|
||||||
|
@ -50,24 +51,30 @@
|
||||||
</header>
|
</header>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/">Home</a></li>
|
<li><a href="http://localhost:8000/">Home</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/posts.html">Posts</a></li>
|
<li><a href="http://localhost:8000/posts.html">Posts</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/contact">Contact</a></li>
|
<li><a href="http://localhost:8000/pages/contact">Contact</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/feed">Feed</a></li>
|
<li><a href="http://localhost:8000/pages/feed">Feed</a></li>
|
||||||
|
|
||||||
<li><a href="https://julimiro.eu/pages/license">License info</a></li>
|
<li><a href="http://localhost:8000/pages/license">License info</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="sidebar_box container">
|
||||||
|
<p id="time">Current time could not be loaded.</p>
|
||||||
|
<div id="song"><p>Current song could not be loaded.</p></div>
|
||||||
|
<div id="weather"><p>Current weather could not be loaded.</p></div>
|
||||||
|
</div>
|
||||||
<div class="sidebar_box container">
|
<div class="sidebar_box container">
|
||||||
<div class="animal_div">
|
<div class="animal_div">
|
||||||
<img src="" id="animal_img" alt="randomly picked image of cute animal">
|
<img src="" id="animal_img" alt="randomly picked image of cute animal">
|
||||||
<p id="animal_subtitle"></p>
|
<p id="animal_subtitle"></p>
|
||||||
<p>Images stolen from <a target="_blank" href="https://tinyfox.dev/image-list/">tinyfox.dev</a></p>
|
<p>Images stolen from <a target="_blank" href="https://tinyfox.dev/image-list/">tinyfox.dev</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue