dark theme
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -11,3 +11,5 @@ bower_components/
|
||||
test/isn.tests/bin
|
||||
test/isn.tests/obj/
|
||||
test/isnd.tests/appsettings.Testing.json
|
||||
wwwroot/.sass-cache/
|
||||
src/isnd/wwwroot/.sass-cache/
|
||||
|
@ -15,8 +15,8 @@ namespace isnd.Controllers
|
||||
{
|
||||
var applicationDbContext = _dbContext.Packages.Include(p => p.Versions).Where(
|
||||
p => ( model.Prerelease || p.Versions.Any(v => !v.IsPrerelease))
|
||||
&& ((model.query == null) || p.Id.StartsWith(model.query)));
|
||||
model.data = await applicationDbContext.ToArrayAsync();
|
||||
&& ((model.Query == null) || p.Id.StartsWith(model.Query)));
|
||||
model.Data = await applicationDbContext.ToArrayAsync();
|
||||
return View(model);
|
||||
}
|
||||
|
||||
|
@ -99,9 +99,9 @@ namespace isnd.Services
|
||||
|
||||
return new PackageIndexViewModel
|
||||
{
|
||||
query = query,
|
||||
totalHits = total,
|
||||
data = pkgs
|
||||
Query = query,
|
||||
TotalHits = total,
|
||||
Data = pkgs
|
||||
};
|
||||
}
|
||||
public AutoCompleteResult AutoComplete(string id,
|
||||
|
@ -1,12 +1,20 @@
|
||||
using isnd.Data;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace isnd.ViewModels
|
||||
{
|
||||
public class PackageIndexViewModel
|
||||
{
|
||||
[JsonProperty("prerelease")]
|
||||
public bool Prerelease { get; set; }
|
||||
public Package[] data {get; set;}
|
||||
public string query { get; set; }
|
||||
public int totalHits { get; internal set; }
|
||||
|
||||
[JsonProperty("data")]
|
||||
public Package[] Data {get; set;}
|
||||
|
||||
[JsonProperty("query")]
|
||||
public string Query { get; set; }
|
||||
|
||||
[JsonProperty("totalHits")]
|
||||
public int TotalHits { get; internal set; }
|
||||
}
|
||||
}
|
17
src/isnd/Views/Home/Features.cshtml
Normal file
17
src/isnd/Views/Home/Features.cshtml
Normal file
@ -0,0 +1,17 @@
|
||||
@model HomeIndexViewModel
|
||||
@{
|
||||
foreach (string leashed in new string[] { "pkg-push", "pkg-get",
|
||||
"pkg-autocomplete","pkg-search","pkg-catalog"})
|
||||
{
|
||||
if (Model.UnleashClient.IsEnabled(leashed))
|
||||
{
|
||||
//do some magic
|
||||
<p>@leashed</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
//do old boring stuff
|
||||
<p>No @leashed (disabled)</p>
|
||||
}
|
||||
}
|
||||
}
|
@ -1,31 +1,12 @@
|
||||
@model HomeIndexViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Home Page";
|
||||
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Welcome</h1>
|
||||
<h1 class="display-4">Bienvenue</h1>
|
||||
<h1>
|
||||
<img src="~/icon.jpg">
|
||||
Welcome to isnd
|
||||
Bienvenue dans isnd
|
||||
</h1>
|
||||
<strong>@Model.PkgCount identifiant(s) de paquet dans le SI</strong>
|
||||
|
||||
@{
|
||||
foreach (string leashed in new string[] { "pkg-push", "pkg-get",
|
||||
"pkg-autocomplete","pkg-search","pkg-catalog"})
|
||||
{
|
||||
if (Model.UnleashClient.IsEnabled(leashed))
|
||||
{
|
||||
//do some magic
|
||||
<p>@leashed</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
//do old boring stuff
|
||||
<p>No @leashed (disabled)</p>
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
@ -11,9 +11,9 @@
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
|
||||
<div class="form-group">
|
||||
<label asp-for="query" class="control-label"></label>
|
||||
<input asp-for="query" class="form-control" />
|
||||
<label asp-for="totalHits" class="control-label"></label>
|
||||
<label asp-for="Query" class="control-label"></label>
|
||||
<input asp-for="Query" class="form-control" />
|
||||
<label asp-for="TotalHits" class="control-label"></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Find" class="btn btn-default" />
|
||||
@ -25,16 +25,16 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.data[0].Id)
|
||||
@Html.DisplayNameFor(model => model.Data[0].Id)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.data[0].Description)
|
||||
@Html.DisplayNameFor(model => model.Data[0].Description)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.data) {
|
||||
@foreach (var item in Model.Data) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Id)
|
||||
|
@ -5,11 +5,11 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - isnd</title>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="~/css/site.css" />
|
||||
<link rel="stylesheet" href="~/css/site-g.css" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<nav class="navbar navbar-dark bg-dark navbar-expand-sm" >
|
||||
<div class="container">
|
||||
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">isnd</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@ -18,14 +18,14 @@
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home<span class="sr-only">(current)</span></a>
|
||||
<a class="nav-link" asp-area="" asp-controller="Home" asp-action="Index">Home<span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
<a class="nav-link" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="form-inline my-2 my-lg-0">
|
||||
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
|
||||
<form class="form-inline my-2 my-lg-0" asp-action="Index" asp-controller="Packages">
|
||||
<input name="Query" id="Query" class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
|
||||
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
|
||||
</form>
|
||||
<partial name="_LoginPartial" />
|
||||
@ -44,6 +44,9 @@
|
||||
© 2021 - isn - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- <script src="/lib/jquery/dist/jquery.slim.min.js" ></script>
|
||||
<script src="/lib/popper/popper.min.js"></script>
|
||||
<script src="/lib/bootstrap/dist/js/bootstrap.min.js" ></script> -->
|
||||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
||||
|
@ -6,14 +6,14 @@
|
||||
@if (SignInManager.IsSignedIn(User))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @UserManager.GetUserName(User)!</a>
|
||||
<a class="nav-link" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @UserManager.GetUserName(User)!</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-controller="ApiKeys" asp-action="Index" title="Api Keys">Your API keys</a>
|
||||
<a class="nav-link" asp-controller="ApiKeys" asp-action="Index" title="Api Keys">Your API keys</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Action("Index", "Home", new { area = "" })">
|
||||
<button type="submit" class="nav-link btn btn-link text-dark">Logout</button>
|
||||
<button type="submit" class="nav-link btn btn-link">Logout</button>
|
||||
</form>
|
||||
</li>
|
||||
}
|
||||
|
7830
src/isnd/wwwroot/css/site-g.css
Normal file
7830
src/isnd/wwwroot/css/site-g.css
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,52 +0,0 @@
|
||||
.body-container {
|
||||
margin-top: 60px;
|
||||
padding-bottom: 40px; }
|
||||
|
||||
.welcome-page li {
|
||||
list-style: none;
|
||||
padding: 4px; }
|
||||
|
||||
.logged-out-page iframe {
|
||||
display: none;
|
||||
width: 0;
|
||||
height: 0; }
|
||||
|
||||
.grants-page .card {
|
||||
margin-top: 20px;
|
||||
border-bottom: 1px solid lightgray; }
|
||||
.grants-page .card .card-title {
|
||||
font-size: 120%;
|
||||
font-weight: bold; }
|
||||
.grants-page .card .card-title img {
|
||||
width: 100px;
|
||||
height: 100px; }
|
||||
.grants-page .card label {
|
||||
font-weight: bold; }
|
||||
|
||||
.expired {
|
||||
color: white;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.ok {
|
||||
font-weight: bolder;
|
||||
color: white;
|
||||
background-color: #009220;
|
||||
}
|
||||
|
||||
|
||||
.nomoretam {
|
||||
font-weight: bolder;
|
||||
color: black;
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
.ok a {
|
||||
color: rgb(47, 228, 228);
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.ok a:hover {
|
||||
color: rgb(119, 255, 255);
|
||||
background-color: black;
|
||||
}
|
@ -1,4 +1,7 @@
|
||||
|
||||
// Your variable overrides
|
||||
$body-bg: rgb(39, 39, 39);
|
||||
$body-color: rgb(255, 255, 255);
|
||||
|
||||
@import "../lib/bootstrap/scss/bootstrap";
|
||||
|
||||
.body-container {
|
||||
@ -48,5 +51,40 @@ $theme-colors: (
|
||||
"primary": #0074d9,
|
||||
"danger": #ff4136
|
||||
);
|
||||
|
||||
.welcome-page li {
|
||||
list-style: none;
|
||||
padding: 4px; }
|
||||
|
||||
.logged-out-page iframe {
|
||||
display: none;
|
||||
width: 0;
|
||||
height: 0; }
|
||||
|
||||
.expired {
|
||||
color: white;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.ok {
|
||||
font-weight: bolder;
|
||||
color: white;
|
||||
background-color: #009220;
|
||||
}
|
||||
|
||||
.nomoretam {
|
||||
font-weight: bolder;
|
||||
color: black;
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
.ok a {
|
||||
color: rgb(47, 228, 228);
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.ok a:hover {
|
||||
color: rgb(119, 255, 255);
|
||||
background-color: black;
|
||||
}
|
||||
|
5
src/isnd/wwwroot/lib/popper/popper.min.js
vendored
Normal file
5
src/isnd/wwwroot/lib/popper/popper.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user