diff --git a/Gemfile b/Gemfile
index a46293e..f595720 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
-ruby '2.6.4'
+ruby '2.6.6'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.3'
diff --git a/Gemfile.lock b/Gemfile.lock
index 9fa062b..ee382ee 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -85,6 +85,7 @@ GEM
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
ffi (1.13.1)
+ ffi (1.13.1-x64-mingw32)
figaro (1.2.0)
thor (>= 0.14.0, < 2)
font-awesome-rails (4.7.0.5)
@@ -118,12 +119,15 @@ GEM
mini_portile2 (2.4.0)
minitest (5.14.1)
msgpack (1.3.3)
+ msgpack (1.3.3-x64-mingw32)
multi_json (1.14.1)
multi_xml (0.6.0)
multipart-post (2.1.1)
nio4r (2.5.2)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
+ nokogiri (1.10.9-x64-mingw32)
+ mini_portile2 (~> 2.4.0)
oauth (0.5.4)
oauth2 (1.4.4)
faraday (>= 0.8, < 2.0)
@@ -132,6 +136,7 @@ GEM
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
pg (1.2.3)
+ pg (1.2.3-x64-mingw32)
popper_js (1.16.0)
public_suffix (4.0.5)
puma (3.12.6)
@@ -182,6 +187,8 @@ GEM
tilt (>= 1.1, < 3)
sassc (2.4.0)
ffi (~> 1.9)
+ sassc (2.4.0-x64-mingw32)
+ ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
@@ -214,6 +221,8 @@ GEM
turbolinks-source (5.2.0)
tzinfo (1.2.7)
thread_safe (~> 0.1)
+ tzinfo-data (1.2020.1)
+ tzinfo (>= 1.0.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
web-console (3.7.0)
@@ -229,6 +238,7 @@ GEM
PLATFORMS
ruby
+ x64-mingw32
DEPENDENCIES
bootsnap (>= 1.1.0)
@@ -256,7 +266,7 @@ DEPENDENCIES
web-console (>= 3.3.0)
RUBY VERSION
- ruby 2.6.4p104
+ ruby 2.6.6p146
BUNDLED WITH
2.1.4
diff --git a/app/assets/images/firewatch-ambience.mp4 b/app/assets/images/firewatch-ambience.mp4
new file mode 100644
index 0000000..de17a62
Binary files /dev/null and b/app/assets/images/firewatch-ambience.mp4 differ
diff --git a/app/assets/stylesheets/albums.scss b/app/assets/stylesheets/albums.scss
index e1067f4..a54b372 100644
--- a/app/assets/stylesheets/albums.scss
+++ b/app/assets/stylesheets/albums.scss
@@ -69,7 +69,7 @@
font-size: 20px;
}
.botao:hover {
- background-color: rgba(62, 64, 204, 0.671); /* Green */
+ background-color: blueviolet; /* Green */
color: whitesmoke;
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
}
diff --git a/app/assets/stylesheets/cards.scss b/app/assets/stylesheets/cards.scss
new file mode 100644
index 0000000..f8242e8
--- /dev/null
+++ b/app/assets/stylesheets/cards.scss
@@ -0,0 +1,186 @@
+.card-container {
+ width: 100%;
+ height: 100vh;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ .post {
+ width: 350px;
+ height: 700px;
+ display: flex;
+ overflow: hidden;
+ flex-direction: column;
+ position: relative;
+
+ }
+
+ .header_post {
+ width: 100%;
+ height: 350px;
+ background: transparent;
+ position: absolute;
+ top: 0;
+
+ img {
+ max-width: 100%;
+ height: auto;
+ }
+ }
+
+ .body_post {
+ width: 100%;
+ height: 50%;
+ background: #fff;
+ position: absolute;
+ bottom: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ cursor: pointer;
+
+
+ .post_content {
+ width: 80%;
+ height: 80%;
+ background: #fff;
+ position: relative;
+ }
+
+ h1 {
+ font-size: 20px;
+ font-weight: bold;
+ margin-bottom: 3px;
+ }
+
+ p {
+ font-size: 14px;
+ font-weight: normal;
+ }
+
+ .container_infos {
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+ position: absolute;
+ bottom: 0;
+ border-top: 1px solid rgba(0, 0, 0, .2);
+ padding-top: 25px;
+
+ .postedBy {
+ display: flex;
+ flex-direction: column;
+ text-transform: uppercase;
+ letter-spacing: 1px;
+ font-size: 12px;
+
+
+ span {
+ font-size: 12px;
+ text-transform: uppercase;
+ opacity: 1;
+ letter-spacing: 1px;
+ }
+
+ p {
+ font-weight: bold;
+ }
+
+ }
+
+ .container_tags {
+ display: flex;
+ flex-direction: column;
+
+ span {
+ font-size: 12px;
+ text-transform: uppercase;
+ opacity: 1;
+ letter-spacing: 1px;
+ }
+
+ .tags {
+ ul {
+ display: flex;
+ li {
+ font-size: 12px;
+ font-weight: bold;
+ letter-spacing: 2px;
+ list-style: none;
+ margin-left: 8px;
+ text-transform: uppercase;
+ position: relative;
+ z-index: 1;
+ display: flex;
+ justify-content: center;
+ cursor: pointer;
+
+ &:first-child {
+ margin-left: 0px;
+ }
+
+ &:before {
+ content: '';
+ text-align: center;
+ width: 100%;
+ height: 5px;
+ background: rgb(62, 65, 204);
+ opacity: 0.7;
+ position: absolute;
+ bottom: 0;
+ z-index: -1;
+ padding: 0px 1px;
+ -webkit-transition: cubic-bezier(0.68, -0.55, 0.27, 01.55) 320ms;
+ -moz-transition: cubic-bezier(0.68, -0.55, 0.27, 01.55) 320ms;
+ -ms-transition: cubic-bezier(0.68, -0.55, 0.27, 01.55) 320ms;
+ -o-transition: cubic-bezier(0.68, -0.55, 0.27, 01.55) 320ms;
+ transition: cubic-bezier(0.68, -0.55, 0.27, 01.55) 320ms;
+ }
+
+ &:hover:before {
+ height: 18px;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+.card-img-top {
+ width: 100%;
+ height: 15vw;
+ object-fit: cover;
+}
+
+
+/*KEYFRAMES ANIMAÇÃO DAS TAGS*/
+
+@keyframes top {
+ 0% {
+ opacity: 0;
+ bottom: -80px
+ }
+ 100% {
+ opacity: 1;
+ bottom: 0px
+
+ }
+}
+
+@keyframes icon {
+ 0% {
+ opacity: 0;
+ transform: scale(0.0);
+ }
+ 50% {
+ opacity: 1;
+ transform: scale(1.3) rotate(-02deg);
+
+ }
+ 100% {
+ opacity: 1;
+ bottom: 0px;
+ }
+}
\ No newline at end of file
diff --git a/app/assets/stylesheets/fixed.scss b/app/assets/stylesheets/fixed.scss
new file mode 100644
index 0000000..7b316eb
--- /dev/null
+++ b/app/assets/stylesheets/fixed.scss
@@ -0,0 +1,43 @@
+/*--- Bootstrap Mobile Gutter Fix --*/
+.row, .container-fluid {
+margin-left: 0px !important;
+margin-right: 0px !important;
+}
+
+/*--- Fixed Video Background iOS/Mobile Style--*/
+.video-wrap {
+ clip: rect(0, auto, auto, 0);
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+#video {
+ position: relative;
+ display: block;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-size: cover;
+ background-position: center center;
+ -webkit-transform: translateZ(0);
+ transform: translateZ(0);
+ will-change: transform;
+ z-index: -1000;
+}
+video {
+ position: relative;
+ top: 50%;
+ left: 50%;
+ min-width: 100%;
+ min-height: 100%;
+ width: auto;
+ height: auto;
+ z-index: -100;
+ transform: translateX(-50%) translateY(-50%);
+ background: url('') no-repeat;
+ background-size: cover;
+ transition: 1s opacity;
+}
\ No newline at end of file
diff --git a/app/assets/stylesheets/homepage.scss b/app/assets/stylesheets/homepage.scss
index 0dd0526..24ecd20 100644
--- a/app/assets/stylesheets/homepage.scss
+++ b/app/assets/stylesheets/homepage.scss
@@ -1,16 +1,122 @@
+* {
+ margin: 0;
+ padding: 0;
+}
+
+body {
+ font-family: 'Montserrat', sans-serif !important;
+ color: #FFFFFF;
+ background-color: black;
+ line-height: 1.6;
+ h1 {
+ font-size: 32px;
+ }
+ h2 {
+ font-size: 26px;
+ }
+}
+
+/* OUTROS */
+
+p {
+ text-align: justify;
+}
+
+.container-fluid {
+ width: 100%;
+ height: 100%;
+ margin: 0 !important;
+ padding: 0 !important;
+ /*overflow-y: scroll;*/
+ /* scroll-behavior: smooth;
+ scroll-snap-type: y mandatory;*/
+ align-content: center;
+
+
+}
+
+.video-background {
+ position: relative;
+ width: 100%;
+ min-height: 90vh;
+ background-color: rgba(0,0,0,0.4)
+}
+
+.caption {
+ position: absolute;
+ top: 35%;
+ width: 100%;
+ color: #FFFFFF;
+}
+
+.caption h1 {
+ font-weight: 700;
+}
+
+/* BOTTOM NAVBAR */
+
+.fixed-bottom {
+ margin: 0 !important;
+ position: fixed !important;
+ z-index: 1;
+ width: 100%;
+ padding: 0;
+ height: 100px;
+}
-/* CAROUSEL */
+/* SECTION */
+
+section {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ text-align: center;
+ width: 100% !important;
+ height: 100vh !important;
+}
+
+section h1 {
+ font-size: 4rem;
+ margin: 0;
+ padding: 0;
+}
+
+section p {
+ font-size: 1.5rem;
+ margin: 0;
+ padding: 0;
+}
+
+section#video {
+ background: #111111;
+}
+
+section#sobre{
+ /*background-image: linear-gradient(#111111, #000000);*/
+ background-image: url("https://cdn.discordapp.com/attachments/722509731922575421/732687216047816865/background-homepage-v2.png");
+}
+
+section#equipe {
+ background-image: url("https://cdn.discordapp.com/attachments/722509731922575421/732689867380883526/background-roxo-v3.png");
+}
+
+/* CARDS */
+
+@media only screen and (max-width: 992px) {
+ flex-direction: column;
+ }
+
+/* CAROUSEL
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
- width: 70%;
margin: auto;
}
.item {
width: 100%;
- height: 100vh;
- min-height: 400px;
+ height: 100vh !important;
}
.carousel-indicators li {
@@ -26,4 +132,14 @@
text-transform: uppercase;
}
-/* OUTROS */
+.carousel {
+ height: 100vh;
+ width: 100%;
+ overflow-x :hidden;
+}
+.carousel .carousel-inner {
+ height:100%;
+}
+*/
+
+
diff --git a/app/assets/stylesheets/infobar.scss b/app/assets/stylesheets/infobar.scss
new file mode 100644
index 0000000..786ce70
--- /dev/null
+++ b/app/assets/stylesheets/infobar.scss
@@ -0,0 +1,89 @@
+.info {
+ width: 100%;
+ height: 100px;
+ position: fixed;
+ line-height: -50px;
+ text-align: center;
+ z-index: 100;
+}
+
+.info div.main_list {
+ /*height: 0px;*/
+}
+
+.info div.main_list ul {
+ width: 100%;
+ /*height: 0px;*/
+ display: flex;
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+.info div.main_list ul li {
+ width: auto;
+ /*height: 0px;*/
+ padding: 0;
+}
+
+.info div.main_list ul li a {
+ text-decoration: none;
+ color: #fff;
+ /*line-height: 0px;*/
+ font-size: 2.4rem;
+}
+
+.info div.main_list ul li a:hover {
+ color: #8a2be2;
+}
+
+.info {
+ padding-top: 20px;
+ padding-bottom: 20px;
+ -webkit-transition: all 0.4s ease;
+ transition: all 0.4s ease;
+}
+
+
+/* Media qurey section
+
+@media screen and (min-width: 768px) and (max-width: 1024px) {
+ .container {
+ margin: 0;
+ }
+}
+
+@media screen and (max-width:768px) {
+ .info div.main_list {
+ width: 100%;
+ height: 0;
+ overflow: hidden;
+ }
+ .info div.show_list {
+ height: auto;
+ }
+ .info div.main_list ul {
+ flex-direction: column;
+ width: 100%;
+ height: 100vh;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ background-color: #111;
+ /*same background color of infobar
+ background-position: center top;
+ }
+ .info div.main_list ul li {
+ width: 100%;
+ text-align: right;
+ }
+ .info div.main_list ul li a {
+ text-align: center;
+ width: 100%;
+ font-size: 3rem;
+ padding: 20px;
+ }
+ .info div.media_button {
+ display: block;
+ }
+}*/
\ No newline at end of file
diff --git a/app/assets/stylesheets/navbar.scss b/app/assets/stylesheets/navbar.scss
index 025a592..5e5249b 100644
--- a/app/assets/stylesheets/navbar.scss
+++ b/app/assets/stylesheets/navbar.scss
@@ -1,4 +1,4 @@
-@import url('https://fonts.googleapis.com/css?family=Quicksand:400,500,700');
+/* @import url('https://fonts.googleapis.com/css?family=Quicksand:400,500,700');
html,
body {
margin: 0;
@@ -19,7 +19,7 @@ body {
position: fixed;
line-height: 65px;
text-align: center;
- z-index: 99;
+ z-index: 100;
}
.nav div.logo {
@@ -36,7 +36,7 @@ body {
}
.nav div.logo a:hover {
- color: blueviolet;
+ color: #8a2be2;
}
.nav div.main_list {
@@ -64,7 +64,7 @@ body {
text-decoration: none;
color: #fff;
line-height: 65px;
- font-size: 2.4rem;
+ font-size: 24px;
}
.nav div.main_list ul li a:hover {
@@ -72,15 +72,6 @@ body {
}
-/* Home section */
-
-/*.home {
- width: 100%;
- height: 100vh;
- background-image: url("https://wallpapermemory.com/uploads/799/firewatch-wallpaper-full-hd-1920x1080-467987.jpg");
- background-position: center top;
- background-size:cover;
-}*/
.navTrigger {
display: none;
diff --git a/app/assets/stylesheets/songplaylists.scss b/app/assets/stylesheets/songplaylists.scss
index 4df6061..b0917c2 100644
--- a/app/assets/stylesheets/songplaylists.scss
+++ b/app/assets/stylesheets/songplaylists.scss
@@ -26,7 +26,7 @@
font-size: 22px;
}
.botao3:hover {
- background-color: rgba(204, 62, 62, 0.671); /* Green */
+ background-color: blueviolet; /* Green */
color: whitesmoke;
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
}
\ No newline at end of file
diff --git a/app/assets/stylesheets/songs.scss b/app/assets/stylesheets/songs.scss
index 96de0ab..5b4933f 100644
--- a/app/assets/stylesheets/songs.scss
+++ b/app/assets/stylesheets/songs.scss
@@ -64,7 +64,7 @@
font-size: 20px;
}
.botao2:hover {
- background-color: rgba(204, 62, 62, 0.671); /* Green */
+ background-color: blueviolet; /* Green */
color: whitesmoke;
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
}
\ No newline at end of file
diff --git a/app/views/albums/index.html.erb b/app/views/albums/index.html.erb
index 1437baf..0b730cb 100644
--- a/app/views/albums/index.html.erb
+++ b/app/views/albums/index.html.erb
@@ -5,7 +5,7 @@
<% if @current_user.role_id == 1 %>
<%= link_to "Novo Álbum", new_album_path, style: 'color:#FFFFFF;' %>
<% end %>
-
<%= link_to "ir para as músicas", songs_path, style: 'color:#FFFFFF;' %>
+
<%= link_to "Ir para Músicas", songs_path, style: 'color:#FFFFFF;' %>
<% if @current_user.role_id == 1 %>
@@ -21,12 +21,12 @@
<% end %>
<%= link_to album.name, album_path(album), style: 'color:black' %>
-
Algumas Músicas presente no album :
+
Músicas:
<% Song.where(album_id: album.id).last(3).each do |sp| %>
<%= sp.name %>
<% end %>
-
<%= link_to 'Remover Album', album_path(album), method: 'delete', data: { confirm: 'Você tem certeza?' }, style: 'color:black;' %>
+
<%= link_to 'Remover Album', delete_album_path(album), :method => :delete, data: { confirm: 'Você tem certeza?' }, style: 'color:black;' %>
@@ -54,7 +54,7 @@
<% end %>
<%= link_to album.name, album_path(album), style: 'color:black' %>
-
Algumas Músicas presente no album :
+
Músicas:
<% Song.where(album_id: album.id).last(3).each do |sp| %>
<%= sp.name %>
diff --git a/app/views/albums/show.html.erb b/app/views/albums/show.html.erb
index a0984a8..5dde2dd 100644
--- a/app/views/albums/show.html.erb
+++ b/app/views/albums/show.html.erb
@@ -19,7 +19,7 @@
<% if @current_user.role_id == 1 %>
<% if @current_user.artist.id == @album.artist.id %>
<%= button_to "Editar Album", edit_album_path(@album), method: :get, class: 'btn btn-outline-light btn-lg' %>
- <%= button_to 'Remover Album', album_path(@album), method: 'delete', data: { confirm: 'Você tem certeza?' }, class: 'btn btn-outline-light btn-lg' %>
+ <%= button_to 'Remover Album', delete_album_path(@album), method: 'delete', data: { confirm: 'Você tem certeza?' }, class: 'btn btn-outline-light btn-lg' %>
<% end %>
<% end %>
@@ -62,7 +62,7 @@
<%= audio_tag (url_for(sp.file)), controls: true, class: 'song' %>
<% if @current_user.artist.id == @album.artist.id %>
<%= link_to " ".html_safe, edit_song_path(sp), method: :get, class: 'btn btn-outline-light icon' %>
- <%= link_to " ".html_safe, song_path(sp), method: 'delete', data: { confirm: 'Você tem certeza que quer apagar essa música?'}, class: 'btn btn-outline-light icon' %>
+ <%= link_to " ".html_safe, delete_song_path(sp), method: 'delete', data: { confirm: 'Você tem certeza que quer apagar essa música?'}, class: 'btn btn-outline-light icon' %>
<% end %>
<% end %>
diff --git a/app/views/application/homepage.html.erb b/app/views/application/homepage.html.erb
index 1cfb317..7ecd2e0 100644
--- a/app/views/application/homepage.html.erb
+++ b/app/views/application/homepage.html.erb
@@ -1,43 +1,84 @@
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
Bom Dia!
-
Projeto Amadeus primero slide
+
+
+<% content_for :nav, render('layouts/navbar-homepage') %>
+<%= render 'layouts/infobar' %>
+
+
+
+
+
+
+
+
+ " type="video/mp4">
+
+
+
+
+
+
PROJETO AMADEUS
+ O pináculo do Streaming Independente.
+ Seja bem-vindo!
+
+
+
+
+
+
+
+
+
+
Amadeus, ou como carinhosamente gostamos de chamar "Por que diabos isso deu erro", é um projeto de streaming proposto pela empresa júnior Struct e implementada por três jovens pessoas que um dia odiariam o Rails. O projeto tem como princípio ser visualmente bonito com um toque de minimalismo, ser totalmente funcional e agradável de ser utilizado pelos usuários.
+
+ Um dos pontos abordados no projeto foi o trabalho em equipe, e apesar de um dos integrantes ter sido expulso (Kayran), contornamos todas as adversidades e soubemos ajudar uns aos outros.
-
-
-
+
+
SOBRE O PROJETO
+
+
+
-
-
-
-
tá funcionando
-
tá funcinando essa porra
+
+
+
CONHEÇA A EQUIPE
+
+
+ <%= render "layouts/cards/pedro" %>
+
+
+ <%= render "layouts/cards/edu" %>
+
+
+
+ <%= render "layouts/cards/kayran" %>
+
+
+
-
diff --git a/app/views/application/teste.html.erb b/app/views/application/teste.html.erb
deleted file mode 100644
index 2a3e4cc..0000000
--- a/app/views/application/teste.html.erb
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
Bootstrap Example
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Bom Dia!
-
Projeto Amadeus, primero slide
-
-
-
-
-
-
-
caralho darth vader
-
ta brabo apenas
-
-
-
-
-
-
-
tá funcionando
-
tá funcinando essa porra
-
-
-
-
-
-
-
-
-
diff --git a/app/views/favoritesongs/index.html.erb b/app/views/favoritesongs/index.html.erb
index 3a5b17a..42ca3a4 100644
--- a/app/views/favoritesongs/index.html.erb
+++ b/app/views/favoritesongs/index.html.erb
@@ -1,11 +1,11 @@
-
+
-
+
-
Bem Vindo as suas músicas favoritas
- <%= @listener.user.name %>
+ Bem-vindo às suas músicas favoritas,
+ <%= @listener.user.name %>!
@@ -25,7 +25,7 @@
<% @favorites.each do |favorito| %>
- <%= link_to " ".html_safe, favoritesong_path(favorito), method: :delete, style: 'color:white;' %>
+ <%= link_to " ".html_safe, delete_favoritesong_path(favorito), method: :delete, style: 'color:white;' %>
<%= favorito.song.name %>
<%= favorito.song.album.name %>
<%= audio_tag (url_for(favorito.song.file)), controls: true, class:'song' %>
diff --git a/app/views/layouts/_infobar.html.erb b/app/views/layouts/_infobar.html.erb
new file mode 100644
index 0000000..05b82ee
--- /dev/null
+++ b/app/views/layouts/_infobar.html.erb
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/layouts/_navbar-homepage.html.erb b/app/views/layouts/_navbar-homepage.html.erb
new file mode 100644
index 0000000..16355a9
--- /dev/null
+++ b/app/views/layouts/_navbar-homepage.html.erb
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <% if current_user %>
+ <% if (current_user.role_id == 1) %>
+ <%= link_to "Álbuns", albums_path%>
+ <%= link_to " ".html_safe, logout_path, method: :delete%>
+ <% else %>
+ <%= link_to "Álbuns", albums_path%>
+ <%= link_to "Playlists", playlists_path%>
+ <%= link_to "Favoritos", favoritesongs_path%>
+ <%= link_to " ".html_safe, logout_path, method: :delete%>
+ <% end %>
+ <% else %>
+ Registrar
+ Log in
+ <% end %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/layouts/_navbar.html.erb b/app/views/layouts/_navbar.html.erb
index 8dd175b..2d13cfa 100644
--- a/app/views/layouts/_navbar.html.erb
+++ b/app/views/layouts/_navbar.html.erb
@@ -1,35 +1,43 @@
-
-
-
+
+
+
+
+
+
-
+
+
+
+
+
- <% if current_user %>
- <% if (current_user.role_id == 1) %>
- <%= link_to "Albums", albums_path%>
- <%= link_to " ".html_safe, logout_path, method: :delete%>
- <% else %>
- <%= link_to "Álbums", albums_path%>
- <%= link_to "Playlist", playlists_path%>
- <%= link_to "Favoritos", favoritesongs_path%>
- <%= link_to " ".html_safe, logout_path, method: :delete%>
- <% end %>
+ <% if current_user %>
+ <% if (current_user.role_id == 1) %>
+ <%= link_to "Álbuns", albums_path%>
+ <%= link_to " ".html_safe, logout_path, method: :delete%>
<% else %>
- Registrar
- Logar
+ <%= link_to "Álbuns", albums_path %>
+ <%= link_to "Playlists", playlists_path%>
+ <%= link_to "Favoritos", favoritesongs_path%>
+ <%= link_to " ".html_safe, logout_path, method: :delete%>
<% end %>
+ <% else %>
+ Registrar
+ Log in
+ <% end %>
-
-
+
+
-
+
+
+
+
-
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index f39cad9..56bf746 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -2,16 +2,26 @@
AmadeusProjeto
+
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
+ <%= javascript_include_tag 'application.js', "https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js" %>
+
+
+ <% #NAVBAR SEM FUNDO NA HOMEPAGE %>
+ <% if content_for? :nav %>
+ <%= content_for :nav %>
+ <% else %>
<%= render 'layouts/navbar' %>
- <%= yield %>
+ <% end %>
+
+ <%= yield %>
diff --git a/app/views/layouts/cards/_edu.html.erb b/app/views/layouts/cards/_edu.html.erb
new file mode 100644
index 0000000..f709e7e
--- /dev/null
+++ b/app/views/layouts/cards/_edu.html.erb
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
Eduardo Marques
+
Olá! Sou um estudante de graduação da Universidade de Brasília, colecionador de jogos e programador nas horas vagas.
+
+
+
+
+
diff --git a/app/views/layouts/cards/_kayran.html.erb b/app/views/layouts/cards/_kayran.html.erb
new file mode 100644
index 0000000..07227ee
--- /dev/null
+++ b/app/views/layouts/cards/_kayran.html.erb
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
Kayran Vieira
+
Criado em um laboratório na URSS por Rasputin, eu sou um homem com o objetivo não só de defender a fé católica, mas também de programar no tempo livre.
+
+
+
+
+
+
diff --git a/app/views/layouts/cards/_pedro.html.erb b/app/views/layouts/cards/_pedro.html.erb
new file mode 100644
index 0000000..22eb47f
--- /dev/null
+++ b/app/views/layouts/cards/_pedro.html.erb
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
Pedro Venzi
+
Bom dia! Sim, bom dia. Sou calouro de Engenharia de Computação na Universidade de Brasília e estou dando meus primeiros passos no mundo da programação.
+ Fora isso, invisto meu tempo em um trompete e em um jogo chamando Counter-Strike .
+
+
+
+
+
diff --git a/app/views/playlists/index.html.erb b/app/views/playlists/index.html.erb
index 4bef19f..3f6909a 100644
--- a/app/views/playlists/index.html.erb
+++ b/app/views/playlists/index.html.erb
@@ -16,7 +16,7 @@
Editar
-
<%= link_to 'Remover', playlist_path(playlist), method: 'delete', data: { confirm: 'Você tem certeza?' }, :class=>'btn btn-outline-dark btn-lg' %>
+
<%= link_to 'Remover', delete_playlist_path(playlist), method: 'delete', data: { confirm: 'Você tem certeza?' }, :class=>'btn btn-outline-dark btn-lg' %>
<% end %>
diff --git a/app/views/songs/index.html.erb b/app/views/songs/index.html.erb
index 139bfe2..119c468 100644
--- a/app/views/songs/index.html.erb
+++ b/app/views/songs/index.html.erb
@@ -23,7 +23,7 @@
<% if @current_user.role_id == 2 %>
<% if @favorites.where(song: song).present? %>
- <%= link_to " ".html_safe, favoritesong_path(@favorites.where(song_id: song.id, listener_id: @listener).ids), method: 'delete', style: 'color:black;' %>
+ <%= link_to " ".html_safe, delete_favoritesong_path(@favorites.where(song_id: song.id, listener_id: @listener).ids), method: 'delete', style: 'color:black;' %>
<% else %>
<%= link_to " ".html_safe, favoritesongs_path(favorite:{song_id: song.id, listener_id: current_user.listener.id}), method: :post, style: 'color:black;' %>
<% end %>
diff --git a/app/views/songs/show.html.erb b/app/views/songs/show.html.erb
index 53e145e..5a5a943 100644
--- a/app/views/songs/show.html.erb
+++ b/app/views/songs/show.html.erb
@@ -7,7 +7,7 @@
<% if @current_user.artist.id == @song.album.artist.id %>
<%= button_to "Todas as músicas", songs_path, method: :get, :class=> "btn btn-outline-dark" %>
<%= button_to "Editar música", edit_song_path(@song), method: :get, :class=> "btn btn-outline-dark" %>
- <%= button_to 'remover música', song_path(@song), method: 'delete', data: { confirm: 'Você tem certeza?' }, :class=> "btn btn-outline-dark" %>
+ <%= button_to 'remover música', delete_song_path(@song), method: 'delete', data: { confirm: 'Você tem certeza?' }, :class=> "btn btn-outline-dark" %>
<% end %>
<% end %>
diff --git a/config/routes.rb b/config/routes.rb
index 2197e98..43f7577 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,20 +1,75 @@
Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
root "application#homepage"
- resources :songs
- resources :albums
- resources :favoritesongs
+
+ # resources :songs
+ scope 'songs' do
+ get '/new', to: 'songs#new', as: :new_song
+ post '/new', to: 'songs#create'
+ get '/show/:id', to: 'songs#show', as: :song
+ get '/', to: 'songs#index', as: :songs
+ get '/edit/:id', to: 'songs#edit', as: :edit_song
+ patch '/edit/:id', to: 'songs#update'
+ delete '/delete/:id', to: 'songs#destroy', as: :delete_song
+ end
+
+ # resources :albums
+ scope 'albums' do
+ get '/new', to: 'albums#new', as: :new_album
+ post '/new', to: 'albums#create'
+ get '/show/:id', to: 'albums#show', as: :album
+ get '/', to: 'albums#index', as: :albums
+ get '/edit/:id', to: 'albums#edit', as: :edit_album
+ patch '/edit/:id', to: 'albums#update'
+ delete '/delete/:id', to: 'albums#destroy', as: :delete_album
+ end
+
+ # resources :favoritesongs
+ scope 'favoritesongs' do
+ get '/new', to: 'favoritesongs#new', as: :new_favoritesong
+ post '/new', to: 'favoritesongs#create'
+ get '/show/:id', to: 'favoritesongs#show', as: :favoritesong
+ get '/', to: 'favoritesongs#index', as: :favoritesongs
+ get '/edit/:id', to: 'favoritesongs#edit', as: :edit_favoritesong
+ patch '/edit/:id', to: 'favoritesongs#update'
+ delete '/delete/:id', to: 'favoritesongs#destroy', as: :delete_favoritesong
+ end
+
resources :songplaylists, only: [:new, :create, :destroy]
- resources :playlists
+ # scope 'songplaylists' do
+ # get '/new', to: 'favoritesongs#new', as: :new_songplaylist
+ # post '/new', to: 'favoritesongs#create', as: :songplaylists
+ # delete '/delete/:id', to: 'favoritesongs#destroy', as: :delete_songplaylist
+ # end
+
+ # resources :playlists
+ scope 'playlists' do
+ get '/new', to: 'playlists#new', as: :new_playlist
+ post '/new', to: 'playlists#create'
+ get '/show/:id', to: 'playlists#show', as: :playlist
+ get '/', to: 'playlists#index', as: :playlists
+ get '/edit/:id', to: 'playlists#edit', as: :edit_playlist
+ patch '/edit/:id', to: 'playlists#update'
+ delete '/delete/:id', to: 'playlists#destroy', as: :delete_playlist
+ end
+ # Login
scope 'users' do
get 'novo_usuario', to: 'users#new', as: :new_user
post 'novo_usuario', to: 'users#create'
end
+ # Register
scope 'auth' do
get 'login', to: 'sessions#new', as: :login
post 'login', to: 'sessions#create'
delete 'logout', to: 'sessions#destroy', as: :logout
end
end
+
+# Mensagem para erros '-'
+
+# match '/401', to: 'errors#unauthorized', via: :all, as: :error_401
+# match '/404', to: 'errors#not_found', via: :all, as: :error_404
+# match '/422', to: 'errors#unprocessable_entity', via: :all, as: :error_422
+# match '/500', to: 'errors#internal_server_error', via: :all, as: :error_500
\ No newline at end of file