Organize the website

This commit is contained in:
Frank A. Krueger 2017-11-09 22:02:36 -08:00
parent b124b3df7f
commit 2e8a605d13
10 changed files with 63 additions and 108 deletions

View File

@ -13,10 +13,15 @@ namespace AspNetCoreMvc.Controllers
{ {
public class HomeController : Controller public class HomeController : Controller
{ {
public IActionResult Index() public IActionResult Index ()
{
return View ();
}
public IActionResult Clicker ()
{ {
var count = 0; var count = 0;
var head = new Heading { Text = "Ooui!" }; var head = new Heading { Text = "Click away!" };
var label = new Label { Text = "0" }; var label = new Label { Text = "0" };
var btn = new Button { Text = "Increase" }; var btn = new Button { Text = "Increase" };
btn.Clicked += (sender, e) => { btn.Clicked += (sender, e) => {
@ -30,23 +35,23 @@ namespace AspNetCoreMvc.Controllers
return new ElementResult (div); return new ElementResult (div);
} }
public IActionResult About() public IActionResult About ()
{ {
ViewData["Message"] = "Your application description page."; ViewData["Message"] = "Your application description page.";
return View(); return View ();
} }
public IActionResult Contact() public IActionResult Contact ()
{ {
ViewData["Message"] = "Your contact page."; ViewData["Message"] = "Your contact page.";
return View(); return View ();
} }
public IActionResult Error() public IActionResult Error ()
{ {
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); return View (new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
} }
} }
} }

View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using AspNetCoreMvc.Models;
using Ooui;
using Ooui.AspNetCore;
namespace AspNetCoreMvc.Controllers
{
public class SamplesController : Controller
{
public IActionResult Clicker ()
{
var count = 0;
var head = new Heading { Text = "Click away!" };
var label = new Label { Text = "0" };
var btn = new Button { Text = "Increase" };
btn.Clicked += (sender, e) => {
count++;
label.Text = count.ToString ();
};
var div = new Div ();
div.AppendChild (head);
div.AppendChild (label);
div.AppendChild (btn);
return new ElementResult (div);
}
}
}

View File

@ -1,108 +1,29 @@
@{ @{
ViewData["Title"] = "Home Page"; ViewData["Title"] = "Ooui";
} }
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="6000"> <div class="row" style="margin-top:4em;">
<ol class="carousel-indicators"> <div class="col-md-2">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li> <img src="images/Icon.png" />
<li data-target="#myCarousel" data-slide-to="1"></li> </div>
<li data-target="#myCarousel" data-slide-to="2"></li> <div class="col-md-2">
<li data-target="#myCarousel" data-slide-to="3"></li> <h1>Ooui</h1>
</ol> <p>Write interactive web apps in C#</p>
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="~/images/banner1.svg" alt="ASP.NET" class="img-responsive" />
<div class="carousel-caption" role="option">
<p>
Learn how to build ASP.NET apps that can run anywhere.
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525028&clcid=0x409">
Learn More
</a>
</p>
</div>
</div>
<div class="item">
<img src="~/images/banner2.svg" alt="Visual Studio" class="img-responsive" />
<div class="carousel-caption" role="option">
<p>
There are powerful new features in Visual Studio for building modern web apps.
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525030&clcid=0x409">
Learn More
</a>
</p>
</div>
</div>
<div class="item">
<img src="~/images/banner3.svg" alt="Package Management" class="img-responsive" />
<div class="carousel-caption" role="option">
<p>
Bring in libraries from NuGet, Bower, and npm, and automate tasks using Grunt or Gulp.
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525029&clcid=0x409">
Learn More
</a>
</p>
</div>
</div>
<div class="item">
<img src="~/images/banner4.svg" alt="Microsoft Azure" class="img-responsive" />
<div class="carousel-caption" role="option">
<p>
Learn how Microsoft's Azure cloud platform allows you to build, deploy, and scale web apps.
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525027&clcid=0x409">
Learn More
</a>
</p>
</div>
</div>
</div> </div>
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div> </div>
<div class="row"> <div class="row" style="margin-top:4em;">
<div class="col-md-3"> <div class="col-md-3">
<h2>Application uses</h2> <h3>Samples</h3>
<ul> <ul>
<li>Sample pages using ASP.NET Core MVC</li> <li><a asp-area="" asp-controller="Samples" asp-action="Clicker">HTML Clicker</a></li>
<li><a href="https://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side libraries</li> <li><a asp-area="" asp-controller="Samples" asp-action="XamarinFormsClicker">Xamarin Forms Clicker</a></li>
<li>Theming using <a href="https://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li>
</ul> </ul>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<h2>How to</h2> <h3>Get it</h3>
<ul> <ul>
<li><a href="https://go.microsoft.com/fwlink/?LinkID=398600">Add a Controller and View</a></li> <li><a href="https://github.com/praeclarum/Ooui">Source Code on Github</a></li>
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699315">Manage User Secrets using Secret Manager.</a></li>
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699316">Use logging to log a message.</a></li>
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699317">Add packages using NuGet.</a></li>
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699318">Add client packages using Bower.</a></li>
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699319">Target development, staging or production environment.</a></li>
</ul>
</div>
<div class="col-md-3">
<h2>Overview</h2>
<ul>
<li><a href="https://go.microsoft.com/fwlink/?LinkId=518008">Conceptual overview of what is ASP.NET Core</a></li>
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699320">Fundamentals of ASP.NET Core such as Startup and middleware.</a></li>
<li><a href="https://go.microsoft.com/fwlink/?LinkId=398602">Working with Data</a></li>
<li><a href="https://go.microsoft.com/fwlink/?LinkId=398603">Security</a></li>
<li><a href="https://go.microsoft.com/fwlink/?LinkID=699321">Client side development</a></li>
<li><a href="https://go.microsoft.com/fwlink/?LinkID=699322">Develop on different platforms</a></li>
<li><a href="https://go.microsoft.com/fwlink/?LinkID=699323">Read more on the documentation site</a></li>
</ul>
</div>
<div class="col-md-3">
<h2>Run &amp; Deploy</h2>
<ul>
<li><a href="https://go.microsoft.com/fwlink/?LinkID=517851">Run your app</a></li>
<li><a href="https://go.microsoft.com/fwlink/?LinkID=517853">Run tools such as EF migrations and more</a></li>
<li><a href="https://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Apps</a></li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - AspNetCoreMvc</title> <title>@ViewData["Title"] - Ooui</title>
<environment include="Development"> <environment include="Development">
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" /> <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
@ -26,7 +26,7 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a asp-area="" asp-controller="Home" asp-action="Index" class="navbar-brand">AspNetCoreMvc</a> <a asp-area="" asp-controller="Home" asp-action="Index" class="navbar-brand">Ooui</a>
</div> </div>
<div class="navbar-collapse collapse"> <div class="navbar-collapse collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
@ -41,7 +41,7 @@
@RenderBody() @RenderBody()
<hr /> <hr />
<footer> <footer>
<p>&copy; 2017 - AspNetCoreMvc</p> <p>&copy; 2017 - Frank A. Krueger</p>
</footer> </footer>
</div> </div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 9.5 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 8.2 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 12 KiB