-
Notifications
You must be signed in to change notification settings - Fork 20
/
_Layout.cshtml
64 lines (63 loc) · 2.41 KB
/
_Layout.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@using Microsoft.AspNetCore.Html
@using System.Web
@model BaseContext
<!DOCTYPE html>
<html lang="en" class="@Model.GetThemeClass()">
<head>
<meta charset="UTF-8">
<title>@(string.IsNullOrWhiteSpace(Model.Title) ? "LightTube" : $"{Model.Title} - LightTube")</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<partial name="Icons"/>
@foreach (IHtmlContent item in Model.HeadTags)
{
@item
}
<link rel="search" type="application/opensearchdescription+xml" title="LightTube" href="/opensearch/osdd.xml"/>
<link rel="stylesheet" href="~/css/[email protected]()">
<link rel="stylesheet" href="~/css/[email protected]()">
<link rel="stylesheet" href="~/fonts/roboto/roboto.css">
@if (Configuration.GetVariable("LIGHTTUBE_CUSTOM_CSS_PATH") != null)
{
<link rel="stylesheet" href="/css/custom.css">
}
</head>
<body class="@(Model.GuideHidden ? "app-container no-guide" : "app-container")">
<div class="@(Context.Request.Path.Value == "/results" ? "top-bar search" : "top-bar")">
<a class="logo" href="/">
Light<b>Tube</b>
<sup class="hide-on-mobile region" title="InnerTube Content Region">
@Context.GetRegion()
</sup>
</a>
<div class="flex-divider hide-on-mobile"></div>
<form action="/results" class="search-bar hide-on-mobile">
<input class="search-bar__input" type="text" placeholder="Search" name="search_query" value="@Model.GetSearchBoxInput()">
<button class="search-bar__submit" type="submit">
<svg class="icon" width="20" height="20" fill="currentColor">
<use xlink:href="/svg/bootstrap-icons.svg#search"/>
</svg>
</button>
</form>
<div class="flex-divider"></div>
<partial name="AccountDropdown" model="Model"/>
</div>
<div class="guide">
<partial name="GuideItem" model="@(new GuideItem("Home", "house", "/", true))"/>
<partial name="GuideItem" model="@(new GuideItem("Subscriptions", "rss", "/feed/subscriptions", true))"/>
<partial name="GuideItem" model="@(new GuideItem("Library", "folder", "/feed/library", true))"/>
<hr>
<div class="guide-links hide-on-mobile">
<a href="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/lighttube-org/lighttube">Source code</a>
<a href="https://github.com/lighttube-org/lighttube/blob/master/LICENSE">License</a><br>
<span style="font-weight: normal">Running on LightTube v@(Utils.GetVersion())</span>
</div>
</div>
<div class="app">
@RenderBody()
</div>
@foreach (IHtmlContent item in Model.EndTags)
{
@item
}
</body>
</html>