Skip to content

Commit 03132f4

Browse files
authored
Clean up legacy frontend resources (#600)
1 parent f1c8c6b commit 03132f4

23 files changed

+60
-4233
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
@inherits RazorSlice<LayoutViewModel>
2+
<script src="@Model.Static("main.js")"></script>

src/Elastic.Markdown/Slices/Layout/_Head.cshtml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,12 @@
11
@inherits RazorSlice<LayoutViewModel>
22
<head>
3+
<title>@Model.Title</title>
4+
<link rel="stylesheet" type="text/css" href="@Model.Static("styles.css")"/>
35
<meta charset="utf-8">
46
<meta name="viewport" content="width=device-width, initial-scale=1.0">
57
<meta name="robots" content="@(Model.AllowIndexing ? "index, follow" : "noindex, nofollow")">
6-
<title>@Model.Title</title>
7-
<link rel="index" title="Index" href="@Model.Link("genindex.html")"/>
8-
<link rel="search" title="Search" href="@Model.Link("search.html")"/>
9-
<link rel="stylesheet" type="text/css" href="@Model.Static("pygments.css")"/>
10-
<link rel="stylesheet" type="text/css" href="@Model.Static("shibuya.css")"/>
11-
<link rel="stylesheet" type="text/css" href="@Model.Static("mystnb.css")"/>
12-
<link rel="stylesheet" type="text/css" href="@Model.Static("copybutton.css")"/>
13-
<link rel="stylesheet" type="text/css" href="@Model.Static("togglebutton.css")"/>
14-
<link rel="stylesheet" type="text/css" href="@Model.Static("sphinx-design.min.css")"/>
15-
<link media="print" rel="stylesheet" type="text/css" href="@Model.Static("/_static/print.css")"/>
16-
<link rel="stylesheet" type="text/css" href="@Model.Static("custom.css")"/>
17-
<link rel="stylesheet" type="text/css" href="@Model.Static("atom-one-light.css")"/>
18-
<link rel="preconnect" href="https://fonts.googleapis.com">
19-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
20-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
21-
<style>
22-
:root {
23-
--sy-f-text: "Inter", var(--sy-f-sys), var(--sy-f-cjk), sans-serif;
24-
--sy-f-heading: "Inter", var(--sy-f-sys), var(--sy-f-cjk), sans-serif;
25-
}
26-
</style>
8+
<meta name="htmx-config" content='{"scrollIntoViewOnBoost": false, "selfRequestsOnly": true}'>
9+
2710
<meta property="og:type" content="website"/>
2811
<meta property="og:title" content="Elastic Docs v3"/>
2912
<meta name="twitter:card" content="summary"/>

src/Elastic.Markdown/Slices/Layout/_HeadNav.cshtml

Lines changed: 0 additions & 66 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
@using Elastic.Markdown.Helpers
2+
@inherits RazorSlice<LayoutViewModel>
3+
<footer id="prev-next-nav" class="content-container mt-20">
4+
<div class="flex flex-wrap lg:flex-nowrap gap-2 mt-2">
5+
<div class="w-full">
6+
@if (Model.Previous != null)
7+
{
8+
<a
9+
href="@Model.Previous.Url"
10+
hx-get="@Model.Previous.Url"
11+
hx-select-oob="@Htmx.GetHxSelectOob()"
12+
hx-swap="none"
13+
hx-push-url="true"
14+
hx-indicator="#htmx-indicator"
15+
preload="mouseover"
16+
class="flex h-full items-center text-ink-light hover:black border-1 border-gray-300 hover:border-gray-500 rounded-lg p-6 shadow-md"
17+
>
18+
<svg class="size-6 mr-2" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
19+
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5 8.25 12l7.5-7.5"/>
20+
</svg>
21+
<div>
22+
<div class="text-xs lg:text-sm">Previous</div>
23+
<div class="text-base lg:text-xl text-black">@Model.Previous.NavigationTitle</div>
24+
</div>
25+
</a>
26+
}
27+
</div>
28+
<div class="w-full">
29+
@if (Model.Next != null)
30+
{
31+
<a
32+
href="@Model.Next.Url"
33+
hx-get="@Model.Next.Url"
34+
hx-select-oob="@Htmx.GetHxSelectOob()"
35+
hx-swap="none"
36+
hx-push-url="true"
37+
hx-indicator="#htmx-indicator"
38+
preload="mouseover"
39+
class="flex h-full items-center justify-end text-ink-light hover:black border-1 border-gray-300 hover:border-gray-500 rounded-lg p-6 shadow-md text-right"
40+
>
41+
<div>
42+
<div class="text-xs lg:text-sm">Next</div>
43+
<div class="text-base lg:text-xl text-black">@Model.Next.NavigationTitle</div>
44+
</div>
45+
<svg class="size-6 ml-2" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
46+
<path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5"/>
47+
</svg>
48+
</a>
49+
}
50+
</div>
51+
</div>
52+
</footer>
Lines changed: 3 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
@using Elastic.Markdown.Helpers
21
@inherits RazorLayoutSlice<LayoutViewModel>
32
<!DOCTYPE html>
43
<html lang="en" class="h-screen">
5-
<head>
6-
<title>@Model.Title</title>
7-
<link rel="stylesheet" type="text/css" href="@Model.Static("styles.css")"/>
8-
<meta charset="utf-8">
9-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
10-
<meta name="robots" content="@(Model.AllowIndexing ? "index, follow" : "noindex, nofollow")">
11-
<meta name="htmx-config" content='{"scrollIntoViewOnBoost": false, "selfRequestsOnly": true}'>
12-
</head>
4+
@await RenderPartialAsync(_Head.Create(Model))
135
<body class="text-ink" hx-ext="preload,head-support">
146
@(await RenderPartialAsync(_Header.Create(Model)))
157
<div class="flex flex-col items-center px-6">
@@ -29,60 +21,10 @@
2921
<article id="markdown-content" class="content-container markdown-content">
3022
@await RenderBodyAsync()
3123
</article>
32-
<footer id="prev-next-nav" class="content-container mt-20">
33-
<div class="flex flex-wrap lg:flex-nowrap gap-2 mt-2">
34-
<div class="w-full">
35-
@if (Model.Previous != null)
36-
{
37-
<a
38-
href="@Model.Previous.Url"
39-
hx-get="@Model.Previous.Url"
40-
hx-select-oob="@Htmx.GetHxSelectOob()"
41-
hx-swap="none"
42-
hx-push-url="true"
43-
hx-indicator="#htmx-indicator"
44-
preload="mouseover"
45-
class="flex h-full items-center text-ink-light hover:black border-1 border-gray-300 hover:border-gray-500 rounded-lg p-6 shadow-md"
46-
>
47-
<svg class="size-6 mr-2" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
48-
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5 8.25 12l7.5-7.5"/>
49-
</svg>
50-
<div>
51-
<div class="text-xs lg:text-sm">Previous</div>
52-
<div class="text-base lg:text-xl text-black">@Model.Previous.NavigationTitle</div>
53-
</div>
54-
</a>
55-
}
56-
</div>
57-
<div class="w-full">
58-
@if (Model.Next != null)
59-
{
60-
<a
61-
href="@Model.Next.Url"
62-
hx-get="@Model.Next.Url"
63-
hx-select-oob="@Htmx.GetHxSelectOob()"
64-
hx-swap="none"
65-
hx-push-url="true"
66-
hx-indicator="#htmx-indicator"
67-
preload="mouseover"
68-
class="flex h-full items-center justify-end text-ink-light hover:black border-1 border-gray-300 hover:border-gray-500 rounded-lg p-6 shadow-md text-right"
69-
>
70-
<div>
71-
<div class="text-xs lg:text-sm">Next</div>
72-
<div class="text-base lg:text-xl text-black">@Model.Next.NavigationTitle</div>
73-
</div>
74-
<svg class="size-6 ml-2" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
75-
<path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5"/>
76-
</svg>
77-
</a>
78-
}
79-
</div>
80-
</div>
81-
</footer>
24+
@await RenderPartialAsync(_PrevNextNav.Create(Model))
8225
</main>
8326
</div>
8427
</div>
85-
@(await RenderPartialAsync(_Footer.Create(Model)))
86-
<script src="@Model.Static("main.js")"></script>
28+
@await RenderPartialAsync(_Footer.Create(Model))
8729
</body>
8830
</html>

src/Elastic.Markdown/_static/atom-one-light.css

Lines changed: 0 additions & 108 deletions
This file was deleted.

0 commit comments

Comments
 (0)