Refactored docs navigation

Moved everything to razor, removed loads of old crap, added new
navigation, breadcrumb and markdown render - still weird but better
This commit is contained in:
Per Ploug
2015-02-24 00:20:13 +01:00
parent 401263e728
commit db87db8e72
65 changed files with 202 additions and 2959 deletions
+9 -5
View File
@@ -14,7 +14,7 @@
<RootNamespace>OurUmbraco.Site</RootNamespace>
<AssemblyName>OurUmbraco.Site</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<UseIISExpress>true</UseIISExpress>
<UseIISExpress>false</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
@@ -1766,7 +1766,6 @@
<Content Include="umbraco_client\tablesorting\jquery.tablesorter.min.js" />
<Content Include="umbraco_client\tinymce3\langs\en_us.js" />
<Content Include="umbraco_client\tinymce3\langs\ru.js" />
<Content Include="usercontrols\DocumentationEditButton.ascx" />
<Content Include="usercontrols\IndexStatus.ascx" />
<Content Include="usercontrols\our.umbraco.org\ExamineSearchResults.ascx" />
<Content Include="usercontrols\our.umbraco.org\ForumSpamCleaner.ascx" />
@@ -1801,6 +1800,9 @@
<Content Include="Views\MacroPartials\Members\Profile.cshtml" />
<Content Include="Views\MacroPartials\Members\ProfileNotifications.cshtml" />
<Content Include="Views\Layout.cshtml" />
<Content Include="Views\MacroPartials\Documenation\Breadcrumb.cshtml" />
<Content Include="Views\MacroPartials\Documenation\DisplayMarkdown.cshtml" />
<Content Include="Views\MacroPartials\Documenation\Navigation.cshtml" />
<None Include="Views\Partials\Forum\MemberBadge.cshtml" />
<Content Include="Views\Web.config" />
<Content Include="web.config">
@@ -4329,8 +4331,6 @@
<Content Include="usercontrols\Deli\Support\VendorSupportRequest.ascx" />
<Content Include="usercontrols\Deli\Support\Vendor\VendorSupportRequest.ascx" />
<Content Include="usercontrols\Deli\TopPaidProjectsList.ascx" />
<Content Include="usercontrols\DocumentationBreadcrumb.ascx" />
<Content Include="usercontrols\DocumentationShowMarkdown.ascx" />
<Content Include="usercontrols\ExamineSearchResults.ascx" />
<Content Include="usercontrols\FergusonMoriyama\FeedCache\PostInstall.ascx" />
<Content Include="usercontrols\ImageGenInstaller.ascx" />
@@ -4699,6 +4699,10 @@
<Project>{00f050b9-e3ed-49a7-ab97-e8bec2513553}</Project>
<Name>uPowers</Name>
</ProjectReference>
<ProjectReference Include="..\uRelease\uRelease.csproj">
<Project>{c5b74e6a-abce-4a9a-896d-89c33fdafcd8}</Project>
<Name>uRelease</Name>
</ProjectReference>
<ProjectReference Include="..\uRepo\uRepo.csproj">
<Project>{47fd2b14-1653-4052-ad53-1871a8f85e0e}</Project>
<Name>uRepo</Name>
@@ -4734,7 +4738,7 @@
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>24292</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:24217/</IISUrl>
<IISUrl>http://our.local</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
@@ -0,0 +1,30 @@
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@using uDocumentation.Busineslogic;
@{
string baseurl = "/";
string absolutePath = HttpContext.Current.Request.Url.AbsolutePath;
string directoryName = Path.GetDirectoryName(absolutePath);
directoryName = directoryName.Substring(1);
string[] strDirs = directoryName.Split('\\');
}
<ul id="breadcrumb">
<li><a href="/">Our</a></li>
@foreach(var page in strDirs){
<li><a href="@(baseurl+page)/">@page.RemoveDash().UnderscoreToDot().EnsureCorrectDocumentationText()</a></li>
{
baseurl += page + "/";
}
}
@if (!absolutePath.EndsWith("/"))
{
<li>@absolutePath.Substring(absolutePath.LastIndexOf('/') + 1).RemoveDash().UnderscoreToDot().EnsureCorrectDocumentationText()</li>
}
</ul>
@@ -0,0 +1,10 @@
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@using uDocumentation.Busineslogic;
@{
var path = HttpContext.Current.Items[MarkdownLogic.MarkdownPathKey].ToString();
MarkdownLogic ml = new MarkdownLogic(path) { PrefixLinks = false };
var markdown = ml.DoTransformation();
}
@Html.Raw(markdown)
@@ -0,0 +1,49 @@
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@using uDocumentation;
@{
var zipper = new uDocumentation.Busineslogic.GithubSourcePull.ZipDownloader();
dynamic sitemap = zipper.DocumentationSiteMap();
var root = "/documentation";
var currentUrl = HttpContext.Current.Request.Url.PathAndQuery;
}
@functions{
public static string IsActive(string path, string classname = "active")
{
if (HttpContext.Current.Request.Url.PathAndQuery.ToLower().StartsWith(path.ToLower()))
return classname;
return string.Empty;
}
}
<nav>
<ul class="level-1">
@foreach (dynamic item in sitemap.directories)
{
<li class=" @IsActive(root+item.path, "active open")">
<a href="@(root + item.path)/"><h3>@item.name</h3></a>
@if((bool)item.hasChildren)
{
<ul class="level-2 @IsActive(root+item.path, "open")">
@foreach(dynamic itemChild in item.directories){
<li class=" @IsActive(root+itemChild.path, "active open")">
<a href="@(root + itemChild.path)/"><h4>@itemChild.name</h4></a>
@if((bool)itemChild.hasChildren){
<ul class="level-3 @IsActive(root+item.path, "open")">
@foreach (dynamic itemGrandChild in itemChild.directories)
{
<li class=" @IsActive(root+itemGrandChild.path, "active")"><a href="@(root + itemGrandChild.path)/"><h5>@itemGrandChild.name</h5></a></li>
}
</ul>
}
</li>
}
</ul>
}
</li>
}
</ul>
</nav>
-373
View File
@@ -1,373 +0,0 @@
* {
margin: 0;
padding: 0;
}
a {
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
body {
overflow-x: hidden;
-webkit-user-select: none;
-webkit-text-size-adjust: none;
font-family: Helvetica;
-webkit-perspective: 800;
-webkit-transform-style: preserve-3d;
}
.selectable, input, textarea {
-webkit-user-select: auto;
}
body > * {
-webkit-backface-visibility: hidden;
-webkit-box-sizing: border-box;
display: none;
position: absolute;
left: 0;
width: 100%;
-webkit-transform: translate3d(0,0,0) rotate(0) scale(1);
min-height: 420px !important;
}
body.fullscreen > * {
min-height: 460px !important;
}
body.fullscreen.black-translucent > * {
min-height: 480px !important;
}
body.landscape > * {
min-height: 320px;
}
body > .current {
display: block !important;
}
.in, .out {
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-duration: 350ms;
}
.slide.in {
-webkit-animation-name: slideinfromright;
}
.slide.out {
-webkit-animation-name: slideouttoleft;
}
.slide.in.reverse {
-webkit-animation-name: slideinfromleft;
}
.slide.out.reverse {
-webkit-animation-name: slideouttoright;
}
@-webkit-keyframes slideinfromright {
from { -webkit-transform: translateX(100%); }
to { -webkit-transform: translateX(0); }
}
@-webkit-keyframes slideinfromleft {
from { -webkit-transform: translateX(-100%); }
to { -webkit-transform: translateX(0); }
}
@-webkit-keyframes slideouttoleft {
from { -webkit-transform: translateX(0); }
to { -webkit-transform: translateX(-100%); }
}
@-webkit-keyframes slideouttoright {
from { -webkit-transform: translateX(0); }
to { -webkit-transform: translateX(100%); }
}
@-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
@-webkit-keyframes fadeout {
from { opacity: 1; }
to { opacity: 0; }
}
.fade.in {
z-index: 10;
-webkit-animation-name: fadein;
}
.fade.out {
z-index: 0;
}
.dissolve.in {
-webkit-animation-name: fadein;
}
.dissolve.out {
-webkit-animation-name: fadeout;
}
.flip {
-webkit-animation-duration: .65s;
}
.flip.in {
-webkit-animation-name: flipinfromleft;
}
.flip.out {
-webkit-animation-name: flipouttoleft;
}
/* Shake it all about */
.flip.in.reverse {
-webkit-animation-name: flipinfromright;
}
.flip.out.reverse {
-webkit-animation-name: flipouttoright;
}
@-webkit-keyframes flipinfromright {
from { -webkit-transform: rotateY(-180deg) scale(.8); }
to { -webkit-transform: rotateY(0) scale(1); }
}
@-webkit-keyframes flipinfromleft {
from { -webkit-transform: rotateY(180deg) scale(.8); }
to { -webkit-transform: rotateY(0) scale(1); }
}
@-webkit-keyframes flipouttoleft {
from { -webkit-transform: rotateY(0) scale(1); }
to { -webkit-transform: rotateY(-180deg) scale(.8); }
}
@-webkit-keyframes flipouttoright {
from { -webkit-transform: rotateY(0) scale(1); }
to { -webkit-transform: rotateY(180deg) scale(.8); }
}
.slideup.in {
-webkit-animation-name: slideup;
z-index: 10;
}
.slideup.out {
-webkit-animation-name: dontmove;
z-index: 0;
}
.slideup.out.reverse {
z-index: 10;
-webkit-animation-name: slidedown;
}
.slideup.in.reverse {
z-index: 0;
-webkit-animation-name: dontmove;
}
@-webkit-keyframes slideup {
from { -webkit-transform: translateY(100%); }
to { -webkit-transform: translateY(0); }
}
@-webkit-keyframes slidedown {
from { -webkit-transform: translateY(0); }
to { -webkit-transform: translateY(100%); }
}
/* Hackish, but reliable. */
@-webkit-keyframes dontmove {
from { opacity: 1; }
to { opacity: 1; }
}
.swap {
-webkit-transform: perspective(800);
-webkit-animation-duration: .7s;
}
.swap.out {
-webkit-animation-name: swapouttoleft;
}
.swap.in {
-webkit-animation-name: swapinfromright;
}
.swap.out.reverse {
-webkit-animation-name: swapouttoright;
}
.swap.in.reverse {
-webkit-animation-name: swapinfromleft;
}
@-webkit-keyframes swapouttoright {
0% {
-webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg);
-webkit-animation-timing-function: ease-in-out;
}
50% {
-webkit-transform: translate3d(-180px, 0px, -400px) rotateY(20deg);
-webkit-animation-timing-function: ease-in;
}
100% {
-webkit-transform: translate3d(0px, 0px, -800px) rotateY(70deg);
}
}
@-webkit-keyframes swapouttoleft {
0% {
-webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg);
-webkit-animation-timing-function: ease-in-out;
}
50% {
-webkit-transform: translate3d(180px, 0px, -400px) rotateY(-20deg);
-webkit-animation-timing-function: ease-in;
}
100% {
-webkit-transform: translate3d(0px, 0px, -800px) rotateY(-70deg);
}
}
@-webkit-keyframes swapinfromright {
0% {
-webkit-transform: translate3d(0px, 0px, -800px) rotateY(70deg);
-webkit-animation-timing-function: ease-out;
}
50% {
-webkit-transform: translate3d(-180px, 0px, -400px) rotateY(20deg);
-webkit-animation-timing-function: ease-in-out;
}
100% {
-webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg);
}
}
@-webkit-keyframes swapinfromleft {
0% {
-webkit-transform: translate3d(0px, 0px, -800px) rotateY(-70deg);
-webkit-animation-timing-function: ease-out;
}
50% {
-webkit-transform: translate3d(180px, 0px, -400px) rotateY(-20deg);
-webkit-animation-timing-function: ease-in-out;
}
100% {
-webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg);
}
}
.cube {
-webkit-animation-duration: .55s;
}
.cube.in {
-webkit-animation-name: cubeinfromright;
-webkit-transform-origin: 0% 50%;
}
.cube.out {
-webkit-animation-name: cubeouttoleft;
-webkit-transform-origin: 100% 50%;
}
.cube.in.reverse {
-webkit-animation-name: cubeinfromleft;
-webkit-transform-origin: 100% 50%;
}
.cube.out.reverse {
-webkit-animation-name: cubeouttoright;
-webkit-transform-origin: 0% 50%;
}
@-webkit-keyframes cubeinfromleft {
from {
-webkit-transform: rotateY(-90deg) translateZ(320px);
opacity: .5;
}
to {
-webkit-transform: rotateY(0deg) translateZ(0);
opacity: 1;
}
}
@-webkit-keyframes cubeouttoright {
from {
-webkit-transform: rotateY(0deg) translateX(0);
opacity: 1;
}
to {
-webkit-transform: rotateY(90deg) translateZ(320px);
opacity: .5;
}
}
@-webkit-keyframes cubeinfromright {
from {
-webkit-transform: rotateY(90deg) translateZ(320px);
opacity: .5;
}
to {
-webkit-transform: rotateY(0deg) translateZ(0);
opacity: 1;
}
}
@-webkit-keyframes cubeouttoleft {
from {
-webkit-transform: rotateY(0deg) translateZ(0);
opacity: 1;
}
to {
-webkit-transform: rotateY(-90deg) translateZ(320px);
opacity: .5;
}
}
.pop {
-webkit-transform-origin: 50% 50%;
}
.pop.in {
-webkit-animation-name: popin;
z-index: 10;
}
.pop.out.reverse {
-webkit-animation-name: popout;
z-index: 10;
}
.pop.in.reverse {
z-index: 0;
-webkit-animation-name: dontmove;
}
@-webkit-keyframes popin {
from {
-webkit-transform: scale(.2);
opacity: 0;
}
to {
-webkit-transform: scale(1);
opacity: 1;
}
}
@-webkit-keyframes popout {
from {
-webkit-transform: scale(1);
opacity: 1;
}
to {
-webkit-transform: scale(.2);
opacity: 0;
}
}
-634
View File
@@ -1,634 +0,0 @@
/*
_/ _/_/ _/_/_/_/_/ _/
_/ _/ _/ _/_/ _/ _/ _/_/_/ _/_/_/
_/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
_/ _/_/ _/ _/ _/_/ _/_/_/ _/_/_/ _/ _/
_/
_/
Created by David Kaneda <http://www.davidkaneda.com>
Documentation and issue tracking on Google Code <http://code.google.com/p/jqtouch/>
Special thanks to Jonathan Stark <http://jonathanstark.com/>
and pinch/zoom <http://www.pinchzoom.com/>
(c) 2009 by jQTouch project members.
See LICENSE.txt for license.
$Revision: 109 $
$Date: 2009-10-06 12:23:30 -0400 (Tue, 06 Oct 2009) $
$LastChangedBy: davidcolbykaneda $
*/
(function($) {
$.jQTouch = function(options) {
// Set support values
$.support.WebKitCSSMatrix = (typeof WebKitCSSMatrix == "object");
$.support.touch = (typeof Touch == "object");
$.support.WebKitAnimationEvent = (typeof WebKitTransitionEvent == "object");
// Initialize internal variables
var $body,
$head=$('head'),
hist=[],
newPageCount=0,
jQTSettings={},
hashCheck,
currentPage,
orientation,
isMobileWebKit = RegExp(" Mobile/").test(navigator.userAgent),
tapReady=true,
lastAnimationTime=0,
touchSelectors=[],
publicObj={},
extensions=$.jQTouch.prototype.extensions,
defaultAnimations=['slide','flip','slideup','swap','cube','pop','dissolve','fade','back'],
animations=[],
hairextensions='';
// Get the party started
init(options);
function init(options) {
var defaults = {
addGlossToIcon: true,
backSelector: '.back, .cancel, .goback',
cacheGetRequests: true,
cubeSelector: '.cube',
dissolveSelector: '.dissolve',
fadeSelector: '.fade',
fixedViewport: true,
flipSelector: '.flip',
formSelector: 'form',
fullScreen: true,
fullScreenClass: 'fullscreen',
icon: null,
touchSelector: 'a, .touch',
popSelector: '.pop',
preloadImages: false,
slideSelector: 'body > * > ul li a',
slideupSelector: '.slideup',
startupScreen: null,
statusBar: 'default', // other options: black-translucent, black
submitSelector: '.submit',
swapSelector: '.swap',
useAnimations: true,
useFastTouch: true // Experimental.
};
jQTSettings = $.extend({}, defaults, options);
// Preload images
if (jQTSettings.preloadImages) {
for (var i = jQTSettings.preloadImages.length - 1; i >= 0; i--){
(new Image()).src = jQTSettings.preloadImages[i];
};
}
// Set icon
if (jQTSettings.icon) {
var precomposed = (jQTSettings.addGlossToIcon) ? '' : '-precomposed';
hairextensions += '<link rel="apple-touch-icon' + precomposed + '" href="' + jQTSettings.icon + '" />';
}
// Set startup screen
if (jQTSettings.startupScreen) {
hairextensions += '<link rel="apple-touch-startup-image" href="' + jQTSettings.startupScreen + '" />';
}
// Set viewport
if (jQTSettings.fixedViewport) {
hairextensions += '<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;"/>';
}
// Set full-screen
if (jQTSettings.fullScreen) {
hairextensions += '<meta name="apple-mobile-web-app-capable" content="yes" />';
if (jQTSettings.statusBar) {
hairextensions += '<meta name="apple-mobile-web-app-status-bar-style" content="' + jQTSettings.statusBar + '" />';
}
}
if (hairextensions) $head.append(hairextensions);
// Initialize on document load:
$(document).ready(function(){
// Add extensions
for (var i in extensions)
{
var fn = extensions[i];
if ($.isFunction(fn))
{
$.extend(publicObj, fn(publicObj));
}
}
// Add animations
for (var i in defaultAnimations)
{
var name = defaultAnimations[i];
var selector = jQTSettings[name + 'Selector'];
if (typeof(selector) == 'string') {
addAnimation({name:name, selector:selector});
}
}
touchSelectors.push('input');
touchSelectors.push(jQTSettings.touchSelector);
touchSelectors.push(jQTSettings.backSelector);
touchSelectors.push(jQTSettings.submitSelector);
$(touchSelectors.join(', ')).css('-webkit-touch-callout', 'none');
$(jQTSettings.backSelector).tap(liveTap);
$(jQTSettings.submitSelector).tap(submitParentForm);
$body = $('body');
if (jQTSettings.fullScreenClass && window.navigator.standalone == true) {
$body.addClass(jQTSettings.fullScreenClass + ' ' + jQTSettings.statusBar);
}
// Create custom live events
$body
.bind('touchstart', handleTouch)
.bind('orientationchange', updateOrientation)
.trigger('orientationchange')
.submit(submitForm);
if (jQTSettings.useFastTouch && $.support.touch)
{
$body.click(function(e){
var $el = $(e.target);
if ($el.attr('target') == '_blank' || $el.attr('rel') == 'external' || $el.is('input[type="checkbox"]'))
{
return true;
} else {
return false;
}
});
// This additionally gets rid of form focusses
$body.mousedown(function(e){
var timeDiff = (new Date()).getTime() - lastAnimationTime;
if (timeDiff < 200)
{
return false;
}
});
}
// Make sure exactly one child of body has "current" class
if ($('body > .current').length == 0) {
currentPage = $('body > *:first');
} else {
currentPage = $('body > .current:first');
$('body > .current').removeClass('current');
}
// Go to the top of the "current" page
$(currentPage).addClass('current');
location.hash = $(currentPage).attr('id');
addPageToHistory(currentPage);
scrollTo(0, 0);
dumbLoopStart();
});
}
// PUBLIC FUNCTIONS
function goBack(to) {
// Init the param
if (hist.length > 1) {
var numberOfPages = Math.min(parseInt(to || 1, 10), hist.length-1);
// Search through the history for an ID
if( isNaN(numberOfPages) && typeof(to) === "string" && to != '#' ) {
for( var i=1, length=hist.length; i < length; i++ ) {
if( '#' + hist[i].id === to ) {
numberOfPages = i;
break;
}
}
}
// If still nothing, assume one
if( isNaN(numberOfPages) || numberOfPages < 1 ) {
numberOfPages = 1;
};
// Grab the current page for the "from" info
var animation = hist[0].animation;
var fromPage = hist[0].page;
// Remove all pages in front of the target page
hist.splice(0, numberOfPages);
// Grab the target page
var toPage = hist[0].page;
// Make the animations
animatePages(fromPage, toPage, animation, true);
return publicObj;
} else {
console.error('No pages in history.');
return false;
}
}
function goTo(toPage, animation) {
var fromPage = hist[0].page;
if (typeof(toPage) === 'string') {
toPage = $(toPage);
}
if (typeof(animation) === 'string') {
for (var i = animations.length - 1; i >= 0; i--){
if (animations[i].name === animation)
{
animation = animations[i];
break;
}
}
}
if (animatePages(fromPage, toPage, animation)) {
addPageToHistory(toPage, animation);
return publicObj;
}
else
{
console.error('Could not animate pages.');
return false;
}
}
function getOrientation() {
return orientation;
}
// PRIVATE FUNCTIONS
function liveTap(e){
// Grab the clicked element
var $el = $(e.target);
if ($el.attr('nodeName')!=='A'){
$el = $el.parent('a');
}
var target = $el.attr('target'),
hash = $el.attr('hash'),
animation=null;
if (tapReady == false || !$el.length) {
console.warn('Not able to tap element.')
return false;
}
if ($el.attr('target') == '_blank' || $el.attr('rel') == 'external')
{
return true;
}
// Figure out the animation to use
for (var i = animations.length - 1; i >= 0; i--){
if ($el.is(animations[i].selector)) {
animation = animations[i];
break;
}
};
// User clicked an internal link, fullscreen mode
if (target == '_webapp') {
window.location = $el.attr('href');
}
// User clicked a back button
else if ($el.is(jQTSettings.backSelector)) {
goBack(hash);
}
// Branch on internal or external href
else if (hash && hash!='#') {
$el.addClass('active');
goTo($(hash).data('referrer', $el), animation);
} else {
$el.addClass('loading active');
showPageByHref($el.attr('href'), {
animation: animation,
callback: function(){
$el.removeClass('loading'); setTimeout($.fn.unselect, 250, $el);
},
$referrer: $el
});
}
return false;
}
function addPageToHistory(page, animation) {
// Grab some info
var pageId = page.attr('id');
// Prepend info to page history
hist.unshift({
page: page,
animation: animation,
id: pageId
});
}
function animatePages(fromPage, toPage, animation, backwards) {
// Error check for target page
if(toPage.length === 0){
$.fn.unselect();
console.error('Target element is missing.');
return false;
}
// Collapse the keyboard
$(':focus').blur();
// Make sure we are scrolled up to hide location bar
scrollTo(0, 0);
// Define callback to run after animation completes
var callback = function(event){
if (animation)
{
toPage.removeClass('in reverse ' + animation.name);
fromPage.removeClass('current out reverse ' + animation.name);
}
else
{
fromPage.removeClass('current');
}
toPage.trigger('pageAnimationEnd', { direction: 'in' });
fromPage.trigger('pageAnimationEnd', { direction: 'out' });
clearInterval(dumbLoop);
currentPage = toPage;
location.hash = currentPage.attr('id');
dumbLoopStart();
var $originallink = toPage.data('referrer');
if ($originallink) {
$originallink.unselect();
}
lastAnimationTime = (new Date()).getTime();
tapReady = true;
}
fromPage.trigger('pageAnimationStart', { direction: 'out' });
toPage.trigger('pageAnimationStart', { direction: 'in' });
if ($.support.WebKitAnimationEvent && animation && jQTSettings.useAnimations) {
toPage.one('webkitAnimationEnd', callback);
tapReady = false;
toPage.addClass(animation.name + ' in current ' + (backwards ? ' reverse' : ''));
fromPage.addClass(animation.name + ' out' + (backwards ? ' reverse' : ''));
} else {
toPage.addClass('current');
callback();
}
return true;
}
function dumbLoopStart() {
dumbLoop = setInterval(function(){
var curid = currentPage.attr('id');
if (location.hash == '') {
location.hash = '#' + curid;
} else if (location.hash != '#' + curid) {
try {
goBack(location.hash)
} catch(e) {
console.error('Unknown hash change.');
}
}
}, 100);
}
function insertPages(nodes, animation) {
var targetPage = null;
$(nodes).each(function(index, node){
var $node = $(this);
if (!$node.attr('id')) {
$node.attr('id', 'page-' + (++newPageCount));
}
$node.appendTo($body);
if ($node.hasClass('current') || !targetPage ) {
targetPage = $node;
}
});
if (targetPage !== null) {
goTo(targetPage, animation);
return targetPage;
}
else
{
return false;
}
}
function showPageByHref(href, options) {
var defaults = {
data: null,
method: 'GET',
animation: null,
callback: null,
$referrer: null
};
var settings = $.extend({}, defaults, options);
if (href != '#')
{
$.ajax({
url: href,
data: settings.data,
type: settings.method,
success: function (data, textStatus) {
var firstPage = insertPages(data, settings.animation);
if (firstPage)
{
if (settings.method == 'GET' && jQTSettings.cacheGetRequests && settings.$referrer)
{
settings.$referrer.attr('href', '#' + firstPage.attr('id'));
}
if (settings.callback) {
settings.callback(true);
}
}
},
error: function (data) {
if (settings.$referrer) settings.$referrer.unselect();
if (settings.callback) {
settings.callback(false);
}
}
});
}
else if ($referrer)
{
$referrer.unselect();
}
}
function submitForm(e, callback){
var $form = (typeof(e)==='string') ? $(e) : $(e.target);
if ($form.length && $form.is(jQTSettings.formSelector) && $form.attr('action')) {
showPageByHref($form.attr('action'), {
data: $form.serialize(),
method: $form.attr('method') || "POST",
animation: animations[0] || null,
callback: callback
});
return false;
}
return true;
}
function submitParentForm(e){
var $form = $(this).closest('form');
if ($form.length)
{
evt = jQuery.Event("submit");
evt.preventDefault();
$form.trigger(evt);
return false;
}
return true;
}
function addAnimation(animation) {
if (typeof(animation.selector) == 'string' && typeof(animation.name) == 'string') {
animations.push(animation);
$(animation.selector).tap(liveTap);
touchSelectors.push(animation.selector);
}
}
function updateOrientation() {
orientation = window.innerWidth < window.innerHeight ? 'profile' : 'landscape';
$body.removeClass('profile landscape').addClass(orientation).trigger('turn', {orientation: orientation});
// scrollTo(0, 0);
}
function handleTouch(e) {
var $el = $(e.target);
// Only handle touchSelectors
if (!$(e.target).is(touchSelectors.join(', ')))
{
var $link = $(e.target).closest('a');
if ($link.length){
$el = $link;
} else {
return;
}
}
if (event)
{
var hoverTimeout = null,
startX = event.changedTouches[0].clientX,
startY = event.changedTouches[0].clientY,
startTime = (new Date).getTime(),
deltaX = 0,
deltaY = 0,
deltaT = 0;
// Let's bind these after the fact, so we can keep some internal values
$el.bind('touchmove', touchmove).bind('touchend', touchend);
hoverTimeout = setTimeout(function(){
$el.makeActive();
}, 100);
}
// Private touch functions (TODO: insert dirty joke)
function touchmove(e) {
updateChanges();
var absX = Math.abs(deltaX);
var absY = Math.abs(deltaY);
// Check for swipe
if (absX > absY && (absX > 35) && deltaT < 1000) {
$el.trigger('swipe', {direction: (deltaX < 0) ? 'left' : 'right'}).unbind('touchmove touchend');
} else if (absY > 1) {
$el.removeClass('active');
}
clearTimeout(hoverTimeout);
}
function touchend(){
updateChanges();
if (deltaY === 0 && deltaX === 0) {
$el.makeActive();
// New approach:
// Fake the double click?
// TODO: Try with all click events (no tap)
// if (deltaT < 40)
// {
// setTimeout(function(){
// $el.trigger('touchstart')
// .trigger('touchend');
// }, 0);
// }
$el.trigger('tap');
} else {
$el.removeClass('active');
}
$el.unbind('touchmove touchend');
clearTimeout(hoverTimeout);
}
function updateChanges(){
var first = event.changedTouches[0] || null;
deltaX = first.pageX - startX;
deltaY = first.pageY - startY;
deltaT = (new Date).getTime() - startTime;
}
} // End touch handler
// Public jQuery Fns
$.fn.unselect = function(obj) {
if (obj) {
obj.removeClass('active');
} else {
$('.active').removeClass('active');
}
}
$.fn.makeActive = function(){
return $(this).addClass('active');
}
$.fn.swipe = function(fn) {
if ($.isFunction(fn))
{
return this.each(function(i, el){
$(el).bind('swipe', fn);
});
}
}
$.fn.tap = function(fn){
if ($.isFunction(fn))
{
var tapEvent = (jQTSettings.useFastTouch && $.support.touch) ? 'tap' : 'click';
return $(this).live(tapEvent, fn);
} else {
$(this).trigger('tap');
}
}
publicObj = {
getOrientation: getOrientation,
goBack: goBack,
goTo: goTo,
addAnimation: addAnimation,
submitForm: submitForm
}
return publicObj;
}
// Extensions directly manipulate the jQTouch object, before it's initialized.
$.jQTouch.prototype.extensions = [];
$.jQTouch.addExtension = function(extension){
$.jQTouch.prototype.extensions.push(extension);
}
})(jQuery);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,60 +0,0 @@
/*
_/ _/_/ _/_/_/_/_/ _/
_/ _/ _/ _/_/ _/ _/ _/_/_/ _/_/_/
_/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
_/ _/_/ _/ _/ _/_/ _/_/_/ _/_/_/ _/ _/
_/
_/
Created by David Kaneda <http://www.davidkaneda.com>
Documentation and issue tracking on Google Code <http://code.google.com/p/jqtouch/>
Special thanks to Jonathan Stark <http://jonathanstark.com/>
and pinch/zoom <http://www.pinchzoom.com/>
(c) 2009 by jQTouch project members.
See LICENSE.txt for license.
*/
(function($) {
$.fn.transition = function(css, options) {
return this.each(function(){
var $el = $(this);
var defaults = {
speed : '300ms',
callback: null,
ease: 'ease-in-out'
};
var settings = $.extend({}, defaults, options);
if(settings.speed === 0) {
$el.css(css);
window.setTimeout(settings.callback, 0);
} else {
if ($.browser.safari)
{
var s = [];
for(var i in css) {
s.push(i);
}
$el.css({
webkitTransitionProperty: s.join(", "),
webkitTransitionDuration: settings.speed,
webkitTransitionTimingFunction: settings.ease
});
if (settings.callback) {
$el.one('webkitTransitionEnd', settings.callback);
}
setTimeout(function(el){ el.css(css) }, 0, $el);
}
else
{
$el.animate(css, settings.speed, settings.callback);
}
}
});
}
})(jQuery);
File diff suppressed because one or more lines are too long
Binary file not shown.

