Basic theme folder reorganization

pull/301/head
Halil İbrahim Kalkan 7 years ago
parent 8ea9c31bee
commit 20398b4853

@ -8,7 +8,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic
{
public const string Name = "Basic";
public string DefaultLayout => "~/Views/Shared/_AppLayout.cshtml";
public string DefaultLayout => "~/Themes/Basic/Layouts/App.cshtml";
public string GetLayoutOrNull(string name)
{

@ -0,0 +1,12 @@
using Microsoft.AspNetCore.Mvc;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Brand
{
public class MainNavbarBrandViewComponent : AbpViewComponent
{
public IViewComponentResult Invoke()
{
return View("~/Themes/Basic/Components/Brand/Default.cshtml");
}
}
}

@ -1,6 +1,6 @@
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Brand
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Menu
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Toolbar
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Brand
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Menu
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top" id="main-navbar">
@(await Component.InvokeAsync<MainNavbarBrandViewComponent>())
<button class="navbar-toggler" type="button" data-toggle="collapse"

@ -1,12 +1,12 @@
using Microsoft.AspNetCore.Mvc;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.MainNavbar
{
public class MainNavbarViewComponent : AbpViewComponent
{
public IViewComponentResult Invoke()
{
return View("~/Views/Shared/Components/Theme/MainNavbar/Default.cshtml");
return View("~/Themes/Basic/Components/MainNavbar/Default.cshtml");
}
}
}

@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.UI.Navigation;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Menu
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Menu
{
public class MainNavbarMenuViewComponent : AbpViewComponent
{
@ -16,7 +16,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.M
public async Task<IViewComponentResult> InvokeAsync()
{
var menu = await _menuManager.GetAsync(StandardMenus.Main);
return View("~/Views/Shared/Components/Theme/MainNavbar/Menu/Default.cshtml", menu);
return View("~/Themes/Basic/Components/Menu/Default.cshtml", menu);
}
}
}

@ -1,4 +1,4 @@
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Toolbar.Items.LanguageSwitch
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.LanguageSwitch
@model LanguageSwitchViewComponentModel
<div class="dropdown d-inline">
<a class="btn btn-link dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">

@ -1,4 +1,4 @@
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Toolbar.Items.LanguageSwitch
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.LanguageSwitch
{
public class LanguageInfo
{

@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Toolbar.Items.LanguageSwitch
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.LanguageSwitch
{
public class LanguageSwitchViewComponent : AbpViewComponent
{
@ -43,7 +43,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.M
});
}
return View("~/Views/Shared/Components/Theme/MainNavbar/Toolbar/Items/LanguageSwitch/Default.cshtml", model);
return View("~/Themes/Basic/Components/Toolbar/LanguageSwitch/Default.cshtml", model);
}
}
}

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Toolbar.Items.LanguageSwitch
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.LanguageSwitch
{
public class LanguageSwitchViewComponentModel
{

@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Toolbar
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar
{
public class MainNavbarToolbarViewComponent : AbpViewComponent
{
@ -16,7 +16,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.M
public async Task<IViewComponentResult> InvokeAsync()
{
var toolbar = await _toolbarManager.GetAsync(StandardToolbars.Main);
return View("~/Views/Shared/Components/Theme/MainNavbar/Toolbar/Default.cshtml", toolbar);
return View("~/Themes/Basic/Components/Toolbar/Default.cshtml", toolbar);
}
}
}

@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.UI.Navigation;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Toolbar.Items.UserMenu
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.UserMenu
{
public class UserMenuViewComponent : AbpViewComponent
{
@ -16,7 +16,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.M
public async Task<IViewComponentResult> InvokeAsync()
{
var menu = await _menuManager.GetAsync(StandardMenus.User);
return View("~/Views/Shared/Components/Theme/MainNavbar/Toolbar/Items/UserMenu/Default.cshtml", menu);
return View("~/Themes/Basic/Components/Toolbar/UserMenu/Default.cshtml", menu);
}
}
}

@ -1,6 +1,5 @@
@using Volo.Abp.AspNetCore.Mvc.AntiForgery
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar
@using Volo.Abp.UI.Navigation
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.MainNavbar
@inject IAbpAntiForgeryManager AbpAntiForgeryManager
@{
Layout = null;

@ -0,0 +1,3 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap

@ -1,6 +1,6 @@
using System.Threading.Tasks;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Toolbar.Items.LanguageSwitch;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Toolbar.Items.UserMenu;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.LanguageSwitch;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.UserMenu;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Toolbars

@ -1,12 +0,0 @@
using Microsoft.AspNetCore.Mvc;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Brand
{
public class MainNavbarBrandViewComponent : AbpViewComponent
{
public IViewComponentResult Invoke()
{
return View("~/Views/Shared/Components/Theme/MainNavbar/Brand/Default.cshtml");
}
}
}

@ -1 +0,0 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

@ -1,3 +1,6 @@
@{
Layout = "~/Views/Shared/_AppLayout.cshtml";
}
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@inject IThemeManager ThemeManager
@{
//TODO: Move this to a lower layer... to Shared?
Layout = ThemeManager.CurrentTheme.DefaultLayout;
}

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\common.props" />
@ -15,17 +15,18 @@
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="Themes\**\*.cshtml" />
<EmbeddedResource Include="Pages\**\*.cshtml" />
<EmbeddedResource Include="Views\**\*.cshtml" />
<EmbeddedResource Include="wwwroot\**\*.*" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="Views\Shared\Components\Theme\MainNavbar\Toolbar\Items\UserMenu\Default.cshtml" />
<EmbeddedResource Remove="Themes\Basic\_ViewImports.cshtml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj" />
</ItemGroup>
</Project>
Loading…
Cancel
Save