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.

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