-
Notifications
You must be signed in to change notification settings - Fork 4
/
member.py
23 lines (18 loc) · 1.04 KB
/
member.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class Member:
def __init__(
self, name: str, linkedin_url: str = None, github_url: str = None
) -> None:
self.name = name
self.linkedin_url = linkedin_url
self.github_url = github_url
def sidebar_markdown(self):
markdown = f'<b style="display: inline-block; vertical-align: middle; height: 100%">{self.name}</b>'
if self.linkedin_url is not None:
markdown += (f' <a href={self.linkedin_url} target="_blank"><img src="https://dst-studio-template.s3.eu'
f'-west-3.amazonaws.com/linkedin-logo-black.png" alt="linkedin" width="25" '
f'style="vertical-align: middle; margin-left: 5px"/></a>')
if self.github_url is not None:
markdown += (f' <a href={self.github_url} target="_blank"><img src="https://dst-studio-template.s3.eu-west'
f'-3.amazonaws.com/github-logo.png" alt="github" width="20" style="vertical-align: middle; '
f'margin-left: 5px"/></a>')
return markdown