mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig.space.git
synced 2025-12-13 16:26:50 +00:00
Fixes
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
"episodes": "npm run fetch && mkdir -p episodes && node tasks/fetch_episodes.js",
|
||||
"copy": "cp -rT static dist && cp node_modules/amplitudejs/dist/amplitude.min.js dist/js/player.js",
|
||||
"init": "run-s clean copy && run-p fetch build:data",
|
||||
"start": "cross-env NODE_ENV=development npm run init && run-p start:*",
|
||||
"start": "cross-env NODE_ENV=development npm run init && cross-env NODE_ENV=development run-p start:*",
|
||||
"start:data": "onchange -k 'content/**/*' 'tasks/generate_site_data.js' -- npm run build:data",
|
||||
"start:pages": "onchange -i -k 'pug.config.js' 'markdown.js' 'content/**' 'generated/**' 'src/**/*.pug' 'src/**/*.svg' 'tasks/generate_pages.js' -- npm run build:pages",
|
||||
"start:styles": "onchange -i -k 'src/**/*.css' -- npm run build:styles",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
const helpers = require('./helpers')
|
||||
|
||||
const IS_DEV = process.env.NODE_ENV === 'development'
|
||||
const HOST = IS_DEV ? 'http://localhost:3000' : getBaseUrl()
|
||||
const HOST = IS_DEV ? 'http://localhost:3000' : 'https://einundzwanzig.space'
|
||||
const random = max => Math.floor(Math.random() * Math.floor(max))
|
||||
const shuffle = arr => { for (let i = arr.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * i); const temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; }; return arr }
|
||||
const formatDate = date => (new Date(date)).toISOString().replace(/T.*/, '').split('-').reverse().join('.')
|
||||
@@ -20,11 +20,6 @@ const assetUrl = (path, protocol = 'https') => {
|
||||
if (!url.startsWith(`${protocol}:`)) url = url.replace(/^.*:/, `${protocol}:`)
|
||||
return url
|
||||
}
|
||||
function getBaseUrl () {
|
||||
const { DEPLOY_PRIME_URL, URL } = process.env
|
||||
const branchUrl = DEPLOY_PRIME_URL || URL || ''
|
||||
return !branchUrl.match('master--einundzwanzig') ? branchUrl : 'https://einundzwanzig.space'
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
basedir: './src/includes',
|
||||
|
||||
@@ -125,7 +125,7 @@ mixin episodeItem(e)
|
||||
mixin episodePlayer(e)
|
||||
.player.player--single&attributes(attributes)
|
||||
a.player__coverlink(href=`/podcast/${e.slug}/`)
|
||||
img.player__cover(src=imgLarge data-amplitude-song-info="cover_art_url" data-amplitude-main-song-info="true")
|
||||
img.player__cover(src=imgLarge data-amplitude-song-info="cover_art_url" data-amplitude-main-song-info="true" alt=e.titlePlain loading="lazy")
|
||||
.player__bottom
|
||||
progress.player__progress.amplitude-song-played-progress(data-amplitude-main-song-played-progress="true")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user