feat: fixes
This commit is contained in:
@@ -13,7 +13,7 @@ const { sendNotification } = require('./notifications')
|
|||||||
const COVER_TEMPLATE = 'MUSICLAND_PLAYBACKER'
|
const COVER_TEMPLATE = 'MUSICLAND_PLAYBACKER'
|
||||||
const COVER_OPTION_ID = 'musicland-playbacker'
|
const COVER_OPTION_ID = 'musicland-playbacker'
|
||||||
const COVER_SIZE = 1024
|
const COVER_SIZE = 1024
|
||||||
const PROFILE_SIZE = 228
|
const PROFILE_SIZE = 320
|
||||||
const TEMPLATE_PATH = path.join(__dirname, '../assets/musiclandPlaybackCover.png')
|
const TEMPLATE_PATH = path.join(__dirname, '../assets/musiclandPlaybackCover.png')
|
||||||
const FONT_FAMILY = 'Poppins, Montserrat, Arial, sans-serif'
|
const FONT_FAMILY = 'Poppins, Montserrat, Arial, sans-serif'
|
||||||
|
|
||||||
@@ -174,7 +174,11 @@ async function prepareMusiclandCover(project) {
|
|||||||
const overlays = [{ input: buildTextOverlay(artistName), left: 0, top: 0 }]
|
const overlays = [{ input: buildTextOverlay(artistName), left: 0, top: 0 }]
|
||||||
|
|
||||||
if (profileOverlay) {
|
if (profileOverlay) {
|
||||||
overlays.unshift({ input: profileOverlay, left: 398, top: 454 })
|
overlays.unshift({
|
||||||
|
input: profileOverlay,
|
||||||
|
left: (COVER_SIZE - PROFILE_SIZE) / 2,
|
||||||
|
top: 568 - PROFILE_SIZE / 2,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const coverBuffer = await sharp(TEMPLATE_PATH)
|
const coverBuffer = await sharp(TEMPLATE_PATH)
|
||||||
|
|||||||
@@ -57,10 +57,10 @@ const styles = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
profilePicture: {
|
profilePicture: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
width: '22.3%',
|
width: '31.25%',
|
||||||
aspectRatio: 1,
|
aspectRatio: 1,
|
||||||
left: '38.85%',
|
left: '34.375%',
|
||||||
top: '44.3%',
|
top: '39.84375%',
|
||||||
borderRadius: 999,
|
borderRadius: 999,
|
||||||
},
|
},
|
||||||
artistName: {
|
artistName: {
|
||||||
|
|||||||
@@ -672,7 +672,7 @@ const HitParade = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Page
|
<Page
|
||||||
backgroundImg={isWeb ? background.hitParadeBG2 : background.hitParadeBG}
|
backgroundImg={background.hitParadeBG2}
|
||||||
headerType="NONE"
|
headerType="NONE"
|
||||||
width="100%"
|
width="100%"
|
||||||
maxWidth={1200}
|
maxWidth={1200}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Asset } from 'expo-asset'
|
|||||||
import { img } from '../assets'
|
import { img } from '../assets'
|
||||||
|
|
||||||
const COVER_SIZE = 1024
|
const COVER_SIZE = 1024
|
||||||
const PROFILE_SIZE = 228
|
const PROFILE_SIZE = 320
|
||||||
|
|
||||||
const loadImage = (source) =>
|
const loadImage = (source) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
@@ -59,8 +59,8 @@ const drawProfilePicture = (context, profilePicture) => {
|
|||||||
sourceY,
|
sourceY,
|
||||||
sourceWidth,
|
sourceWidth,
|
||||||
sourceHeight,
|
sourceHeight,
|
||||||
398,
|
(COVER_SIZE - PROFILE_SIZE) / 2,
|
||||||
454,
|
568 - PROFILE_SIZE / 2,
|
||||||
PROFILE_SIZE,
|
PROFILE_SIZE,
|
||||||
PROFILE_SIZE
|
PROFILE_SIZE
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user