aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/_includes
diff options
context:
space:
mode:
authorGravatar David Chen <dzc@google.com>2016-04-26 07:12:42 +0000
committerGravatar Yun Peng <pcloudy@google.com>2016-04-26 08:30:02 +0000
commitbd69080f0b9d57047d390d9557aa6d0441e66b38 (patch)
tree4da3c8ac4f8e81c9f3ddc5fd2b2e77fa70560772 /site/_includes
parent02669d78e33b13d0d8ee59217d8b6bb22d6f6f3a (diff)
Include Jekyll layout files, style sheets, and Bazel logo images in the
public Bazel tree. -- MOS_MIGRATED_REVID=120787331
Diffstat (limited to 'site/_includes')
-rw-r--r--site/_includes/blog-sidebar.html20
-rw-r--r--site/_includes/blog-twitter-js.html6
-rw-r--r--site/_includes/footer.html77
-rw-r--r--site/_includes/head.html41
-rw-r--r--site/_includes/header.html45
5 files changed, 189 insertions, 0 deletions
diff --git a/site/_includes/blog-sidebar.html b/site/_includes/blog-sidebar.html
new file mode 100644
index 0000000000..f56362318a
--- /dev/null
+++ b/site/_includes/blog-sidebar.html
@@ -0,0 +1,20 @@
+ <div class="col-lg-3">
+ <h2>Twitter</h2>
+ <p>For more frequent updates, follow us on Twitter.</p>
+ <p><a class="twitter-follow-button" href="https://twitter.com/bazelbuild" data-show-count="false" data-size="large">Follow @bazelbuild</a></p>
+ <h2>Discuss</h2>
+ <p>Join the discussion at our <a href="https://groups.google.com/forum/#!forum/bazel-discuss">mailing list</a>.</p>
+ <h2>Subscribe</h2>
+ <p>Subscribe to our blog via the <a href="/blog/feed.xml">RSS Feed</a> or via email:</p>
+ <div class="well">
+ <form action="https://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('https://feedburner.google.com/fb/a/mailverify?uri=BazelBlog', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
+ <div class="form-group">
+ <input type="text" class="form-control" name="email" placeholder="name@email.com">
+ </div>
+ <input type="hidden" value="BazelBlog" name="uri">
+ <input type="hidden" name="loc" value="en_US">
+ <button type="submit" class="btn btn-primary btn-block">Subscribe</button>
+ </form>
+ <p>Delivered by <a href="https://feedburner.google.com" target="_blank">FeedBurner</a></p>
+ </div>
+ </div>
diff --git a/site/_includes/blog-twitter-js.html b/site/_includes/blog-twitter-js.html
new file mode 100644
index 0000000000..c6dfa460da
--- /dev/null
+++ b/site/_includes/blog-twitter-js.html
@@ -0,0 +1,6 @@
+<!--
+JavaScript used by the Follow @bazelbuild on Twitter button on the blog sidebar.
+Code from: https://dev.twitter.com/web/follow-button
+-->
+
+<script>window.twttr=(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return;js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);t._e=[];t.ready=function(f){t._e.push(f);};return t;}(document,"script","twitter-wjs"));</script>
diff --git a/site/_includes/footer.html b/site/_includes/footer.html
new file mode 100644
index 0000000000..22382aa9bc
--- /dev/null
+++ b/site/_includes/footer.html
@@ -0,0 +1,77 @@
+ <footer class="footer">
+ <div class="container">
+ <div class="row">
+ <div class="col-lg-12">
+ <p class="text-muted">&copy; 2015 Google</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+ <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
+ <!-- Include all compiled plugins (below), or include individual files as needed -->
+ <script src="/assets/js/bootstrap.min.js"></script>
+
+ <script>
+ var shiftWindow = function() {
+ if (location.hash.length !== 0) {
+ window.scrollBy(0, -50);
+ }
+ };
+ window.addEventListener("hashchange", shiftWindow);
+
+ var highlightCurrentSidebarNav = function() {
+ var href = location.pathname;
+ var item = $('#sidebar-nav [href$="' + href + '"]');
+ if (item) {
+ var li = item.parent();
+ li.addClass("active");
+
+ if (li.parent() && li.parent().is("ul")) {
+ do {
+ var ul = li.parent();
+ if (ul.hasClass("collapse")) {
+ ul.collapse("show");
+ }
+ li = ul.parent();
+ } while (li && li.is("li"));
+ }
+ }
+ };
+
+ $(document).ready(function() {
+ // Scroll to anchor of location hash, adjusted for fixed navbar.
+ window.setTimeout(function() {
+ shiftWindow();
+ }, 1);
+
+ // Flip the caret when submenu toggles are clicked.
+ $(".sidebar-submenu").on("show.bs.collapse", function() {
+ var toggle = $('[href$="#' + $(this).attr('id') + '"]');
+ if (toggle) {
+ toggle.addClass("dropup");
+ }
+ });
+ $(".sidebar-submenu").on("hide.bs.collapse", function() {
+ var toggle = $('[href$="#' + $(this).attr('id') + '"]');
+ if (toggle) {
+ toggle.removeClass("dropup");
+ }
+ });
+
+ // Highlight the current page on the sidebar nav.
+ highlightCurrentSidebarNav();
+ });
+ </script>
+
+ <!-- Google Analytics tracking code -->
+ <script>
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ ga('create', 'UA-61082125-1', 'auto');
+ ga('send', 'pageview');
+ </script>
diff --git a/site/_includes/head.html b/site/_includes/head.html
new file mode 100644
index 0000000000..c2fc78d0c7
--- /dev/null
+++ b/site/_includes/head.html
@@ -0,0 +1,41 @@
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>{{ page.title }} - Bazel</title>
+
+ <script>
+ var current_url = window.location.href;
+ var bad_url = new RegExp("^https?://bazelbuild.github.io/bazel/");
+ if (bad_url.test(current_url)) {
+ window.location.replace(current_url.replace(bad_url, "http://bazel.io/"));
+ }
+ </script>
+
+ <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site_root }}">
+
+ <!-- Webfont -->
+ <link href="http://fonts.googleapis.com/css?family=RobotoDraft:300,400,500|Source+Code+Pro:400,500,700" rel="stylesheet">
+
+ <link rel="shortcut icon" type="image/png" href="/images/favicon.ico">
+
+ <!-- Bootstrap -->
+ <link href="/assets/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/assets/css/font-awesome.min.css" rel="stylesheet">
+
+ <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
+ <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+ <!--[if lt IE 9]>
+ <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
+ <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+ <![endif]-->
+
+ <!-- Custom stylesheet -->
+ <link rel="stylesheet" type="text/css" href="/css/main.css" />
+
+ <!-- metadata -->
+ <meta name="og:title" content="Bazel"/>
+ <meta name="og:image" content="/images/bazel-og-image.png"/>
+ <meta name="og:description" content="Correct, reproducible, fast builds for everyone"/>
+ </head>
+
diff --git a/site/_includes/header.html b/site/_includes/header.html
new file mode 100644
index 0000000000..af8b90ce41
--- /dev/null
+++ b/site/_includes/header.html
@@ -0,0 +1,45 @@
+ <nav id="common-nav" class="navbar navbar-inverse navbar-fixed-top">
+ <div class="container">
+ <!-- Brand and toggle get grouped for better mobile display -->
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="navbar-brand" href="/">
+ <img src="/images/bazel-navbar.png" height="30px">
+ </a>
+ </div>
+
+ <!-- Collect the nav links, forms, and other content for toggling -->
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+ <form class="navbar-form navbar-right" action="/search.html" id="cse-search-box">
+ <div class="form-group">
+ <input type="hidden" name="cx" value="012346921571893344015:xv_nfgpzbu4">
+ <input type="hidden" name="cof" value="FORID:10">
+ <input type="hidden" name="ie" value="UTF-8">
+ <input type="search" name="q" class="form-control input-sm" placeholder="Search">
+ </div>
+ </form>
+ <ul class="nav navbar-nav navbar-right">
+ <li{% if page.nav == "docs" %} class="active"{% endif %}>
+ <a href="/docs/install.html">Docs</a>
+ </li>
+ <li{% if page.nav == "community" %} class="active"{% endif %}>
+ <a href="/contributing.html">Community</a>
+ </li>
+ <li{% if page.nav == "faq" %} class="active"{% endif %}>
+ <a href="/faq.html">FAQ</a></li>
+ <li{% if page.nav == "blog" %} class="active"{% endif %}>
+ <a href="/blog">Blog</a>
+ </li>
+ <li><a href="https://github.com/bazelbuild/bazel">GitHub</a></li>
+ <li><a href="https://twitter.com/bazelbuild" class="nav-icon"><i class="fa fa-twitter"></i></a></li>
+ <li><a href="https://groups.google.com/forum/#!forum/bazel-discuss" class="nav-icon"><i class="fa fa-comments"></i></a></li>
+ </ul>
+ </div><!-- /.navbar-collapse -->
+ </div><!-- /.container-fluid -->
+ </nav>
+