Skip to content
This repository has been archived by the owner on Mar 23, 2022. It is now read-only.

Commit

Permalink
layouts and styles
Browse files Browse the repository at this point in the history
  • Loading branch information
tmaiaroto committed Feb 8, 2019
1 parent fda6249 commit 38c2326
Show file tree
Hide file tree
Showing 11 changed files with 125 additions and 115 deletions.
1 change: 0 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ pygmentsUseClasses = true
github = "alpacahq"
email = ""


[[menu.main]]
name = "Material"
url = "/"
Expand Down
2 changes: 1 addition & 1 deletion content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ outputs:
---


# Getting Started
# Where Should I Start?

## Sign up to generate your API key

Expand Down
23 changes: 0 additions & 23 deletions content/community-and-support/_index.md

This file was deleted.

23 changes: 0 additions & 23 deletions content/community-and-support/brokerage-related/_index.md

This file was deleted.

45 changes: 0 additions & 45 deletions content/community-and-support/tech-related/_index.md

This file was deleted.

3 changes: 3 additions & 0 deletions layouts/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<script type="text/javascript">
window.location.replace("/");
</script>
35 changes: 18 additions & 17 deletions layouts/home.html.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,31 @@
<article class="article">
<div class="wrapper">

<h1 class="homepage-title">Documentation</h1>
<p><strong>Welcome to Alpaca!</strong> Get familar with Alpaca and explore the resources.</p>

<div class="flex-grid homepage-category-links">

<div class="col homepage-category-box">
<a href="#">
<a href="/about-us/">
<h2>Who is Alpaca?</h2>
<p>
Find out who is behind Alpaca.
Find out who is behind Alpaca and how our business works.
</p>
</a>
</div>

<div class="col homepage-category-box">
<a href="#sign-up-to-generate-your-api-key">
<h2>Where should I start?</h2>
<a href="#getting-started">
<h2>Where Should I Start?</h2>
<p>
Not sure where to start? Here are multiple starting points you can kick off with.
Not sure where to start? Here's a quick guide to getting up and running.
</p>
</a>
</div>

<div class="col homepage-category-box">
<a href="#">
<a href="/example-algos/">
<h2>Run Example Algorithms</h2>
<p>
Do you learn by doing things? Copy and paste an example algorithm and run it right away!
Expand All @@ -52,46 +53,46 @@ <h2>Run Example Algorithms</h2>
</div>

<div class="col homepage-category-box">
<a href="#">
<a href="/api-documentation/">
<h2>API Documentation</h2>
<p>
Go deep dive in our users favorite Web API documentation.
Take a deep dive into our users' favorite Web API documentation or check out our client SDKs.
</p>
</a>
</div>

<div class="col homepage-category-box">
<a href="#">
<a href="/orders/">
<h2>Understand Orders</h2>
<p>
Learn all about order-types and their behaviors that you can use on Alpaca.
Learn all about order types and their behaviors that you can use on Alpaca.
</p>
</a>
</div>

<div class="col homepage-category-box">
<a href="#">
<a href="/paper-trading/">
<h2>Paper Trading Specification</h2>
<p>
Alpacas paper trading offers a great simulation environment to test your algorithms.
Alpaca's paper trading offers a great simulation environment to test your algorithms.
</p>
</a>
</div>

<div class="col homepage-category-box">
<a href="#">
<a href="/platform-migration/">
<h2>Third-Party Tools Integration</h2>
<p>
Coming from Quantopian? Looking for client SDKs in Python, .NET/C#, Go, Node? Check them out.
Coming from Quantopian? Using zipline, pipeline, or backtrader? Expedite your migration to Alpaca.
</p>
</a>
</div>

<div class="col homepage-category-box">
<a href="#">
<h2>Community & Support</h2>
<a href="/market-data/">
<h2>Market Data</h2>
<p>
Understand how &amp; where you can get support. And don’t forget to join the community Slack!
Learn about what types of market data are available at Alpaca.
</p>
</a>
</div>
Expand Down
3 changes: 2 additions & 1 deletion layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
<link rel="shortcut icon" type="image/x-icon" href="{{ with .Site.Params.favicon }}{{ . | absURL }}{{ else }}{{ "images/favicon.ico" | absURL }}{{ end }}">
<link rel="icon" type="image/x-icon" href="{{ with .Site.Params.favicon }}{{ . | absURL }}{{ else }}{{ "images/favicon.ico" | absURL }}{{ end }}">
<link rel="stylesheet" href="https://files.alpaca.markets/fonts/gilroy/MyFontsWebfontsKit.css">

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

