feat: dynamically style each post
This commit is contained in:
parent
8655cd7097
commit
d3811df2ce
4 changed files with 27 additions and 18 deletions
|
|
@ -28,3 +28,16 @@ function goHome(e) {
|
|||
|
||||
clearPrompt(500, () => (window.location.href = "/"));
|
||||
}
|
||||
|
||||
function getTopicColor(topicName) {
|
||||
switch (topicName) {
|
||||
case "software":
|
||||
return "#0073e6";
|
||||
case "economics":
|
||||
return "#009975";
|
||||
case "trading":
|
||||
return "#d50032";
|
||||
case "algorithms":
|
||||
return "#6a0dad";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue