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" banner, "fullscreen" full-screen, "overlay" overlay transparent, "none" solid color

TIP

The wallpaper mode switch toggle has been moved to displaySettingsConfig.wallpaperModeSwitchable. See Display Settings Panel.

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

Avoid renaming your custom images to d1-d6 or m1-m6, as these default sample image names may be overwritten during updates.

Background Video Player

PropertyTypeDefaultDescription
playerEnablebooleanfalseEnable background video player. When enabled, a play button will appear in the navbar
src.playerUrlstring | string[]-Video URL(s). Supports a single path or an array for multi-video cycling
common.playerMode"order" | "random""order"Multi-video playback mode: "order" sequential loop, "random" random shuffle
ts
export const backgroundWallpaper = {
  playerEnable: true,
  src: {
    desktop: [...],
    mobile: [...],
    // Single video
    // playerUrl: "/assets/videos/firefly.mp4",
    // Multiple videos
    playerUrl: [
      "/assets/videos/video1.mp4",
      "/assets/videos/video2.mp4",
    ],
  },
  common: {
    playerMode: "random",
  },
};

TIP

  • Place local videos in the public/assets/videos/ directory
  • The play button is automatically hidden in solid color mode (mode: "none")
  • In multi-video mode, if a video fails to load, the player automatically tries the next one. A failure toast is shown when all videos fail

Common Configuration (Shared by Banner and Fullscreen)

Settings under common are shared between banner wallpaper and fullscreen wallpaper modes.

Text Overlay Dim

PropertyTypeDefaultDescription
common.dimOpacitynumber0.2Banner text overlay darkness, 0-1, higher values = darker

Home Banner Text

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

Typewriter Effect

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

INFO

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

Shows a customizable row of link icons (translucent round buttons) below the home banner title.

