diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..61fdb00 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +assets/css/*.css +assets/css/*.map +feed.json \ No newline at end of file diff --git a/assets/css/styles.scss b/assets/css/styles.scss new file mode 100644 index 0000000..73087e6 --- /dev/null +++ b/assets/css/styles.scss @@ -0,0 +1,135 @@ +@font-face { + font-family: "Cursive"; + src: url("/assets/fonts/Cursive\ standard.woff2"); +} + +@font-face { + font-family: "Cursive-bold"; + src: url("/assets/fonts/Cursive\ standard\ Bold.woff2"); +} + +// Colors + +:root { + --title-color: #63BAEE; + --bgd-color: #F7F6EE; + --text-color: #2A2A2A; +} + +@media (prefers-color-scheme: dark) { + :root { + --bgd-color: #2A2A2A; + --text-color: #F7F6EE; + } +} + +body { + font-family: "Cursive"; + display: flex; + flex-direction: column; + background-color: var(--bgd-color); + color: var(--text-color); + margin-left: 10%; + margin-right: 10%; + + + h1 { + font-family: "Cursive-bold"; + margin-left: auto; + margin-right: auto; + font-size: xxx-large; + color: var(--title-color); + text-align: center; + } + + .FeedDesc { + font-size: x-large; + text-align: center; + } + + .FollowMe { + display: flex; + flex-direction: row; + + align-items: center; + height: 10vh; + + font-size: x-large; + white-space: nowrap; + + a { + margin-left: 5%; + margin-right: 5%; + display: flex; + flex-direction: row; + text-decoration: none; + height: 100%; + align-items: center; + + p { + margin-left: 5%; + margin-right: 5%; + white-space: nowrap; + } + + img { + height: 25%; + } + } + } + + .listen-on { + display: flex; + flex-direction: row; + + align-items: center; + + font-size: x-large; + white-space: nowrap; + + height: 10vh; + + a { + display: flex; + flex-direction: row; + align-items: center; + margin-left: 5%; + margin-right: 5%; + height: 100%; + + font-family: Verdana, Geneva, Tahoma, sans-serif; + text-decoration: none; + + img { + height: 75%; + } + + .textRSS { + margin-left: 5%; + color: var(--text-color); + } + } + + .rss-listen { + padding-left: 1%; + padding-right: 1%; + + border: solid var(--text-color); + border-radius: 50px; + } + } + + hr { + width: 100%; + } + + .Podcasts { + .podcast { + audio { + width: 90%; + background-color: #F7F6EE; + } + } + } +} + diff --git a/assets/fonts/Cursive standard Bold.woff2 b/assets/fonts/Cursive standard Bold.woff2 new file mode 100644 index 0000000..60fdb97 Binary files /dev/null and b/assets/fonts/Cursive standard Bold.woff2 differ diff --git a/assets/fonts/Cursive standard.woff2 b/assets/fonts/Cursive standard.woff2 new file mode 100644 index 0000000..607c1f5 Binary files /dev/null and b/assets/fonts/Cursive standard.woff2 differ diff --git a/assets/images/Amazon_Music_Charcoal.png b/assets/images/Amazon_Music_Charcoal.png new file mode 100644 index 0000000..7f1d0b3 Binary files /dev/null and b/assets/images/Amazon_Music_Charcoal.png differ diff --git a/assets/images/FR_Apple_Podcasts_Listen_Badge_RGB.svg b/assets/images/FR_Apple_Podcasts_Listen_Badge_RGB.svg new file mode 100755 index 0000000..461a15f --- /dev/null +++ b/assets/images/FR_Apple_Podcasts_Listen_Badge_RGB.svg @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/Instagram_logo.wepb b/assets/images/Instagram_logo.wepb new file mode 100644 index 0000000..1e7b4bc Binary files /dev/null and b/assets/images/Instagram_logo.wepb differ diff --git a/assets/images/Spotify_Logo_RGB_Green.png b/assets/images/Spotify_Logo_RGB_Green.png new file mode 100644 index 0000000..3542e5e Binary files /dev/null and b/assets/images/Spotify_Logo_RGB_Green.png differ diff --git a/assets/images/favicon.ico b/assets/images/favicon.ico new file mode 100644 index 0000000..56855ce Binary files /dev/null and b/assets/images/favicon.ico differ diff --git a/assets/images/logo.webp b/assets/images/logo.webp new file mode 100644 index 0000000..f45b63b Binary files /dev/null and b/assets/images/logo.webp differ diff --git a/assets/images/rss-black-icon.png b/assets/images/rss-black-icon.png new file mode 100644 index 0000000..6086d61 Binary files /dev/null and b/assets/images/rss-black-icon.png differ diff --git a/assets/script.js b/assets/script.js new file mode 100644 index 0000000..0de6348 --- /dev/null +++ b/assets/script.js @@ -0,0 +1,52 @@ +"use strict"; + +function removeAcastBranding(description,removeBR) { // Retire la mention "hébergé par Acast" + let desc = description.replace(/(

\n

).+(<\/p>)/g,""); + if (removeBR) { desc = desc.replace(/
/g,"") } + return desc +} + +async function fetchRSSfeed() { + const RSS_URL = 'https://feeds.acast.com/public/shows/le-plus-beau-des-voyages'; + const response = await fetch("https://api.rss2json.com/v1/api.json?rss_url=" + RSS_URL); + return await response.json(); +} + +function formatEpisodeIntoHTML(episode) { + + const article = document.createElement("article"); + article.className = "podcast"; + + const podcastTitle = document.createElement("h3"); + podcastTitle.innerHTML = episode.title; + + const podcastAudio = document.createElement("audio"); + podcastAudio.setAttribute("controls",true); + podcastAudio.setAttribute("src",episode.enclosure.link); + podcastAudio.setAttribute("type",episode.enclosure.type); + podcastAudio.setAttribute("length",episode.enclosure.length) + podcastAudio.setAttribute("duration",episode.enclosure.duration) + + const podcastDescription = document.createElement("div"); + podcastDescription.className = "podcast-desc" + podcastDescription.innerHTML = removeAcastBranding(episode.description,true); + + article.append(podcastTitle,podcastAudio,podcastDescription); + + return article +} + +window.addEventListener("DOMContentLoaded", function () { + console.log( + "Hewo, c'est renarde 🦊, la créatrice de ce site. Si tu veux trouver le code source du site c'est par ici -> " + + 'https://forgejo.la-taniere-solidaire.gay/' + ); + + fetchRSSfeed().then( rssData => { + document.getElementById("FeedDesc").innerHTML = removeAcastBranding(rssData.feed.description,false); + for (const episode of rssData.items) { + const formatedEp = formatEpisodeIntoHTML(episode) + this.document.getElementById("Podcasts").append(formatedEp) + } + }) +}) \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..6a55e11 --- /dev/null +++ b/index.html @@ -0,0 +1,51 @@ + + + + + + + Le plus beau des voyages - Animé par Pauline + + + + + + +

Le plus beau des voyages

+

+
+
+ Me suivre : + + +

Le plus beau des voyages

+
+ + +

Pauline.Hrdt

+
+ + +

Oscar le teckel

+
+
+
+ Écoutez le podcast sur : + + +
RSS
+
+ + + + + + + + + +
+
+
+ + \ No newline at end of file