This repository was archived by the owner on Feb 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp_config.py
60 lines (47 loc) · 1.67 KB
/
app_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
from app.config import app_configuration
class Config:
data: dict = app_configuration
@staticmethod
def __site_name__() -> str:
value = Config.data.get("site_name", "Site Name")
return value if value else "Site Name"
@staticmethod
def __repo_name__() -> str:
value = Config.data.get("repo_name", "")
return value if value else ""
@staticmethod
def __repo_url__() -> str:
value = Config.data.get("repo_url", "")
return value if value else ""
@staticmethod
def __copy_right__() -> str:
value = Config.data.get("copy_right", "")
return value if value else ""
@staticmethod
def __attribute__() -> str:
value = Config.data.get("attribute", "")
return value if value else ""
@staticmethod
def __drawer__() -> bool:
value = Config.data.get("drawer", False)
return value if value else False
@staticmethod
def __theme_primary__() -> str:
value = Config.data["theme"].get("primary", "orange")
return value if value else "orange"
@staticmethod
def __theme_secondary__() -> str:
value = Config.data["theme"].get("secondary", "orange")
return value if value else "orange"
@staticmethod
def __theme_font__() -> str:
value = Config.data["theme"].get("font", "Times New Roman")
return value if value else "Times New Roman"
@staticmethod
def __all_social__():
value = Config.data.get("socials", {})
return value if value else None
@staticmethod
def __navigation__():
value = Config.data.get("navigation", {})
return value if value else None