guide and api homepage update

This commit is contained in:
Alex Wolfe 2015-04-21 23:09:13 -07:00
parent 067abfe3ee
commit d69eed18ee
10 changed files with 50 additions and 74 deletions

View File

@ -13,7 +13,7 @@ nav.side-nav.l-pinned-left.l-layer-4.l-offset-nav
// PRIMARY NAVIGATION
li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{slug}.html" md-button><span class="side-nav-icon icon-#{page.icon}"></span> #{name}</a>
li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{slug}" md-button><span class="side-nav-icon icon-#{page.icon}"></span> #{name}</a>
// SECONDARY NAVIGATION

View File

@ -1,10 +1,10 @@
a(class="hover-card is-button has-icon" href="#{url}" md-button)
span(class="hover-card-icon #{classes}")
if number
h3 #{number}. #{name}
hasIcon = icon ? 'has-icon' : ''
iconNumber = number ? number : ''
a(class="hover-card is-button #{hasIcon}" href="#{url}" md-button)
if icon
span(class="hover-card-icon #{icon}") #{iconNumber}
else
h3 #{name}
h3 #{name}
if cta
p #{cta}

View File

@ -4,18 +4,19 @@ data = public.docs[current.path[1]][current.path[2]][current.path[3]]._data
for page, slug in data
// CHECK IF CURRENT PAGE IS SET, THEN SET NEXT PAGE
if currentPage
if !nextPage
.l-sub-section
h3 Next Step
a(href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html") #{page.title}
if slug != "index"
// CHECK IF CURRENT PAGE IS SET, THEN SET NEXT PAGE
if currentPage
if !nextPage
.l-sub-section
h3 Next Step
a(href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html") #{page.title}
//NEXT PAGE HAS NOW BEEN SET
nextPage = true
//NEXT PAGE HAS NOW BEEN SET
nextPage = true
// SET CURRENT PAGE FLAG WHEN YOU PASS IT
if current.path[4] == slug
currentPage = true
// SET CURRENT PAGE FLAG WHEN YOU PASS IT
if current.path[4] == slug
currentPage = true

View File

@ -1,4 +1,6 @@
{
"strict": true,
"index": {
"icon": "home",
"title": "Angular Docs",
@ -19,7 +21,9 @@
"api": {
"icon": "book",
"title": "API Preview"
"title": "API Preview",
"strict": true
},
"help": {

View File

@ -1,4 +1,8 @@
{
"index": {
"title": "API Preview"
},
"annotations" : {
"title" : "Annotations"
},

View File

@ -8,11 +8,10 @@
in the development community. If you're building a production app today, please
<a href="https://docs.angularjs.org/api">use Angular 1.X</a>.
number = 1;
ul
for page, slug in public.docs[current.path[1]][current.path[2]].api._data
url = "/docs/" + current.path[1] + "/" + current.path[2] + "/" + current.path[3] + "/" + slug + ".html"
num = number++
if slug != 'index'
url = "/docs/" + current.path[1] + "/" + current.path[2] + "/" + current.path[3] + "/" + slug + ".html"
li.c8
!= partial("../../../_includes/_hover-card", { number: num, name: page.title, url: url })
li.c8
!= partial("../../../../_includes/_hover-card", {name: page.title, url: url })

View File

@ -1,6 +1,10 @@
{
"_listtype": "ordered",
"index": {
"title": "Step By Step Guide"
},
"setup": {
"title": "Getting Started"
},

View File

@ -2,9 +2,9 @@ number = 1;
ul
for page, slug in public.docs[current.path[1]][current.path[2]].guide._data
if slug != '_listtype'
if slug != '_listtype' && slug != 'index'
url = "/docs/" + current.path[1] + "/" + current.path[2] + "/" + current.path[3] + "/" + slug + ".html"
num = number++
li.c8
!= partial("../../../_includes/_hover-card", { number: num, name: page.title, url: url })
!= partial("../../../../_includes/_hover-card", { icon: "icon-number", number: num, name: page.title, url: url })

View File

@ -16,7 +16,7 @@ div.c4
p.text-body Step by Step Guide
footer
a(href="/docs/#{current.path[1]}/#{current.path[2]}/guide.html" class="button button-primary" md-button) View Guide
a(href="/docs/#{current.path[1]}/#{current.path[2]}/guide/" class="button button-primary" md-button) View Guide
div.c4
@ -26,5 +26,5 @@ div.c4
p.text-body Proposal for v2.0 API
footer
a(href="/docs/#{current.path[1]}/#{current.path[2]}/api.html" class="button" md-button) View API
a(href="/docs/#{current.path[1]}/#{current.path[2]}/api/" class="button" md-button) View API

View File

@ -30,6 +30,7 @@
.hover-card-icon {
color: rgba($blueberry, .87);
border-color: rgba($blueberry, .87);
}
h3 {
@ -64,54 +65,17 @@
color: rgba($cloud, .56);
}
.icon-Java {
.icon-number {
top: 16px;
left: 20px;
font-size: 40px;
}
.icon-python {
top: 22px;
left: 20px;
font-size: 34px;
}
.icon-Nodejs {
top: 20px;
left: 20px;
font-size: 38px;
}
.icon-go {
background: url('/resources/images/icons/languages/go-icon-large.png') 0px 0px no-repeat;
height: 32px;
width: 24px;
left: 23px;
top: 21px;
}
.icon-ruby {
background: url('/resources/images/icons/languages/ruby-icon-large.png') 0px 0px no-repeat;
height: 30px;
width: 30px;
left: 21px;
top: 22px;
}
.icon-php {
top: 26px;
left: 14px;
font-size: 25px;
}
.icon-C {
top: 26px;
left: $unit * 2;
font-size: 24px;
}
.icon-connection {
top: 24px;
font-size: 28px;
line-height: 36px;
height: 40px;
width: 40px;
text-align: center;
border: 2px solid $mist;
border-radius: 200px;
padding: 0px;
}