Skip to content

polis-digifinland/df-participation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b8d2aca · Mar 28, 2025

History

89 Commits
Jan 24, 2025
Dec 12, 2024
Mar 28, 2025
Oct 18, 2024
Nov 7, 2024
Jan 17, 2025
Oct 18, 2024
Feb 10, 2025
Sep 18, 2024
Oct 18, 2024
Nov 15, 2024
Mar 6, 2025
Dec 20, 2024
Dec 12, 2024
Dec 17, 2024
Mar 26, 2025
Mar 26, 2025
Sep 18, 2024
Dec 4, 2024
Nov 28, 2024

Repository files navigation

DigiFinland Polis participation

Development

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying src/app/[id]/df/page.tsx. The page auto-updates as you edit the file. Only the DigiFinland theme's page.tsx should be manually edited; others will be copied from it.

Building and running the Project

This project is meant to be part of a Polis-DigiFinland deployment. For more information on how to build and run the project, please refer to the Polis-DigiFinland documentation.

Theming

Themes are determined by the last folder in the URL. For example, /df refers to the DigiFinland theme. To create a new theme, follow these steps:

  1. Create a new folder for the theme.
  2. Update the scripts/copy-pages.sh script to include the new theme.

Each theme folder should contain two files: page.tsx and theme.css. The page.tsx file is identical across all themes, df folder page.tsx is used as the source for copying by the script, while theme.css contains theme-specific definitions for colors, fonts, etc.

Color Customization

Color changes do not require code modifications. The following files manage color definitions:

  • global.css: Defines color names and hex codes.
  • [locale]/[id]/THEME/theme.css: Specifies the colors used by the theme.
  • tailwind.config.ts: Converts color names from theme.css into Tailwind CSS variables.
  • Tailwind CSS variables are then used throughout the code.

By following this structure, you can easily manage and customize themes without altering the codebase. Themes are explained more in detail in the brandbook.

Internationalization

Translations are made for Finnish, Swedish, and English. The translation files are located in the src/app/locales directory. For example:

  • src/app/locales/fi/common.json for Finnish
  • src/app/locales/sv/common.json for Swedish
  • src/app/locales/en/common.json for English