140 lines
5.2 KiB
Plaintext
140 lines
5.2 KiB
Plaintext
@namespace Oqtane.Themes.OqtaneTheme
|
|
@inherits ThemeBase
|
|
@inject ISettingService SettingService
|
|
|
|
<main role="main">
|
|
<nav class="navbar navbar-dark bg-primary fixed-top">
|
|
<Logo /><Menu Orientation="Horizontal" />
|
|
<div class="controls ms-auto">
|
|
<div class="controls-group"><UserProfile ShowRegister="@_register" /> <Login ShowLogin="@_login" /> <ControlPanel /></div>
|
|
</div>
|
|
</nav>
|
|
<div class="content">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<Pane Name="@PaneNames.Admin" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<Pane Name="Top Full Width" />
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<Pane Name="Top 100%" />
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<Pane Name="Left 50%" />
|
|
</div>
|
|
<div class="col-md-6">
|
|
<Pane Name="Right 50%" />
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<Pane Name="Left 33%" />
|
|
</div>
|
|
<div class="col-md-4">
|
|
<Pane Name="Center 33%" />
|
|
</div>
|
|
<div class="col-md-4">
|
|
<Pane Name="Right 33%" />
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
<Pane Name="Left Outer 25%" />
|
|
</div>
|
|
<div class="col-md-3">
|
|
<Pane Name="Left Inner 25%" />
|
|
</div>
|
|
<div class="col-md-3">
|
|
<Pane Name="Right Inner 25%" />
|
|
</div>
|
|
<div class="col-md-3">
|
|
<Pane Name="Right Outer 25%" />
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
<Pane Name="Left 25%" />
|
|
</div>
|
|
<div class="col-md-6">
|
|
<Pane Name="Center 50%" />
|
|
</div>
|
|
<div class="col-md-3">
|
|
<Pane Name="Right 25%" />
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-8">
|
|
<Pane Name="Left Sidebar 66%" />
|
|
</div>
|
|
<div class="col-md-4">
|
|
<Pane Name="Right Sidebar 33%" />
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<Pane Name="Left Sidebar 33%" />
|
|
</div>
|
|
<div class="col-md-8">
|
|
<Pane Name="Right Sidebar 66%" />
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<Pane Name="Bottom 100%" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<Pane Name="Bottom Full Width" />
|
|
@if (_footer)
|
|
{
|
|
<div style="clear: both; height: 30px;"></div>
|
|
<div class="bg-primary fixed-bottom footer">
|
|
<Pane Name="Footer" />
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<Pane Name="Footer" />
|
|
}
|
|
</div>
|
|
</main>
|
|
|
|
@code {
|
|
public override string Name => "Default Theme";
|
|
|
|
public override string Panes => PaneNames.Admin + ",Top Full Width,Top 100%,Left 50%,Right 50%,Left 33%,Center 33%,Right 33%,Left Outer 25%,Left Inner 25%,Right Inner 25%,Right Outer 25%,Left 25%,Center 50%,Right 25%,Left Sidebar 66%,Right Sidebar 33%,Left Sidebar 33%,Right Sidebar 66%,Bottom 100%,Bottom Full Width,Footer";
|
|
|
|
public override List<Resource> Resources => new List<Resource>()
|
|
{
|
|
new Resource { ResourceType = ResourceType.Stylesheet, Url = "https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.1.3/cyborg/bootstrap.min.css", Integrity = "sha512-/in5IWTUhb7wOUd6iHotlyrLrZ7+2utJJR8ySzSxeeOMJ9fanjCr4fmyWzDW/ziw56shUNTVClBMWZaA677VhA==", CrossOrigin = "anonymous" },
|
|
new Resource { ResourceType = ResourceType.Stylesheet, Url = ThemePath() + "Theme.css" },
|
|
new Resource { ResourceType = ResourceType.Script, Bundle = "Bootstrap", Url = "https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js", Integrity = "sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p", CrossOrigin = "anonymous" }
|
|
};
|
|
|
|
private bool _login = true;
|
|
private bool _register = true;
|
|
private bool _footer = false;
|
|
|
|
protected override void OnParametersSet()
|
|
{
|
|
try
|
|
{
|
|
var settings = SettingService.MergeSettings(PageState.Site.Settings, PageState.Page.Settings);
|
|
_login = bool.Parse(SettingService.GetSetting(settings, GetType().Namespace + ":Login", "true"));
|
|
_register = bool.Parse(SettingService.GetSetting(settings, GetType().Namespace + ":Register", "true"));
|
|
_footer = bool.Parse(SettingService.GetSetting(settings, GetType().Namespace + ":Footer", "false"));
|
|
}
|
|
catch
|
|
{
|
|
// error loading theme settings
|
|
}
|
|
}
|
|
|
|
}
|