Initial commit: open-source release of atakanozban.com
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
@{
|
||||
ViewBag.Title = "wallpaper";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<h2 class="text-white mt-3 mb-3">Wallpaper</h2>
|
||||
<p class="text-white-50">This image is used as the background on every public page.</p>
|
||||
@if (TempData["ok"] != null)
|
||||
{<div class="alert alert-success">@TempData["ok"]</div>}
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="text-white d-block mb-2">Current wallpaper</label>
|
||||
<img src="@ViewBag.CurrentWallpaper" style="max-width:100%;max-height:300px;border-radius:8px;border:1px solid #444;" />
|
||||
</div>
|
||||
|
||||
@using (Html.BeginForm("Wallpaper", "admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="text-white">New wallpaper image</label>
|
||||
<img id="wallpaperPreview" style="display:none;max-width:100%;max-height:300px;border-radius:8px;" class="mb-2 d-block" />
|
||||
<input id="wallpaperFile" type="file" name="wallpaperFile" class="form-control bg-dark text-white" accept="image/*" />
|
||||
<small class="text-muted">PNG, JPG, WEBP or GIF. You can also paste (Ctrl+V) an image directly.</small>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-success">Upload New Wallpaper</button>
|
||||
}
|
||||
|
||||
@using (Html.BeginForm("WallpaperReset", "admin", FormMethod.Post, new { onsubmit = "return confirm('Reset wallpaper to the default image?');" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn btn-secondary mt-2">Reset to Default</button>
|
||||
}
|
||||
|
||||
<script>
|
||||
enablePasteUpload('#wallpaperFile', '#wallpaperPreview');
|
||||
</script>
|
||||
Reference in New Issue
Block a user