PropertyTypeDefaultDescription
common.homeText.linksEnablebooleantrueShow the link icons below the title
common.homeText.links{ name; url; icon; showName? }[]-List of link icons. Empty to hide
  • name: link name (used for aria-label / title / optional showName display)
  • url: link URL (http(s):// external links open in a new tab)
  • icon: Iconify icon, e.g. fa7-brands:github, fa7-solid:envelope, fa7-solid:rss, mdi:rss
  • showName: optional, true to show the name next to the icon
ts
homeText: {
  // ...
  links: [
    { name: "GitHub", icon: "fa7-brands:github", url: "https://github.com/CuteLeaf" },
    { name: "Email", icon: "fa7-solid:envelope", url: "mailto:xiaye@msn.com" },
    { name: "RSS", icon: "fa7-solid:rss", url: "/rss/" },
    // optionally show text
    { name: "Blog", icon: "mdi:rss", url: "/rss/", showName: true },
  ],
},

Shared carousel configuration for both banner and fullscreen modes. Only works when multiple images are configured.

PropertyTypeDefaultDescription
common.carousel.enablebooleanfalseEnable wallpaper carousel. If disabled, one image is randomly chosen on page refresh
common.carousel.intervalnumber5000Carousel interval in milliseconds
common.carousel.transitionEffectstring"fade"Transition effect: "fade", "zoom", "slide", "kenburns"
ts
common: {
  carousel: {
    enable: true,
    interval: 5000,
    transitionEffect: "kenburns", // "fade" | "zoom" | "slide" | "kenburns"
  },
},

TIP

The wallpaper carousel user toggle has been moved to displaySettingsConfig.bannerCarouselSwitchable. See Display Settings Panel.

Transition effects:

EffectDescription
fadeCross-fade between images
zoomNew image scales up from small to full size
slideNew image slides in from the right
kenburnsKen Burns (recommended) — image slowly zooms in while transitioning via LQIP blurred preview bridge for the smoothest effect

Image Position

PropertyTypeDefaultDescription
banner.positionstring"0% 20%"CSS object-position value. Supports 'center', 'top', 'bottom', 'left', 'right', percentages, etc.

Post Banner Information

PropertyTypeDefaultDescription
banner.postInfo.mode"description" | "meta""description"Post banner information mode: "description" shows the post description, while "meta" shows published/updated dates, word count, and reading time
PropertyTypeDefaultDescription
banner.navbar.transparentModestring"semi"Mode: "semi" semi-transparent, "full" fully transparent, "semifull" dynamic
banner.navbar.blurnumber5Blur intensity; 0 disables the navbar's frosted glass

INFO

The navbar's dropdown menus and float panels (search, display settings, light/dark, music, mobile menu) always keep a frosted glass. Its blur follows banner.navbar.blur with a minimum of 2px.

So setting blur to 0 only disables the frosted glass on the navbar itself — the panels are unaffected. In pure-color mode (mode: "none") the panels stay opaque.

The fullscreen wallpaper mode's navbar is not affected by this config (it is controlled separately by fullscreen.navbar.dynamicTransparent, see below).

Wave Animation

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

WARNING

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

TIP

The wave animation user toggle has been moved to displaySettingsConfig.wavesSwitchable. See Display Settings Panel.

Gradient Transition

Automatically enabled when waves are disabled, providing a smooth gradient fade from the wallpaper bottom to the background color.

PropertyTypeDefaultDescription
banner.gradient.enableboolean | { desktop, mobile }{ desktop: true, mobile: true }Enable gradient transition
banner.gradient.heightstring"15vh"Gradient height

INFO

Gradient and waves are mutually exclusive: when waves are enabled, the gradient is automatically hidden; when waves are disabled, the gradient is automatically shown. Both user toggles have been moved to displaySettingsConfig. See Display Settings Panel.

Fullscreen Mode

Fullscreen wallpaper mode fixes the background image across the entire screen:

  • Home page: the first screen shows only the wallpaper with the centered home title; the content area sits below the fold. Scrolling slides the content up over the wallpaper, the title fades out smoothly as it scrolls up, and the wallpaper transitions from crisp to blurred
  • Other pages: behaves like overlay mode — the wallpaper stays fixed and blurred, content at the top
  • The wallpaper is opaque (overlay.opacity does not apply); blur (blur), card opacity (cardOpacity) and z-index (zIndex) are reused from the overlay config below
  • Waves and gradient transitions are not shown
PropertyTypeDefaultDescription
fullscreen.positionstring"center"CSS object-position value
fullscreen.navbar.dynamicTransparentbooleantrueEnable dynamic transparent navbar: the navbar is transparent at the top of the home page and becomes opaque after scrolling (home page only)
fullscreen.blurRamp.enableboolean | object{ desktop: true, mobile: true }Blur ramp toggle for the home page scroll (blur ramps from 0 to overlay.blur as you scroll). Supports a boolean or per-device { desktop, mobile }; when disabled on a device, fullscreen wallpaper stays crisp there (home and other pages) and the settings-panel blur slider is hidden
ts
fullscreen: {
  position: "center",
  navbar: {
    dynamicTransparent: true,
  },
  blurRamp: {
    enable: {
      desktop: true,
      mobile: true,
    },
  },
},

INFO

In fullscreen mode the navbar is fully transparent by default (transparency is controlled by overlay.cardOpacity). With fullscreen.navbar.dynamicTransparent enabled, the home page's top navbar becomes transparent and shows a card background after scrolling.

TIP

The crisp-to-blurred wallpaper transition on scroll is expensive on mobile GPUs (it re-rasterizes a full-screen blur). If scrolling feels laggy on mobile, set blurRamp.enable.mobile to false — fullscreen wallpaper stays crisp on that device and the settings-panel blur slider is hidden as well.

Overlay Mode

PropertyTypeDefaultDescription
overlay.zIndexnumber-1Z-index, ensures wallpaper stays in background layer
overlay.opacitynumber0.8Wallpaper opacity (0-1)
overlay.blurnumber10Background blur (px)
overlay.cardOpacitynumber0.5Card background opacity (0-1). Lower values make cards more transparent

TIP

The overlay parameter adjustment toggle has been moved to displaySettingsConfig.overlaySwitchable, supporting master toggle or per-item toggles. See Display Settings Panel.