Skip to content

Commit

Permalink
New homepage (#555)
Browse files Browse the repository at this point in the history
* new homepage and various fixes and tweaks

* update screenshot

* fix linter and 404 issues

* tweaks from review

* WIP

* WIP

* missing image

* fix code sample

* tweak style

* make homepage cards look like other cards, remove unused JS

* fix bug with top nav on desktop narrow

* tweak footer

* remove unneeded styles
  • Loading branch information
sethladd committed May 15, 2017
1 parent d599715 commit 775bad8
Show file tree
Hide file tree
Showing 71 changed files with 797 additions and 608 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -52,7 +52,7 @@ to the front matter of each page, and including some HTML.
---
layout: tutorial
title: "Constraints"
sidebar: home_sidebar
permalink: /tutorials/layout/constraints.html
prev-page: /tutorials/layout/properties.html
prev-page-title: "Container Properties"
Expand Down
13 changes: 6 additions & 7 deletions _includes/footer.html
Expand Up @@ -5,24 +5,23 @@
<div class="logo">
<img src="/images/flutter-mark-square-100.png" alt="Flutter Logo" width="100" height="100">
</div>
<ul class="contact-list">
<li>{{ site.title }}</li>
</ul>
<p class="social-media-list">
<a href="https://twitter.com/flutterio"> <span class="icon icon--twitter">
<a href="https://twitter.com/flutterio">
<span class="icon icon--twitter">
<svg viewBox="0 0 16 16">
<path fill="#828282" d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809
c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"/>
</svg>
</span> &bull;
<a href="https://github.com/flutter/"> <span class="icon icon--github">
<a href="https://github.com/flutter/">
<span class="icon icon--github">
<svg viewBox="0 0 16 16">
<path fill="#828282" d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761 c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32 c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472 c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037 C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65 c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261 c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082 c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129 c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"/>
</svg>
</span></a> &bull;
</span></a>
</p>
<p class="terms">
<a href="mailto:{{ site.email }}">{{ site.email_name }}</a> &bull;
<a href="https://groups.google.com/forum/#!forum/flutter-dev">{{ site.email_name }}</a> &bull;
<a href="/tos">terms</a> &bull;
<a href="http://www.google.com/intl/en/policies/privacy/">privacy</a>
</p>
Expand Down
8 changes: 4 additions & 4 deletions _includes/header.html
Expand Up @@ -6,16 +6,16 @@
<img src="/images/flutter-mark-square-100.png" alt="Flutter Logo" width="40" height="40" style="vertical-align:middle">

<a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
<span class="project-status">(tech preview)</span>
<span class="project-status">(alpha)</span>

<nav class="site-nav">
<a href="#" class="menu-icon">
<i class="material-icons-extended">more_vert</i>
</a>
<div class="trigger">
<a class="page-link" href="/getting-started/">Get Started</a>
<a class="page-link" href="/faq/">FAQ</a>
<a class="page-link" href="https://docs.flutter.io/flutter/">API</a>
<a class="page-link" href="https://docs.flutter.io">API</a>
<a class="page-link" href="https://github.com/flutter/flutter">GitHub</a>
<a class="page-link" href="/support/">Support</a>
<form action="/search/" class="nav-searchbox" id="cse-search-box" style="display: inline">
<input type="hidden" name="cx" value="007067728241810524621:gm6vraqlc8c">
<input type="hidden" name="ie" value="UTF-8">
Expand Down
5 changes: 3 additions & 2 deletions _includes/sidebar.html
Expand Up @@ -31,7 +31,6 @@

<ul class="sidebar-items">
<li><a href="/platform-plugins/">Plugins &amp; platform-specific code</a></li>
<li><a href="/platform-channels/">Custom platform-specific code</a></li>
<li><a href="/reading-writing-files/">Read and write files</a></li>
<li><a href="/networking/">Network and HTTP</a></li>
</ul>
Expand All @@ -49,9 +48,11 @@
<li><a href="/upgrading/">Upgrade your Flutter install</a></li>
</ul>

<li class="sidebar-title">Advanced topics</li>
<li class="sidebar-title">More details</li>

<ul class="sidebar-items">
<li><a href="/faq/">FAQ</a></li>
<li><a href="/technical-overview">Technical overview</a></li>
<li><a href="https://docs.google.com/presentation/d/1cw7A4HbvM_Abv320rVgPVGiUP2msVs7tfGbkgdrTy0I/edit?usp=sharing">Architecture diagrams</a></li>
<li><a href="https://www.youtube.com/watch?v=dkyY9WCGMi0">Framework's layered design <i class="fa fa-video-camera" aria-hidden="true"></i></a></li>
<li><a href="https://www.youtube.com/watch?v=UUfXWzp0-DU">Flutter's rendering pipeline <i class="fa fa-video-camera" aria-hidden="true"></i></a></li>
Expand Down
15 changes: 0 additions & 15 deletions _layouts/code_comp_page.html

This file was deleted.

7 changes: 3 additions & 4 deletions _layouts/default.html
Expand Up @@ -20,7 +20,9 @@

<!-- Content Column -->
<div class="col-sm-9 main-contents">
{{content}}
<div class="main-contents-body">
{{content}}
</div>
</div>
</div> <!-- /.row -->
</div> <!-- /.container -->
Expand All @@ -30,13 +32,10 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/2.0.0/anchor.min.js"></script>
<script src="{{ "/js/sidebar_toggle.js" }}"></script>
<script src="{{ "/js/customscripts.js" }}"></script>
<script src="{{ "/js/prism.js" }}"></script>
<script src="{{ "/js/toc.js" }}"></script>

<script async="" defer="" src="//survey.g.doubleclick.net/async_survey?site=at3ul57xpub2vk3oxt2ytw365i"></script>
</body>
Expand Down
10 changes: 7 additions & 3 deletions _layouts/page.html
Expand Up @@ -2,9 +2,13 @@
layout: default
---

<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
</header>
<article class="post-content">

{% unless page.hide_title %}
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
</header>
{% endunless %}

{{ content }}
</article>
1 change: 1 addition & 0 deletions _layouts/tutorial.html
Expand Up @@ -12,4 +12,5 @@ <h4>What's the point?</h4>
</ul>
</div>
{% endif %}

{{ content }}
27 changes: 0 additions & 27 deletions _sass/_base.scss
Expand Up @@ -122,33 +122,6 @@ blockquote {
}



/**
* Code formatting
*/
pre {
font-size: 15px;
}

code, code[class*="language-"], pre[class*="language-"]{
font-family: 'Source Code Pro', monospace !important;
font-size: 1em;
padding: 0;
}

pre {
overflow-x: auto;
padding: 8px 12px;

> code {
border: 0;
padding-right: 0;
padding-left: 0;
}
}



/**
* Wrapper
*/
Expand Down
4 changes: 1 addition & 3 deletions _sass/_catalog.scss
Expand Up @@ -21,7 +21,6 @@
flex-direction: column;
overflow: hidden;
position: relative;
min-width: 320px;
min-height: 180px;
padding: 24px;
border: solid transparent;
Expand All @@ -42,8 +41,7 @@
.cards__item {
display: flex;
padding: 0 0 16px 0;
margin-right: 24px;
width: 300px;
margin-right: 16px;
}

.card__image {
Expand Down
22 changes: 22 additions & 0 deletions _sass/_code_pre.scss
@@ -0,0 +1,22 @@
// Overrides the _prism.scss styles,
// so that _prism.scss can be easily regenerated.

code[class*="language-"],
pre[class*="language-"] {
text-shadow: inherit;
font-family: 'Source Code Pro', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
white-space: pre-wrap;
word-break: break-all;
word-wrap: break-word;
}

pre {
overflow-x: auto;
padding: 8px 12px;

> code {
border: 0;
padding-right: 0;
padding-left: 0;
}
}
87 changes: 0 additions & 87 deletions _sass/_customstyles.scss
Expand Up @@ -69,26 +69,9 @@ body {
background-color: #eeeeee;
}



.breadcrumb > .active {color: #777 !important;}

/* make room for the nav bar */
h1[id],
h2[id],
h3[id],
h4[id],
h5[id],
h6[id],
dt[id]{
padding-top: 60px;
margin-top: -40px
}

body h1 {margin-top:40px;}

.post-content img {
margin: 12px 0px 3px 0px;
width: auto;
height: auto;
max-width: 100%;
Expand Down Expand Up @@ -520,23 +503,6 @@ div#toc ul li ul li {
margin: 5px 0px 0px 0px;
}

.tab-content {
padding: 15px;
background-color: #FAFAFA;
}

span.tagTitle {font-weight: 500;}

li.activeSeries {
font-weight: bold;
}

.seriesContext .dropdown-menu li.active {
font-weight: bold;
margin-left: 43px;
font-size:18px;
}

.alert {
border: 0;
border-radius: 0;
Expand All @@ -561,10 +527,6 @@ div.alert code, h2 code {

div.tags {padding: 10px 5px;}

.tabLabel {
font-weight: normal;
}

hr {
border: 0;
border-bottom: 1px dashed #ccc;
Expand All @@ -587,21 +549,6 @@ span.otherProgrammingLanguages {
font-style: normal;
}

a[data-toggle="tooltip"] {
color: #649345;
font-style: italic;
cursor: default;
}

.seriesNext, .seriesContext {
margin-top: 15px;
margin-bottom: 15px;
}

.seriescontext ol li {
list-style-type: upper-roman;
}

ol.series li {
list-style-type: decimal;
margin-left: 40px;
Expand Down Expand Up @@ -777,26 +724,6 @@ span.soft {
padding:10px;
}

/* this part adds an icon after external links, using FontAwesome*/
a[href^="http://"]:after, a[href^="https://"]:after {
content: "\f08e";
font-family: FontAwesome;
vertical-align: super;
font-weight: normal;
font-style: normal;
font-size: 45%;
display: inline-block;
text-decoration: none;
padding-left: 3px;
}

/* Strip the outbound icon when this class is present */
a[href^="http://own-domain.com"]:after, a[href^="https://docs.flutter.io"]:after,
a.no_icon:after {
content:none !important;
padding-left: 0;
}

.btn-default {
margin-bottom: 10px;
}
Expand Down Expand Up @@ -880,17 +807,3 @@ table th code {
font-size: 16px;
font-style: inherit;
}

div.prev-next {
margin-top: 2em;
margin-bottom: 2em;
}

div.prev-next-right {
display: inline-block;
float: right;
}

div.prev-next-left {
display: inline-block;
}

0 comments on commit 775bad8

Please sign in to comment.