File tree Expand file tree Collapse file tree 8 files changed +72
-8
lines changed Expand file tree Collapse file tree 8 files changed +72
-8
lines changed Original file line number Diff line number Diff line change 1
- <header local-class =" header" >
1
+ <header local-class =" header {{ if @ hero " hero " }} " >
2
2
<div local-class =" header-inner" >
3
3
<LinkTo @route =" index" local-class =" index-link" >
4
4
<img src =" /assets/Cargo-Logo-Small.png" role =" presentation" alt =" " local-class =" logo" >
5
5
<h1 >crates.io</h1 >
6
6
</LinkTo >
7
7
8
- <SearchForm local-class =" search-form" />
8
+ <div local-class =" search-form" >
9
+ <h1 local-class =" hero-title" >
10
+ The Rust community’ s crate registry
11
+ </h1 >
12
+
13
+ <SearchForm @size ={{ if @hero " big" }} />
14
+ </div >
9
15
10
16
<nav local-class =' nav' >
11
17
<LinkTo @route =" crates" @query ={{ hash letter =null page =1 }} data-test-all-crates-link>
Original file line number Diff line number Diff line change 32
32
"search search" auto /
33
33
auto 1fr ;
34
34
}
35
+
36
+ .hero & {
37
+ grid-template :
38
+ "logo nav" auto
39
+ "search search" auto /
40
+ auto 1fr ;
41
+
42
+ @media only screen and (max-width : 900px ) {
43
+ grid-template :
44
+ "logo menu" auto
45
+ "search search" auto /
46
+ auto 1fr ;
47
+ }
48
+ }
35
49
}
36
50
37
51
.index-link {
59
73
@media only screen and (max-width : 820px ) {
60
74
padding : 10px 0 ;
61
75
}
76
+
77
+ .hero & {
78
+ justify-self : center;
79
+ padding : 40px 0 60px ;
80
+
81
+ @media only screen and (max-width : 450px ) {
82
+ padding : 40px 0 30px ;
83
+ }
84
+ }
85
+ }
86
+
87
+ .hero-title {
88
+ display : none;
89
+ margin : 0 0 20px ;
90
+ font-size : 45px ;
91
+ color : # dfffdb ;
92
+ text-align : center;
93
+
94
+ .hero & {
95
+ display : block;
96
+ }
97
+
98
+ @media only screen and (max-width : 820px ) {
99
+ font-size : 30px ;
100
+ }
101
+
102
+ @media only screen and (max-width : 550px ) {
103
+ font-size : 24px ;
104
+ }
62
105
}
63
106
64
107
.sep {
75
118
grid-area : nav;
76
119
display : flex;
77
120
align-items : center;
78
- text-align : right ;
121
+ justify-self : end ;
79
122
80
123
@media only screen and (max-width : 900px ) {
81
124
display : none;
84
127
85
128
.menu {
86
129
grid-area : menu;
87
- text-align : right ;
130
+ justify-self : end ;
88
131
display : none;
89
132
90
133
@media only screen and (max-width : 900px ) {
Original file line number Diff line number Diff line change 1
1
<form
2
- local-class =" form"
2
+ local-class =" form {{ if ( eq @ size " big " ) " size-big " }} "
3
3
action =" /search"
4
4
role =" search"
5
5
data-test-search-form
Original file line number Diff line number Diff line change 17
17
box-shadow : none;
18
18
transition : box-shadow 150ms ;
19
19
20
+ .size-big & {
21
+ font-size : 125% ;
22
+ padding : 5px 5px 5px 35px ;
23
+ background-position : 10px 7px ;
24
+ background-size : 20px 21px ;
25
+ }
26
+
20
27
& : focus {
21
28
outline : none;
22
29
box-shadow : 0 0 0 4px var (--yellow500 );
Original file line number Diff line number Diff line change @@ -4,4 +4,9 @@ import { inject as service } from '@ember/service';
4
4
export default class ApplicationController extends Controller {
5
5
@service design ;
6
6
@service progress ;
7
+ @service router ;
8
+
9
+ get isIndex ( ) {
10
+ return this . router . currentRouteName === 'index' ;
11
+ }
7
12
}
Original file line number Diff line number Diff line change 1
1
.title-header {
2
2
text-align : center;
3
3
border-bottom : 5px solid var (--gray-border );
4
+ margin-top : 25px ;
4
5
padding-bottom : 40px ;
5
6
7
+ @media only screen and (max-width : 570px ) {
8
+ margin-top : 0 ;
9
+ }
10
+
6
11
h1 {
7
12
font-size : 50px ;
8
13
@media only screen and (max-width : 370px ) {
Original file line number Diff line number Diff line change 5
5
<ProgressBar />
6
6
<NotificationContainer @position =" top-right" />
7
7
8
- <Header />
8
+ <Header @ hero = {{ this.isIndex }} />
9
9
10
10
<main local-class =" main" >
11
11
<div local-class =" inner-main" >
Original file line number Diff line number Diff line change 1
1
<div local-class =' title-header' >
2
- <h1 >The Rust community’ s crate registry</h1 >
3
-
4
2
<div local-class =' links' >
5
3
<a href =" https://doc.rust-lang.org/cargo/getting-started/installation.html" local-class =" hero-button" data-test-install-cargo-link>
6
4
{{ svg-jar " download-arrow" local-class =" icon" }}
You can’t perform that action at this time.
0 commit comments