No description
  • Svelte 74.5%
  • TypeScript 19.8%
  • JavaScript 3%
  • CSS 1.7%
  • HTML 1%
Find a file
2026-10-02 01:15:18 +00:00
.forgejo/workflows Initial commit 2026-10-02 01:15:18 +00:00
src Initial commit 2026-10-02 01:15:18 +00:00
static Initial commit 2026-10-02 01:15:18 +00:00
.gitignore Initial commit 2026-10-02 01:15:18 +00:00
.npmrc Initial commit 2026-10-02 01:15:18 +00:00
package-lock.json Initial commit 2026-10-02 01:15:18 +00:00
package.json Initial commit 2026-10-02 01:15:18 +00:00
README.md Initial commit 2026-10-02 01:15:18 +00:00
svelte.config.js Initial commit 2026-10-02 01:15:18 +00:00
tsconfig.json Initial commit 2026-10-02 01:15:18 +00:00
vite.config.ts Initial commit 2026-10-02 01:15:18 +00:00

Cortina Svelte Base Template

This is intended as a simple starting point for a svelte based interactive.

The main features of this template are:

  • Setup for route based navigation
  • Defaults to using Svelte Animations
  • Includes a Timeout screen that can then be styled/modified
  • Automatically will pull data from either a CMS or from locally cached content
  • Built in build for deploying directly to either Application Manager or the extranet

Usage

Use the "Use this template" Button above to create a new repository based on this template.

Build Pipelines

To enable build pipelines in the new repository under settings -> actions -> variables define the following variables:

  1. AZURE_DESTINATION this will be the location on the cortinabuilds bucket that this app will deploying
  2. SOURCE this will be the output location of npm run build
  3. Rename .forgejo/workflows/main.yml.bak to main.yml

Analytics

Capture analytics data in the application and send it as a JSON to a given destination.

  • new Analytics(endpoint: string, appId: string, appInstId: string, username: string, password: string) - Declare a new instance of Analytics and configure where data events get sent using a given POST endpoint
  • trackNewSession(isSessionADA: boolean): () => void - Generates a UUID as it starts a new session using the internal SessionTracker class. This should be called once the user begins a session by interacting with the attract
  • submitAnalytics(hierarchy: string, eventName: string, screenName: string, parameters: object | null): () => void - Send captured analytics data to its POST endpoint Parameters
  • Parameters are optional and defaulted to null. It is an object that would contain any additional information needing to be captured.

In order to use these analytics utilities, first create a store for the anayltics data. Example:

    import { analyticsStore } from "$lib/stores/analyticsstore";
    import Analytics from "$lib/utils/Analytics";

    $analyticsStore = new Analytics("Application_Endpoint", "My_App_Analytics", "My_App_Instance_Id", "MyUsername", "MyPassword");
    $analyticsStore.trackNewSession(false);

    const onExampleEvent = (param) => {
        $analyticsStore.submitAnalytics("", "event_name", "screen_name", null);
    }