UniNews
University news from Greek and international universities in one place
Loading...
Searching...
No Matches
uninews.ui.theme Namespace Reference

Classes

class  Palette
 

Functions

Palette palette (str theme)
 
Path arrow_file (str direction, str color)
 
str stylesheet (str theme)
 

Variables

str LIGHT = "light"
 
str DARK = "dark"
 
dict PALETTES
 
str FONT_FAMILY = '"Noto Sans", "Inter", "Arial"'
 
dict ARROWS
 

Detailed Description

All colours and stylesheets. Nothing here knows about articles or sources.

Function Documentation

◆ arrow_file()

Path uninews.ui.theme.arrow_file ( str  direction,
str  color 
)
Write (once) a small chevron SVG and return its path.

Qt stylesheets can only point at image files, so the arrows for combo
boxes and spin boxes are generated instead of shipped as assets.

◆ palette()

Palette uninews.ui.theme.palette ( str  theme)

◆ stylesheet()

str uninews.ui.theme.stylesheet ( str  theme)
The whole app's CSS. Set it once on the window; children inherit it.

Variable Documentation

◆ ARROWS

dict uninews.ui.theme.ARROWS
Initial value:
1= {
2 "down": "M1 1 L5 5.5 L9 1",
3 "up": "M1 6 L5 1.5 L9 6",
4}

◆ DARK

str uninews.ui.theme.DARK = "dark"

◆ FONT_FAMILY

str uninews.ui.theme.FONT_FAMILY = '"Noto Sans", "Inter", "Arial"'

◆ LIGHT

str uninews.ui.theme.LIGHT = "light"

◆ PALETTES

dict uninews.ui.theme.PALETTES
Initial value:
1= {
2 LIGHT: Palette(
3 background="#F4F0FA",
4 panel="#FFFFFF",
5 panel_alt="#FFFFFF",
6 border="#E6DDF3",
7 text="#171124",
8 muted="#4B5563",
9 accent="#A855F7",
10 accent_hover="#9333EA",
11 input_background="#F9F5FF",
12 card="#FFFFFF",
13 card_hover="#FBF7FF",
14 image_background="#F3E8FF",
15 ),
16 DARK: Palette(
17 background="#080A14",
18 panel="#111827",
19 panel_alt="#0B1220",
20 border="#2A3144",
21 text="#F8FAFC",
22 muted="#CBD5E1",
23 accent="#C084FC",
24 accent_hover="#E879F9",
25 input_background="#111827",
26 card="#111827",
27 card_hover="#161F33",
28 image_background="#1F2937",
29 ),
30}