Before

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 978 B

@@ -1,677 +0,0 @@
body {
background: rgb(0,0,0);
}
body > * {
background: rgb(197,204,211) url(img/pinstripes.png);
}
h1, h2 {
font: bold 18px Helvetica;
text-shadow: rgba(255,255,255,.2) 0 1px 1px;
color: rgb(76, 86, 108);
margin: 10px 20px 6px;
}
/* @group Toolbar */
.toolbar {
-webkit-box-sizing: border-box;
border-bottom: 1px solid #2d3642;
padding: 10px;
height: 45px;
background: url(img/toolbar.png) #6d84a2 repeat-x;
position: relative;
}
.black-translucent .toolbar {
margin-top: 20px;
}
.toolbar > h1 {
position: absolute;
overflow: hidden;
left: 50%;
top: 10px;
line-height: 1em;
margin: 1px 0 0 -75px;
height: 40px;
font-size: 20px;
width: 150px;
font-weight: bold;
text-shadow: rgba(0, 0, 0, 0.4) 0px -1px 0;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
color: #fff;
}
body.landscape .toolbar > h1 {
margin-left: -125px;
width: 250px;
}
.button, .back, .cancel, .add {
position: absolute;
overflow: hidden;
top: 8px;
right: 6px;
margin: 0;
border-width: 0 5px;
padding: 0 3px;
width: auto;
height: 30px;
line-height: 30px;
font-family: inherit;
font-size: 12px;
font-weight: bold;
color: #fff;
text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0;
text-overflow: ellipsis;
text-decoration: none;
white-space: nowrap;
background: none;
-webkit-border-image: url(img/toolButton.png) 0 5 0 5;
}
.button.active, .back.active, .cancel.active, .add.active {
-webkit-border-image: url(img/toolButton.png) 0 5 0 5;
}
.blueButton {
-webkit-border-image: url(img/blueButton.png) 0 5 0 5;
border-width: 0 5px;
}
.back {
left: 6px;
right: auto;
padding: 0;
max-width: 55px;
border-width: 0 8px 0 14px;
-webkit-border-image: url(img/backButton.png) 0 8 0 14;
}
.leftButton, .cancel {
left: 6px;
right: auto;
}
.add {
font-size: 24px;
line-height: 24px;
font-weight: bold;
}
.whiteButton,
.grayButton {
display: block;
border-width: 0 12px;
padding: 10px;
text-align: center;
font-size: 20px;
font-weight: bold;
text-decoration: inherit;
color: inherit;
}
.whiteButton {
-webkit-border-image: url(img/whiteButton.png) 0 12 0 12;
text-shadow: rgba(255, 255, 255, 0.7) 0 1px 0;
}
.grayButton {
-webkit-border-image: url(img/grayButton.png) 0 12 0 12;
color: #FFFFFF;
}
/* @end */
/* @group Lists */
h1 + ul, h2 + ul, h3 + ul, h4 + ul, h5 + ul, h6 + ul {
margin-top: 0;
}
ul {
color: black;
background: #fff;
border: 1px solid #B4B4B4;
font: bold 17px Helvetica;
padding: 0;
margin: 15px 10px 17px 10px;
-webkit-border-radius: 8px;
}
ul li {
color: #666;
border-top: 1px solid #B4B4B4;
list-style-type: none;
padding: 10px 10px 10px 10px;
}
/* when you have a first LI item on any list */
li:first-child, li:first-child a {
border-top: 0;
-webkit-border-top-left-radius: 8px;
-webkit-border-top-right-radius: 8px;
}
li:last-child, li:last-child a {
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
}
/* universal arrows */
ul li.arrow {
background-image: url(img/chevron.png);
background-position: right center;
background-repeat: no-repeat;
}
#plastic ul li.arrow, #metal ul li.arrow {
background-image: url(../images/chevron_dg.png);
background-position: right center;
background-repeat: no-repeat;
}
/* universal links on list */
ul li a, li.img a + a {
color: #000;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
padding: 12px 10px 12px 10px;
margin: -10px;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
ul li a.active {
background: #194fdb url(img/selection.png) 0 0 repeat-x;
color: #fff;
}
ul li a.button {
background-color: #194fdb;
color: #fff;
}
ul li.img a + a {
margin: -10px 10px -20px -5px;
font-size: 17px;
font-weight: bold;
}
ul li.img a + a + a {
font-size: 14px;
font-weight: normal;
margin-left: -10px;
margin-bottom: -10px;
margin-top: 0;
}
ul li.img a + small + a {
margin-left: -5px;
}
ul li.img a + small + a + a {
margin-left: -10px;
margin-top: -20px;
margin-bottom: -10px;
font-size: 14px;
font-weight: normal;
}
ul li.img a + small + a + a + a {
margin-left: 0px !important;
margin-bottom: 0;
}
ul li a + a {
color: #000;
font: 14px Helvetica;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
margin: 0;
padding: 0;
}
ul li a + a + a, ul li.img a + a + a + a, ul li.img a + small + a + a + a {
color: #666;
font: 13px Helvetica;
margin: 0;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
padding: 0;
}
/*
@end */
/* @group Forms */
ul.form li {
padding: 7px 10px;
}
ul.form li.error {
border: 2px solid red;
}
ul.form li.error + li.error {
border-top: 0;
}
ul.form li:hover {
background: #fff;
}
ul li input[type="text"], ul li input[type="password"], ul li textarea, ul li select {
color: #777;
background: #fff url(../.png);
border: 0;
font: normal 17px Helvetica;
padding: 0;
display: inline-block;
margin-left: 0px;
width: 100%;
-webkit-appearance: textarea;
}
ul li textarea {
height: 120px;
padding: 0;
text-indent: -2px;
}
ul li select {
text-indent: 0px;
background: transparent url(../images/chevron.png) no-repeat 103% 3px;
-webkit-appearance: textfield;
margin-left: -6px;
width: 104%;
}
ul li input[type="checkbox"], ul li input[type="radio"] {
margin: 0;
color: rgb(50,79,133);
padding: 10px 10px;
}
ul li input[type="checkbox"]:after, ul li input[type="radio"]:after {
content: attr(title);
font: 17px Helvetica;
display: block;
width: 246px;
margin: -12px 0 0 17px;
}
/* @end */
/* @group Edge to edge */
.edgetoedge h4 {
color: #fff;
background: rgb(154,159,170) url(img/listGroup.png) top left repeat-x;
border-top: 1px solid rgb(165,177,186);
text-shadow: #666 0 1px 0;
margin: 0;
padding: 2px 10px;
}
.edgetoedge, .metal {
margin: 0;
padding: 0;
background-color: rgb(255,255,255);
}
.edgetoedge ul, .metal ul, .plastic ul {
-webkit-border-radius: 0;
margin: 0;
border-left: 0;
border-right: 0;
border-top: 0;
}
.metal ul {
border-top: 0;
border-bottom: 0;
background: rgb(180,180,180);
}
.edgetoedge ul li:first-child, .edgetoedge ul li:first-child a, .edgetoedge ul li:last-child, .edgetoedge ul li:last-child a, .metal ul li:first-child a, .metal ul li:last-child a {
-webkit-border-radius: 0;
}
.edgetoedge ul li small {
font-size: 16px;
line-height: 28px;
}
.edgetoedge li, .metal li {
-webkit-border-radius: 0;
}
.edgetoedge li em {
font-weight: normal;
font-style: normal;
}
.edgetoedge h4 + ul {
border-top: 1px solid rgb(152,158,164);
border-bottom: 1px solid rgb(113,125,133);
}
/* @end */
/* @group Mini Label */
ul li small {
color: #369;
font: 17px Helvetica;
text-align: right;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
width: 23%;
float: right;
padding: 3px 0px;
}
ul li.arrow small {
padding: 0 15px;
}
ul li small.counter {
font-size: 17px !important;
line-height: 13px !important;
font-weight: bold;
background: rgb(154,159,170);
color: #fff;
-webkit-border-radius: 11px;
padding: 4px 10px 5px 10px;
display: inline !important;
width: auto;
margin-top: -22px;
}
ul li.arrow small.counter {
margin-right: 15px;
}
/* @end */
/* @group Plastic */
#plastic ul li.arrow, #metal ul li.arrow {
background-image: url(img/listArrow.png);
background-position: right center;
background-repeat: no-repeat;
}
.edgetoedge ul, .metal ul, .plastic ul {
-webkit-border-radius: 0;
margin: 0;
border-left: 0;
border-right: 0;
border-top: 0;
}
.metal ul li {
border-top: 1px solid rgb(238,238,238);
border-bottom: 1px solid rgb(156,158,165);
background: url(../images/bgMetal.png) top left repeat-x;
font-size: 26px;
text-shadow: #fff 0 1px 0;
}
.metal ul li a {
line-height: 26px;
margin: 0;
padding: 13px 0;
}
.metal ul li a:hover {
color: rgb(0,0,0);
}
.metal ul li:hover small {
color: inherit;
}
.metal ul li a em {
display: block;
font-size: 14px;
font-style: normal;
color: #444;
width: 50%;
line-height: 14px;
}
.metal ul li small {
float: right;
position: relative;
margin-top: 10px;
font-weight: bold;
}
.metal ul li.arrow a small {
padding-right: 0;
line-height: 17px;
}
.metal ul li.arrow {
background: url(../images/bgMetal.png) top left repeat-x,
url(../images/chevron_dg.png) right center no-repeat;
}
.plastic {
margin: 0;
padding: 0;
background: rgb(173,173,173);
}
.plastic ul {
-webkit-border-radius: 0;
margin: 0;
border-left: 0;
border-right: 0;
border-top: 0;
background-color: rgb(173,173,173);
}
.plastic ul li {
-webkit-border-radius: 0;
border-top: 1px solid rgb(191,191,191);
border-bottom: 1px solid rgb(157,157,157);
}
.plastic ul li:nth-child(odd) {
background-color: rgb(152,152,152);
border-top: 1px solid rgb(181,181,181);
border-bottom: 1px solid rgb(138,138,138);
}
.plastic ul + p {
font-size: 11px;
color: #2f3237;
text-shadow: none;
padding: 10px 10px;
}
.plastic ul + p strong {
font-size: 14px;
line-height: 18px;
text-shadow: #fff 0 1px 0;
}
.plastic ul li a {
text-shadow: rgb(211,211,211) 0 1px 0;
}
.plastic ul li:nth-child(odd) a {
text-shadow: rgb(191,191,191) 0 1px 0;
}
.plastic ul li small {
color: #3C3C3C;
text-shadow: rgb(211,211,211) 0 1px 0;
font-size: 13px;
font-weight: bold;
text-transform: uppercase;
line-height: 24px;
}
#plastic ul.minibanner, #plastic ul.bigbanner {
margin: 10px;
border: 0;
height: 81px;
clear: both;
}
#plastic ul.bigbanner {
height: 140px !important;
}
#plastic ul.minibanner li {
border: 1px solid rgb(138,138,138);
background-color: rgb(152,152,152);
width: 145px;
height: 81px;
float: left;
-webkit-border-radius: 5px;
padding: 0;
}
#plastic ul.bigbanner li {
border: 1px solid rgb(138,138,138);
background-color: rgb(152,152,152);
width: 296px;
height: 140px;
float: left;
-webkit-border-radius: 5px;
padding: 0;
margin-bottom: 4px;
}
#plastic ul.minibanner li:first-child {
margin-right: 6px;
}
#plastic ul.minibanner li a {
color: transparent;
text-shadow: none;
display: block;
width: 145px;
height: 81px;
}
#plastic ul.bigbanner li a {
color: transparent;
text-shadow: none;
display: block;
width: 296px;
height: 145px;
}
/* @end */
/* @group Individual */
ul.individual {
border: 0;
background: none;
clear: both;
overflow: hidden;
}
ul.individual li {
color: rgb(183,190,205);
background: white;
border: 1px solid rgb(180,180,180);
font-size: 14px;
text-align: center;
-webkit-border-radius: 8px;
-webkit-box-sizing: border-box;
width: 48%;
float: left;
display: block;
padding: 11px 10px 14px 10px;
}
ul.individual li + li {
float: right;
}
ul.individual li a {
color: rgb(50,79,133);
line-height: 16px;
margin: -11px -10px -14px -10px;
padding: 11px 10px 14px 10px;
-webkit-border-radius: 8px;
}
ul.individual li a:hover {
color: #fff;
background: #36c;
}
/* @end */
/* @group Toggle */
.toggle {
width: 94px;
position: relative;
height: 27px;
display: block;
overflow: hidden;
float: right;
}
.toggle input[type="checkbox"]:checked {
left: 0px;
}
.toggle input[type="checkbox"] {
-webkit-tap-highlight-color: rgba(0,0,0,0);
margin: 0;
-webkit-border-radius: 5px;
background: #fff url(img/on_off.png) 0 0 no-repeat;
height: 27px;
overflow: hidden;
width: 149px;
border: 0;
-webkit-appearance: textarea;
background-color: transparent;
-webkit-transition: left .15s;
position: absolute;
top: 0;
left: -55px;
}
/* @end */
.info {
background: #dce1eb;
font-size: 12px;
line-height: 16px;
text-align: center;
text-shadow: rgba(255,255,255,.8) 0 1px 0;
color: rgb(76, 86, 108);
padding: 15px;
border-top: 1px solid rgba(76, 86, 108, .3);
font-weight: bold;
}
File diff suppressed because one or more lines are too long
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 805 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 978 B

