hi
Please copy the
ApplicationLayout
and custom it like the default. You can download the source code of Letpton to get theApplicationLayout
Thank you, this did the trick.
To get the menu to the left side, following steps need to be performed.
First download Volo.Abp.LeptonTheme
.
Insert it into your Default.cshtml
Change @await Html.PartialAsync("~/Themes/Lepton/Layouts/Application/_Footer.cshtml")
to @await Html.PartialAsync("~/Themes/Lepton/Layouts/Public/_Footer.cshtml")
The drawback is that one now needs to monitor
ApplicationLayout
for changes when updating abp
closing the issue... you can always reopen.
Hey albert :) The footer is missing, so this is not done yet :/
hi
Here's another way:
Update the
MyCompanyName.MyProjectName.Web.Public\Pages\_ViewStart.cshtml
and using theGetApplicationLayout
@using Volo.Abp.AspNetCore.Mvc.UI.Theming @inject IThemeManager ThemeManager @{ Layout = ThemeManager.CurrentTheme.GetApplicationLayout(); //GetPublicLayout }
Thank you, this works way better. Sadly the footer is gone >.<
hi jfistelmann
We will check this.
Hey maliming,
thank you very much. I just received an email that a ServiceBot closed this ticket. Was that on intention?
write your ABP version? your UI Framework?
Sorry, 5.2.1 and Blazor server side. But as this is related to the public site it's ASP .NET
Hey :)
This is somewhat a follow up of #3241
When removing lp-topmenu
in aspnet-core\src\MyCompanyName.MyProjectName.Web.Public\Themes\Lepton\Layouts\Public\Default.cshtml
this leads to some pretty weird behavior.
if you scroll a bit, it looks like this:
I removed that using
@media only screen and (min-width: 992px) {
.landing-header {
background: none !important;
height: 100%;
}
}
But is that good?
So we now have:
@media only screen and (min-width: 992px) {
.landing-header {
background: none !important;
height: 100%;
}
.lp-footer {
background: none;
}
}
As you can see here, the language selection and login menu are still on top and it does not align correctly. And as you can see - I hovered over "Home". Also not looking as it's supposed to.
Got no solution for that >.<
The weirdest thing though is this. When navigating to a new page, the menu takes it space after the page has loaded. This does not look very nice as you can see.
I tried changing the css to the following:
@media only screen and (min-width: 992px) {
.landing-header {
background: none !important;
height: 100%;
}
.lp-footer {
background: none;
}
.lp-sidebar {
transition: none !important;
background: linear-gradient(7deg, #303f9f, #7b1fa2) !important;
}
.lp-content {
padding: 0 36px 24px 300px !important;
}
}
This made it kind of worse but shows a bit better what actually happens.
There may be more issues, but that are the ones I experienced so far. And I am not sure if I am even supposed to make these css changes of if there's something already built in.
Make use of css variables in themes so that it is changeable with reasonable effort. Taking the lepton theme as an example: I need to set my own colors so that they match my corporate identity.
Starting from lepton6.css (copied from source into my project) I have one screen with the app running, another with debug console and another with the css file. I need to check the hex codes used to then manipulate the style sheet, which is WAY more effort than just replacing a bunch of variables. And now that I replaced everything with variables I am less exited about updates in this area, because I now have to constantly monitor changes >.<
Well... solved it for me by using a different approach.
abp get-source Volo.LeptonTheme
as described here
ABP Suite on 5.3.0
It says in the image that I should be able to download the module's source code. but the logs state that it's forbidden (https://abp.io/api/download/module/ returns 403)
Logs:
[12:36:10 INF] ABP CLI (https://abp.io)
[12:36:10 INF] Version 5.3.0 (Stable)
Starting Suite v5.3.0 ...
Opening http://localhost:3000
Press Ctrl+C to shut down.
Error occured while downloading source-code from https://abp.io/api/download/module/ : StatusCode: 403, ReasonPhrase: 'Forbidden', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:
{
Date: Sat, 18 Jun 2022 10:40:11 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-cache,no-store
Pragma: no-cache
Set-Cookie: ####### OMITTED #######
Strict-Transport-Security: max-age=2592000
X-Frame-Options: SAMEORIGIN
X-Powered-By: ARR/3.0
X-Powered-By: ASP.NET
CF-Cache-Status: DYNAMIC
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Report-To: {"endpoints":[{"url":"####### OMITTED #######"}],"group":"cf-nel","max_age":604800}
NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server: cloudflare
CF-RAY: ####### OMITTED #######
Content-Type: text/html; charset=utf-8
Expires: -1
}
'<' is an invalid start of a value. Path: $ | LineNumber: 1 | BytePositionInLine: 0.
[12:40:11 ERR] Error occured while getting the source code for Volo.LeptonTheme v5.2.2 - System.Text.Json.JsonException: '<' is an invalid start of a value. Path: $ | LineNumber: 1 | BytePositionInLine: 0.
---> System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 1 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)
at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
at System.Text.Json.Utf8JsonReader.Read()
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable`1 actualByteCount)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo jsonTypeInfo)
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
at Volo.Abp.Json.SystemTextJson.AbpSystemTextJsonSerializerProvider.Deserialize[T](String jsonString, Boolean camelCase) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Json\Volo\Abp\Json\SystemTextJson\AbpSystemTextJsonSerializerProvider.cs:line 35
at Volo.Abp.Json.AbpHybridJsonSerializer.Deserialize[T](String jsonString, Boolean camelCase) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Json\Volo\Abp\Json\AbpHybridJsonSerializer.cs:line 37
at Volo.Abp.Cli.ProjectBuilding.RemoteServiceExceptionHandler.GetAbpRemoteServiceErrorAsync(HttpResponseMessage responseMessage) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\RemoteServiceExceptionHandler.cs:line 52
at Volo.Abp.Cli.ProjectBuilding.RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(HttpResponseMessage responseMessage) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\RemoteServiceExceptionHandler.cs:line 38
at Volo.Abp.Cli.ProjectBuilding.AbpIoSourceCodeStore.DownloadSourceCodeContentAsync(SourceCodeDownloadInputDto input) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\AbpIoSourceCodeStore.cs:line 251
at Volo.Abp.Cli.ProjectBuilding.AbpIoSourceCodeStore.GetAsync(String name, String type, String version, String templateSource, Boolean includePreReleases) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\AbpIoSourceCodeStore.cs:line 119
at Volo.Abp.Cli.ProjectBuilding.ModuleProjectBuilder.BuildAsync(ProjectBuildArgs args) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\ModuleProjectBuilder.cs:line 48
at Volo.Abp.Cli.Commands.Services.SourceCodeDownloadService.DownloadModuleAsync(String moduleName, String outputFolder, String version, String gitHubAbpLocalRepositoryPath, String gitHubVoloLocalRepositoryPath, AbpCommandLineOptions options) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\Services\SourceCodeDownloadService.cs:line 40
at Volo.Abp.Cli.Commands.GetSourceCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\GetSourceCommand.cs:line 64
at Volo.Abp.Suite.Controllers.AbpSuiteController.GetSourceAsync(GetSourceInput input)
Is this a bug in UI (meaning I am really not allowed) or may the issue lie somewhere else?
Thank you for your efforts :)
hi
Try to remove the
lp-topmenu
inaspnet-core\src\MyCompanyName.MyProjectName.Web.Public\Themes\Lepton\Layouts\Public\Default.cshtml
Thank you very much maliming :) I did not expect it to be that easy.