mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-23 12:33:53 +00:00
Adjusted desktop EventHeader to improve the dropdown and unify duplicate
styles
This commit is contained in:
1 parent
00a6eb920e
commit
d4e9140321
5 files changed
+65
-96
No files matched your search
+1
-1
@@ -28,7 +28,7 @@ public class DropdownItem extends Widget {
|
||||
setElement(uiBinder.createAndBindUi(this));
|
||||
|
||||
if(active) {
|
||||
getElement().addClassName(local_res.css().dropdownregattas_content_linkactive());
|
||||
getElement().addClassName(local_res.css().dropdown_content_linkactive());
|
||||
}
|
||||
|
||||
this.link.setHref(link);
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
</ui:style>
|
||||
<a ui:field="link" class="{local_res.css.dropdown_content_link} {local_res.css.dropdownregattas_content_link}">
|
||||
<div ui:field="title" class="{local_res.css.dropdown_content_link_title} {local_res.css.dropdownregattas_content_link_title}">
|
||||
<a ui:field="link" class="{local_res.css.dropdown_content_link}">
|
||||
<div ui:field="title" class="{local_res.css.dropdown_content_link_title}">
|
||||
<!-- regatta.name -->
|
||||
</div>
|
||||
</a>
|
||||
|
||||
+54
-78
@@ -10,92 +10,40 @@
|
||||
}
|
||||
.dropdown {
|
||||
font-size: 1rem;
|
||||
width: 20em;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
}
|
||||
.dropdown_head {
|
||||
display: block;
|
||||
}
|
||||
.dropdown_head_title {
|
||||
font-size: 1.866666666666667em;
|
||||
cursor: pointer;
|
||||
background: #f8f8f8;
|
||||
color: #cfcfcf;
|
||||
height: 1.464285714285714em;
|
||||
line-height: 1.428571428571429em;
|
||||
padding-left: 0.535714285714286em;
|
||||
font-weight: 700;
|
||||
}
|
||||
.dropdown_head_title_button {
|
||||
float: right;
|
||||
}
|
||||
.dropdown_content {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
background: #f6f9fc;
|
||||
display: none;
|
||||
width: 20em;
|
||||
height: auto;
|
||||
max-height: 23.333333333333332em;
|
||||
overflow: auto;
|
||||
box-shadow: 0 0.066666666666667em 0.266666666666667em #eee;
|
||||
border-bottom: solid 1px #eee;
|
||||
}
|
||||
.jsdropdownactive .dropdown_content {
|
||||
display: block;
|
||||
}
|
||||
.dropdown_content_link {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
padding: 1.333333333333333em 3.333333333333333em 1em 1em;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
}
|
||||
.dropdown_content_link:hover,
|
||||
.dropdown_content_link:focus {
|
||||
background: #f8f8f8;
|
||||
text-decoration: none;
|
||||
}
|
||||
.dropdown_content_link:hover .dropdown_content_link_title,
|
||||
.dropdown_content_link:focus .dropdown_content_link_title {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.dropdown_content_link_title {
|
||||
color: #008fcc;
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
.dropdown_content_link_subtitle {
|
||||
color: #cfcfcf;
|
||||
font-size: 1.066666666666667em;
|
||||
}
|
||||
.dropdownregattas {
|
||||
width: 100%;
|
||||
min-width: 21.333333333333332em;
|
||||
margin-left: -0.666666666666667em;
|
||||
}
|
||||
.dropdownregattas_head {
|
||||
display: inherit;
|
||||
}
|
||||
.dropdownregattas_head_title {
|
||||
padding-left: 0.357142857142857em;
|
||||
background: #f2f2f2;
|
||||
color: #333;
|
||||
.dropdown_head {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
padding-left: 0.75em;
|
||||
padding-right: 1.75em;
|
||||
border-radius: 0.107142857142857em;
|
||||
border: 1px solid transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
.dropdownregattas_head_title:hover {
|
||||
.dropdown_head:hover {
|
||||
border: 1px solid #cfcfcf;
|
||||
background-color: #eee;
|
||||
text-decoration: none;
|
||||
}
|
||||
.dropdownregattas_head_title_button {
|
||||
position: relative;
|
||||
.dropdown_head_title {
|
||||
font-size: 1.866666666666667em;
|
||||
color: #333;
|
||||
height: 1.464285714285714em;
|
||||
line-height: 1.428571428571429em;
|
||||
font-weight: 700;
|
||||
}
|
||||
.dropdown_head_title_button {
|
||||
position: absolute;
|
||||
top: 0.75em;
|
||||
right: 0;
|
||||
display: inline-block;
|
||||
margin-left: 0.714285714285714em;
|
||||
top: 50%;
|
||||
height: 0.285714285714286em;
|
||||
width: 0.428571428571429em;
|
||||
background-image: url("images/home/dropdown__button--arrow@2x.png");
|
||||
@@ -108,20 +56,51 @@
|
||||
transform: translate(-50%, -50%);
|
||||
float: none;
|
||||
}
|
||||
.dropdownregattas_content {
|
||||
.dropdown_content {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
display: none;
|
||||
height: auto;
|
||||
max-height: 23.333333333333332em;
|
||||
overflow: auto;
|
||||
width: auto;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: 0.133333333333333em 0.133333333333333em 0.333333333333333em #ccc;
|
||||
}
|
||||
.dropdownregattas_content_link {
|
||||
.dropdownregattas_content {
|
||||
}
|
||||
.jsdropdownactive .dropdown_content {
|
||||
display: block;
|
||||
}
|
||||
.dropdown_content_link {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
padding: 1.333333333333333em 3.333333333333333em 1em 1em;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
position: relative;
|
||||
border: none;
|
||||
}
|
||||
.dropdownregattas_content_link:hover {
|
||||
.dropdown_content_link:hover,
|
||||
.dropdown_content_link:focus {
|
||||
background: #f8f8f8;
|
||||
text-decoration: none;
|
||||
}
|
||||
.dropdownregattas_content_linkactive:after {
|
||||
.dropdown_content_link:hover .dropdown_content_link_title,
|
||||
.dropdown_content_link:focus .dropdown_content_link_title {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.dropdown_content_link_title {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
font-size: 1.2em;
|
||||
color: #666;
|
||||
}
|
||||
.dropdown_content_link_subtitle {
|
||||
color: #cfcfcf;
|
||||
font-size: 1.066666666666667em;
|
||||
}
|
||||
.dropdown_content_linkactive:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 1.333333333333333em;
|
||||
@@ -137,9 +116,6 @@
|
||||
-ms-transform: translate(0, -50%);
|
||||
transform: translate(0, -50%);
|
||||
}
|
||||
.dropdownregattas_content_link_title {
|
||||
color: #666;
|
||||
}
|
||||
.leaderboardquickaccess {
|
||||
font-size: 1rem;
|
||||
text-align: right;
|
||||
|
||||
+7
-7
@@ -11,19 +11,19 @@
|
||||
<a ui:field="eventLogoAnchorUi"><div ui:field="eventLogo" class="{local_res.css.eventheader_intro_logo_image}" /></a>
|
||||
</div>
|
||||
<!-- IF header.dropdown === 'regattas' -->
|
||||
<div ui:field="dropdownTitle" class="{local_res.css.dropdown} {local_res.css.dropdownregattas} {local_res.css.jsdropdown}">
|
||||
<div class="{local_res.css.dropdown_head} {local_res.css.dropdownregattas_head} {local_res.css.jsdropdown_head}">
|
||||
<a ui:field="dropdownTrigger" class="{local_res.css.dropdown_head_title} {local_res.css.dropdownregattas_head_title}">
|
||||
<div ui:field="dropdownTitle" class="{local_res.css.dropdown} {local_res.css.jsdropdown}">
|
||||
<a ui:field="dropdownTrigger" class="{local_res.css.dropdown_head} {local_res.css.jsdropdown_head}">
|
||||
<span class="{local_res.css.dropdown_head_title}">
|
||||
<span ui:field="dropdownEventName"></span>
|
||||
<!-- IF event.state === 'live' -->
|
||||
<div ui:field="dropdownEventState" data-labeltype="live" class="{res.mainCss.label} {res.mainCss.labellarge}">
|
||||
<!-- <ui:text from='{i18n.live}' /> -->
|
||||
</div>
|
||||
<!-- IFEND event.state === 'live' -->
|
||||
<div class="{local_res.css.dropdown_head_title_button} {local_res.css.dropdownregattas_head_title_button}"></div>
|
||||
</a>
|
||||
</div>
|
||||
<g:FlowPanel ui:field="dropdownContent" addStyleNames="{local_res.css.dropdown_content} {local_res.css.dropdownregattas_content} {local_res.css.jsdropdown_content}">
|
||||
<div class="{local_res.css.dropdown_head_title_button}"></div>
|
||||
</span>
|
||||
</a>
|
||||
<g:FlowPanel ui:field="dropdownContent" addStyleNames="{local_res.css.dropdown_content} {local_res.css.jsdropdown_content}">
|
||||
<!-- EACH regattaItem in event.regattas -->
|
||||
<!-- TODO <s:eventHeader.RegattasDropdownItem ui:field='regattaItem'></s> -->
|
||||
<!-- EACHEND -->
|
||||
|
||||
+1
-8
@@ -23,14 +23,7 @@ public interface EventHeaderResources extends ClientBundle {
|
||||
String dropdown_content_link();
|
||||
String dropdown_content_link_title();
|
||||
String dropdown_content_link_subtitle();
|
||||
String dropdownregattas();
|
||||
String dropdownregattas_head();
|
||||
String dropdownregattas_head_title();
|
||||
String dropdownregattas_head_title_button();
|
||||
String dropdownregattas_content();
|
||||
String dropdownregattas_content_link();
|
||||
String dropdownregattas_content_linkactive();
|
||||
String dropdownregattas_content_link_title();
|
||||
String dropdown_content_linkactive();
|
||||
String leaderboardquickaccess();
|
||||
String eventheader();
|
||||
String eventheader_breadcrumb();
|
||||
|
||||
Reference in new issue
Block a user