Dynamic realtime profile ReadMe linked with spotify
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
3.4 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <svg width="600" height="233" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  2. <foreignObject width="600" height="233">
  3. <div xmlns="http://www.w3.org/1999/xhtml" class="container">
  4. <style>
  5. div {
  6. font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
  7. }
  8. .main {
  9. display: flex;
  10. }
  11. .container {
  12. border-radius: 5px;
  13. padding: 10px 10px 10px 0px;
  14. }
  15. .playing {
  16. font-weight: bold;
  17. color: #53b14f;
  18. text-align: center;
  19. display: flex;
  20. justify-content: center;
  21. align-items: center;
  22. }
  23. .not-play {
  24. color: #ff1616;
  25. }
  26. .art {
  27. float: left;
  28. width: 44%;
  29. margin-left: -15px;
  30. }
  31. .artist {
  32. font-size: 20px;
  33. color: #b3b3b3;
  34. text-align: left;
  35. margin-top: 5px;
  36. margin-bottom: 5px;
  37. }
  38. .song {
  39. font-weight: bold;
  40. font-size: 24px;
  41. color: #000000ba;
  42. text-align: left;
  43. margin-top: 65px;
  44. }
  45. .logo {
  46. margin-left: 5px;
  47. margin-top: 5px;
  48. }
  49. .cover {
  50. border-radius: 5px;
  51. }
  52. #bars {
  53. height: 30px;
  54. bottom: 23px;
  55. margin: -20px 0 0 0px;
  56. position: absolute;
  57. width: 40px;
  58. }
  59. .bar {
  60. background: #53b14f;
  61. bottom: 1px;
  62. height: 3px;
  63. position: absolute;
  64. width: 3px;
  65. animation: sound 0ms -800ms linear infinite alternate;
  66. }
  67. @keyframes sound {
  68. 0% {
  69. opacity: .35;
  70. height: 3px;
  71. }
  72. 100% {
  73. opacity: 1;
  74. height: 28px;
  75. }
  76. }
  77. {{css_bar|safe}}
  78. </style>
  79. {% if song_name %}
  80. <div class="main">
  81. <a class="art" href="{}" target="_BLANK">
  82. <center>
  83. <img src="data:image/png;base64, {{img}}" width="200" height="200" class="cover" />
  84. </center>
  85. </a>
  86. <div class="text">
  87. <div class="song">{{song_name}}</div>
  88. <div class="artist">{{artist_name}}</div>
  89. <div id="bars">
  90. {{content_bar|safe}}
  91. </div>
  92. </div>
  93. {% else %}
  94. <div class="playing not-play">Nothing playing on Spotify</div>
  95. {% endif %}
  96. </div>
  97. </div>
  98. </foreignObject>
  99. </svg>