1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Added Privacy and Contact pages

This commit is contained in:
Uncled1023 2015-11-23 16:55:28 -08:00
parent d97e89d9d3
commit 6fd2360cf7
10 changed files with 318 additions and 0 deletions

View File

@ -0,0 +1,33 @@
using System.Web.Mvc;
namespace Teknik.Areas.Contact
{
public class ContactAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "Contact";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapSubdomainRoute(
"Contact_dev", // Route name
"dev",
"Contact/{controller}/{action}", // URL with parameters
new { area = this.AreaName, controller = "Contact", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.ContactController).Namespace }
);
context.MapSubdomainRoute(
"Contact_default", // Route name
"contact",
"{controller}/{action}", // URL with parameters
new { area = this.AreaName, controller = "Contact", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.ContactController).Namespace }
);
}
}
}

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Teknik.Controllers;
namespace Teknik.Areas.Contact.Controllers
{
public class ContactController : DefaultController
{
// GET: Contact/Contact
[AllowAnonymous]
public ActionResult Index()
{
ViewBag.Title = Config.Title + " - Contact";
ViewBag.Message = "Contact Teknik Support";
return View();
}
}
}

View File

@ -0,0 +1,87 @@
@using Teknik.Models
<div class="container">
<div class="row">
<div class="col-sm-12 col-lg-12">
<h1 class="h1">
Contact us
</h1>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-8">
<div class="well well-sm">
<form>
<div class="row">
<div class="col-md-6">
@if (!Request.IsAuthenticated)
{
<div class="form-group">
<label for="contact_name">
Name
</label>
<input type="text" class="form-control" id="contact_name" placeholder="Enter name" required="required" />
</div>
<div class="form-group">
<label for="contact_email">
Email Address
</label>
<div class="input-group">
<span class="input-group-addon">
<span class="glyphicon glyphicon-envelope"></span>
</span>
<input type="email" class="form-control" id="contact_email" placeholder="Enter email" required="required" />
</div>
</div>
}
<div class="form-group">
<label for="contact_subject">
Subject
</label>
<select id="contact_subject" name="contact_subject" class="form-control" required="required">
<option value="na" selected="">Choose One:</option>
<option value="general">General Questions</option>
<option value="suggestions">Suggestions</option>
<option value="service">Service Support</option>
<option value="feedback">Feedback</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="contact_message">
Message
</label>
<textarea name="contact_message" id="contact_message" class="form-control" rows="9" cols="25" required="required"
placeholder="Message"></textarea>
</div>
</div>
<div class="col-md-12">
<button type="submit" class="btn btn-primary pull-right" id="contact_submit">
Send Message
</button>
</div>
</div>
</form>
</div>
</div>
<div class="col-md-4">
<form>
<legend><span class="glyphicon glyphicon-globe"></span> Where to find us</legend>
<address>
<strong>/g/ Technology on IRC</strong><br>
#/g/technology (<a href="irc://irc.rizon.net" target="_blank">irc.rizon.net</a>)<br>
</address>
<address>
<strong>Teknik IRC</strong><br>
#teknik (<a href="irc://irc.teknik.io" target="_blank">irc.teknik.io</a>)<br>
</address>
<address>
<strong>Customer Support</strong><br>
<a href="mailto:support@teknik.io">support@teknik.io</a>
</address>
</form>
</div>
</div>
</div>

View File

@ -0,0 +1,3 @@
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}

View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.Optimization" />
<add namespace="Teknik" />
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.webServer>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
</configuration>

View File

@ -0,0 +1,33 @@
using System.Web.Mvc;
namespace Teknik.Areas.Privacy
{
public class PrivacyAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "Privacy";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapSubdomainRoute(
"Privacy_dev", // Route name
"dev",
"Privacy/{controller}/{action}", // URL with parameters
new { area = this.AreaName, controller = "Privacy", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.PrivacyController).Namespace }
);
context.MapSubdomainRoute(
"Privacy_default", // Route name
"privacy",
"{controller}/{action}", // URL with parameters
new { area = this.AreaName, controller = "Privacy", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.PrivacyController).Namespace }
);
}
}
}

View File

@ -0,0 +1,51 @@
@using Teknik.Models
<div class="container">
<div class="row">
<div class="col-xs-10">
<h2>Public Information</h2>
<p>
The following information is publicly available.
</p>
<ul>
<li>Email Address (username@@(ViewBag.Config.Host))</li>
<li>Published Blog Posts</li>
<li>Comments</li>
<li>Uploads (Only accessible by direct link)</li>
<li>Git Repositories</li>
<li>Pastes without passwords</li>
<li>User Profile</li>
<ul>
<li>Registration Date</li>
<li>Last Login Date</li>
<li>About</li>
<li>Website</li>
<li>Quote</li>
</ul>
</ul>
<h2>Data We Collect</h2>
<p>
Teknik collects the following data when you use our services and is used only internally.
</p>
<ul>
<li><var>User ID</var> - Your internal user ID is associated with any of the following actions while logged in:</li>
<ul>
<li>Upload File</li>
<li>Paste</li>
<li>Blog Post + Comments</li>
<li>Ricehalla Post</li>
</ul>
<li><var>Dates</var> - When you perform an action (ie: register an account), the date of the action will be recorded.</li>
<li><var>Emails</var> - Any email you send or receive with your Teknik.io email address is stored locally onto the server.</li>
</ul>
<h2>Cookies We Store</h2>
<p>
While browsing we store the following cookies onto your machine.
</p>
<ul>
<li><var>PHPSESSION</var> - Used by PHP for the server-side code that is ran.</li>
<li><var>auth</var> - Used to authenticate a persistent login (activated when you choose 'remember me' at login).</li>
<li><var>_ga, _pk_id, _pk_ref, piwik_auth</var> - Used as an identifier for site statistics. This can be disabled through the user profile.</li>
</ul>
</div>
</div>
</div>

