Added Favicon support, Progressive Web App support, page title and url support, and private/public user registration options
This commit is contained in:
@ -146,10 +146,12 @@ namespace Oqtane.Controllers
|
||||
page = new Page();
|
||||
page.SiteId = parent.SiteId;
|
||||
page.Name = parent.Name;
|
||||
page.Title = parent.Title;
|
||||
page.Path = parent.Path;
|
||||
page.ParentId = parent.PageId;
|
||||
page.Order = 0;
|
||||
page.IsNavigation = false;
|
||||
page.Url = "";
|
||||
page.EditMode = false;
|
||||
page.ThemeType = parent.ThemeType;
|
||||
page.LayoutType = parent.LayoutType;
|
||||
|
@ -9,6 +9,9 @@
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>Oqtane</title>
|
||||
<base href="~/" />
|
||||
<link id="fav-icon" rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
|
||||
<!-- stub the PWA manifest but defer the assignment of href -->
|
||||
<link id="pwa-manifest" rel="manifest" />
|
||||
<link href="css/quill/quill1.3.6.bubble.css" rel="stylesheet" />
|
||||
<link href="css/quill/quill1.3.6.snow.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
||||
|
@ -634,8 +634,10 @@ namespace Oqtane.Repository
|
||||
SiteId = site.SiteId,
|
||||
ParentId = parentid,
|
||||
Name = pagetemplate.Name,
|
||||
Title = "",
|
||||
Path = pagetemplate.Path,
|
||||
Order = 1,
|
||||
Url = "",
|
||||
IsNavigation = pagetemplate.IsNavigation,
|
||||
EditMode = pagetemplate.EditMode,
|
||||
ThemeType = "",
|
||||
|
@ -9,9 +9,14 @@ CREATE TABLE [dbo].[Site](
|
||||
[TenantId] [int] NOT NULL,
|
||||
[Name] [nvarchar](200) NOT NULL,
|
||||
[LogoFileId] [int] NULL,
|
||||
[FaviconFileId] [int] NULL,
|
||||
[DefaultThemeType] [nvarchar](200) NOT NULL,
|
||||
[DefaultLayoutType] [nvarchar](200) NOT NULL,
|
||||
[DefaultContainerType] [nvarchar](200) NOT NULL,
|
||||
[PwaIsEnabled] [bit] NOT NULL,
|
||||
[PwaAppIconFileId] [int] NULL,
|
||||
[PwaSplashIconFileId] [int] NULL,
|
||||
[AllowRegistration] [bit] NOT NULL,
|
||||
[CreatedBy] [nvarchar](256) NOT NULL,
|
||||
[CreatedOn] [datetime] NOT NULL,
|
||||
[ModifiedBy] [nvarchar](256) NOT NULL,
|
||||
@ -31,11 +36,13 @@ CREATE TABLE [dbo].[Page](
|
||||
[SiteId] [int] NOT NULL,
|
||||
[Path] [nvarchar](50) NOT NULL,
|
||||
[Name] [nvarchar](50) NOT NULL,
|
||||
[Title] [nvarchar](200) NULL,
|
||||
[ThemeType] [nvarchar](200) NULL,
|
||||
[Icon] [nvarchar](50) NOT NULL,
|
||||
[ParentId] [int] NULL,
|
||||
[Order] [int] NOT NULL,
|
||||
[IsNavigation] [bit] NOT NULL,
|
||||
[Url] [nvarchar](500) NULL,
|
||||
[LayoutType] [nvarchar](200) NOT NULL,
|
||||
[EditMode] [bit] NOT NULL,
|
||||
[UserId] [int] NULL,
|
||||
|
@ -25,7 +25,7 @@ window.interop = {
|
||||
document.title = title;
|
||||
}
|
||||
},
|
||||
updateMeta: function (id, attribute, name, content) {
|
||||
includeMeta: function (id, attribute, name, content) {
|
||||
var meta;
|
||||
if (id !== "") {
|
||||
meta = document.getElementById(id);
|
||||
@ -48,7 +48,7 @@ window.interop = {
|
||||
}
|
||||
}
|
||||
},
|
||||
updateLink: function (id, rel, type, url) {
|
||||
includeLink: function (id, rel, url, type) {
|
||||
var link;
|
||||
if (id !== "") {
|
||||
link = document.getElementById(id);
|
||||
@ -62,14 +62,58 @@ window.interop = {
|
||||
link.id = id;
|
||||
}
|
||||
link.rel = rel;
|
||||
link.type = type;
|
||||
link.href = url;
|
||||
if (type !== "") {
|
||||
link.type = type;
|
||||
}
|
||||
document.head.appendChild(link);
|
||||
}
|
||||
else {
|
||||
if (link.rel !== rel) {
|
||||
link.setAttribute('rel', rel);
|
||||
}
|
||||
if (link.href !== url) {
|
||||
link.setAttribute('href', url);
|
||||
}
|
||||
if (type !== "" && link.type !== type) {
|
||||
link.setAttribute('type', type);
|
||||
}
|
||||
}
|
||||
},
|
||||
includeScript: function (id, src, content, location) {
|
||||
var script;
|
||||
if (id !== "") {
|
||||
script = document.getElementById(id);
|
||||
}
|
||||
if (script === null) {
|
||||
script = document.createElement("script");
|
||||
if (id !== "") {
|
||||
script.id = id;
|
||||
}
|
||||
if (src !== "") {
|
||||
script.src = src;
|
||||
}
|
||||
else {
|
||||
script.innerHTML = content;
|
||||
}
|
||||
if (location === 'head') {
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
if (location === 'body') {
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (src !== "") {
|
||||
if (script.src !== src) {
|
||||
script.src = src;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (script.innerHTML !== content) {
|
||||
script.innerHTML = content;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
getElementByName: function (name) {
|
||||
|
2
Oqtane.Server/wwwroot/service-worker.js
Normal file
2
Oqtane.Server/wwwroot/service-worker.js
Normal file
@ -0,0 +1,2 @@
|
||||
// always fetch from the network and do not enable offline support
|
||||
self.addEventListener('fetch', () => { });
|
Reference in New Issue
Block a user