mirror of https://github.com/usbharu/Hideout.git
feat: OGP用のクラスを追加
This commit is contained in:
parent
df6d2940ed
commit
48d325deed
|
@ -0,0 +1,8 @@
|
||||||
|
package dev.usbharu.hideout.core.interfaces.web.common
|
||||||
|
|
||||||
|
data class OGP(
|
||||||
|
val title: String,
|
||||||
|
val url: String,
|
||||||
|
val description: String,
|
||||||
|
val image: String?
|
||||||
|
)
|
|
@ -2,12 +2,12 @@
|
||||||
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||||
<head prefix="og: http://ogp.me/ns#">
|
<head prefix="og: http://ogp.me/ns#">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title th:title="${title}">Index</title>
|
<title th:title="${ogp.title}">Index</title>
|
||||||
<meta property="og:url" th:content="${url}">
|
<meta property="og:url" th:content="${ogp.url}">
|
||||||
<meta property="og:title" th:content="${title}">
|
<meta property="og:title" th:content="${ogp.title}">
|
||||||
<meta property="og:description" th:content="${description}">
|
<meta property="og:description" th:content="${ogp.description}">
|
||||||
<th:block th:if="${image != null}">
|
<th:block th:if="${ogp.image != null}">
|
||||||
<meta property="og:image" th:content="${image}">
|
<meta property="og:image" th:content="${ogp.image}">
|
||||||
</th:block>
|
</th:block>
|
||||||
<noscript>
|
<noscript>
|
||||||
<meta http-equiv="refresh" th:content="${'1; url='+nsUrl}">
|
<meta http-equiv="refresh" th:content="${'1; url='+nsUrl}">
|
||||||
|
|
Loading…
Reference in New Issue