reorganize favicons
Signed-off-by: MiniDigger <admin@minidigger.me>
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 60 KiB |
BIN
src/main/frontend/public/images/favicon/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/main/frontend/public/images/favicon/favicon-16x16.png
Normal file
After Width: | Height: | Size: 680 B |
BIN
src/main/frontend/public/images/favicon/favicon-32x32.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
src/main/frontend/public/images/favicon/favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
@ -7,13 +7,13 @@
|
||||
"start_url": "/?homescreen=1",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https://papermc.io/favicons/android-chrome-192x192.png?v=BG70oBaPzN",
|
||||
"src": "/assets/images/favicon/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "https://papermc.io/favicons/android-chrome-384x384.png?v=BG70oBaPzN",
|
||||
"sizes": "384x384",
|
||||
"src": "/assets/images/favicon/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
|
@ -27,4 +27,4 @@ Disallow: /*/*/versions/*/reviews
|
||||
Disallow: /*/*/versions/*/new
|
||||
Disallow: /*/*/versions/*/confirm
|
||||
|
||||
Sitemap: https://hangar-new.minidigger.me/sitemap.xml
|
||||
Sitemap: https://hangar.minidigger.me/sitemap.xml
|
||||
|
@ -3,6 +3,36 @@ package io.papermc.hangar.controller;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.annotation.Secured;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
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.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
import org.springframework.web.server.ResponseStatusException;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.View;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import io.papermc.hangar.config.hangar.HangarConfig;
|
||||
import io.papermc.hangar.controller.util.StatusZ;
|
||||
import io.papermc.hangar.db.customtypes.LoggedActionType;
|
||||
@ -33,34 +63,6 @@ import io.papermc.hangar.service.VersionService;
|
||||
import io.papermc.hangar.service.project.FlagService;
|
||||
import io.papermc.hangar.service.project.ProjectService;
|
||||
import io.papermc.hangar.util.AlertUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.annotation.Secured;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
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.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
import org.springframework.web.server.ResponseStatusException;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.View;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.time.LocalDate;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Controller
|
||||
public class ApplicationController extends HangarController {
|
||||
@ -222,13 +224,13 @@ public class ApplicationController extends HangarController {
|
||||
@GetMapping("/admin/stats")
|
||||
public ModelAndView showStats(@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from, @RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to) {
|
||||
ModelAndView mav = new ModelAndView("users/admin/stats");
|
||||
if(from == null){
|
||||
if (from == null) {
|
||||
from = LocalDate.now().minus(30, ChronoUnit.DAYS);
|
||||
}
|
||||
if(to == null){
|
||||
if (to == null) {
|
||||
to = LocalDate.now();
|
||||
}
|
||||
if(to.isBefore(from)){
|
||||
if (to.isBefore(from)) {
|
||||
to = from;
|
||||
}
|
||||
List<Stats> stats = statsService.getStats(from, to);
|
||||
@ -267,8 +269,8 @@ public class ApplicationController extends HangarController {
|
||||
Map<String, List<String>> additions;
|
||||
Map<String, List<String>> removals;
|
||||
try {
|
||||
additions = mapper.treeToValue(object.get("additions"), (Class<Map<String,List<String>>>)(Class)Map.class);
|
||||
removals = mapper.treeToValue(object.get("removals"), (Class<Map<String,List<String>>>)(Class)Map.class);
|
||||
additions = mapper.treeToValue(object.get("additions"), (Class<Map<String, List<String>>>) (Class) Map.class);
|
||||
removals = mapper.treeToValue(object.get("removals"), (Class<Map<String, List<String>>>) (Class) Map.class);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Bad formatting", e);
|
||||
}
|
||||
@ -307,10 +309,10 @@ public class ApplicationController extends HangarController {
|
||||
@GetMapping(value = "/favicon.ico", produces = "images/x-icon")
|
||||
@ResponseBody
|
||||
public ClassPathResource faviconRedirect() {
|
||||
return new ClassPathResource("public/images/favicon.ico");
|
||||
return new ClassPathResource("public/images/favicon/favicon.ico");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/global-sitemap.xml", produces = MediaType.APPLICATION_XML_VALUE)
|
||||
@GetMapping(value = "/global-sitemap.xml", produces = MediaType.APPLICATION_XML_VALUE)
|
||||
@ResponseBody
|
||||
public String globalSitemap() {
|
||||
return sitemapService.getGlobalSitemap();
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Strings localized for en-US locale
|
||||
|
||||
general.language = en_US
|
||||
general.language = en
|
||||
general.appName = Hangar
|
||||
general.projectName = Paper
|
||||
general.organization = PaperMC
|
||||
|
@ -21,6 +21,7 @@ sorted according to different criteria.
|
||||
<meta property="og:url" content="${config.baseUrl}">
|
||||
<meta property="og:image" content="<@hangar.url "images/ore-dark.png" />" />
|
||||
<meta property="og:description" content="<@spring.message "general.description" />" />
|
||||
<meta name="description" content="<@spring.message "general.description" />" />
|
||||
</#macro>
|
||||
|
||||
<#function randomSponsor>
|
||||
|
@ -18,7 +18,7 @@ showFooter: Boolean = true, noContainer: Boolean = false, additionalMeta: Html =
|
||||
<link href="${config.security.api.url}" rel="dns-prefetch">
|
||||
<#-- <link href="<@hangar.config "app.discourseCdnUrl" />" rel="dns-prefetch">--><#--TODO this-->
|
||||
|
||||
<link rel="prefetch" href="<@hangar.url "images/favicon.ico" />">
|
||||
<link rel="prefetch" href="<@hangar.url "images/favicon/favicon.ico" />">
|
||||
<link rel="prefetch" href="https://fonts.googleapis.com/css?family=Montserrat:400,700">
|
||||
<link rel="prefetch" href="<@hangar.url "css/chunk-common.css" />">
|
||||
<link rel="prefetch" href="<@hangar.url "css/chunk-vendors.css" />">
|
||||
@ -34,15 +34,11 @@ showFooter: Boolean = true, noContainer: Boolean = false, additionalMeta: Html =
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
${additionalMeta}
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180"
|
||||
href="https://papermc.io/favicons/apple-touch-icon.png?v=BG70oBaPzN">
|
||||
<link rel="icon" type="image/png" sizes="32x32"
|
||||
href="https://papermc.io/favicons/favicon-32x32.png?v=BG70oBaPzN">
|
||||
<link rel="icon" type="image/png" sizes="16x16"
|
||||
href="https://papermc.io/favicons/favicon-16x16.png?v=BG70oBaPzN">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/assets/images/favicon/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/assets/images/favicon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/assets/images/favicon/favicon-16x16.png">
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Montserrat:400,700" >
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Montserrat:400,700&display=swap" >
|
||||
<link rel="stylesheet" type="text/css" href="<@hangar.url "css/chunk-common.css" />"/>
|
||||
<link rel="stylesheet" type="text/css" href="<@hangar.url "css/chunk-vendors.css" />">
|
||||
<link rel="stylesheet" type="text/css" href="<@hangar.url "css/main.css" />"/>
|
||||
|
@ -41,6 +41,7 @@ Base template for Project overview.
|
||||
<meta property="og:image" content="${p.iconUrl}"/>
|
||||
<meta property="og:site_name" content="<@spring.message "general.appName" />"/>
|
||||
<meta property="og:description" content="${p.project.description!}"/>
|
||||
<meta name="description" content="${p.project.description!}" />
|
||||
</#assign>
|
||||
|
||||
<@base.base title=(p.project.ownerName + " / " + p.project.name) additionalScripts=scriptsVar additionalStyling=styleVar additionalMeta=metaVar>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<#if config.useWebpack>
|
||||
http://localhost:8081/${path}
|
||||
<#else>
|
||||
${urls.getForLookupPath('/assets/${path}')}
|
||||
${urls.getForLookupPath('/assets/${path}')!"/assets/${path}?error"}
|
||||
</#if>
|
||||
</#compress>
|
||||
</#macro>
|
||||
|