View File

@ -0,0 +1,3 @@
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}

View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.Optimization" />
<add namespace="Teknik" />
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.webServer>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
</configuration>

View File

@ -138,9 +138,13 @@
<Compile Include="Areas\About\AboutAreaRegistration.cs" /> <Compile Include="Areas\About\AboutAreaRegistration.cs" />
<Compile Include="Areas\About\Controllers\AboutController.cs" /> <Compile Include="Areas\About\Controllers\AboutController.cs" />
<Compile Include="Areas\Blog\BlogAreaRegistration.cs" /> <Compile Include="Areas\Blog\BlogAreaRegistration.cs" />
<Compile Include="Areas\Contact\ContactAreaRegistration.cs" />
<Compile Include="Areas\Contact\Controllers\ContactController.cs" />
<Compile Include="Areas\Dev\DevAreaRegistration.cs" /> <Compile Include="Areas\Dev\DevAreaRegistration.cs" />
<Compile Include="Areas\Home\Controllers\HomeController.cs" /> <Compile Include="Areas\Home\Controllers\HomeController.cs" />
<Compile Include="Areas\Home\HomeAreaRegistration.cs" /> <Compile Include="Areas\Home\HomeAreaRegistration.cs" />
<Compile Include="Areas\Privacy\Controllers\PrivacyController.cs" />
<Compile Include="Areas\Privacy\PrivacyAreaRegistration.cs" />
<Compile Include="Configuration\Config.cs" /> <Compile Include="Configuration\Config.cs" />
<Compile Include="Areas\Blog\Controllers\BlogController.cs" /> <Compile Include="Areas\Blog\Controllers\BlogController.cs" />
<Compile Include="Controllers\DefaultController.cs" /> <Compile Include="Controllers\DefaultController.cs" />
@ -203,6 +207,12 @@
<Content Include="Areas\About\Views\web.config" /> <Content Include="Areas\About\Views\web.config" />
<Content Include="Areas\About\Views\About\Index.cshtml" /> <Content Include="Areas\About\Views\About\Index.cshtml" />
<Content Include="Areas\About\Views\_ViewStart.cshtml" /> <Content Include="Areas\About\Views\_ViewStart.cshtml" />
<Content Include="Areas\Privacy\Views\web.config" />
<Content Include="Areas\Privacy\Views\_ViewStart.cshtml" />
<Content Include="Areas\Privacy\Views\Privacy\Index.cshtml" />
<Content Include="Areas\Contact\Views\web.config" />
<Content Include="Areas\Contact\Views\_ViewStart.cshtml" />
<Content Include="Areas\Contact\Views\Contact\Index.cshtml" />
<None Include="Properties\PublishProfiles\IIS.pubxml" /> <None Include="Properties\PublishProfiles\IIS.pubxml" />
<None Include="Scripts\jquery-2.1.4.intellisense.js" /> <None Include="Scripts\jquery-2.1.4.intellisense.js" />
<Content Include="Scripts\common.js" /> <Content Include="Scripts\common.js" />
@ -249,10 +259,14 @@
<Folder Include="Areas\About\Views\Shared\" /> <Folder Include="Areas\About\Views\Shared\" />
<Folder Include="Areas\Blog\Models\" /> <Folder Include="Areas\Blog\Models\" />
<Folder Include="Areas\Blog\Views\Shared\" /> <Folder Include="Areas\Blog\Views\Shared\" />
<Folder Include="Areas\Contact\Models\" />
<Folder Include="Areas\Contact\Views\Shared\" />
<Folder Include="Areas\Dev\Models\" /> <Folder Include="Areas\Dev\Models\" />
<Folder Include="Areas\Dev\Views\Shared\" /> <Folder Include="Areas\Dev\Views\Shared\" />
<Folder Include="Areas\Home\Models\" /> <Folder Include="Areas\Home\Models\" />
<Folder Include="Areas\Home\Views\Shared\" /> <Folder Include="Areas\Home\Views\Shared\" />
<Folder Include="Areas\Privacy\Models\" />
<Folder Include="Areas\Privacy\Views\Shared\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="packages.config" /> <Content Include="packages.config" />