Skip to content

Commit d08d086

Browse files
committed
Initial setup and testsite; API key authentication review; update umb-overlay usage.
1 parent 5130b12 commit d08d086

File tree

75 files changed

+6154
-45
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+6154
-45
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,3 +324,8 @@ src/Umbraco.Cms.Integrations.Commerce.CommerceTools.Testsite.V9/App_Plugins
324324
src/Umbraco.Cms.Integrations.Commerce.CommerceTools.Testsite.V9/umbraco
325325
src/Umbraco.Cms.Integrations.Commerce.CommerceTools.Testsite.V9/wwwroot/media
326326

327+
src/Umbraco.Cms.Integrations.Crm.Hubspot.Testsite.V8/App_Data/
328+
src/Umbraco.Cms.Integrations.Crm.Hubspot.Testsite.V8/App_Plugins/
329+
src/Umbraco.Cms.Integrations.Crm.Hubspot.Testsite.V8/Media/
330+
src/Umbraco.Cms.Integrations.SEO.Semrush.Testsite.V8/App_Data/
331+
src/Umbraco.Cms.Integrations.SEO.Semrush.Testsite.V8/App_Plugins/

src/Umbraco.Cms.Integrations.Commerce.CommerceTools.Testsite.V8/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@
7272
<package id="UmbracoCms" version="8.15.1" targetFramework="net472" />
7373
<package id="UmbracoCms.Core" version="8.15.1" targetFramework="net472" />
7474
<package id="UmbracoCms.Web" version="8.15.1" targetFramework="net472" />
75-
<package id="Umbraco.Cms.Integrations.Commerce.CommerceTools" version="1.0.0-beta" targetFramework="net472" />
76-
<package id="Umbraco.Cms.Integrations.Commerce.CommerceTools.Web" version="1.0.0-beta" targetFramework="net472" />
75+
<!--<package id="Umbraco.Cms.Integrations.Commerce.CommerceTools" version="1.0.0-beta" targetFramework="net472" />
76+
<package id="Umbraco.Cms.Integrations.Commerce.CommerceTools.Web" version="1.0.0-beta" targetFramework="net472" />-->
7777
</packages>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<%@ Application Inherits="Umbraco.Web.UmbracoApplication" Language="C#" %>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("Umbraco.Cms.Integrations.Crm.Hubspot.Testsite.V8")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("Umbraco.Cms.Integrations.Crm.Hubspot.Testsite.V8")]
13+
[assembly: AssemblyCopyright("Copyright © 2022")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("955aa642-8373-4317-b354-a9497765f2dc")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Revision and Build Numbers
33+
// by using the '*' as shown below:
34+
[assembly: AssemblyVersion("1.0.0.0")]
35+
[assembly: AssemblyFileVersion("1.0.0.0")]

src/Umbraco.Cms.Integrations.Crm.Hubspot.Testsite.V8/Umbraco.Cms.Integrations.Crm.Hubspot.Testsite.V8.csproj

Lines changed: 408 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@using ContentModels = Umbraco.Web.PublishedModels;
2+
@inherits Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.Blog>
3+
@using Umbraco.Web;
4+
@{
5+
Layout = "master.cshtml";
6+
}
7+
@Html.Partial("~/Views/Partials/SectionHeader.cshtml")
8+
9+
<section class="section">
10+
11+
<div class="container">
12+
@Umbraco.RenderMacro("latestBlogposts",
13+
new
14+
{
15+
numberOfPosts = Model.HowManyPostsShouldBeShown,
16+
startNodeId = Model.Id
17+
})
18+
@{
19+
}
20+
</div>
21+
22+
</section>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@inherits Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.Blogpost>
2+
@using ContentModels = Umbraco.Web.PublishedModels;
3+
@{
4+
Layout = "master.cshtml";
5+
}
6+
@Html.Partial("~/Views/Partials/SectionHeader.cshtml")
7+
8+
<section class="section">
9+
<div class="container">
10+
<article>
11+
<div class="blogpost-meta">
12+
<small class="blogpost-date">@Model.CreateDate.ToShortDateString()</small>
13+
<span class="blogpost-cat">
14+
@Html.Partial("~/Views/Partials/CategoryLinks.cshtml", Model.Categories)
15+
</span>
16+
</div>
17+
<h3>@Model.Excerpt</h3>
18+
@Html.GetGridHtml(Model, "bodyText", "bootstrap3-fluid")
19+
<!-- todo: implement discus comments -->
20+
</article>
21+
</div>
22+
</section>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@inherits Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.Hubspot>
2+
3+
@using ContentModels = Umbraco.Web.PublishedModels;
4+
5+
@{
6+
Layout = "master.cshtml";
7+
8+
}
9+
10+
<script charset="utf-8" type="text/javascript" src="//js-eu1.hsforms.net/forms/shell.js"></script>
11+
<script>
12+
hbspt.forms.create({
13+
region: "eu1",
14+
portalId: "25480247",
15+
formId: "adce7c38-f600-4d37-aba2-40c0e9a105b2"
16+
});
17+
</script>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@inherits Umbraco.Web.Macros.PartialViewMacroPage
2+
3+
4+
@*
5+
This snippet lists the items from a Multinode tree picker, using the pickers default settings.
6+
Content Values stored as xml.
7+
8+
To get it working with any site's data structure, set the selection equal to the property which has the
9+
multinode treepicker (so: replace "PropertyWithPicker" with the alias of your property).
10+
*@
11+
12+
@{ var selection = CurrentPage.PropertyWithPicker.Split(','); }
13+
14+
<ul>
15+
@foreach (var id in selection)
16+
{
17+
var item = Umbraco.Content(id);
18+
<li>
19+
<a href="@item.Url">@item.Name</a>
20+
</li>
21+
}
22+
</ul>
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
@using ContentModels = Umbraco.Web.PublishedModels;
2+
@using Umbraco.Web;
3+
@inherits Umbraco.Web.Macros.PartialViewMacroPage
4+
@{
5+
var startNodeId = Model.MacroParameters["startNodeId"] != null ? Model.MacroParameters["startNodeId"] : Model.Content.Id;
6+
7+
8+
var numberOfPosts = 3;
9+
if (Model.MacroParameters["numberOfPosts"] != null)
10+
{
11+
int.TryParse((string)Model.MacroParameters["numberOfPosts"], out numberOfPosts);
12+
}
13+
14+
15+
}
16+
@if (startNodeId != null)
17+
{
18+
@* Get the starting page *@
19+
var startNode = Umbraco.Content(startNodeId);
20+
21+
if (startNode == null)
22+
{
23+
<div class="blogposts">
24+
<h1>There are no posts at this time, try again later.</h1>
25+
</div>
26+
27+
return;
28+
}
29+
30+
//Gets all blogposts to calculate pages
31+
var blogposts = startNode.Children.OrderBy(x => x.CreateDate).ToList();
32+
var pageCount = (int)Math.Ceiling((double)blogposts.Count / (double)numberOfPosts);
33+
//gets the page from the querystring and sets it to one if it is out of range
34+
var page = 1;
35+
if (!string.IsNullOrEmpty(Request.QueryString["page"]))
36+
{
37+
int.TryParse(Request.QueryString["page"], out page);
38+
if (page <= 0 || page > pageCount)
39+
{
40+
page = 1;
41+
}
42+
}
43+
//Gets the blogposts for the current page
44+
var pagedBlogposts = blogposts.Skip((page - 1) * numberOfPosts).Take(numberOfPosts).ToList();
45+
46+
if (pagedBlogposts.Count > 0)
47+
{
48+
<div class="blogposts">
49+
50+
@foreach (ContentModels.Blogpost post in pagedBlogposts)
51+
{
52+
<a href="@post.Url" class="blogpost">
53+
<div class="blogpost-meta">
54+
<small class="blogpost-date">@post.CreateDate.ToShortDateString()</small>
55+
<small class="blogpost-cat">
56+
@Html.Partial("~/Views/Partials/CategoryLinks.cshtml", post.Categories)
57+
</small>
58+
</div>
59+
<h3 class="blogpost-title">@post.PageTitle</h3>
60+
<div class="blogpost-excerpt">@post.Excerpt</div>
61+
</a>
62+
}
63+
</div>
64+
}
65+
66+
if (blogposts.Count > numberOfPosts)
67+
{
68+
<div class="pagination">
69+
<nav class="nav-bar nav-bar--center">
70+
@if (page <= 1)
71+
{
72+
<span class="nav-link nav-link--black nav-link--disabled">Prev</span>
73+
}
74+
else
75+
{
76+
<a class="nav-link nav-link--black" href="@(Model.Content.Url + "?page=" + (page - 1))">Prev</a>
77+
}
78+
79+
@for (int i = 1; i <= pageCount; i++)
80+
{
81+
<a class="nav-link nav-link--black @(page == i ? " nav-link--active" : null)" href="@(Model.Content.Url + "?page=" + i)">@i</a>
82+
}
83+
@if (page == pageCount)
84+
{
85+
<span class="nav-link nav-link--black nav-link--disabled">Next</span>
86+
}
87+
else
88+
{
89+
<a class="nav-link nav-link--black" href="@(Model.Content.Url + "?page=" + (page + 1))">Next</a>
90+
}
91+
92+
</nav>
93+
</div>
94+
}
95+
}
96+

0 commit comments

Comments
 (0)