add veryyyyyyyyyyyyyyy basic landing page
All checks were successful
deploy / deploy (push) Successful in 41s

This commit is contained in:
Lee 2024-04-06 06:44:27 +01:00
parent d547f5e40b
commit c8d5e86876
10 changed files with 47 additions and 11 deletions

@ -71,6 +71,11 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.jodah</groupId>
<artifactId>expiringmap</artifactId>

@ -2,7 +2,6 @@ package cc.fascinated;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
@Component

@ -3,9 +3,7 @@ package cc.fascinated;
import com.google.gson.Gson;
import lombok.Getter;
import lombok.SneakyThrows;
import lombok.experimental.Helper;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@ -0,0 +1,18 @@
package cc.fascinated.api.controller;
import cc.fascinated.Consts;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping(value = "/")
public class HomeController {
@RequestMapping(value = "/")
public String home(Model model) {
model.addAttribute("url", Consts.getSITE_URL() + "/eeab5f8a-18dd-4d58-af78-2b3c4543da48");
model.addAttribute("avatar_url", Consts.getSITE_URL() + "/avatar/eeab5f8a-18dd-4d58-af78-2b3c4543da48");
return "index";
}
}

@ -9,7 +9,6 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

@ -8,8 +8,6 @@ import cc.fascinated.util.UUIDUtils;
import lombok.extern.log4j.Log4j2;
import net.jodah.expiringmap.ExpirationPolicy;
import net.jodah.expiringmap.ExpiringMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import java.util.Map;

@ -7,7 +7,6 @@ import cc.fascinated.mojang.types.MojangSessionServerProfileProperties;
import cc.fascinated.util.UUIDUtils;
import com.google.gson.JsonObject;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import java.util.UUID;

@ -2,9 +2,8 @@ package cc.fascinated.player.impl;
import cc.fascinated.Main;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.*;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;
import lombok.Getter;
import lombok.SneakyThrows;
import java.net.URI;
import java.net.http.HttpRequest;

@ -6,7 +6,6 @@ import lombok.extern.log4j.Log4j2;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.awt.image.DataBufferByte;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;

@ -0,0 +1,22 @@
<!doctype html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<title>Minecraft Helper</title>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
<p class="font-bold">Hello!</p>
<p>I don't feel like making this pretty.</p>
<div class="flex flex-col mt-3">
<p>Player Data: <a class="text-blue-600" th:href="${url}" th:text="${url}">Player Data</a></p>
<p>Avatar Url: <a class="text-blue-600" th:href="${avatar_url}" th:text="${avatar_url}">Avatar Url</a></p>
</div>
</body>
</html>