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.

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