Skip to content

Commit

Permalink
Merge pull request #36 from ohthias/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
ohthias authored Oct 22, 2024
2 parents ce287fe + f966452 commit 20e39f4
Show file tree
Hide file tree
Showing 45 changed files with 1,487 additions and 1,067 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,28 @@
Data: 24.09.2024
*/

import com.example.Astro.Model.User;
import com.example.Astro.Repository.UserRepository;
import com.example.Astro.service.TokenService;
import com.example.Astro.service.UserService;
import io.jsonwebtoken.Claims;
import java.time.LocalDate;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.*;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.client.RestTemplate;
import java.util.Optional;

import java.security.Principal;
import java.time.LocalDate;
import com.example.Astro.Model.User;
import com.example.Astro.Repository.UserRepository;
import com.example.Astro.service.TokenService;
import com.example.Astro.service.UserService;

import io.jsonwebtoken.Claims;

@Controller
public class HomeController {
Expand All @@ -43,6 +49,11 @@ public String login(){
return "login";
}

@GetMapping("/plano")
public String plano(){
return "plano";
}

@GetMapping("/sign")
public String sign(){
return "sign";
Expand All @@ -65,9 +76,18 @@ public String home(@RequestParam("token") String token, Model model) {
@GetMapping("/artist")
public String artist() { return "artist";}

@GetMapping("/playlist")
public String playlist() {return "playlist";}

@GetMapping("/album")
public String album() {return "album";}

@GetMapping("/busca")
public String busca() {return "busca";}

@GetMapping("/setting")
public String setting() {return "setting";}

@GetMapping("/user")
public String userProfile(@RequestParam("token") String token, Model model) {
try {
Expand All @@ -91,19 +111,6 @@ public String userProfile(@RequestParam("token") String token, Model model) {
}
}


@GetMapping("/playlist/{id}")
public String playlist(@PathVariable("id") String id, @RequestParam("token") String token, Model model) {
model.addAttribute("token", token);
return "playlist";
}

@GetMapping("/album/{id}")
public String album(@PathVariable("id") String id, @RequestParam("token") String token, Model model) {
model.addAttribute("token", token);
return "album";
}

@GetMapping("/single/{id}")
public String single(@PathVariable("id") String id, @RequestParam("token") String token, Model model) {
model.addAttribute("token", token);
Expand Down
2 changes: 0 additions & 2 deletions Astro/src/main/java/com/example/Astro/Model/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
@Entity
@Table(name = "User_Details")
public class User {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "idUser_Details")
Expand Down Expand Up @@ -41,7 +40,6 @@ public User(Long idUserDetails, String email, String password, String username,
this.username = username;
this.lastAccess = lastAccess;
this.token = token;

}

// Getters e Setters
Expand Down
2 changes: 1 addition & 1 deletion Astro/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect

# Spotify API
spotify.client.id=8b8a8c66585b4376b70f7362c50fbdf0
spotify.client.secret=e856e53832ad4651a0dc1ab0ba1d33fc
spotify.client.secret=e856e53832ad4651a0dc1ab0ba1d33fc
95 changes: 94 additions & 1 deletion Astro/src/main/resources/static/css/components/navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
3. Estilos do lado direito da barra de navegação
4. Estilos do botão de brilho
Data: 20 de Outubro de 2024
Data: 21 de Outubro de 2024
*/

nav.navigation-bar {
Expand Down Expand Up @@ -59,6 +59,19 @@ nav.navigation-bar {
gap: 1rem;
transition: all 500ms ease;

.hamburger {
display: none;
cursor: pointer;
font-size: 24px;
color: var(--font-all);
transition: 250ms;

&:hover {
color: var(--tertiary);
text-shadow: 0 0 10px var(--tertiary-shadow);
}
}

h6#albumTitleNav {
width: 100%;
font-size: 18px;
Expand Down Expand Up @@ -214,3 +227,83 @@ a.btn-user {
background-position: 180px;
}
}

@media screen and (max-width: 550px) {
nav.navigation-bar {
grid-area: 1 / 1 / 2 / 8;
}

.side-left .hamburger {
display: block;
}

a.btn-user {
width: 40px;
}

.btn-shine {
padding: 12px 24px;
font-size: 14px;
}
}

@media screen and (max-width: 321px) {
.btn-shine {
display: none;
}
}

.overlay-menu {
position: fixed;
padding: 1rem;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: var(--black-shadow);
backdrop-filter: blur(10px);
color: var(--font-all);
display: none;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
z-index: 1000;
opacity: 0;
transform: translateY(-20px);
transition: opacity 0.3s ease, transform 0.3s ease;
}

.overlay-menu.visible {
opacity: 1;
transform: translateY(0);
}

.menu-item {
margin: 15px 0;
color: var(--font-all);
text-decoration: none;
font-size: 24px;
display: flex;
align-items: center;
transform: all 250ms;

span {
margin-right: 1rem;
}

&:hover {
color: var(--tertiary);
border-bottom: 2px solid var(--tertiary);
}
}

.close-button {
position: absolute;
top: 20px;
right: 20px;
background: transparent;
border: none;
color: white;
font-size: 30px;
cursor: pointer;
}
129 changes: 49 additions & 80 deletions Astro/src/main/resources/static/css/components/player.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
4. Trackbar do player
5. Botão de volume do player
Data: 20 de Outubro de 2024
Data: 21 de Outubro de 2024
*/

/* Player */
Expand Down Expand Up @@ -158,85 +158,6 @@ button:is(#prevButton, #playPauseButton, #nextButton) {
color: var(--white-shadow);
}

/* Media screen */

@media screen and (max-width: 1025px) {
.containner_player {
bottom: 10px;
}

.player {
height: 95px;
}

.player_infoMusic #musicName {
font-size: 1em;
}

.player_infoMusic #artistName {
font-size: 0.5em;
}
}

@media screen and (max-width: 426px) {
.containner_player {
padding: 0;
bottom: 80px;
}

.player {
margin: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
height: 110px;
place-items: center;
justify-content: space-around;
}

.player_image #imgSong {
width: 60px;
height: 60px;
}

.player_infoMusic,
.player_infoMusic #musicName {
width: 120px;
}

#heartMusic,
#randomPlayerMusic {
font-size: 1em;
}

.controls {
display: flex;
flex-direction: row;
justify-content: center;
position: absolute;
top: -50px;
left: 28%;
background: transparent;
background: var(--background-details-shadow);
-webkit-backdrop-filter: blur(20px);
backdrop-filter: blur(50px);
}

.progress-bar,
.container_volume,
.fi-rr-menu-burger,
.container_faixas .container_faixas_detalhes,
.container_faixas .container_faixas_detalhes.open,
.container_faixas {
display: none;
}

#duration,
#currentTime {
margin: 0 1px;
font-size: 0.5em;
}
}

.volume-control {
display: flex;
flex-direction: column-reverse;
Expand Down Expand Up @@ -321,3 +242,51 @@ span.volume_off {
border-color: transparent;
color: transparent;
}

/* Media screen */

@media screen and (max-width: 1025px) {
.player {
height: 95px;
}

.player_infoMusic #musicName {
font-size: 1em;
}

.player_infoMusic #artistName {
font-size: 0.5em;
}
}

@media screen and (max-width: 550px) {
.container_player {
grid-area: 3 / 1 / 4 / 8;
}
.player_image #imgSong {
width: 60px;
height: 60px;
}

.side-left {
width: 80%;
}

.player_infoMusic {
width: 100%;
}

#randomPlayerMusic,
#nextButton,
#prevButton,
.container_volume,
.timecode_player,
.volume-control {
display: none;
}

#heartMusic,
.playPauseButton {
display: flex;
}
}
Loading

0 comments on commit 20e39f4

Please sign in to comment.