@@ -1,527 +0,0 @@
body {
background: #000;
color: #ddd;
}
body > * {
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#333), to(#5e5e65));
}
h1, h2 {
font: bold 18px Helvetica;
text-shadow: rgba(255,255,255,.2) 0 1px 1px;
color: #000;
margin: 10px 20px 5px;
}
/* @group Toolbar */
.toolbar {
-webkit-box-sizing: border-box;
border-bottom: 1px solid #000;
padding: 10px;
height: 45px;
background: url(img/toolbar.png) #000000 repeat-x;
position: relative;
}
.black-translucent .toolbar {
margin-top: 20px;
}
.toolbar > h1 {
position: absolute;
overflow: hidden;
left: 50%;
top: 10px;
line-height: 1em;
margin: 1px 0 0 -75px;
height: 40px;
font-size: 20px;
width: 150px;
font-weight: bold;
text-shadow: rgba(0,0,0,1) 0 -1px 1px;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
color: #fff;
}
body.landscape .toolbar > h1 {
margin-left: -125px;
width: 250px;
}
.button, .back, .cancel, .add {
position: absolute;
overflow: hidden;
top: 8px;
right: 10px;
margin: 0;
border-width: 0 5px;
padding: 0 3px;
width: auto;
height: 30px;
line-height: 30px;
font-family: inherit;
font-size: 12px;
font-weight: bold;
color: #fff;
text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0;
text-overflow: ellipsis;
text-decoration: none;
white-space: nowrap;
background: none;
-webkit-border-image: url(img/button.png) 0 5 0 5;
}
.blueButton {
-webkit-border-image: url(img/blueButton.png) 0 5 0 5;
border-width: 0 5px;
}
.back {
left: 6px;
right: auto;
padding: 0;
max-width: 55px;
border-width: 0 8px 0 14px;
-webkit-border-image: url(img/back_button.png) 0 8 0 14;
}
.back.active {
-webkit-border-image: url(img/back_button_clicked.png) 0 8 0 14;
color: #aaa;
}
.leftButton, .cancel {
left: 6px;
right: auto;
}
.add {
font-size: 24px;
line-height: 24px;
font-weight: bold;
}
.whiteButton,
.grayButton {
display: block;
border-width: 0 12px;
padding: 10px;
text-align: center;
font-size: 20px;
font-weight: bold;
text-decoration: inherit;
color: inherit;
}
.whiteButton {
-webkit-border-image: url(img/whiteButton.png) 0 12 0 12;
text-shadow: rgba(255, 255, 255, 0.7) 0 1px 0;
}
.grayButton {
-webkit-border-image: url(img/grayButton.png) 0 12 0 12;
color: #FFFFFF;
}
/* @end */
/* @group Lists */
h1 + ul, h2 + ul, h3 + ul, h4 + ul, h5 + ul, h6 + ul {
margin-top: 0;
}
ul {
color: #aaa;
border: 1px solid #333333;
font: bold 18px Helvetica;
padding: 0;
margin: 15px 10px 17px 10px;
}
ul.rounded {
-webkit-border-radius: 8px;
-webkit-box-shadow: rgba(0,0,0,.3) 1px 1px 3px;
}
ul.rounded li:first-child, ul.rounded li:first-child a {
border-top: 0;
-webkit-border-top-left-radius: 8px;
-webkit-border-top-right-radius: 8px;
}
ul.rounded li:last-child, ul.rounded li:last-child a {
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
}
ul li {
color: #666;
border-top: 1px solid #333;
border-bottom: #555858;
list-style-type: none;
padding: 10px 10px 10px 10px;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4c4d4e), to(#404142));
overflow: hidden;
}
ul li.arrow {
background-image: url(img/chevron.png), -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4c4d4e), to(#404142));
background-position: right center;
background-repeat: no-repeat;
}
ul li.forward {
background-image: url(img/chevron_circle.png), -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4c4d4e), to(#404142));
background-position: right center;
background-repeat: no-repeat;
}
/* universal links on list */
ul li a, li.img a + a {
color: #fff;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
padding: 12px 10px 12px 10px;
margin: -10px;
-webkit-tap-highlight-color: rgba(0,0,0,0);
text-shadow: rgba(0,0,0,.2) 0 1px 1px;
}
ul li a.active, ul li a.button {
background-color: #53b401;
color: #fff;
}
ul li a.active.loading {
background-image: url(img/loading.gif);
background-position: 95% center;
background-repeat: no-repeat;
}
ul li.arrow a.active {
background-image: url(img/chevron.png);
background-position: right center;
background-repeat: no-repeat;
}
ul li.forward a.active {
background-image: url(img/chevron_circle.png);
background-position: right center;
background-repeat: no-repeat;
}
ul li.img a + a {
margin: -10px 10px -20px -5px;
font-size: 17px;
font-weight: bold;
}
ul li.img a + a + a {
font-size: 14px;
font-weight: normal;
margin-left: -10px;
margin-bottom: -10px;
margin-top: 0;
}
ul li.img a + small + a {
margin-left: -5px;
}
ul li.img a + small + a + a {
margin-left: -10px;
margin-top: -20px;
margin-bottom: -10px;
font-size: 14px;
font-weight: normal;
}
ul li.img a + small + a + a + a {
margin-left: 0px !important;
margin-bottom: 0;
}
ul li a + a {
color: #000;
font: 14px Helvetica;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
margin: 0;
padding: 0;
}
ul li a + a + a, ul li.img a + a + a + a, ul li.img a + small + a + a + a {
color: #666;
font: 13px Helvetica;
margin: 0;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
padding: 0;
}
/*
@end */
/* @group Forms */
ul.form li {
padding: 7px 10px;
}
ul.form li.error {
border: 2px solid red;
}
ul.form li.error + li.error {
border-top: 0;
}
ul li input[type="text"], ul li input[type="password"], ul li textarea, ul li select {
color: #777;
background: transparent url(../.png);
border: 0;
font: normal 17px Helvetica;
padding: 0;
display: inline-block;
margin-left: 0px;
width: 100%;
-webkit-appearance: textarea;
}
ul li textarea {
height: 120px;
padding: 0;
text-indent: -2px;
}
ul li select {
text-indent: 0px;
background: transparent url(img/chevron.png) no-repeat right center;
-webkit-appearance: textfield;
margin-left: -6px;
width: 104%;
}
ul li input[type="checkbox"], ul li input[type="radio"] {
margin: 0;
padding: 10px 10px;
}
ul li input[type="checkbox"]:after, ul li input[type="radio"]:after {
content: attr(title);
font: 17px Helvetica;
display: block;
width: 246px;
color: #777;
margin: -12px 0 0 17px;
}
/* @end */
/* @group Mini Label */
ul li small {
color: #64c114;
font: 17px Helvetica;
text-align: right;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
width: 23%;
float: right;
padding: 0;
}
ul li.arrow small {
padding: 0 15px;
}
ul li small.counter {
font-size: 17px;
line-height: 13px;
font-weight: bold;
background: rgba(0,0,0,.15);
color: #fff;
-webkit-border-radius: 11px;
padding: 4px 10px 5px 10px;
display: block;
width: auto;
margin-top: -22px;
-webkit-box-shadow: rgba(255,255,255,.1) 0 1px 0;
}
ul li.arrow small.counter {
margin-right: 15px;
}
/* @end */
/* @group Individual */
ul.individual {
border: 0;
background: none;
clear: both;
overflow: hidden;
padding-bottom: 3px;
-webkit-box-shadow: none;
}
ul.individual li {
background: #4c4d4e;
border: 1px solid #333;
font-size: 14px;
text-align: center;
-webkit-border-radius: 8px;
-webkit-box-sizing: border-box;
width: 48%;
float: left;
display: block;
padding: 11px 10px 14px 10px;
-webkit-box-shadow: rgba(0,0,0,.2) 1px 1px 3px;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4c4d4e), to(#404142));
}
ul.individual li + li {
float: right;
}
ul.individual li a {
color: #fff;
line-height: 16px;
margin: -11px -10px -14px -10px;
padding: 11px 10px 14px 10px;
-webkit-border-radius: 8px;
}
/* @end */
/* @group Toggle */
.toggle {
width: 94px;
position: relative;
height: 27px;
display: block;
overflow: hidden;
float: right;
}
.toggle input[type="checkbox"]:checked {
left: 0px;
}
.toggle input[type="checkbox"] {
-webkit-appearance: textarea;
-webkit-border-radius: 5px;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-transition: left .15s;
background-color: transparent;
background: #fff url(img/on_off.png) 0 0 no-repeat;
border: 0;
height: 27px;
left: -55px;
margin: 0;
overflow: hidden;
position: absolute;
top: 0;
width: 149px;
}
/* @end */
/* @group Info */
.info {
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ccc), to(#aaa), color-stop(.6,#CCCCCC));
font-size: 12px;
line-height: 16px;
text-align: center;
text-shadow: rgba(255,255,255,.8) 0 1px 0;
color: #444;
padding: 15px;
border-top: 1px solid rgba(255,255,255,.2);
font-weight: bold;
}
/* @end */
/* @group Edge to edge */
ul.edgetoedge {
border-width: 1px 0;
margin: 0;
padding: 0;
}
ul.edgetoedge li {
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#1e1f21), to(#272729));
border-bottom: 2px solid #000;
border-top: 1px solid #4a4b4d;
font-size: 20px;
margin-bottom: -1px;
}
ul.edgetoedge li.sep {
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0,0,0,0)), to(rgba(0,0,0,.5)));
border-bottom: 1px solid #111113;
border-top: 1px solid #666;
color: #3e9ac3;
font-size: 16px;
margin: 1px 0 0 0;
padding: 2px 10px;
text-shadow: #000 0 1px 0;
}
ul.edgetoedge li em {
font-weight: normal;
font-style: normal;
}
/* @end */
/* @group Plastic */
#plastic {
background: #17181a;
}
ul.plastic {
background: #17181a;
color: #aaa;
font: bold 18px Helvetica;
margin: 0;
padding: 0;
border-width: 0 0 1px 0;
}
ul.plastic li {
border-width: 1px 0;
border-style: solid;
border-top-color: #222;
border-bottom-color: #000;
color: #666;
list-style-type: none;
overflow: hidden;
padding: 10px 10px 10px 10px;
}
ul.plastic li a.active.loading {
background-image: url(img/loading.gif);
background-position: 95% center;
background-repeat: no-repeat;
}
ul.plastic li small {
color: #888;
font-size: 13px;
font-weight: bold;
line-height: 24px;
text-transform: uppercase;
}
ul.plastic li:nth-child(odd) {
background-color: #1c1c1f;
}
ul.plastic li.arrow {
background-image: url(img/chevron.png);
background-position: right center;
background-repeat: no-repeat;
}
ul.plastic li.arrow a.active {
background-image: url(img/chevron.png);
background-position: right center;
background-repeat: no-repeat;
}
ul.plastic li.forward {
background-image: url(img/chevron_circle.png);
background-position: right center;
background-repeat: no-repeat;
}
ul.plastic li.forward a.active {
background-image: url(img/chevron_circle.png);
background-position: right center;
background-repeat: no-repeat;
}
/* @group Metal */
ul.metal {
border-bottom: 0;
border-left: 0;
border-right: 0;
border-top: 0;
margin: 0;
}
ul.metal li {
background-image: none;
border-top: 1px solid #fff;
border-bottom: 1px solid #666;
font-size: 26px;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(238,238,238,1)), to(rgba(156,158,160,1)));
}
ul.metal li a {
line-height: 26px;
margin: 0;
text-shadow: #fff 0 1px 0;
padding: 13px 0;
}
ul.metal li a em {
display: block;
font-size: 14px;
font-style: normal;
color: #444;
width: 50%;
line-height: 14px;
}
ul.metal li a.active {
color: rgb(0,0,0);
}
ul.metal li small {
float: right;
position: relative;
margin-top: 10px;
font-weight: bold;
}
ul.metal li.arrow {
background-image: url(img/chevron.png);
background-position: right center;
background-repeat: no-repeat;
background-image: url(img/chevron.png), -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(238,238,238,1)), to(rgba(156,158,160,1)));
background-repeat: no-repeat;
background-position: right center;
}
ul.metal li.arrow a small {
padding-right: 15px;
line-height: 17px;
}
/* @end */
File diff suppressed because one or more lines are too long
@@ -14,6 +14,7 @@
}
var unzip = new uDocumentation.Busineslogic.GithubSourcePull.ZipDownloader(rootFolderPath, configPath);
unzip.IsProjectDocumentation = true;
unzip.Run();
}
else
@@ -12,306 +12,7 @@
<div class="sidebar-area">
<div class="sidebar-content">
<div class="content-wrapper">
<nav>
<ul class="level-1">
<li>
<a href=""><h3>Getting started</h3></a>
<ul class="level-2 open">
<li>
<a href=""><h4>Setup</h4></a>
<ul class="level-3">
<li><a href=""><h5>Requirements</h5></a></li>
<li>
<a href=""><h5>Install</h5></a>
</li>
<li>
<a href=""><h5>Config</h5></a>
</li>
<li>
<a href=""><h5>Server setup</h5></a>
</li>
</ul>
</li>
<li>
<a href=""><h4>Data</h4></a>
<ul class="level-3">
<li>
<a href=""><h5>Doc types</h5></a>
</li>
<li>
<a href=""><h5>Data types</h5></a>
</li>
<li>
<a href=""><h5>Content entry</h5></a>
</li>
</ul>
</li>
<li>
<a href=""><h4>Design</h4></a>
<ul class="level-3 open">
<li>
<a href=""><h5>Templates</h5></a>
</li>
<li>
<a href=""><h5>Razor</h5></a>
</li>
<li>
<a href=""><h5>Content/Media API</h5></a>
</li>
</ul>
</li>
<li>
<a href=""><h4>Code</h4></a>
<ul class="level-3">
<li>
<a href=""><h5>MVC</h5></a>
</li>
<li>
<a href=""><h5>Events</h5></a>
</li>
<li>
<a href=""><h5>Forms/Conttrollers</h5></a>
</li>
</ul>
</li>
<li>
<a href=""><h4>Extend</h4></a>
<ul class="level-3">
<li>
<a href=""><h5>Property Editors</h5></a>
</li>
<li>
<a href=""><h5>Trees</h5></a>
</li>
<li>
<a href=""><h5>Editors</h5></a>
</li>
<li>
<a href=""><h5>Angular JS</h5></a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a class="active" href=""><h3>Implementation</h3></a>
<ul class="level-2">
<li>
<a href=""><h4>Routing</h4></a>
<ul class="level-3">
<li>
<a href=""><h5>Routing</h5></a>
</li>
<li>
<a href=""><h5>Pipeline</h5></a>
</li>
<li>
<a href=""><h5>MVC</h5></a>
</li>
<li>
<a href=""><h5>Request</h5></a>
</li>
</ul>
</li>
<li>
<a href=""><h4>Content definition</h4></a>
<ul class="level-3">
<li>
<a href=""><h5>HTML</h5></a>
</li>
<li>
<a href=""><h5>CSS</h5></a>
</li>
<li>
<a href=""><h5>JS</h5></a>
</li>
<li>
<h5>Clientdependency</h5>
</li>
</ul>
</li>
<li>
<a href=""><h4>Templating</h4></a>
<ul class="level-3">
<li>
<a href=""><h5>MVC</h5></a>
</li>
<li>
<a href=""><h5>Templating</h5></a>
</li>
<li>
<a href=""><h5>Rendering</h5></a>
</li>
<li>
<a href=""><h5>Razor</h5></a>
</li>
<li>
<a href=""><h5>Content APIs</h5></a>
</li>
</ul>
</li>
<li>
<a href=""><h4>Query data</h4></a>
<ul class="level-3">
<li>
<a href=""><h5>Events</h5></a>
</li>
<li>
<a href=""><h5>APIs</h5></a>
</li>
<li>
<a href=""><h5>Services</h5></a>
</li>
<li>
<a href=""><h5>Lowerlevel APIs</h5></a>
</li>
</ul>
</li>
<li>
<a href=""><h4>Client side</h4></a>
<ul class="level-3">
<li>
<a href=""><h5>Tables</h5></a>
</li>
<li>
<a href=""><h5>Schemas</h5></a>
</li>
<li>
<a href=""><h5>Migrations</h5></a>
</li>
<li>
<a href=""><h5>Upgrades</h5></a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a class="active" href=""><h3>Extending</h3></a>
<ul class="level-2">
<li>
<a href=""><h4>Property Editors</h4></a>
<ul class="level-3">
<li>
<a href=""><h5>Package manifest</h5></a>
</li>
<li>
<a href=""><h5>Controller</h5></a>
</li>
<li>
<a href=""><h5>Views</h5></a>
</li>
<li>
<a href=""><h5>Dependencies</h5></a>
</li>
</ul>
</li>
<li>
<a href=""><h4>Dashboards</h4></a>
<ul class="level-3">
<li>
<a href=""><h5>View</h5></a>
</li>
<li>
<a href=""><h5>Sections</h5></a>
</li>
<li>
<a href=""><h5>Controller</h5></a>
</li>
</ul>
</li>
<li>
<a href=""><h4>Sections</h4></a>
<ul class="level-3">
<li>
<a href=""><h5>MVC</h5></a>
</li>
<li>
<a href=""><h5>Templating</h5></a>
</li>
<li>
<a href=""><h5>Rendering</h5></a>
</li>
<li>
<a href=""><h5>Razor</h5></a>
</li>
<li>
<a href=""><h5>Content APIs</h5></a>
</li>
</ul>
</li>
<li>
<a href=""><h4>Trees</h4></a>
<ul class="level-3">
<li>
<a href=""><h5>Events</h5></a>
</li>
<li>
<a href=""><h5>APIs</h5></a>
</li>
<li>
<a href=""><h5>Services</h5></a>
</li>
<li>
<a href=""><h5>Lowerlevel APIs</h5></a>
</li>
</ul>
</li>
<li>
<a href=""><h4>Packages</h4></a>
<ul class="level-3">
<li>
<a href=""><h5>Tables</h5></a>
</li>
<li>
<a href=""><h5>Schemas</h5></a>
</li>
<li>
<a href=""><h5>Migrations</h5></a>
</li>
<li>
<a href=""><h5>Upgrades</h5></a>
</li>
</ul>
</li>
<li>
<a href=""><h4>Languages</h4></a>
<ul class="level-3">
<li>
<a href=""><h5>Add language</h5></a>
</li>
<li>
<a href=""><h5>Modify language</h5></a>
</li>
</ul>
</li>
<li>
<a href=""><h4>Database</h4></a>
<ul class="level-3">
<li>
<a href=""><h5>Tables</h5></a>
</li>
<li>
<a href=""><h5>Schemas</h5></a>
</li>
<li>
<a href=""><h5>Migrations</h5></a>
</li>
<li>
<a href=""><h5>Upgrades</h5></a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<h3>Umbraco v4/v6</h3>
</li>
</ul>
</nav>
<umbraco:Macro Alias="[Docs]Navigation" runat="server"></umbraco:Macro>
</div><!-- .content-wrapper -->
</div><!-- .sidebar-content -->
</div><!-- .sidebar-area-->
@@ -320,11 +21,11 @@
<div class="main-content">
<div class="content-wrapper">
<div>
<umbraco:Macro linkToCurrent="1" Alias="Breadcrumb" runat="server"></umbraco:Macro>
<umbraco:Macro Alias="[Docs]Breadcrumb" runat="server"></umbraco:Macro>
</div>
<div id="markdown-docs" class="markdown-syntax">
<markdown:Doc ID="Markdown" runat="server" AddHeader="False" PrefixLinks="False" />
<umbraco:Macro Alias="[Docs]DisplayMarkdown" runat="server"></umbraco:Macro>
</div>
</div><!-- .content-wrapper -->
</div><!-- .main-content -->
@@ -1,4 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DocumentationBreadcrumb.ascx.cs" Inherits="uDocumentation.usercontrols.DocumentationBreadcrumb" %>
<ul id="breadcrumb">
<%= GetBreadcrumb() %>
</ul>
@@ -1,3 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DocumentationEditButton.ascx.cs" Inherits="uDocumentation.usercontrols.DocumentationEditButton" %>
<a id="editLink" runat="server" Visible="False" class="edit-doc-btn voting rounded">Edit</a>
@@ -1,3 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DocumentationShowMarkdown.ascx.cs" Inherits="uDocumentation.usercontrols.DocumentationShowMarkdown" %>
<asp:Label runat="server" ID="lblHeader"></asp:Label>
<asp:Label runat="server" ID="lblMarkdownOutput"></asp:Label>
+13 -3
View File
@@ -1,8 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OurUmbraco.Site", "OurUmbraco.Site\OurUmbraco.Site.csproj", "{911907FB-3B9D-4E5F-9A45-16700A451A54}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{84E122E2-FB7D-4732-A764-B6EFB1F524DE}"
@@ -38,6 +36,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{F3A30E
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uWiki", "uWiki\uWiki.csproj", "{996601FA-5C0E-46A6-B39D-2863BADC80D8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uRelease", "uRelease\uRelease.csproj", "{C5B74E6A-ABCE-4A9A-896D-89C33FDAFCD8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -158,6 +158,16 @@ Global
{996601FA-5C0E-46A6-B39D-2863BADC80D8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{996601FA-5C0E-46A6-B39D-2863BADC80D8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{996601FA-5C0E-46A6-B39D-2863BADC80D8}.Release|x86.ActiveCfg = Release|Any CPU
{C5B74E6A-ABCE-4A9A-896D-89C33FDAFCD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C5B74E6A-ABCE-4A9A-896D-89C33FDAFCD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C5B74E6A-ABCE-4A9A-896D-89C33FDAFCD8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{C5B74E6A-ABCE-4A9A-896D-89C33FDAFCD8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{C5B74E6A-ABCE-4A9A-896D-89C33FDAFCD8}.Debug|x86.ActiveCfg = Debug|Any CPU
{C5B74E6A-ABCE-4A9A-896D-89C33FDAFCD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C5B74E6A-ABCE-4A9A-896D-89C33FDAFCD8}.Release|Any CPU.Build.0 = Release|Any CPU
{C5B74E6A-ABCE-4A9A-896D-89C33FDAFCD8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{C5B74E6A-ABCE-4A9A-896D-89C33FDAFCD8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{C5B74E6A-ABCE-4A9A-896D-89C33FDAFCD8}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -8,11 +8,19 @@ using System.Net;
using ICSharpCode.SharpZipLib.Zip;
using System.Diagnostics;
using umbraco.BusinessLogic;
using System.Dynamic;
using Newtonsoft.Json;
namespace uDocumentation.Busineslogic.GithubSourcePull
{
public class ZipDownloader
{
private const string rootFolder = @"~\Documentation";
private const string config = @"~\config\githubpull.config";
private string rootFolderPath = HttpContext.Current.Server.MapPath(rootFolder);
private string configPath = HttpContext.Current.Server.MapPath(config);
public string RootFolder { get; set; }
public XmlDocument Configuration { get; set; }
public bool IsProjectDocumentation { get; set; }
@@ -24,6 +32,16 @@ namespace uDocumentation.Busineslogic.GithubSourcePull
IsProjectDocumentation = false;
}
public ZipDownloader()
{
XmlDocument xd = new XmlDocument();
xd.Load(configPath);
Configuration = xd;
RootFolder = rootFolderPath;
IsProjectDocumentation = false;
}
public ZipDownloader(string rootFolder, string configurationPath)
{
XmlDocument xd = new XmlDocument();
@@ -64,25 +82,64 @@ namespace uDocumentation.Busineslogic.GithubSourcePull
process(url, folder);
}
FinishEventArgs ev = new FinishEventArgs();
FireOnFinish(ev);
}
public dynamic DocumentationSiteMap(string folder = "")
{
var path = Path.Combine(RootFolder, folder, "sitemap.js");
var json = File.ReadAllText(path);
dynamic d = JsonConvert.DeserializeObject<dynamic>(json);
return d;
}
public void process(string url, string foldername)
{
var zip = Download(url, foldername);
unzip(zip, foldername, RootFolder);
BuildSitemap(foldername);
}
private void BuildSitemap(string foldername)
{
var folder = new DirectoryInfo(Path.Combine(RootFolder, foldername));
dynamic root = GetFolderStructure(folder, folder.FullName, 0);
var serializedRoot = JsonConvert.SerializeObject(root, Newtonsoft.Json.Formatting.Indented);
File.WriteAllText(Path.Combine(folder.FullName, "sitemap.js"), serializedRoot);
}
private dynamic GetFolderStructure(DirectoryInfo dir, string rootPath, int level)
{
dynamic d = new ExpandoObject();
d.name = dir.Name;
d.path = dir.FullName.Substring(rootPath.Length).Replace('\\','/');
d.level = level;
if (dir.GetDirectories().Any())
{
var list = new List<dynamic>();
foreach (var child in dir.GetDirectories())
list.Add(GetFolderStructure(child, rootPath, level+1));
d.hasChildren = true;
d.directories = list;
}
return d;
}
private string Download(string url, string foldername)
{
var dir = new DirectoryInfo(Path.Combine(RootFolder, foldername));
var dirsToCreate = new List<DirectoryInfo>();
while (!dir.Exists)
{
dirsToCreate.Add(dir);
dir = dir.Parent;
}
@@ -93,7 +150,7 @@ namespace uDocumentation.Busineslogic.GithubSourcePull
d.Create();
}
var path = Path.Combine(RootFolder, foldername + ".zip");
var path = Path.Combine(RootFolder, foldername + "archive.zip");
if (File.Exists(path))
File.Delete(path);
@@ -104,6 +161,7 @@ namespace uDocumentation.Busineslogic.GithubSourcePull
return path;
}
private void unzip(string path, string foldername, string rootFolder)
{
ZipInputStream s = new ZipInputStream(File.OpenRead(path));
@@ -116,8 +174,14 @@ namespace uDocumentation.Busineslogic.GithubSourcePull
if (Directory.Exists(serverFolder))
{
var files = string.Join("|", Directory.GetFiles(serverFolder, "*.md", SearchOption.AllDirectories)).ToLower().Split('|');
existingFiles.AddRange(files);
foreach (var folder in Directory.GetDirectories(serverFolder))
Directory.Delete(folder, true);
foreach (var mdfile in Directory.GetFiles(serverFolder, "*.md"))
File.Delete(mdfile);
// var files = string.Join("|", Directory.GetFiles(serverFolder, "*.md", SearchOption.AllDirectories)).ToLower().Split('|');
// existingFiles.AddRange(files);
}
else
Directory.CreateDirectory(serverFolder);
@@ -195,14 +259,7 @@ namespace uDocumentation.Busineslogic.GithubSourcePull
s.Close();
foreach (var file in Directory.GetFiles(rootFolder, "*.zip"))
{
File.Delete(file);
}
foreach (var file in existingFiles)
{
DeleteEventArgs ev = new DeleteEventArgs();
ev.FilePath = file;
FireOnDelete(ev);
//File.Delete(file);
}
}
+1 -3
View File
@@ -7,12 +7,10 @@ namespace uDocumentation.Busineslogic
public class MarkdownLogic
{
private readonly string _filePath;
private readonly string _version;
public MarkdownLogic(string filePath, string version)
public MarkdownLogic(string filePath)
{
_filePath = filePath;
_version = version;
}
public const string VersionSession = "DocumentationVersion";
@@ -87,6 +87,7 @@ namespace uDocumentation
{
XmlAttribute legacyNodeTypeAliasAttribute = urlNode.Attributes["nodeTypeAlias"];
string nodeTypeAlias = legacyNodeTypeAliasAttribute == null ? string.Empty : legacyNodeTypeAliasAttribute.Value;
if (urlNode.Name == MarkdownLogic.DocumentTypeAlias || nodeTypeAlias == MarkdownLogic.DocumentTypeAlias || urlNode.Name == "Projects")
{
HttpContext.Current.Items[MarkdownLogic.MarkdownPathKey] = markdownPath;
+2 -33
View File
@@ -242,17 +242,6 @@
<HintPath>..\packages\UmbracoCms.Core.7.2.1\lib\UrlRewritingNet.UrlRewriter.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="usercontrols\DocumentationEditButton.ascx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="usercontrols\DocumentationBreadcrumb.ascx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="usercontrols\DocumentationShowMarkdown.ascx">
<SubType>ASPXCodeBehind</SubType>
</Content>
</ItemGroup>
<ItemGroup>
<Compile Include="Busineslogic\ConventionExtensions.cs" />
<Compile Include="Busineslogic\DefaultVersion.cs" />
@@ -261,27 +250,6 @@
<Compile Include="Busineslogic\MarkdownLogic.cs" />
<Compile Include="DocumentationContentFinder.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="usercontrols\DocumentationEditButton.ascx.cs">
<DependentUpon>DocumentationEditButton.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="usercontrols\DocumentationEditButton.ascx.designer.cs">
<DependentUpon>DocumentationEditButton.ascx</DependentUpon>
</Compile>
<Compile Include="usercontrols\DocumentationBreadcrumb.ascx.cs">
<DependentUpon>DocumentationBreadcrumb.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="usercontrols\DocumentationBreadcrumb.ascx.designer.cs">
<DependentUpon>DocumentationBreadcrumb.ascx</DependentUpon>
</Compile>
<Compile Include="usercontrols\DocumentationShowMarkdown.ascx.cs">
<DependentUpon>DocumentationShowMarkdown.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="usercontrols\DocumentationShowMarkdown.ascx.designer.cs">
<DependentUpon>DocumentationShowMarkdown.ascx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="packages.config" />
@@ -299,7 +267,8 @@
<ProjectExtensions />
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<PropertyGroup>
<PostBuildEvent>XCOPY "$(ProjectDir)usercontrols\*.ascx" "$(ProjectDir)..\OurUmbraco.Site\usercontrols\" /y</PostBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -1,4 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DocumentationBreadcrumb.ascx.cs" Inherits="uDocumentation.usercontrols.DocumentationBreadcrumb" %>
<ul id="breadcrumb">
<%= GetBreadcrumb() %>
</ul>
@@ -1,56 +0,0 @@
using System;
using System.IO;
using System.Text;
using System.Web;
using System.Web.UI;
using uDocumentation.Busineslogic;
namespace uDocumentation.usercontrols
{
public partial class DocumentationBreadcrumb : UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
public string GetBreadcrumb()
{
StringBuilder sbResult = new StringBuilder();
StringBuilder sbBcUrl = new StringBuilder();
string rootUrl = "/";
string rootName = "Home";
sbResult.Append("<li><a href=\"" + rootUrl + "\">" + rootName + "</a></li>");
sbBcUrl.Append("/");
string absolutePath = HttpContext.Current.Request.Url.AbsolutePath;
string directoryName = Path.GetDirectoryName(absolutePath);
directoryName = directoryName.Substring(1);
string[] strDirs = directoryName.Split('\\');
//Added nofollow to link because we can't ensure all parts of the url path to be an actual page
//main concern being the version part, ie. v501.
foreach (string strDirName in strDirs)
{
sbResult.Append("<li><a href=\"" + sbBcUrl + strDirName + "\" rel=\"nofollow\">" +
strDirName
.RemoveDash()
.UnderscoreToDot()
.EnsureCorrectDocumentationText() + "</a></li>");
sbBcUrl.Append(strDirName + "/");
}
if (!absolutePath.EndsWith("/"))
{
sbResult.AppendFormat("<li>{0}</li>",
absolutePath.Substring(absolutePath.LastIndexOf('/') + 1)
.RemoveDash()
.UnderscoreToDot()
.EnsureCorrectDocumentationText());
}
return sbResult.ToString();
}
}
}
@@ -1,15 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace uDocumentation.usercontrols {
public partial class DocumentationBreadcrumb {
}
}
@@ -1,3 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DocumentationEditButton.ascx.cs" Inherits="uDocumentation.usercontrols.DocumentationEditButton" %>
<a id="editLink" runat="server" Visible="False" class="edit-doc-btn voting rounded">Edit</a>
@@ -1,76 +0,0 @@
using System;
using System.IO;
using System.Web;
using System.Web.Hosting;
using System.Web.UI;
using uDocumentation.Busineslogic;
using umbraco.NodeFactory;
namespace uDocumentation.usercontrols
{
public partial class DocumentationEditButton : UserControl
{
private readonly Node _currentNode = Node.GetCurrent();
public bool ShowButton = false;
public static string BaseUrl = "https://github.com/umbraco/Umbraco4Docs/blob/master";
protected void Page_Load(object sender, EventArgs e)
{
//Do same check as masterpage - that DocType/Node alias is Projects
if (_currentNode.NodeTypeAlias == "Projects")
{
//We don;t want the button to show, so stop excuting...
return;
}
//We got this far so we can show button
ShowButton = true;
//Get the documentation link to the md file to edit on GitHub
//The MarkDown path key from the Context Keys (not correct casing, so can not trim)
//This is the full url - C:/inetpub/wwwroot/OurUmbraco/OurUmbraco.Site/documentation/installation/install-umbraco-with-microsoft-webmatrix.md
var docUrl = HttpContext.Current.Items[MarkdownLogic.MarkdownPathKey].ToString();
//Make sure file exists on disk
if (File.Exists(docUrl))
{
//Need to get NEW key as needs to be the original MD filename
//from Github including .md & correct casing of file
var originalUrl = HttpContext.Current.Items["umbOriginalUrl"].ToString();
//Ensure beginning part of url is right case for GitHub URL
originalUrl = originalUrl.Replace("/documentation/", "/Documentation/");
//If ends with / then it's an index.md file in a folder
if (originalUrl.EndsWith("/"))
{
//Add the word after the /, so it's /index
originalUrl += "index";
}
//Append the .md file extension
docUrl = string.Format("{0}{1}", originalUrl, ".md");
}
else
{
//MD file does not exist on disk - hide edit button
ShowButton = false;
}
//Show or hide the link/button
editLink.Visible = ShowButton;
if (ShowButton)
{
//Onbly bother setting the link url if it's visible
//NOTE: GitHub URLs are case sensitive
editLink.HRef = string.Format("{0}{1}", BaseUrl, docUrl);
}
}
}
}
@@ -1,24 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace uDocumentation.usercontrols {
public partial class DocumentationEditButton {
/// <summary>
/// editLink control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlAnchor editLink;
}
}
@@ -1,3 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DocumentationShowMarkdown.ascx.cs" Inherits="uDocumentation.usercontrols.DocumentationShowMarkdown" %>
<asp:Label runat="server" ID="lblHeader"></asp:Label>
<asp:Label runat="server" ID="lblMarkdownOutput"></asp:Label>
@@ -1,80 +0,0 @@
using System;
using System.IO;
using System.Web;
using System.Web.UI;
using uDocumentation.Busineslogic;
namespace uDocumentation.usercontrols
{
public partial class DocumentationShowMarkdown : UserControl
{
private string _markdownFilePath;
protected void Page_Load(object sender, EventArgs e)
{
if (AddHeader)
{
string path = HttpContext.Current.Request.Url.AbsolutePath;
int index = path.EndsWith("/")
? path.TrimEnd('/').LastIndexOf('/') + 1
: path.LastIndexOf('/') + 1;
string urlPath = path.Substring(index);
lblHeader.Text = string.Concat("<h1>", urlPath.RemoveDash().UnderscoreToDot().TrimStart('/').TrimEnd('/'), "</h1>");
}
MarkdownLogic ml = new MarkdownLogic(MarkdownFilePath, VersionFromSession) { PrefixLinks = PrefixLinks };
lblMarkdownOutput.Text = ml.DoTransformation();
}
public bool PrefixLinks { get; set; }
public bool AddHeader { get; set; }
public string MarkdownFilePath
{
get
{
if (umbraco.NodeFactory.Node.GetCurrent().Parent.NodeTypeAlias == "Project")
{
string readmePath = string.Concat(HttpRuntime.AppDomainAppPath, umbraco.NodeFactory.Node.GetCurrent().Url.Substring(1).Replace("/", @"\") + @"\readme.md");
if (File.Exists(readmePath))
return readmePath;
else
return string.Concat(HttpRuntime.AppDomainAppPath, umbraco.NodeFactory.Node.GetCurrent().Url.Substring(1).Replace("/", @"\") + @"\index.md");
}
if (string.IsNullOrEmpty(_markdownFilePath))
{
return HttpContext.Current.Items[MarkdownLogic.MarkdownPathKey].ToString();
}
string formattedPath = string.Format(_markdownFilePath, VersionFromSession);
//Try to resolve relative filepath
if (!File.Exists(formattedPath))
{
string absolutePath = string.Concat(HttpRuntime.AppDomainAppPath, formattedPath);
if (File.Exists(absolutePath))
return absolutePath;
}
return formattedPath;
}
set { _markdownFilePath = value; }
}
public string VersionFromSession
{
get
{
if (Session[MarkdownLogic.VersionSession] == null || Session[MarkdownLogic.VersionSession].ToString() == string.Empty)
{
Session[MarkdownLogic.VersionSession] = DefaultVersion.Instance.Number;
}
return Session[MarkdownLogic.VersionSession].ToString();
}
set { Session[MarkdownLogic.VersionSession] = value; }
}
}
}
@@ -1,33 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace uDocumentation.usercontrols {
public partial class DocumentationShowMarkdown {
/// <summary>
/// lblHeader control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblHeader;
/// <summary>
/// lblMarkdownOutput control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblMarkdownOutput;
}
}
+12 -1
View File
@@ -79,7 +79,18 @@ namespace uForum
{
var memberShipHelper = new Umbraco.Web.Security.MembershipHelper(Umbraco.Web.UmbracoContext.Current);
if (topic.LatestReplyAuthor > 0)
return memberShipHelper.GetById(topic.LatestReplyAuthor);
{
try
{
return memberShipHelper.GetById(topic.LatestReplyAuthor);
}
catch (Exception ex)
{
var wat = ex;
return null;
}
}
else
return topic.Author();
}