💻
alt:V Athena Docs v3.0.0
  • Info
    • Introduction
    • Patreon & Support
    • Athena Discord
    • FAQ
  • Installation
    • Common Issues
    • Windows
    • Linux (Ubuntu 20.04+)
    • Debugging
    • Updating
  • Info
    • Admin
    • Configuration
    • Console
    • Database
    • Hotkeys
    • Identifier
  • Plugins
    • Load Plugins
    • Create Plugins
    • Mods
    • Clothing
  • Controllers
    • What is a Controller?
    • Blip Controller
    • Interaction Controller
    • Marker Controller
    • Object Controller
    • Ped Controller
    • Text Label Controller
    • World Notification Controller
  • Systems
    • Interiors
    • Inventory & Items
    • Inventory Rules
    • Jobs
    • Time
    • Weather
  • Menus
    • Menu Types
    • Action Menus
    • Input Menu
    • Wheel Menu
  • Player
    • Admin-Commands
    • Animations
    • Attach Objects
    • Credits
    • Currency
    • Commands
    • Error Screen
    • Message
    • Meta
    • Notifications
    • Particle
    • Progress Bar
    • Save
    • Shard
    • Sound
    • Spinners
    • Task Timeline
  • Custom WebViews
    • Introduction
    • Your First Page
    • CSS Framework
  • Misc
    • Custom Sounds
    • Custom Streamers
    • Custom Icons
    • Adding Locale / Translations
    • Adding Vehicle Rules
    • Adding Whitelist
    • Adding Wheel Menus
    • Adding Parking Garages
Powered by GitBook
On this page
  • Before Working with Vue
  • How to Start Development Mode
  • How to Focus on a Page
  • Working with Vue
Edit on GitHub
  1. Custom WebViews

Introduction

PreviousTask TimelineNextYour First Page

Last updated 3 years ago

WebViews are a way for you to easily create custom HTML, CSS, and JavaScript based menus. However, Athena has done a lot of the heavy lifting to get you started with the best industry practices. Keep in mind that regular WebViews are not supported anymore and you will need to switch your tooling over to Vue 3 in Athena 3.0.0+. This keeps everything meshed together and ensures compatability with the entire framework.

Athena currently uses Vite which is a way to write Vue 3 based menus and all inside a single page application.

Pros

  • Performance

  • Entirely TypeScript

  • Uses Vue 3

  • Easy to Access Development Mode

  • Not React

  • Builds into a Single Page

  • Uses 1 WebView for all HTML / CSS Menus

Cons

  • Learning Curve for Vue 3

  • Hard to Understand Making a Custom Page

Before Working with Vue

Install this extension in VSCode

How to Start Development Mode

It's quite easy to start our Vue interfaces in Development mode we only need to run a single command.

npm run vue-dev

You can also run npm run dev which will turn on the vue server in the background while you have your server running.

Running this command in the root directory of the project will let you open all pages through this url:

http://localhost:3000/

Sometimes the port may be different, pretty unlikely though.

How to Focus on a Page

There are currently two ways to navigate to different pages while in development mode. In your browser you can either use the toolbar by hovering on the left side of the browser or you can modify defaultPage.ts and change the Case Sensitive page name in there.

defaultPage.ts Example

Hover Example

Working with Vue

It's best to use the current pages as general examples but head over to the your-first-page section to learn more.

https://marketplace.visualstudio.com/items?itemName=octref.vetur