feat: dynamically style each post

This commit is contained in:
Barrett Ruth 2024-06-22 13:53:26 -05:00
parent 8655cd7097
commit d3811df2ce
4 changed files with 27 additions and 18 deletions

View file

@ -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";
}
}