File tree Expand file tree Collapse file tree 3 files changed +38
-4
lines changed Expand file tree Collapse file tree 3 files changed +38
-4
lines changed Original file line number Diff line number Diff line change 9
9
< div class ="nav-container ">
10
10
< div class ="container ">
11
11
< div class ="pure-menu pure-menu-horizontal " role ="navigation " aria-label ="Main navigation ">
12
- < form action ="/releases/search " method ="GET " class ="landing-search-form-nav ">
12
+ < form action ="/releases/search " method ="GET "
13
+ class ="landing-search-form-nav {% if not is_latest_version %}not-latest{% endif %} ">
13
14
{# The search bar #}
14
15
< div id ="search-input-nav " class ="pure-menu-right ">
15
16
< label for ="nav-search ">
Original file line number Diff line number Diff line change 8
8
< ul class ="pure-menu-list ">
9
9
{% if 'krate' in __tera_context %}
10
10
< li class ="pure-menu-item pure-menu-has-children ">
11
- < a href ="# " class ="pure-menu-link " title ="{{ krate.description }} ">
11
+ < a href ="# " class ="pure-menu-link crate-name " title ="{{ krate.description }} ">
12
12
{{ "cube" | fas }}
13
13
< span class ="title "> {{ krate.name }}-{{ krate.version }}</ span >
14
14
</ a >
163
163
</ li >
164
164
{% else %}
165
165
< li class ="pure-menu-item ">
166
- < a href ="{{ crate_url | safe }} " class ="pure-menu-link " title ="{{ metadata.description }} ">
166
+ < a href ="{{ crate_url | safe }} " class ="pure-menu-link crate-name " title ="{{ metadata.description }} ">
167
167
{{ "cube" | fas }}
168
168
< span class ="title "> {{ metadata.name }}-{{ metadata.version }}</ span >
169
169
</ a >
Original file line number Diff line number Diff line change @@ -43,6 +43,12 @@ div.nav-container {
43
43
color : var (--color-standard );
44
44
background-color : inherit ;
45
45
}
46
+
47
+ & .crate-name {
48
+ text-overflow : ellipsis ;
49
+ overflow : hidden ;
50
+ max-width : 200px ;
51
+ }
46
52
}
47
53
48
54
.pure-menu-right {
@@ -121,11 +127,38 @@ div.nav-container {
121
127
// use a .title span inside a menu to hide it on small screens
122
128
span .title {
123
129
display : none ;
124
- @media #{$media-sm } {
130
+ @media screen and (min-width : 872px ) {
131
+ display : inline ;
132
+ }
133
+ }
134
+
135
+ .pure-menu-right span .title {
136
+ @media screen and (min-width : 872px ) {
137
+ display : none ;
138
+ }
139
+ @media screen and (min-width : 965px ) {
125
140
display : inline ;
126
141
}
127
142
}
128
143
144
+ form .landing-search-form-nav.not-latest {
145
+ span .title {
146
+ display : none ;
147
+ @media screen and (min-width : 973px ) {
148
+ display : inline ;
149
+ }
150
+ }
151
+
152
+ .pure-menu-right span .title {
153
+ @media screen and (min-width : 973px ) {
154
+ display : none ;
155
+ }
156
+ @media screen and (min-width : 1125px ) {
157
+ display : inline ;
158
+ }
159
+ }
160
+ }
161
+
129
162
// Make menu item optional and disappear on small screens
130
163
.pure-menu-opt {
131
164
display : none ;
You can’t perform that action at this time.
0 commit comments