Skip to content

Commit 26cf65f

Browse files
author
Joseph Damiba
authored
Merge pull request #1455 from plotly/hero-bg-image
Replace Hero BG Image
2 parents c392d52 + 47e2d29 commit 26cf65f

File tree

5 files changed

+36
-72
lines changed

5 files changed

+36
-72
lines changed

_data/cache_bust_css.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
9739c634dee855183734aa6d8b6b0866 ../all_static/css/main.css
1+
7ce96b3003bafe7485b3c03ebccabac3 ../all_static/css/main.css
22
a5765df8bc2358dd61c19edcc0cbef7d ../all_static/css/normalize.css

_includes/head.html

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
<!-- Fonts -->
1919
<link href="//fonts.googleapis.com/css?family=Open+Sans:600,400,300,200|Inconsolata|Ubuntu+Mono:400,700"
2020
rel="stylesheet" type="text/css"/>
21+
<link href="https://fonts.googleapis.com/css?family=Asap&display=swap" rel="stylesheet"/>
22+
2123
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
2224

2325
<!-- code highlighting -->

_posts/2015-07-26-index.html

-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616
<main class="page --home --api">
1717
<div class="--wrap-top">
1818
<section class="hero">
19-
<div class="hero-bg">
20-
<img src="https://s3-us-west-1.amazonaws.com/plotly-tutorials/assets/api/images/api-home-bg.jpg" data-depth="0.3" alt=""
21-
class="layer">
22-
<img src="https://s3-us-west-1.amazonaws.com/plotly-tutorials/assets/api/images/api-home-front.png" data-depth="0.1" alt=""
23-
class="layer">
24-
</div>
2519
<div class="--wrap-inner">
2620
<div class="--welcome layer"><span class="meta">Welcome to the</span>
2721
<h2>Plotly Open Source Graphing Libraries</h2>

all_static/css/main.css

+15-29
Original file line numberDiff line numberDiff line change
@@ -7339,6 +7339,10 @@ div#notebook {
73397339
margin-top: 80px; }
73407340

73417341
.page.\--home .hero {
7342+
background-position: center;
7343+
background-repeat: no-repeat;
7344+
background-size: 110% 110%;
7345+
background-image: url(https://plotly-tutorials.s3-us-west-1.amazonaws.com/assets/api/images/api-bg-img.png);
73427346
width: 100%;
73437347
height: 400px;
73447348
max-height: 500px;
@@ -7361,31 +7365,8 @@ div#notebook {
73617365
overflow: hidden; }
73627366
@media (max-width: 584px) {
73637367
.page.\--home .hero {
7364-
height: 100vh; } }
7365-
.page.\--home .hero .hero-bg {
7366-
height: 400px;
7367-
left: 50% !important;
7368-
margin-left: -1665px;
7369-
top: -50px !important;
7370-
width: 3330px;
7371-
position: absolute;
7372-
z-index: 1; }
7373-
@media (max-width: 584px) {
7374-
.page.\--home .hero .hero-bg {
7375-
height: 100vh;
7376-
left: 50% !important;
7377-
margin-left: -1200px;
7378-
top: -169px !important;
7379-
width: 2400px;
7380-
position: absolute;
7381-
z-index: 1;
7382-
-webkit-transform: scale(0.65) !important;
7383-
-ms-transform: scale(0.65) !important;
7384-
transform: scale(0.65) !important; } }
7385-
.page.\--home .hero .hero-bg img {
7386-
position: absolute;
7387-
top: 0;
7388-
left: 0; }
7368+
height: 100vh;
7369+
background-size: cover; } }
73897370
.page.\--home .hero .\--welcome {
73907371
position: relative;
73917372
z-index: 2;
@@ -7405,16 +7386,20 @@ div#notebook {
74057386
-webkit-flex-wrap: wrap;
74067387
-ms-flex-wrap: wrap;
74077388
flex-wrap: wrap;
7408-
color: #626262;
7389+
color: #fff;
74097390
margin-top: 120px;
7410-
max-width: 580px;
7391+
max-width: 700px;
74117392
text-align: center; }
74127393
@media (max-width: 584px) {
74137394
.page.\--home .hero .\--welcome {
74147395
margin-top: 110px; } }
7396+
.page.\--home .hero .\--welcome h2 {
7397+
font-size: 28pt;
7398+
font-family: "Asap", sans-serif;
7399+
margin-bottom: 0;
7400+
margin-top: 20px; }
74157401
.page.\--home .hero .\--welcome h1, .page.\--home .hero .\--welcome section.section h2, section.section .page.\--home .hero .\--welcome h2 {
74167402
width: 100%;
7417-
font-size: 5rem;
74187403
margin: 0;
74197404
font-weight: 100;
74207405
color: #2391fe;
@@ -7430,7 +7415,8 @@ div#notebook {
74307415
.page.\--home .hero .\--welcome p, .page.\--home .hero .\--welcome section.section div.content-box, section.section .page.\--home .hero .\--welcome div.content-box {
74317416
padding: 0 40px; } }
74327417
.page.\--home .hero .\--welcome span {
7433-
color: white;
7418+
color: #fff;
7419+
font-size: 14pt;
74347420
text-transform: uppercase;
74357421
letter-spacing: 2px; }
74367422