<style>
@font-face {
font-family: 'Icon';
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</div>

<div class="button button-nowrap hide-sm-only-table-cell show-md-table-cell" role="button" aria-label="Community and Support">
<a href="https://alpaca.markets/slack" target="_blank" class="link-key link-key-community hide-sm-only">Community &amp; Support</a>
<a href="/community" class="link-key link-key-community hide-sm-only">Community</a>
</div>

<div class="button button-search" role="button" aria-label="Search">
Expand Down
91 changes: 91 additions & 0 deletions layouts/partials/nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{{- $currentNode := . }}
{{- $showvisitedlinks := .Site.Params.showVisitedLinks -}}

{{- if eq .Site.Params.ordersectionsby "title"}}
{{- range .Site.Home.Sections.ByTitle}}
{{- template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks}}
{{- end}}
{{- else}}
{{- range .Site.Home.Sections.ByWeight}}
{{- template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks}}
{{- end}}
{{- end}}

<!-- templates -->
{{- define "section-tree-nav" }}
{{- $showvisitedlinks := .showvisitedlinks }}
{{- $currentNode := .currentnode }}
{{- with .sect}}
{{ $isCurrent := eq .URL $currentNode.URL}}
{{- if and .IsSection (or (not .Params.hidden) $.showhidden)}}
{{- $numberOfPages := (add (len .Pages) (len .Sections)) }}
{{- safeHTML .Params.head}}
<li data-nav-id="{{.URL}}" class="dd-item
{{- if .IsAncestor $currentNode}} parent{{end}}
{{- if eq .URL $currentNode.URL}} active{{end}}
{{- if .Params.alwaysopen}} alwaysopen{{end -}}
{{- if ne $numberOfPages 0 }} haschildren{{end}}
">
<div>
<a href="{{ .RelPermalink}}"
{{- if $currentNode}} class="current"{{end}}
>
{{- if eq .Title "API Documentation"}}
<i class="fa fa-book" style="display:inline; margin-right: 4px;" aria-hidden="true"></i>
{{- end}}
{{safeHTML .Params.Pre}}{{.Title}}{{safeHTML .Params.Post}}</a>
{{ if $isCurrent }}
<ul id="scrollspy">
</ul>
{{ end }}
</div>
{{- if ne $numberOfPages 0 }}
<ul style="{{ if .IsAncestor $currentNode}}{{ else }} display: none; {{ end }}">
{{- .Scratch.Set "pages" .Pages }}
{{- if .Sections}}
{{- .Scratch.Set "pages" (.Pages | union .Sections) }}
{{- end}}
{{- $pages := (.Scratch.Get "pages") }}

{{- if eq .Site.Params.ordersectionsby "title"}}
{{- range $pages.ByTitle }}
{{- if and .Params.hidden (not $.showhidden) }}
{{- else}}
{{- end}}
{{- end}}
{{- else}}
{{- range $pages.ByWeight }}
{{- if and .Params.hidden (not $.showhidden) }}
{{- else}}
{{- template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }}
{{- end}}
{{- end}}
{{- end}}
</ul>
{{- end}}
</li>

{{- if eq .Title "API Documentation"}}
<hr />
{{- end}}

{{- if eq .Title "API Documentation"}}
<li><div><a href="/" {{- if $currentNode}} class="current"{{end}}>Home</a></div></li>
{{- end}}

{{- else}}
{{- if not .Params.Hidden }}
<li data-nav-id="{{.URL}}" class="dd-item
{{- if eq .URL $currentNode.URL}} active{{end -}}
">
<div>
<a href="{{ .RelPermalink}}">
{{safeHTML .Params.Pre}}{{.LinkTitle}}{{safeHTML .Params.Post}}
</a>
{{- if $showvisitedlinks}}<i class="fa fa-circle-thin read-icon"></i>{{end}}
</div>
</li>
{{- end}}
{{- end}}
{{- end}}
{{- end}}
12 changes: 9 additions & 3 deletions static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -265,20 +265,24 @@ span.alpaca-docs-subtitle a:hover {
padding-bottom: 0 !important;
}

h1.homepage-title {
border: 0 !important;
padding-bottom: 0 !important;
}
.homepage-category-links {
margin-top: 20px;
margin-bottom: 20px !important;
}

.homepage-category-box {
padding: 10px;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5);
display: block;
border: 1px solid #bfa100;
}

.homepage-category-box h2 {
font-family: "Gilroy-Bold", sans-serif;
font-size: 25px;
font-size: 16px;
font-weight: 400 !important;
font-style: normal;
font-stretch: normal;
Expand All @@ -291,7 +295,9 @@ span.alpaca-docs-subtitle a:hover {

.homepage-category-box p {
color: #000 !important;
font-size: 16px;
font-size: 14px;
line-height: 20px;
margin-top: 8px;
font-weight: normal;
}

Expand Down

0 comments on commit 38c2326

Please sign in to comment.