implement more social links, change naming of e.V.

This commit is contained in:
David Rodenkirchen
2024-06-06 17:24:20 +00:00
parent 5dee350c6a
commit 09ff8c78a9
19 changed files with 152 additions and 53 deletions
+2
View File
@@ -0,0 +1,2 @@
from .socials import SocialPlatform, SocialLink, SOCIAL_PLATFORM_ICON_MAP
from .member_info import MemberInfo
+14
View File
@@ -0,0 +1,14 @@
from dataclasses import dataclass, field
from pathlib import Path
from typing import Optional
from ..models import SocialLink
@dataclass
class MemberInfo:
picture_path: Path
name: str
position: str
entry_date: str
socials: list[SocialLink] = field(default_factory=list)
+35
View File
@@ -0,0 +1,35 @@
from dataclasses import dataclass
from enum import Enum
class SocialPlatform(Enum):
MAIL = 0
STEAM = 1
DISCORD = 2
X = 3
FACEBOOK = 4
YOUTUBE = 5
TWITCH = 6
INSTAGRAM = 7
LINKEDIN = 8
GIT = 9
@dataclass
class SocialLink:
platform: SocialPlatform
url: str
SOCIAL_PLATFORM_ICON_MAP = {
SocialPlatform.MAIL: "material/mail",
SocialPlatform.STEAM: "custom/steam",
SocialPlatform.DISCORD: "custom/discord",
SocialPlatform.X: "custom/x",
SocialPlatform.FACEBOOK: "custom/facebook",
SocialPlatform.YOUTUBE: "custom/youtube",
SocialPlatform.TWITCH: "custom/twitch",
SocialPlatform.INSTAGRAM: "custom/instagram",
SocialPlatform.LINKEDIN: "custom/linkedin",
SocialPlatform.GIT: "custom/git"
}