scss/_pages/_home.scss

+18-36
Original file line numberDiff line numberDiff line change
@@ -7,52 +7,27 @@
77

88
&.\--home {
99
.hero {
10+
background-position: center;
11+
background-repeat: no-repeat;
12+
background-size: 110% 110%;;
13+
background-image: url(https://plotly-tutorials.s3-us-west-1.amazonaws.com/assets/api/images/api-bg-img.png);
1014
width: 100%;
11-
1215
height: 400px;
1316
max-height:500px;
1417
@include handheld {
1518
height: 100vh;
19+
background-size: cover;
20+
1621
}
22+
1723
display: flex;
1824
align-items: flex-start;
1925
justify-content: center;
2026
flex-wrap: wrap;
2127
//border-bottom:$border;
2228
position: relative;
2329
overflow: hidden;
24-
.hero-bg {
25-
$hero-w: 3330px;
26-
$hero-h: 1250px;
27-
//background: url(/all_static/images/api-home.jpg) 50% 50% !important;
28-
//height: 45vh;
29-
height:400px;
30-
left: 50% !important;
31-
margin-left: $hero-w*-0.5;
32-
top: -50px !important;
33-
width:$hero-w;
34-
position: absolute;
35-
z-index: 1;
36-
//transform: scale(0.45) !important;
3730

38-
@include handheld {
39-
height: 100vh;
40-
left: 50% !important;
41-
margin-left: -1200px;
42-
top: -169px !important;
43-
width: 2400px;
44-
position: absolute;
45-
z-index: 1;
46-
transform: scale(0.65) !important;
47-
}
48-
img {
49-
//left: -1200px !important;
50-
//top:-300px !important;
51-
position: absolute;
52-
top:0;
53-
left: 0;
54-
}
55-
}
5631
.\--welcome {
5732
position: relative;
5833
z-index: 2;
@@ -61,16 +36,22 @@
6136
align-items: center;
6237
justify-content: center;
6338
flex-wrap: wrap;
64-
color: $grey;
39+
color: #fff;
6540
margin-top: 120px;
66-
max-width: 580px;
41+
max-width: 700px;
6742
text-align: center;
6843
@include handheld {
6944
margin-top:$unit*11;
7045
}
46+
h2{
47+
font-size: 28pt;
48+
font-family: "Asap", sans-serif;
49+
margin-bottom: 0;
50+
margin-top: 20px;
51+
}
7152
h1 {
7253
width: 100%;
73-
font-size: 5rem;
54+
7455
@include handheld {
7556
font-size: 3rem;
7657
padding: $unit $unit*4;
@@ -90,7 +71,8 @@
9071
}
9172
}
9273
span {
93-
color: lighten($grey, 100%);
74+
color: #fff;
75+
font-size: 14pt;
9476
text-transform: uppercase;
9577
letter-spacing: 2px;
9678
}

0 commit comments

Comments
 (0)