修改提交
This commit is contained in:
parent
5227742565
commit
3c63b88563
15
pom.xml
15
pom.xml
@ -53,6 +53,21 @@
|
||||
<version>3.0.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.33</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>23.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
15
src/main/java/com/xiaolfeng/dormstar/cache/RamDataCache.java
vendored
Normal file
15
src/main/java/com/xiaolfeng/dormstar/cache/RamDataCache.java
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
package com.xiaolfeng.dormstar.cache;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author lfeng
|
||||
*/
|
||||
@Component
|
||||
public class RamDataCache {
|
||||
@Value("${project.version}")
|
||||
public String version;
|
||||
@Value("${project.name}")
|
||||
public String name;
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package com.xiaolfeng.dormstar.controllers;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
/**
|
||||
* @author 筱锋xiao_lfeng
|
||||
*/
|
||||
@Controller
|
||||
public class IndexController {
|
||||
|
||||
@GetMapping("/")
|
||||
public String getIndex() {
|
||||
return "index";
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package com.xiaolfeng.dormstar.controllers;
|
||||
|
||||
/**
|
||||
* @author 筱锋xiao_lfeng
|
||||
*/
|
||||
public class WxxyNetController {
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.xiaolfeng.dormstar.controllers.view;
|
||||
|
||||
import com.xiaolfeng.dormstar.cache.RamDataCache;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
/**
|
||||
* @author 筱锋xiao_lfeng
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/")
|
||||
@RequiredArgsConstructor
|
||||
public class IndexController {
|
||||
private final RamDataCache ramDataCache;
|
||||
|
||||
@GetMapping("/")
|
||||
public String getIndex(@NotNull Model model) {
|
||||
model.addAttribute("title", ramDataCache.name);
|
||||
return "index";
|
||||
}
|
||||
|
||||
@GetMapping("/center")
|
||||
public String getCenter(@NotNull Model model) {
|
||||
model.addAttribute("title", ramDataCache.name);
|
||||
model.addAttribute("version", ramDataCache.version);
|
||||
return "center";
|
||||
}
|
||||
|
||||
@GetMapping("/help")
|
||||
public String getHelp() {
|
||||
return "help";
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.xiaolfeng.dormstar.services;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author 筱锋xiao_lfeng
|
||||
*/
|
||||
@Service
|
||||
public class GetWxxyNetworkInfo {
|
||||
|
||||
public String getWxxyNetWork() {
|
||||
return null;
|
||||
}
|
||||
}
|
3
src/main/resources/tailwind.css
Normal file
3
src/main/resources/tailwind.css
Normal file
@ -0,0 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
72
src/main/resources/templates/center.html
Normal file
72
src/main/resources/templates/center.html
Normal file
@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="h-full bg-gray-100" lang="zh-cn">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
|
||||
name="viewport">
|
||||
<meta content="ie=edge" http-equiv="X-UA-Compatible">
|
||||
<title th:text="${title}"></title>
|
||||
<!-- Css -->
|
||||
<link href="/css/style.css" rel="stylesheet">
|
||||
</head>
|
||||
<body class="h-full">
|
||||
<!--
|
||||
This example requires updating your template:
|
||||
|
||||
```
|
||||
<html class="h-full bg-gray-100">
|
||||
<body class="h-full">
|
||||
```
|
||||
-->
|
||||
<div class="min-h-full">
|
||||
<nav class="bg-gray-800">
|
||||
<div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex h-16 items-center justify-between">
|
||||
<div class="flex items-center">
|
||||
<div class="flex-shrink-0">
|
||||
<img alt="Your Company" class="h-8 w-8"
|
||||
src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=500">
|
||||
</div>
|
||||
<div class="ml-10 flex space-x-4 w-full">
|
||||
<a aria-current="page" class="bg-gray-900 text-white rounded-md px-3 py-2 text-sm font-medium"
|
||||
href="/">首页</a>
|
||||
<a class="text-gray-300 hover:bg-gray-700 hover:text-white rounded-md px-3 py-2 text-sm font-medium"
|
||||
href="#">Team</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ml-4 flex items-center md:ml-6">
|
||||
<div class="relative ml-3">
|
||||
<span class="absolute -inset-1.5"></span>
|
||||
<span class="sr-only">Open user menu</span>
|
||||
<img alt=""
|
||||
class="h-8 w-8 rounded-full"
|
||||
src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<header class="bg-white shadow">
|
||||
<div class="mx-auto max-w-7xl px-4 py-6 sm:px-6 lg:px-8">
|
||||
<h1 class="text-3xl font-bold tracking-tight text-gray-900">系统看板</h1>
|
||||
</div>
|
||||
</header>
|
||||
<main>
|
||||
<div class="mx-auto max-w-7xl py-6 px-6 lg:px-8 grid grid-cols-5">
|
||||
<div class="grid-cols-1">
|
||||
<a class="block p-6 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700"
|
||||
href="#">
|
||||
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">Noteworthy
|
||||
technology
|
||||
acquisitions 2021</h5>
|
||||
<p class="font-normal text-gray-700 dark:text-gray-400">Here are the biggest enterprise technology
|
||||
acquisitions of 2021 so far, in reverse chronological order.</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
<!-- JavaScript -->
|
||||
<script src="/js/flowbite.js"></script>
|
||||
</html>
|
10
src/main/resources/templates/help.html
Normal file
10
src/main/resources/templates/help.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -2,9 +2,47 @@
|
||||
<html lang="zh-cn">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<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">
|
||||
<title th:text="${title}"></title>
|
||||
<!-- Css -->
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="bg-white">
|
||||
<div class="mx-auto max-w-7xl py-24 sm:px-6 sm:py-32 lg:px-8">
|
||||
<div class="relative isolate overflow-hidden bg-gray-900 px-6 pt-16 shadow-2xl sm:rounded-3xl sm:px-16 md:pt-24 lg:flex lg:gap-x-20 lg:px-24 lg:pt-0">
|
||||
<svg viewBox="0 0 1024 1024" class="absolute left-1/2 top-1/2 -z-10 h-[64rem] w-[64rem] -translate-y-1/2 [mask-image:radial-gradient(closest-side,white,transparent)] sm:left-full sm:-ml-80 lg:left-1/2 lg:ml-0 lg:-translate-x-1/2 lg:translate-y-0" aria-hidden="true">
|
||||
<circle cx="512" cy="512" r="512" fill="url(#759c1415-0410-454c-8f7c-9a820de03641)" fill-opacity="0.7" />
|
||||
<defs>
|
||||
<radialGradient id="759c1415-0410-454c-8f7c-9a820de03641">
|
||||
<stop stop-color="#7775D6" />
|
||||
<stop offset="1" stop-color="#E935C1" />
|
||||
</radialGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
<div class="mx-auto max-w-md text-center lg:mx-0 lg:flex-auto lg:py-32 lg:text-left">
|
||||
<h2 class="text-3xl font-bold tracking-tight text-white sm:text-4xl">
|
||||
<span th:text="${title}"></span>
|
||||
<br/>
|
||||
<span>我们的宿舍</span>
|
||||
</h2>
|
||||
<p class="mt-6 text-lg leading-8 text-gray-300">这个只是方便我们宿舍使用的一些东西而已,没有什么其他用的东西。</p>
|
||||
<div class="mt-10 flex items-center justify-center gap-x-6 lg:justify-start">
|
||||
<a href="./center" class="rounded-md bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm hover:bg-gray-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white">进入中心</a>
|
||||
<a href="http://192.168.5.190:1000/" target="_blank" class="rounded-md bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm hover:bg-gray-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white">公共网盘</a>
|
||||
<a href="http://192.168.5.190:201/" target="_blank" class="rounded-md bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm hover:bg-gray-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white">宿舍网盘</a>
|
||||
<a href="./help" class="text-sm font-semibold leading-6 text-white">使用帮助 <span aria-hidden="true">→</span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative mt-16 h-80 lg:mt-8">
|
||||
<img class="absolute left-0 top-0 w-[57rem] max-w-none rounded-md bg-white/5 ring-1 ring-white/10" src="https://tailwindui.com/img/component-images/dark-project-app-screenshot.png" alt="App screenshot" width="1824" height="1080">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<!-- JavaScript -->
|
||||
<script src="/js/flowbite.js"></script>
|
||||
</html>
|
12
tailwind.config.js
Normal file
12
tailwind.config.js
Normal file
@ -0,0 +1,12 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: [
|
||||
"./src/main/resources/**/*.{html,js}",
|
||||
"./node_modules/flowbite/**/*.js"
|
||||
],
|
||||
theme: {
|
||||
extend: {},
|
||||
}, plugins: [
|
||||
require('flowbite/plugin')
|
||||
],
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user