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.

115 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
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. .artist {
  28. font-weight: bold;
  29. font-size: 24px;
  30. color: #fff;
  31. text-align: left;
  32. margin-top: 5px;
  33. }
  34. .song {
  35. font-size: 20px;
  36. color: #b3b3b3;
  37. text-align: left;
  38. margin-top: 45px;
  39. margin-bottom: 15px;
  40. }
  41. .logo {
  42. margin-left: 5px;
  43. margin-top: 5px;
  44. }
  45. .cover {
  46. float: left;
  47. width: 44%;
  48. margin-left: -15px;
  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 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="artist">{{artist_name}}</div>
  87. <div class="song">{{song_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>