Beispiel #1
0
 public HomeView()
     : base("Home SpotiChelas",
            H1(Text("Home")),
            Ul(
                Li(A(ResolveUri.ForPlaylist(), "Playlists")),
                Li(A(ResolveUri.ForSearch(), "Search"))
                )
            )
 {
 }
Beispiel #2
0
 public ArtistView(ViewArtist artist)
     : base(artist.Name,
            H1(Text(string.Format("Artist : {0}", artist.Name))),
            P(Label("name", "Name"), Text(artist.Name)),
            H2(Text("Albuns")),
            Ul(
                artist.Albuns.Select(alb => Li(A(ResolveUri.ForAlbum(alb.Key), alb.Value))).ToArray()
                ),
            Ul(
                Li(A(ResolveUri.ForPlaylist(), "Playlists")),
                Li(A(ResolveUri.ForSearch(), "Search"))
                )
            )
 {
 }
Beispiel #3
0
 public PlaylistDetailView(ViewPlaylist p)
     : base("Playlist Detail",
            H1(Text("Playlist Detail - " + p.Name)),
            H3(Text("Name: " + p.Name)),
            H3(Text("Description: " + p.Description)),
            H3(Text("Track List")),
            Ul(
                p.Tracks.Select(track => Li(
                                    A(ResolveUri.ForTrack(track.Key), track.Value),
                                    Form("POST", ResolveUri.ForRemoveTrack(p, track.Key), P(InputSubmit("Remove")))
                                    )).ToArray()
                ),
            Form("POST", ResolveUri.ForPlaylistRemove(p), P(InputSubmit("Delete"))),
            Form("GET", ResolveUri.ForPlaylistEdit(p), P(InputSubmit("Edit"))),
            P(A(ResolveUri.ForHome(), "Home")),
            P(A(ResolveUri.ForSearch(), "Search"))
            )
 {
 }
Beispiel #4
0
 public TrackView(ViewTrack track)
     : base(track.Name,
            H1(Text(string.Format("Track : {0}", track.Name))),
            P(Label("name", "Name"), Text(track.Name)),
            P(Label("duration", "Duration"), Text(track.Duration)),
            P(Label("album", "Album"), Text(track.Album.Value), A(ResolveUri.ForAlbum(track.Album.Key), "View")),
            H2(Text("Artists")),
            Ul(
                track.Artists.Select(art => Li(A(ResolveUri.ForArtist(art.Key), art.Value))).ToArray()
                ),
            TrackPlayer(track.Href),
            Ul(
                Li(A(ResolveUri.ForAddTrack(track.Href), "Adicionar")),
                Li(A(ResolveUri.ForPlaylist(), "Playlists")),
                Li(A(ResolveUri.ForSearch(), "Search"))
                )
            )
 {
 }
Beispiel #5
0
 public AlbumView(ViewAlbum album)
     : base(album.Name,
            H1(Text(string.Format("Album : {0}", album.Name))),
            P(Label("name", "Name"), Text(album.Name)),
            P(Label("year", "Release"), Text(album.Year)),
            H2(Text("Artists")),
            Ul(
                album.Artist.Select(a => Li(A(ResolveUri.ForArtist(a.Key), a.Value))).ToArray()
                ),
            H2(Text("Tracks")),
            Ul(
                album.Tracks.Select(trc => Li(A(ResolveUri.ForTrack(trc.Key), trc.Value))).ToArray()
                ),
            PlaylistPlayer(album.Name, album.Tracks.Select(track => track.Key).ToArray()),
            Ul(
                Li(A(ResolveUri.ForPlaylist(), "Playlists")),
                Li(A(ResolveUri.ForSearch(), "Search"))
                )
            )
 {
 }