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