Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Should make the "Fork me" ribbon sticky. #1158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 40 additions & 30 deletions _layouts/basic.html
Original file line number Diff line number Diff line change
@@ -1,48 +1,58 @@
<!DOCTYPE html>
<!-- Page last generated {{ site.time }} -->
<html lang="en">
<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 }}</title>
<meta name="keywords" content="Rust, Rust programming language, rustlang, rust-lang, Mozilla Rust">
<meta name="description" content="A systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety.">

<link rel="stylesheet" href="/css/bootstrap.css">
<link rel="stylesheet" href="/css/style.css">
{% for css_name in page.extra_css %}
<link rel="stylesheet" href="/css/{{ css_name }}">
{% endfor %}
</head>
<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 }}</title>
<meta name="keywords" content="Rust, Rust programming language, rustlang, rust-lang, Mozilla Rust">
<meta name="description" content="A systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety.">

<body class="container">
<a href="https://github.com/rust-lang/rust">
<img class="ribbon" style="display: none" src="/logos/forkme.svg" alt="Fork me on GitHub" width="298" height="298">
</a>
<link rel="stylesheet" href="/css/bootstrap.css">
<link rel="stylesheet" href="/css/style.css"> {% for css_name in page.extra_css %}
<link rel="stylesheet" href="/css/{{ css_name }}"> {% endfor %}
</head>

<body>
<a class="ribbon" href="https://github.com/rust-lang/rust">
<img src="/logos/forkme.svg" alt="Fork me on GitHub" width="149" height="149">
</a>

<div class="container">
<header>
<ul class="row menu">
<li class="col-xs-12 col-md-2">
<li class="col-xs-12 col-md-2">
<a href="/en-US/index.html">
<img class="img-responsive" src="/logos/rust-logo-blk.svg" onerror="this.src='/logos/rust-logo-256x256-blk.png'" height="128" width="128" alt="Rust logo" />
<img class="img-responsive" src="/logos/rust-logo-blk.svg" onerror="this.src='/logos/rust-logo-256x256-blk.png'" height="128"
width="128" alt="Rust logo" />
</a>
</li>
<li class="col-xs-12 col-md-10 menu">
<h2><a href="/en-US/documentation.html">Documentation</a></h2>
<h2><a href="/en-US/install.html">Install</a></h2>
<h2><a href="/en-US/community.html">Community</a></h2>
<h2><a href="/en-US/contribute.html">Contribute</a></h2>
</li>
</li>
<li class="col-xs-12 col-md-10 menu">
<h2>
<a href="/en-US/documentation.html">Documentation</a>
</h2>
<h2>
<a href="/en-US/install.html">Install</a>
</h2>
<h2>
<a href="/en-US/community.html">Community</a>
</h2>
<h2>
<a href="/en-US/contribute.html">Contribute</a>
</h2>
</li>
</ul>
</header>

{{ content }}

<footer>
<p>Our site in other languages:
{% include footer.html %}
<p>Our site in other languages: {% include footer.html %}
</p>
</footer>
</body>
</html>
</div>
</body>

</html>
50 changes: 28 additions & 22 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
font-family: 'Fira Sans';
src: url('../fonts/Fira/eot/FiraSans-Regular.eot');
src: url('../fonts/Fira/eot/FiraSans-Regular.eot') format('embedded-opentype'),
url('../fonts/Fira/woff2/FiraSans-Regular.woff2') format('woff2'),
url('../fonts/Fira/woff/FiraSans-Regular.woff') format('woff'),
url('../fonts/Fira/ttf/FiraSans-Regular.ttf') format('truetype');
url('../fonts/Fira/woff2/FiraSans-Regular.woff2') format('woff2'),
url('../fonts/Fira/woff/FiraSans-Regular.woff') format('woff'),
url('../fonts/Fira/ttf/FiraSans-Regular.ttf') format('truetype');
font-weight: 400;
font-style: normal;
}
Expand All @@ -24,9 +24,9 @@
font-family: 'Fira Sans';
src: url('../fonts/Fira/eot/FiraSans-Medium.eot');
src: url('../fonts/Fira/eot/FiraSans-Medium.eot') format('embedded-opentype'),
url('../fonts/Fira/woff2/FiraSans-Medium.woff2') format('woff2'),
url('../fonts/Fira/woff/FiraSans-Medium.woff') format('woff'),
url('../fonts/Fira/ttf/FiraSans-Medium.ttf') format('truetype');
url('../fonts/Fira/woff2/FiraSans-Medium.woff2') format('woff2'),
url('../fonts/Fira/woff/FiraSans-Medium.woff') format('woff'),
url('../fonts/Fira/ttf/FiraSans-Medium.ttf') format('truetype');
font-weight: 500;
font-style: normal;
}
Expand All @@ -40,29 +40,30 @@
}

body {
font-family: 'Fira Sans', "Helvetica Neue", Helvetica, Arial, sans-serif;
margin-top: 20px;
margin-bottom: 10px;
max-width: 820px;
font-family: 'Fira Sans', "Helvetica Neue", Helvetica, Arial, sans-serif;
margin-bottom: 10px;
}
p {
margin-top: 1.2em;
margin-top: 1.2em;
margin-bottom: 1.2em;
}
.pitch b {
font-weight: 400;
font-weight: 400;
}
li {
margin-bottom: .5em;
margin-bottom: .5em;
}
h1 {
font-size: 2em;
font-size: 2em;
margin-top: 1.2em;
margin-bottom: 0.5em;
}

ul {
padding-left: 30px;
padding-left: 30px;
}
.container {
margin-top: -20px;
}
ul.menu {
font-size: 1em;
Expand Down Expand Up @@ -224,20 +225,25 @@ ul.laundry-list {
display: none;
}

.ribbon {
display: none;
}
@media (min-width: 992px) {
ul.laundry-list {
column-count: auto;
-moz-column-count: auto;
-webkit-column-count: auto;
}
img.ribbon {
display: inline !important;
position: absolute;
top: 0;
right: 0;
.ribbon {
display: block;
position: absolute;
position: sticky;
top: 0;
right: 0;
border: 0;
width: 149px;
height: 149px;
height: 0;
width: 149px;
margin-left: calc(100% - 149px);
}
ul.menu .col-xs-12 {
padding-left: 0;
Expand Down