Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
舰娘
* 现在点击舰娘可以查询详细信息了
* 航空战列舰、轻型航母、航空巡洋舰现在会显示“对潜”属性
* [修复] 修正“弹耗”数据
  • Loading branch information
Diablohu committed Mar 19, 2015
1 parent 6ade95f commit f10e703
Show file tree
Hide file tree
Showing 10 changed files with 132 additions and 19 deletions.
2 changes: 1 addition & 1 deletion app/assets/css-app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/css-base.css

Large diffs are not rendered by default.

24 changes: 23 additions & 1 deletion app/assets/js-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
_g.pathMakeObj( _g.path )

_g.data = {
'entities': {},
'ships': {},
'ship_id_by_type': [], // refer to _g.ship_type_order
'ship_types': {},
Expand Down Expand Up @@ -388,6 +389,13 @@ _frame.app_main = {
_db_loaded++

switch( db_name ){
case 'entities':
_db.entities.find({}, function(err, docs){
for(var i in docs ){
_g.data.entities[docs[i]['id']] = docs[i]
}
})
break;
case 'ship_namesuffix':
_db.ship_namesuffix.find({}).sort({ 'id': 1 }).exec(function(err, docs){
_g.data.ship_namesuffix = [{}].concat(docs)
Expand Down Expand Up @@ -507,7 +515,7 @@ _frame.app_main = {
'data-itemid': d['equip'][i],
'tooltip': true
})
name.html( 'ID: ' + d['equip'][i] )
name.html( '装备#' + d['equip'][i] )
slot.html( d['slot'][i] )
}
i++
Expand Down Expand Up @@ -544,6 +552,20 @@ _frame.app_main = {
_add_stat( 'fuel', '', _val( d['consum']['fuel'] ), stat_consum )
_add_stat( 'ammo', '', _val( d['consum']['ammo'] ), stat_consum )

// 声优&画师_g.data.entities
$('<div class="entity"/>')
.html(
'<strong>声优</strong>'
+ '<span>' + _g['data']['entities'][d['rels']['cv']]['name'][_g.lang] + '</span>'
)
.appendTo(dom)
$('<div class="entity"/>')
.html(
'<strong>画师</strong>'
+ '<span>' + _g['data']['entities'][d['rels']['illustrator']]['name'][_g.lang] + '</span>'
)
.appendTo(dom)

_frame.modal.show(
dom,
_g.getName( d['name'], '・' ) || '舰娘',
Expand Down
19 changes: 8 additions & 11 deletions app/page/about.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
<div class="about">
<h2>更新历史</h2>
<ul>
<strong>v0.2</strong>
<li>舰娘<ul>
<li>现在点击舰娘可以查询详细信息了</li>
<li>航空战列舰、轻型航母、航空巡洋舰现在会显示“对潜”属性</li>
<li>[修复] 修正“弹耗”数据</li>
</ul></li>
</ul>
</div>
<h2>更新历史</h2>
<h3>v0.2.0<small>2015/03/19</small></h3>
<ul>
<strong>舰娘</strong>
<li>现在点击舰娘可以查询详细信息了</li>
<li>航空战列舰、轻型航母、航空巡洋舰现在会显示“对潜”属性</li>
<li>[修复] 修正“弹耗”数据</li>
</ul>



Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Who Calls the Fleet",
"main": "app/main.html",
"version": "0.1.1",
"version": "0.2.0",

"debug": true,

Expand Down
1 change: 1 addition & 0 deletions source/css-app.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
@import "less-app/frame/modal.less";

@import "less-app/page/ships.less";
@import "less-app/page/about.less";
24 changes: 23 additions & 1 deletion source/js-app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
_g.pathMakeObj( _g.path )

_g.data = {
'entities': {},
'ships': {},
'ship_id_by_type': [], // refer to _g.ship_type_order
'ship_types': {},
Expand Down Expand Up @@ -388,6 +389,13 @@ _frame.app_main = {
_db_loaded++

switch( db_name ){
case 'entities':
_db.entities.find({}, function(err, docs){
for(var i in docs ){
_g.data.entities[docs[i]['id']] = docs[i]
}
})
break;
case 'ship_namesuffix':
_db.ship_namesuffix.find({}).sort({ 'id': 1 }).exec(function(err, docs){
_g.data.ship_namesuffix = [{}].concat(docs)
Expand Down Expand Up @@ -507,7 +515,7 @@ _frame.app_main = {
'data-itemid': d['equip'][i],
'tooltip': true
})
name.html( 'ID: ' + d['equip'][i] )
name.html( '装备#' + d['equip'][i] )
slot.html( d['slot'][i] )
}
i++
Expand Down Expand Up @@ -544,6 +552,20 @@ _frame.app_main = {
_add_stat( 'fuel', '', _val( d['consum']['fuel'] ), stat_consum )
_add_stat( 'ammo', '', _val( d['consum']['ammo'] ), stat_consum )

// 声优&画师_g.data.entities
$('<div class="entity"/>')
.html(
'<strong>声优</strong>'
+ '<span>' + _g['data']['entities'][d['rels']['cv']]['name'][_g.lang] + '</span>'
)
.appendTo(dom)
$('<div class="entity"/>')
.html(
'<strong>画师</strong>'
+ '<span>' + _g['data']['entities'][d['rels']['illustrator']]['name'][_g.lang] + '</span>'
)
.appendTo(dom)

_frame.modal.show(
dom,
_g.getName( d['name'], '・' ) || '舰娘',
Expand Down
54 changes: 51 additions & 3 deletions source/less-app/frame/modal.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
padding: 0;
font-family:@font_famliy_Song;
.line-height(36);
text-shadow:0 2px 2px #000;
}
&>button.close{
@size: 30;
Expand All @@ -34,7 +35,6 @@
background: transparent;
color: #ced0d1;
.clearfix();

.ship{
position: relative;
width: 100%;
Expand All @@ -61,13 +61,14 @@
.font-size(14);
.padding-top(2);
.padding-right(12);
text-shadow:0 1px 0 #000;
em{
font-style: normal;
padding: 0 .25em;
}
}
&>.equipments{
.margin-top(10);
.margin-top(8);
&>button{
display: inline-block;
width: ~"calc(50% - 12px)";
Expand Down Expand Up @@ -141,6 +142,7 @@
border-radius: 5px;
.line-height(26);
.font-size(13);
position: relative;
&>span{
width: 50%;
display: inline-block;
Expand All @@ -159,7 +161,7 @@
content: '';
position: absolute;
left: 0;
.top( (26 - 18) / 2 );
.top( (26 - 18) / 2 - 1 );
.width(18);
.height(18);
background: ~"url(@{folder_images}/stats.png) no-repeat 0 0";
Expand Down Expand Up @@ -233,12 +235,58 @@
}
}
}
&.consum{
background: fade(#370a0a, 32.5%);
width: ~"calc(25% - 12px)";
.padding-left(40);
.line-height(23);
&>strong{
font-weight:normal;
position: absolute;
.top(4);
.left(8);
color: #d1cecf;
}
&>span{
width: 100%;
&>em{
padding-left: 0;
color: #eb6969;
}
}
}
}
}
}
&>.entity{
display: inline-block;
.margin(12, 12, 0, 0);
.padding(6, 12);
width: ~"calc(37.5% - 12px)";
vertical-align:top;
background: fade(#0a380a, 32.5%);
border-radius: 5px;
position: relative;
.height(54);
&>strong{
.font-size(13);
.line-height(20);
color: #cfd1cf;
font-weight:normal;
display: block;
}
&>span{
.font-size(15);
.line-height(20);
color: #8fcc8f;
}
}
} // .ship
}
}
&>s{
background: #595959;
}
}


Expand Down
5 changes: 5 additions & 0 deletions source/less-app/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ body{
h1, h2, h3, h4, h5, h6{
font-family:@font_famliy_Song;
line-height:1.2em;
small{
font-size: small;
opacity: .75;
padding-left:1em;
}
}
h2{
.font-size(36);
Expand Down
18 changes: 18 additions & 0 deletions source/less-app/page/about.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#layout>main>.page[page="about"]{
//background: hsla(199, 30%, 18%, .65);
background: hsla(0, 20%, 18%, .65);
h1, h2, h3, h4, h5, h6{
//color: hsl(0, 100%, 73%);
color: hsl(0, 100%, 76%);
small{
font-family:@font_family_sans;
font-weight:lighter;
}
}
ul{
&>strong{
font-size: larger;
font-weight:lighter;
}
}
}

0 comments on commit f10e703

Please sign in to comment.