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.

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