Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/offsite2014 #3

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tv/js/offsite2014.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tv/js/site.min.js

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions tv/offsite2014.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@
var configRequire = {};
configRequire[config.app + '/project/offsite2014/widget/get-data/main'] = {
handler: {
"new-comers": "http://10.128.34.240:8099/newsletter"
"new-comers": "http://10.128.34.240:8099/newcommer",
"meet-our-people": "http://10.128.34.240:8099/meetourpeople"
}
};
configRequire[config.app + '/project/offsite2014/page/index/main'] = {
span: 5000
span: 1000
};
configRequire[config.app + '/project/offsite2014/page/index/widget/qa-dashboard/main'] = {
handler: "http://jenkins.englishtown.com:8080",
span: 10000
};
require.config({
context: config.context || '_',
Expand All @@ -46,7 +51,10 @@
<div class="header-bar"></div>
<div class="new-comers"></div>
<div class="meet-our-people"></div>
<div class="qa-dashboard"></div>
</div>

<div class="console"></div>

</body>
</html>
15 changes: 15 additions & 0 deletions tv/src/project/offsite2014/page/index/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ body {
height: 1080px;
*/
}
.console {
position: absolute;
z-index: 10;
left: 0;
bottom: 0.5em;
width: 100%;
height: 2em;
font-size: 12px;
line-height: 1em;
color: Red;
text-align: center;
background-color: transparent;
opacity: 0.2;
filter: alpha(opacity=20);
}
@media (max-width: 768px) {
body {
font-size: 12px;
Expand Down
23 changes: 18 additions & 5 deletions tv/src/project/offsite2014/page/index/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
'when',
'./widget/header-bar/main',
'./widget/new-comers/main',
'./widget/meet-our-people/main'
'./widget/meet-our-people/main',
'./widget/qa-dashboard/main'
], function (
module,
$,
Expand All @@ -19,7 +20,8 @@
when,
headerbar,
newcomers,
meetourpeople
meetourpeople,
qadashboard
) {
(new tagger()).tag({more: true});

Expand All @@ -29,20 +31,31 @@
$(domReady);
}

function getParameterByURL(n){var qs=window.location.href.toLowerCase().match(/[^\?#]+?\?(.*?)(?:#.*?)?$/i),m=qs?(new RegExp('(?:^|&)'+n+'=([^&]*?)(?:&|$)','i')).exec(qs[1]):qs;return m?m[1]:undefined};

function domReady($) {
var config = module.config(),
tabs = [{
$container: $('.new-comers'),
tab: newcomers
},{
$container: $('.meet-our-people'),
tab: meetourpeople
}],
isHeaderBarInit = false,
isFirstTabInit = false,
span = (config && config.span) ? config.span : 1000,
iCurrentTab = 0;

if (getParameterByURL('meetourpeople')) {
tabs.push({
$container: $('.meet-our-people'),
tab: meetourpeople
});
}

tabs.push({
$container: $('.qa-dashboard'),
tab: qadashboard
});

function switchTab() {
var tabCurrent = tabs[iCurrentTab].tab,
$containerCurrent = tabs[iCurrentTab].$container,
Expand Down
16 changes: 16 additions & 0 deletions tv/src/project/offsite2014/page/index/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@
*/
}

.console {
position: absolute;
z-index: 10;
left: 0;
bottom: 0.5em;
width: 100%;
height: 2em;
font-size: 12px;
line-height: 1em;
color: Red;
text-align: center;
background-color: transparent;
opacity: 0.2;
filter: alpha(opacity=20);
}

@media (max-width: 768px) {
body {
font-size: 12px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="row">
<div class="col-xs-12 item">
<div class="title"></div>
<div class="subtitle"></div>
<!-- <div class="subtitle"></div> -->
<div class="pre-line"></div>
<div class="icon"></div>
<div class="next-line"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
deferCssReady = when.defer(),
deferDomReady = when.defer(),
span = 3000,
numberOfDisplay = 12,
$container,
callbackData,
dataMeetOurPeople,
Expand All @@ -41,6 +42,9 @@
if (pConfig.span) {
span = pConfig.span;
}
if (pConfig.numberOfDisplay) {
numberOfDisplay = pConfig.numberOfDisplay;
}
}
}

Expand Down Expand Up @@ -71,7 +75,14 @@
detail: false,
};
callbackData = function(data) {
dataMeetOurPeople = data['new-comers'];
if (!data['meet-our-people'] && !(data['meet-our-people'] instanceof Array)) {
return;
}
var arrDataMeetOurPeople = [];
for (var i = 0, len = data['meet-our-people'].length; i < len && i < numberOfDisplay; i++) {
arrDataMeetOurPeople.push(data['meet-our-people'][i]);
}
dataMeetOurPeople = arrDataMeetOurPeople;
list.update(dataMeetOurPeople).then(function () {
if (!isInit.list) {
if (!isInit.detail && dataMeetOurPeople.length > indexCurrent) {
Expand All @@ -94,7 +105,7 @@
}
});
};
pollingData.on('new-comers', callbackData);
pollingData.on('meet-our-people', callbackData);
$(window).on('resize', onResize);
onResize();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,64 +5,53 @@
.meet-our-people .detail .columns {
display: none;
position: relative;
height: 100%;
/*
-moz-column-count: 2;
-webkit-column-count: 2;
column-count: 2;
-moz-column-gap: 4em;
-webkit-column-gap: 4em;
column-gap: 4em;
*/
}
.meet-our-people .detail .columns .left,
.meet-our-people .detail .columns .right {
min-height: 100%;
-moz-column-count: 2;
-webkit-column-count: 2;
column-count: 2;
-moz-column-gap: 4em;
-webkit-column-gap: 4em;
column-gap: 4em;
}
.meet-our-people .detail .columns .header {
position: absolute;
top: 0;
width: 49%;
height: 100%;
overflow: hidden;
}
.meet-our-people .detail .columns .left {
top: 11em;
left: 0;
background-color: transparent;
}
.meet-our-people .detail .columns .left .header {
margin-top: 10em;
padding-right: 2em;
width: 50%;
}
.meet-our-people .detail .columns .left .header .pic {
.meet-our-people .detail .columns .header .pic {
width: 100%;
}
.meet-our-people .detail .columns .left .header .info {
.meet-our-people .detail .columns .header .info {
font-family: Georgia;
font-size: 1em;
font-style: italic;
}
.meet-our-people .detail .columns .left .header .info .name {
.meet-our-people .detail .columns .header .info .name {
font-family: Myriad Pro;
font-size: 3.6em;
font-size: 2.2em;
font-weight: bold;
}
.meet-our-people .detail .columns .left .touch {
margin-top: 4em;
.meet-our-people .detail .columns .body {
/* margin-top: 2.6em; */
}
.meet-our-people .detail .columns .body .desc {
font-family: Myriad Pro;
font-size: 1em;
line-height: 1.4em;
}
.meet-our-people .detail .columns .body .touch {
margin-top: 2em;
line-height: 1.4em;
color: #45A39A;
}
.meet-our-people .detail .columns .left .touch .touch-label {
.meet-our-people .detail .columns .body .touch .touch-label {
font-weight: bold;
}
.meet-our-people .detail .columns .left .touch .touch-mobile {
.meet-our-people .detail .columns .body .touch .touch-mobile {
margin-top: 1.4em;
}
.meet-our-people .detail .columns .left .touch .two-dimensional-code {
.meet-our-people .detail .columns .body .touch .two-dimensional-code {
width: 100%;
}
.meet-our-people .detail .columns .right {
right: 0;
}
.meet-our-people .detail .columns .right .desc {
margin-left: 2em;
font-family: Myriad Pro;
font-size: 1em;
line-height: 1.4em;
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<div class="columns">
<div class="left">
<div class="row header">
<div class="col-xs-6">
<img class="pic" src="" />
</div>
<div class="col-xs-1"></div>
<div class="col-xs-5 info">
<div class="label"></div>
<div class="name"></div>
<div class="position"></div>
<div class="date"></div>
</div>
<div class="row header">
<div class="col-xs-6">
<img class="pic" src="" />
</div>
<div class="col-xs-1"></div>
<div class="col-xs-5 info">
<!-- <div class="label"></div> -->
<div class="name"></div>
<div class="position"></div>
<!-- <div class="date"></div> -->
</div>
</div>
<div class="body">
<div class="desc"></div>
<!--
<div class="row touch">
<div class="col-xs-9">
<div class="touch-label">How to get in touch:</div>
Expand All @@ -22,8 +24,6 @@
<img class="two-dimensional-code pic2" src="" />
</div>
</div>
</div>
<div class="right body">
<div class="desc"></div>
-->
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@

function fadeIn($item) {
templateEngine($item, data);
var $desc = $item.find('.desc');
$desc.html((function () {
var strBR = '';
for (var i = 0; i < 19; i++) {
strBR += '<br />';
}
return strBR;
})() + $desc.html());
$item.fadeIn(function () {
deferShow.resolve();
});
Expand Down
Loading