Skip to content
Snippets Groups Projects
Select Git revision
  • 08ffe708b98f38fedf4a1bac80ba34740be29ffa
  • master default protected
  • 101-upgrade-framework-and-dependencies
  • 84-improve-app-metadata
  • 82-fix-colors
  • 23-add-timer
  • 65-update-icons
  • Release_0.10.0_87 protected
  • Release_0.9.2_86 protected
  • Release_0.9.1_85 protected
  • Release_0.9.0_84 protected
  • Release_0.8.0_83 protected
  • Release_0.7.0_82 protected
  • Release_0.6.0_81 protected
  • Release_0.5.2_80 protected
  • Release_0.5.1_79 protected
  • Release_0.5.0_78 protected
  • Release_0.4.1_77 protected
  • Release_0.4.0_76 protected
  • Release_0.3.1_75 protected
  • Release_0.3.0_74 protected
  • Release_0.2.1_73 protected
  • Release_0.2.0_72 protected
  • Release_0.1.22_71 protected
  • Release_0.1.21_70 protected
  • Release_0.1.20_69 protected
  • Release_0.1.19_68 protected
27 results

game_top.dart

Blame
  • template.php 5.26 KiB
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title>Spotify playlist generator</title>
      <link rel="icon" type="image/png" href="img/favicon.png"/>
      <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" media="all" />
      <link rel="stylesheet" href="css/styles.css" type="text/css" media="all" />
      <script src="js/bootstrap.min.js"></script>
      <script src="js/scripts.js"></script>
    </head>
    
    <body class="container mt-2">
    
      <div class="row">
        <div class="col-3">
    
          <div class="card">
            <?php if (count($templateData['user']->images)) { ?>
            <img src="<?php echo $templateData['user']->images[0]->url; ?>" class="card-img-top" alt="<?php echo $templateData['user']->display_name; ?>">
            <?php } ?>
            <div class="card-body">
              <h5 class="card-title"><?php echo $templateData['user']->display_name; ?></h5>
              <a href="<?php echo $templateData['user']->external_urls->spotify; ?>" class="btn btn-primary">View profile</a>
            </div>
            <div class="card-footer">
              <a href="index.php" class="card-link">refresh</a>
              <br/>
              <a href="?logout" class="card-link">disconnect</a>
            </div>
          </div>
    
        </div>
        <div class="col-9">
    
          <?php if (count($templateData['errors'])) { ?>
            <?php foreach ($templateData['errors'] as $message) { ?>
              <div class="alert alert-warning" role="alert"><?php echo $message; ?></div>
            <?php } ?>
          <?php } ?>
    
          <?php if (count($templateData['infos'])) { ?>
            <?php foreach ($templateData['infos'] as $message) { ?>
              <div class="alert alert-primary" role="alert"><?php echo $message; ?></div>
            <?php } ?>
          <?php } ?>
    
          <?php if (count($templateData['topArtists'])) { ?>
            <form class="clearfix">
              <legend>Generate playlist from artists:</legend>
              <ul class="list-unstyled row row-cols-4">
                <?php foreach ($templateData['topArtists'] as $artist) { ?>
                  <li class="col">
                    <div class="custom-control custom-checkbox">
                      <input
                        type="checkbox"
                        class="custom-control-input"
                        id="check-top-artist-<?php echo $artist->id; ?>"
                        name="selected-artist[]"
                        value="<?php echo $artist->id; ?>"
                      >
                      <label class="custom-control-label" for="check-top-artist-<?php echo $artist->id; ?>">
                        <?php echo $artist->name; ?>
                      </label>
                    </div>
                  </li>
                <?php } ?>
              </ul>
              <div class="row">
                <div class="col-8">
                  <input
                    type="checkbox"
                    class="custom-control-input"
                    id="check-top-artist-filter-artists"
                    name="check-top-artist-filter-artists"
                    value="filter-artists"
                    checked
                  >
                  <label class="custom-control-label" for="check-top-artist-filter-artists">
                    Allow only selected artists in recommendations
                  </label>
                </div>
                <div class="col-4">
                  <button name="generate-playlist-top-artists" type="submit" class="btn btn-secondary float-end">🎶 Generate!</button>
                </div>
              </div>
            </form>
          <?php } ?>
    
          <?php if (count($templateData['playlists'])) { ?>
            <form class="clearfix">
              <legend>Generate playlist from tracks in existing playlist:</legend>
              <ul class="list-unstyled row row-cols-2">
                <?php foreach ($templateData['playlists'] as $playlist) { ?>
                  <li class="col">
                    <div class="custom-control custom-checkbox">
                      <input
                        type="checkbox"
                        class="custom-control-input"
                        id="check-playlist-<?php echo $playlist->id; ?>"
                        name="selected-playlist[]"
                        value="<?php echo $playlist->id; ?>"
                      >
                      <label class="custom-control-label" for="check-playlist-<?php echo $playlist->id; ?>">
                        <?php echo $playlist->name; ?>
                      </label>
                    </div>
                  </li>
                <?php } ?>
              </ul>
              <div class="row">
                <div class="col-8">
                  <input
                    type="checkbox"
                    class="custom-control-input"
                    id="check-playlist-filter-artists"
                    name="check-playlist-filter-artists"
                    value="filter-artists"
                    checked
                  >
                  <label class="custom-control-label" for="check-playlist-filter-artists">
                    Allow only artists in selected playlists in recommendations
                  </label>
                </div>
                <div class="col-4">
                  <button name="generate-playlist-from-playlist" type="submit" class="btn btn-secondary float-end">🎶 Generate!</button>
                </div>
              </div>
            </form>
          <?php } ?>
    
        </div>
      </div>
    
    </body>
    
    </html>