--
This commit is contained in:
@@ -0,0 +1,67 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg id="_レイヤー_1" data-name="レイヤー 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 630">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.cls-1 {
|
||||||
|
font-size: 56.25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-1, .cls-2, .cls-3, .cls-4 {
|
||||||
|
fill: #939393;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-1, .cls-5 {
|
||||||
|
font-family: InterBIZUD-Bold, 'Inter BIZUD';
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-3 {
|
||||||
|
font-family: InterBIZUD-Regular, 'Inter BIZUD';
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-3, .cls-5 {
|
||||||
|
font-size: 28.12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-4 {
|
||||||
|
font-family: MesloBIZUD-Regular, 'Meslo BIZUD';
|
||||||
|
font-size: 18.75px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-6 {
|
||||||
|
fill: #4d4d4d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-5, .cls-7 {
|
||||||
|
fill: #c84040;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-8 {
|
||||||
|
letter-spacing: -.06em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-9 {
|
||||||
|
fill: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-10 {
|
||||||
|
fill: #1a1a1a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-11 {
|
||||||
|
letter-spacing: .03em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<rect class="cls-10" width="1200" height="630"/>
|
||||||
|
<g>
|
||||||
|
<polygon class="cls-9" points="0 315 0 630 1200 630 1200 525 0 315"/>
|
||||||
|
<polygon class="cls-6" points="1200 315 1200 630 600 630 1200 315"/>
|
||||||
|
</g>
|
||||||
|
<path class="cls-2" d="M1136,566h-32.94v-7.06h25.88v-12.64l-23.82-7.97-27.66,27.66h-61.46v-64.9l87.22,29.16,32.78-32.78v68.52ZM1023.06,558.94h51.48l23.1-23.1-74.58-24.94v48.04ZM1110.7,532.76l18.24,6.1v-24.34l-18.24,18.24Z"/>
|
||||||
|
<rect class="cls-7" width="1200" height="18.75"/>
|
||||||
|
<text class="cls-5" transform="translate(1090.31 54.49)"><tspan x="0" y="0">ERROR</tspan></text>
|
||||||
|
<text class="cls-4" transform="translate(34.16 69.49)"><tspan x="0" y="0">__PATH__</tspan></text>
|
||||||
|
<text class="cls-1" transform="translate(32.15 142.92)"><tspan x="0" y="0">__TITLE__</tspan></text>
|
||||||
|
<text class="cls-3" transform="translate(33.6 185.25)"><tspan x="0" y="0">__DESCRIPTION__</tspan></text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,55 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg id="_レイヤー_1" data-name="レイヤー 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 630">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.cls-1 {
|
||||||
|
font-family: InterBIZUD-Bold, 'Inter BIZUD';
|
||||||
|
font-size: 56.25px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-1, .cls-2, .cls-3, .cls-4 {
|
||||||
|
fill: #939393;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-3 {
|
||||||
|
font-family: InterBIZUD-Regular, 'Inter BIZUD';
|
||||||
|
font-size: 28.12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-4 {
|
||||||
|
font-family: MesloBIZUD-Regular, 'Meslo BIZUD';
|
||||||
|
font-size: 18.75px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-5 {
|
||||||
|
fill: #4d4d4d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-6 {
|
||||||
|
letter-spacing: -.06em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-7 {
|
||||||
|
fill: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-8 {
|
||||||
|
fill: #1a1a1a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-9 {
|
||||||
|
letter-spacing: .03em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<rect class="cls-8" width="1200" height="630"/>
|
||||||
|
<g>
|
||||||
|
<polygon class="cls-7" points="0 315 0 630 1200 630 1200 525 0 315"/>
|
||||||
|
<polygon class="cls-5" points="1200 315 1200 630 600 630 1200 315"/>
|
||||||
|
</g>
|
||||||
|
<path class="cls-2" d="M1136,566h-32.94v-7.06h25.88v-12.64l-23.82-7.97-27.66,27.66h-61.46v-64.9l87.22,29.16,32.78-32.78v68.52ZM1023.06,558.94h51.48l23.1-23.1-74.58-24.94v48.04ZM1110.7,532.76l18.24,6.1v-24.34l-18.24,18.24Z"/>
|
||||||
|
<text class="cls-4" transform="translate(34.16 69.49)"><tspan x="0" y="0">__PATH__</tspan></text>
|
||||||
|
<text class="cls-1" transform="translate(32.15 142.92)"><tspan x="0" y="0">__TITLE__</tspan></text>
|
||||||
|
<text class="cls-3" transform="translate(33.6 185.25)"><tspan x="0" y="0">__DESCRIPTION__</tspan></text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -1,59 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<svg id="_レイヤー_1" data-name="レイヤー 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 256">
|
|
||||||
<defs>
|
|
||||||
<style>
|
|
||||||
.cls-1 {
|
|
||||||
font-family: MesloBIZUD-Regular, 'Meslo BIZUD';
|
|
||||||
font-size: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cls-1, .cls-2, .cls-3, .cls-4 {
|
|
||||||
fill: #939393;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cls-3 {
|
|
||||||
font-family: InterBIZUD-Regular, 'Inter BIZUD';
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cls-4 {
|
|
||||||
font-family: InterBIZUD-Bold, 'Inter BIZUD';
|
|
||||||
font-size: 24px;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cls-5, .cls-8 {
|
|
||||||
fill: #c84040;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cls-5 {
|
|
||||||
font-family: InterBIZUD-Bold, 'Inter BIZUD';
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cls-6 {
|
|
||||||
fill: #4d4d4d;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cls-9 {
|
|
||||||
fill: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cls-10 {
|
|
||||||
fill: #1a1a1a;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</defs>
|
|
||||||
<rect class="cls-10" width="512" height="256"/>
|
|
||||||
<g>
|
|
||||||
<polygon class="cls-9" points="0 128 0 256 512 256 512 213.33 0 128"/>
|
|
||||||
<polygon class="cls-6" points="512 128 512 256 256 256 512 128"/>
|
|
||||||
</g>
|
|
||||||
<path class="cls-2" d="M483.6,230.12h-14.05v-3.01h11.04v-5.39l-10.16-3.4-11.8,11.8h-26.22v-27.69l37.21,12.44,13.99-13.99v29.24ZM435.41,227.11h21.96l9.86-9.86-31.82-10.64v20.5ZM472.8,215.94l7.78,2.6v-10.39l-7.78,7.78Z"/>
|
|
||||||
<rect class="cls-8" width="512" height="8"/>
|
|
||||||
<text class="cls-5" transform="translate(465.2 23.25)"><tspan x="0" y="0">ERROR</tspan></text>
|
|
||||||
<text class="cls-1" transform="translate(14.57 23.25)"><tspan x="0" y="0">__PATH__</tspan></text>
|
|
||||||
<text class="cls-4" transform="translate(13.72 54.58)"><tspan x="0" y="0">__TITLE__</tspan></text>
|
|
||||||
<text class="cls-3" transform="translate(14.34 72.64)"><tspan x="0" y="0">__DESCRIPTION__</tspan></text>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.8 KiB |
@@ -1,47 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<svg id="_レイヤー_1" data-name="レイヤー 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 256">
|
|
||||||
<defs>
|
|
||||||
<style>
|
|
||||||
.cls-1 {
|
|
||||||
font-family: MesloBIZUD-Regular, 'Meslo BIZUD';
|
|
||||||
font-size: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cls-1, .cls-2, .cls-3, .cls-4 {
|
|
||||||
fill: #939393;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cls-3 {
|
|
||||||
font-family: InterBIZUD-Regular, 'Inter BIZUD';
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cls-5 {
|
|
||||||
fill: #4d4d4d;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cls-4 {
|
|
||||||
font-family: InterBIZUD-Bold, 'Inter BIZUD';
|
|
||||||
font-size: 24px;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cls-6 {
|
|
||||||
fill: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cls-7 {
|
|
||||||
fill: #1a1a1a;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</defs>
|
|
||||||
<rect class="cls-7" width="512" height="256"/>
|
|
||||||
<g>
|
|
||||||
<polygon class="cls-6" points="0 128 0 256 512 256 512 213.33 0 128"/>
|
|
||||||
<polygon class="cls-5" points="512 128 512 256 256 256 512 128"/>
|
|
||||||
</g>
|
|
||||||
<path class="cls-2" d="M483.6,230.12h-14.05v-3.01h11.04v-5.39l-10.16-3.4-11.8,11.8h-26.22v-27.69l37.21,12.44,13.99-13.99v29.24ZM435.41,227.11h21.96l9.86-9.86-31.82-10.64v20.5ZM472.8,215.94l7.78,2.6v-10.39l-7.78,7.78Z"/>
|
|
||||||
<text class="cls-1" transform="translate(14.57 23.25)"><tspan x="0" y="0">__PATH__</tspan></text>
|
|
||||||
<text class="cls-4" transform="translate(13.72 54.58)"><tspan x="0" y="0">__TITLE__</tspan></text>
|
|
||||||
<text class="cls-3" transform="translate(14.34 72.64)"><tspan x="0" y="0">__DESCRIPTION__</tspan></text>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB |
+2
-2
@@ -29,14 +29,14 @@
|
|||||||
<meta property="og:site_name" content="nercone's website">
|
<meta property="og:site_name" content="nercone's website">
|
||||||
<meta property="og:title" content="{{ self.title() }}">
|
<meta property="og:title" content="{{ self.title() }}">
|
||||||
<meta property="og:description" content="{{ self.description() }}">
|
<meta property="og:description" content="{{ self.description() }}">
|
||||||
<meta property="og:image" content="https://nercone.dev/assets/thumbnail/{{ request.url.path.strip('/') or 'index' }}?title={{ self.title() | urlencode }}&description={{ self.description() | urlencode }}&template={% block thumbnail_template %}normal{% endblock %}">
|
<meta property="og:image" content="https://nercone.dev/assets/images/thumbnail/{{ request.url.path.strip('/') or 'index' }}?title={{ self.title() | urlencode }}&description={{ self.description() | urlencode }}&template={% block thumbnail_template %}normal{% endblock %}">
|
||||||
<meta property="og:url" content="https://nercone.dev/">
|
<meta property="og:url" content="https://nercone.dev/">
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<!-- Twitter -->
|
<!-- Twitter -->
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
<meta name="twitter:title" content="{{ self.title() }}">
|
<meta name="twitter:title" content="{{ self.title() }}">
|
||||||
<meta name="twitter:description" content="{{ self.description() }}">
|
<meta name="twitter:description" content="{{ self.description() }}">
|
||||||
<meta name="twitter:image" content="https://nercone.dev/assets/thumbnail/{{ request.url.path.strip('/') or 'index' }}?title={{ self.title() | urlencode }}&description={{ self.description() | urlencode }}&template={{ self.thumbnail_template() }}">
|
<meta name="twitter:image" content="https://nercone.dev/assets/images/thumbnail/{{ request.url.path.strip('/') or 'index' }}?title={{ self.title() | urlencode }}&description={{ self.description() | urlencode }}&template={{ self.thumbnail_template() }}">
|
||||||
<!-- PWA (Progressive Web App) -->
|
<!-- PWA (Progressive Web App) -->
|
||||||
<link rel="manifest" href="/site.webmanifest">
|
<link rel="manifest" href="/site.webmanifest">
|
||||||
<link rel="apple-touch-icon" href="/assets/images/favicon.png" sizes="1200x1200">
|
<link rel="apple-touch-icon" href="/assets/images/favicon.png" sizes="1200x1200">
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ welcome to nercone.dev!
|
|||||||
async def fake_error_page(request: Request, code: str):
|
async def fake_error_page(request: Request, code: str):
|
||||||
return error_page(templates=templates, request=request, status_code=int(code))
|
return error_page(templates=templates, request=request, status_code=int(code))
|
||||||
|
|
||||||
@app.api_route("/assets/thumbnail/{path:path}", methods=["GET"])
|
@app.api_route("/assets/images/thumbnail/{path:path}", methods=["GET"])
|
||||||
async def thumbnail(request: Request, path: str) -> Response:
|
async def thumbnail(request: Request, path: str) -> Response:
|
||||||
title = request.query_params.get("title", "Untitled Page")
|
title = request.query_params.get("title", "Untitled Page")
|
||||||
description = request.query_params.get("description", "No description.")
|
description = request.query_params.get("description", "No description.")
|
||||||
@@ -113,7 +113,7 @@ async def thumbnail(request: Request, path: str) -> Response:
|
|||||||
svg_filename = "error.svg" if template_type == "error" else "normal.svg"
|
svg_filename = "error.svg" if template_type == "error" else "normal.svg"
|
||||||
fonts_dir = Path.cwd().joinpath("public", "assets", "fonts")
|
fonts_dir = Path.cwd().joinpath("public", "assets", "fonts")
|
||||||
|
|
||||||
svg_path = Path.cwd().joinpath("public", "assets", "thumbnails", svg_filename)
|
svg_path = Path.cwd().joinpath("public", "assets", "images", "thumbnail", svg_filename)
|
||||||
svg = svg_path.read_text(encoding="utf-8")
|
svg = svg_path.read_text(encoding="utf-8")
|
||||||
svg = svg.replace("__PATH__", escape(path_display))
|
svg = svg.replace("__PATH__", escape(path_display))
|
||||||
svg = svg.replace("__TITLE__", escape(title))
|
svg = svg.replace("__TITLE__", escape(title))
|
||||||
|
|||||||
Reference in New Issue
Block a user