Skip to content

Background Wallpaper

The background wallpaper configuration controls the site's background image display mode and related effects.

Config File

src/config/backgroundWallpaper.ts

Wallpaper Mode

PropertyTypeDefaultDescription
modestring"banner"Mode: "banner", "overlay" full-screen transparent, "none" solid color
switchablebooleantrueAllow users to switch wallpaper mode via navbar

Image Configuration

The src property supports multiple formats:

Separate Desktop and Mobile

ts
src: {
  desktop: "assets/images/DesktopWallpaper/d1.avif",
  mobile: "assets/images/MobileWallpaper/m1.avif",
},

Multiple Images (Random)

ts
src: {
  desktop: [
    "assets/images/DesktopWallpaper/d1.avif",
    "assets/images/DesktopWallpaper/d2.avif",
  ],
  mobile: [
    "assets/images/MobileWallpaper/m1.avif",
    "assets/images/MobileWallpaper/m2.avif",
  ],
},

Random Image API

ts
src: {
  desktop: "https://t.alcy.cc/pc",
  mobile: "https://t.alcy.cc/mp",
},

TIP

Image path formats:

  1. public directory (starts with /): not optimized
  2. src directory (no leading /): auto-optimized (recommended)
  3. Remote URL: not optimized, ensure small file size

Image Position

PropertyTypeDefaultDescription
banner.positionstring"0% 20%"CSS object-position value

Home Banner Text

PropertyTypeDefaultDescription
banner.homeText.enablebooleantrueEnable banner text
banner.homeText.switchablebooleantrueAllow user toggle via control panel
banner.homeText.titlestring"Lovely firefly!"Main title
banner.homeText.titleSizestring"3.8rem"Title font size
banner.homeText.subtitlestring | string[]-Subtitle(s)
banner.homeText.subtitleSizestring"1.5rem"Subtitle font size

Typewriter Effect

PropertyTypeDefaultDescription
banner.homeText.typewriter.enablebooleantrueEnable typewriter effect
banner.homeText.typewriter.speednumber100Typing speed (ms)
banner.homeText.typewriter.deleteSpeednumber50Delete speed (ms)
banner.homeText.typewriter.pauseTimenumber2000Pause time after completion (ms)

INFO

  • Typewriter enabled — cycles through all subtitles
  • Typewriter disabled — randomly shows one subtitle on each refresh

Image Credit

PropertyTypeDescription
banner.credit.enableboolean | { desktop, mobile }Show credit text
banner.credit.textstring | { desktop, mobile }Credit text
banner.credit.urlstring | { desktop, mobile }Original artwork URL
PropertyTypeDefaultDescription
banner.navbar.transparentModestring"semifull"Mode: "semi", "full", "semifull" (dynamic)
banner.navbar.enableBlurbooleantrueEnable frosted glass blur
banner.navbar.blurnumber3Blur intensity
PropertyTypeDefaultDescription
banner.carousel.enablebooleantrueEnable banner image carousel. If disabled, one image is randomly chosen on page refresh
banner.carousel.intervalnumber5000Carousel interval in milliseconds
banner.carousel.switchablebooleantrueAllow users to toggle carousel in the control panel

TIP

Banner carousel only works when multiple images are configured in src.desktop or src.mobile.

Wave Animation

PropertyTypeDefaultDescription
banner.waves.enableboolean | { desktop, mobile }{ desktop: true, mobile: true }Enable wave animation
banner.waves.switchablebooleantrueAllow user toggle

WARNING

Wave animation affects page performance. Enable based on your needs.

Overlay Mode

PropertyTypeDefaultDescription
overlay.switchableboolean | { opacity, blur, cardOpacity }false (if omitted)Whether users can adjust overlay settings in the display panel. Can be a single switch or per-item switches
overlay.zIndexnumber-1Z-index
overlay.opacitynumber0.8Wallpaper opacity (0-1)
overlay.blurnumber3Background blur (px)
overlay.cardOpacitynumber0.6Card background opacity (0-1). Lower values make cards more transparent

You can control switching behavior in two ways:

ts
overlay: {
  // Option 1: one switch for all overlay settings
  switchable: true,

  // Option 2: per-item control
  // switchable: {
  //   opacity: true,
  //   blur: true,
  //   cardOpacity: true,
  // },
}