added 'stage' partial to homepage

This commit is contained in:
fmittag committed 2014-05-27 15:25:42 +02:00
1 parent d6f0af3d40
commit b58c35178a
17 files changed
+205 -135

No files matched your search

@@ -17,7 +17,7 @@ public class HomeEntryPoint extends AbstractEntryPoint {
EntryPointHelper.registerASyncService((ServiceDefTarget) clientFactory.getSailingService(), RemoteServiceMappingConstants.sailingServiceRemotePath);
ApplicationHistoryMapper applicationHistoryMapper = GWT.create(ApplicationHistoryMapper.class);
onModuleLoad(clientFactory, applicationHistoryMapper, new ApplicationActivityMapper(clientFactory));
HomeResources.INSTANCE.css().ensureInjected();
HomeResources.INSTANCE.mainCss().ensureInjected();
StyleInjector.injectAtEnd("@media (min-width: 25em) { "+HomeResources.INSTANCE.smallCss().getText()+"}");
StyleInjector.injectAtEnd("@media (min-width: 50em) { "+HomeResources.INSTANCE.mediumCss().getText()+"}");
}
@@ -9,7 +9,7 @@ public interface HomeResources extends ClientBundle {
public static final HomeResources INSTANCE = GWT.create(HomeResources.class);
@Source("com/sap/sailing/gwt/home/main.css")
MainCss css();
MainCss mainCss();
@Shared
public interface MainCss extends CssResource {
@@ -4,7 +4,7 @@
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
<g:HTMLPanel>
<div ui:field="loadingMessage" style="position:absolute; top:0; left:0; background-color:yellow;">Loading...</div>
<div ui:field="loadingMessage" style="display: none; position:absolute; top:0; left:0; background-color:yellow;">Loading...</div>
<s:HeaderPanel ui:field="headerPanel" />
@@ -13,8 +13,8 @@
<g:VerticalPanel styleName="{style.panel}">
<g:HTML>
Contact content
<div class="{res.css.smalloffset11}">Humba Humba</div>
<div class="{res.css.medium9}">Humba Humba</div>
<div class="{res.mainCss.smalloffset11}">Humba Humba</div>
<div class="{res.mainCss.medium9}">Humba Humba</div>
</g:HTML>
</g:VerticalPanel>
</ui:UiBinder>
@@ -2,8 +2,10 @@ package com.sap.sailing.gwt.home.client.app.start;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
import com.sap.sailing.gwt.home.client.shared.Stage;
public class SmartphoneStartView extends Composite implements StartView {
private static StartPageMobileViewUiBinder uiBinder = GWT.create(StartPageMobileViewUiBinder.class);
@@ -11,6 +13,8 @@ public class SmartphoneStartView extends Composite implements StartView {
interface StartPageMobileViewUiBinder extends UiBinder<Widget, SmartphoneStartView> {
}
@UiField Stage stage;
public SmartphoneStartView() {
super();
@@ -1,17 +1,11 @@
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared"
xmlns:g="urn:import:com.google.gwt.user.client.ui">
<ui:style>
.panel {
width: 100%;
background-color: rgb(255,255,255);
border: solid 1px black;
}
</ui:style>
<ui:with field="res" type="com.sap.sailing.gwt.home.client.HomeResources" />
<g:VerticalPanel styleName="{style.panel}">
<g:HTML>
Home content MOBILE
</g:HTML>
</g:VerticalPanel>
<g:HTMLPanel>
<s:Stage ui:field='stage'/>
</g:HTMLPanel>
</ui:UiBinder>
@@ -5,14 +5,16 @@ import com.google.gwt.event.shared.EventBus;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
public class StartActivity extends AbstractActivity {
private final StartClientFactory clientFactory;
public StartActivity(StartPlace place, StartClientFactory clientFactory) {
// TODO Auto-generated constructor stub
this.clientFactory = clientFactory;
}
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
// TODO Auto-generated method stub
final StartView view = clientFactory.createStartView();
panel.setWidget(view.asWidget());
}
}
@@ -4,31 +4,18 @@ import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
import com.sap.sailing.gwt.home.client.shared.Stage;
public class TabletAndDesktopStartView extends Composite implements StartView {
private static StartPageViewUiBinder uiBinder = GWT.create(StartPageViewUiBinder.class);
@UiField
Label bannerSeriesName;
@UiField
Label bannerName;
@UiField
Label bannerLocation;
@UiField
Label upcomingMessage;
@UiField
Label upcomingName;
@UiField
Label upcomingAction;
interface StartPageViewUiBinder extends UiBinder<Widget, TabletAndDesktopStartView> {
}
@UiField Stage stage;
public TabletAndDesktopStartView() {
super();
initWidget(uiBinder.createAndBindUi(this));
}
@@ -1,103 +1,11 @@
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.app.start"
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared"
xmlns:g="urn:import:com.google.gwt.user.client.ui">
<ui:with field="res" type="com.sap.sailing.gwt.home.client.HomeResources" />
<ui:style>
.events {
font-size: 16px;
font-size: 1rem;
padding: 3.75em 0;
}
.events-banner {
font-size: 16px;
font-size: 1rem;
line-height: 1;
background-position: top center;
background-repeat: no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
height: 36.25em;
position: relative;
}
.events-banner_title {
position: absolute;
top: 4.0625em;
left: 0;
right: 0;
text-shadow: 0 0 1.125em rgba(0,0,0,0.13), 0 0.125em 0.0625em rgba(0,0,0,0.25);
text-align: center;
}
.events-banner_title_series {
font-size: 2.25em;
font-weight: 400;
color: #fff;
margin: 0;
}
.events-banner_title_name {
font-size: 6.625em;
font-weight: 700;
color: #fff;
margin: 0;
}
.events-banner_title_location {
font-size: 1.875em;
font-weight: 600;
color: #fff;
margin: 0;
}
.events-banner_band {
position: absolute;
bottom: 0;
right: 0;
left: 0;
background-color: rgba(51,51,51,0.6);
text-align: center;
padding: 1.5625em;
}
.events-banner_band_message {
display: inline-block;
color: #f0ab00;
font-size: 1.5em;
font-weight: 700;
text-shadow: 0 0 0.625em rgba(51,51,51,0.45);
text-transform: uppercase;
}
.events-banner_band_name {
display: inline-block;
color: #fff;
font-size: 1.5em;
text-shadow: 0 0 0.625em rgba(51,51,51,0.45);
}
.events-banner_band_action {
font-size: 1.125em;
padding: 0.875em 1.875em;
margin-left: 1.25em;
text-transform: none;
}
</ui:style>
<g:HTMLPanel>
<div style="background-image: url('images/banner-background.jpg')" class="events-banner">
<div class="{style.events-banner_title}">
<h3 class="{style.events-banner_title_series}"><g:Label ui:field="bannerSeriesName" /></h3>
<h2 class="{style.events-banner_title_name}"><g:Label ui:field="bannerName" /></h2>
<h3 class="{style.events-banner_title_location}"><g:Label ui:field="bannerLocation" />,&nbsp;
</h3>
</div>
<div class="{style.events-banner_band}">
<div class="{res.css.grid}">
<div class="{res.css.small12} {res.css.columns}">
<div class="{style.events-banner_band_message}"><g:Label ui:field="upcomingMessage" />&nbsp;-
</div>
<div class="{style.events-banner_band_name}"><g:Label ui:field="upcomingName" /></div>
<button class="{res.css.button} {style.events-banner_band_action}"><g:Label ui:field="upcomingAction" /></button>
</div>
</div>
</div>
</div>
<button class="{res.css.button} events_show-all">Show all events</button>
<s:Stage ui:field='stage'/>
</g:HTMLPanel>
</ui:UiBinder>
@@ -35,9 +35,9 @@
</ui:style>
<g:HTMLPanel>
<footer class="{style.sitefooter}">
<div class="{res.css.grid}">
<div class="{res.css.small6} {res.css.columns} {style.sitefooter_copyright}">© 2014&nbsp;&nbsp;&nbsp;SAP Sailing Analytics</div>
<div class="{res.css.small6} {res.css.columns} {style.sitefooter_links}"><a href="" class="{style.sitefooter_links_link}">Legal Disclosure</a><a href="" class="{style.sitefooter_links_link}">Privacy</a></div>
<div class="{res.mainCss.grid}">
<div class="{res.mainCss.small6} {res.mainCss.columns} {style.sitefooter_copyright}">© 2014&nbsp;&nbsp;&nbsp;SAP Sailing Analytics</div>
<div class="{res.mainCss.small6} {res.mainCss.columns} {style.sitefooter_links}"><a href="" class="{style.sitefooter_links_link}">Legal Disclosure</a><a href="" class="{style.sitefooter_links_link}">Privacy</a></div>
</div>
</footer>
</g:HTMLPanel>
@@ -8,11 +8,11 @@
type="com.sap.sailing.gwt.home.client.shared.HeaderPanelResources" />
<g:HTMLPanel>
<header class="{local_res.css.siteheader}">
<div class="{res.css.grid}">
<div class="{res.css.small4} {res.css.columns}">
<div class="{res.mainCss.grid}">
<div class="{res.mainCss.small4} {res.mainCss.columns}">
<g:Image resource="{local_res.logo}" altText="SAP Sailing Analytics" styleName="{local_res.css.logo}"></g:Image>
</div>
<div class="{res.css.small8} {res.css.columns}">
<div class="{res.mainCss.small8} {res.mainCss.columns}">
<g:FlowPanel styleName="{local_res.css.sitenavigation}">
<s:MainMenu ui:field="mainMenu" />
</g:FlowPanel>
@@ -0,0 +1,85 @@
/**
* Main stage area
*/
.stage {
display: -webkit-box;
display: -moz-box;
display: -webkit-flex;
display: -ms-flexbox;
display: box;
display: flex;
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-o-box-orient: vertical;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: start;
-moz-box-pack: start;
-o-box-pack: start;
-ms-flex-pack: start;
-webkit-justify-content: flex-start;
justify-content: flex-start;
font-size: 16px;
font-size: 1rem;
line-height: 1;
background-position: top center;
background-repeat: no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
height: 36.25em;
position: relative;
}
.stage_header {
padding: 4.875em;
text-shadow: 0 0 18px rgba(0,0,0,0.13), 0 2px 6px rgba(0,0,0,0.25);
text-align: center;
}
.stage_header_subtitle {
font-size: 1.875em;
font-weight: 400;
color: #fff;
margin: 0;
}
.stage_header_title {
font-size: 4.5em;
font-weight: 700;
color: #fff;
margin: 0;
}
.stage_header_message {
font-size: 1.875em;
font-weight: 600;
color: #fff;
margin: 0;
}
.stage_band {
position: absolute;
bottom: 0;
right: 0;
left: 0;
background-color: rgba(51,51,51,0.6);
text-align: center;
padding: 1.5625em;
}
.stage_band_message {
display: inline-block;
color: #f0ab00;
font-size: 1.5em;
font-weight: 700;
text-shadow: 0 0 0.625em rgba(51,51,51,0.45);
text-transform: uppercase;
}
.stage_band_name {
display: inline-block;
color: #fff;
font-size: 1.5em;
text-shadow: 0 0 0.625em rgba(51,51,51,0.45);
}
.stage_band_action {
font-size: 1.125em;
padding: 0.875em 1.875em;
margin-left: 1.25em;
text-transform: none;
}
@@ -0,0 +1,29 @@
package com.sap.sailing.gwt.home.client.shared;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
public class Stage extends Composite {
@UiField Label subtitle;
@UiField Label title;
@UiField Label message;
@UiField Label message2;
@UiField Label name;
@UiField Label action;
interface StageUiBinder extends UiBinder<Widget, Stage> {
}
private static StageUiBinder uiBinder = GWT.create(StageUiBinder.class);
public Stage() {
StageResources.INSTANCE.css().ensureInjected();
initWidget(uiBinder.createAndBindUi(this));
}
}
@@ -0,0 +1,27 @@
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
<ui:with field="i18n" type="com.sap.sailing.gwt.home.client.i18n.TextMessages" />
<ui:with field="res" type="com.sap.sailing.gwt.home.client.HomeResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.shared.StageResources" />
<g:HTMLPanel>
<!-- The main stage -->
<div style="background-image: url('images/home/banner-background.jpg')" class="{local_res.css.stage}">
<header class="{local_res.css.stage_header}">
<p class="{local_res.css.stage_header_subtitle}"><g:Label ui:field='subtitle' /></p>
<h2 class="{local_res.css.stage_header_title}"><g:Label ui:field='title' /></h2>
<div class="{local_res.css.stage_header_message}"><g:Label ui:field='message' /></div>
</header>
<div class="{local_res.css.stage_band}">
<div class="{res.mainCss.grid}">
<div class="{res.mainCss.small12} {res.mainCss.columns}">
<div class="{local_res.css.stage_band_message}"><g:Label ui:field='message2' />&nbsp;-
</div>
<div class="{local_res.css.stage_band_name}"><g:Label ui:field='name' /></div>
<button class="{res.mainCss.button} {local_res.css.stage_band_action}"><g:Label ui:field='action' text='Full event schedule'/></button>
</div>
</div>
</div>
</div>
</g:HTMLPanel>
</ui:UiBinder>
@@ -0,0 +1,24 @@
package com.sap.sailing.gwt.home.client.shared;
import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.CssResource;
public interface StageResources extends ClientBundle {
public static final StageResources INSTANCE = GWT.create(StageResources.class);
@Source("com/sap/sailing/gwt/home/client/shared/stage.css")
LocalCss css();
public interface LocalCss extends CssResource {
String stage();
String stage_header();
String stage_header_subtitle();
String stage_header_title();
String stage_header_message();
String stage_band();
String stage_band_message();
String stage_band_name();
String stage_band_action();
}
}
@@ -56,6 +56,16 @@
<!-- Specify the paths for translatable code -->
<extend-property name="locale" values="de" />
<set-property name="gwt.logging.enabled" value="TRUE"/>
<set-property name="gwt.logging.logLevel" value="FINE"/>
<set-property name="gwt.logging.firebugHandler" value="ENABLED" />
<set-property name="gwt.logging.simpleRemoteHandler" value="ENABLED" />
<set-property name="gwt.logging.consoleHandler" value="ENABLED" />
<set-property name="gwt.logging.developmentModeHandler" value="DISABLED" />
<set-property name="gwt.logging.popupHandler" value="DISABLED" />
<set-property name="gwt.logging.systemHandler" value="ENABLED" />
<source path='ui/common' />
<source path='ui/client' />
<source path='ui/shared' />