Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
syntax_j
mycard
Commits
097000a9
Commit
097000a9
authored
Apr 19, 2017
by
2breakegg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shop interface
parent
a93fb0a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
73 deletions
+73
-73
app/cube-description/cube-description.component.css
app/cube-description/cube-description.component.css
+40
-28
app/cube-description/cube-description.component.html
app/cube-description/cube-description.component.html
+29
-7
app/cube-description/cube-description.component.ts
app/cube-description/cube-description.component.ts
+4
-38
No files found.
app/cube-description/cube-description.component.css
View file @
097000a9
...
@@ -9,60 +9,72 @@
...
@@ -9,60 +9,72 @@
position
:
relative
;
position
:
relative
;
}
}
.left-
small-item
{
.left-
box
{
width
:
116px
;
overflow
:
hidden
;
height
:
65px
;
/*width: 600px;*/
margin
:
2
px
;
margin
-right
:
5
px
;
float
:
left
;
float
:
left
;
background
:
black
;
}
.left-small-item
{
width
:
116px
;
height
:
65px
;
margin
:
2px
;
float
:
left
;
background
:
black
;
text-align
:
center
;
text-align
:
center
;
line-height
:
100%
;
line-height
:
100%
;
}
}
.left-big-item-box
{
.left-big-item-box
{
width
:
600px
;
width
:
600px
;
height
:
337px
;
height
:
337px
;
text-align
:
center
;
text-align
:
center
;
background
:
black
;
background
:
black
;
position
:
relative
;
position
:
relative
;
line-height
:
100%
;
line-height
:
100%
;
}
}
.left-big-item
{
.left-big-item
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
position
:
absolute
;
position
:
absolute
;
line-height
:
100%
;
line-height
:
100%
;
}
}
.block
{
.block
{
width
:
50px
;
width
:
50px
;
height
:
50px
;
height
:
50px
;
background
:
black
;
background
:
black
;
}
}
img
{
img
{
max-height
:
100%
;
max-height
:
100%
;
max-width
:
100%
;
max-width
:
100%
;
}
}
div
{
font-size
:
13px
;
}
/*#left {*/
/*#left {*/
/*font-size: 14px;*/
/*font-size: 14px;*/
/*margin-right: 8px;*/
/*margin-right: 8px;*/
/*display: flex;*/
/*display: flex;*/
/*flex-direction: column;*/
/*flex-direction: column;*/
/*flex-grow: 1;*/
/*flex-grow: 1;*/
/*}*/
/*}*/
/*#left p {*/
/*#left p {*/
/*flex-grow: 1;*/
/*flex-grow: 1;*/
/*}*/
/*}*/
/*#right {*/
/*#right {*/
/*width: 160px;*/
/*width: 160px;*/
/*flex-shrink: 0;*/
/*flex-shrink: 0;*/
/*}*/
/*}*/
/*.tag {*/
/*.tag {*/
/*font-size: 12px;*/
/*font-size: 12px;*/
/*padding: 2px 5px;*/
/*padding: 2px 5px;*/
/*}*/
/*}*/
app/cube-description/cube-description.component.html
View file @
097000a9
<!--<div class="panel">-->
<!--<div class="panel">-->
<div
style=
"overflow: hidden; width:600px; margin-right: 5px;"
>
<div
class=
"row"
>
<div
class=
"left-box col-md8"
>
<div
class=
"left-big-item-box"
>
<div
class=
"left-big-item-box"
>
<div
*ngFor=
"let src of imgsrc
"
class=
"left-big-item"
>
<div
*ngFor=
"let src of imgsrc
; index as key"
class=
"left-big-item"
[style.opacity]=
"divOpacity[key]"
>
<img
[src]=
"src"
>
<img
[src]=
"src"
/
>
</div>
</div>
</div>
</div>
<div
style=
"width:100%; overflow: hidden; height:65px "
>
<div
style=
"width:100%; overflow: hidden; height:65px "
>
<div>
<div>
<div
*ngFor=
"let src of imgsrc ; index as key"
class=
"left-small-item"
(click)=
"
test
(key)"
>
<div
*ngFor=
"let src of imgsrc ; index as key"
class=
"left-small-item"
(click)=
"
show
(key)"
>
<img
[src]=
"
entry.key"
>
<img
[src]=
"
src"
/
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--</div>-->
<!--</div>-->
{{divOpacity[0]}}
<div
style=
" float: right"
class=
"col-md3"
>
{{divOpacity[1]}}
<img
[src]=
"imgsrc[0]"
/>
<p
[innerHTML]=
"currentCube.description"
></p>
<dl>
<dt
i18n
>
开发
</dt>
<dd>
<div
*ngFor=
"let developer of currentCube.developers"
>
<a
*ngIf=
"developer.url"
target=
"_blank"
[href]=
"developer.url"
>
{{developer.name}}
</a>
<span
*ngIf=
"!developer.url"
>
{{developer.name}}
</span>
</div>
</dd>
<dt
i18n
>
发行日期
</dt>
<dd>
{{currentCube.released_at | date:'mediumDate'}}
</dd>
</dl>
<div
id=
"tags"
*ngIf=
"currentCube.tags"
>
<div
i18n
*ngFor=
"let tag of currentCube.tags"
class=
"btn btn-sm btn-danger tag"
>
{tag, select, installed {已安装} test {测试} recommend {推荐} mysterious {迷之物体} touhou {东方 Project} touhou_pc98 {东方旧作} runtime_installed{已安装的运行库} }
</div>
</div>
</div>
</div>
<!--<div class="panel" id="left">-->
<!--<div class="panel" id="left">-->
<!--<p [innerHTML]="currentCube.description"></p>-->
<!--<p [innerHTML]="currentCube.description"></p>-->
<!--<div id="tags" *ngIf="currentCube.tags">-->
<!--<div id="tags" *ngIf="currentCube.tags">-->
...
...
app/cube-description/cube-description.component.ts
View file @
097000a9
/**
/**
* Created by zh99998 on 16/9/2.
* Created by zh99998 on 16/9/2.
*/
*/
import
{
ChangeDetectorRef
,
Component
,
Input
,
Pipe
}
from
'
@angular/core
'
;
import
{
ChangeDetectorRef
,
Component
,
Input
}
from
'
@angular/core
'
;
import
{
Cube
}
from
'
../cube
'
;
import
{
Cube
}
from
'
../cube
'
;
...
@@ -11,35 +11,19 @@ import {Cube} from '../cube';
...
@@ -11,35 +11,19 @@ import {Cube} from '../cube';
styleUrls
:
[
'
./cube-description.component.css
'
],
styleUrls
:
[
'
./cube-description.component.css
'
],
})
})
@
Pipe
({
name
:
'
keys
'
})
export
class
CubeDescriptionComponent
{
export
class
CubeDescriptionComponent
{
@
Input
()
@
Input
()
currentCube
:
Cube
;
currentCube
:
Cube
;
divOpacity
:
number
[]
=
[
1
,
0
,
0
];
div1
=
1
;
div2
=
0
;
color1
=
'
red
'
;
hrefs
=
'
http://abc.efg.ijk
'
;
imgsrc
:
string
[]
=
[
imgsrc
:
string
[]
=
[
'
http://cdn.akamai.steamstatic.com/steam/apps/545980/ss_bfc8d95b53734e03998342b1def248f560c440e3.600x338.jpg?t=1492488208
'
,
'
http://cdn.akamai.steamstatic.com/steam/apps/545980/ss_bfc8d95b53734e03998342b1def248f560c440e3.600x338.jpg?t=1492488208
'
,
'
http://cdn.akamai.steamstatic.com/steam/apps/15370/0000004764.1920x1080.jpg?t=1447351397
'
,
'
http://cdn.akamai.steamstatic.com/steam/apps/15370/0000004764.1920x1080.jpg?t=1447351397
'
,
'
http://cdn.akamai.steamstatic.com/steam/apps/15370/0000004767.600x338.jpg?t=1447351397
'
'
http://cdn.akamai.steamstatic.com/steam/apps/15370/0000004767.600x338.jpg?t=1447351397
'
];
];
divOpacity
:
number
[]
=
this
.
imgsrc
.
map
(
function
(
val
:
any
,
key
:
any
)
{
constructor
(
private
ref
:
ChangeDetectorRef
)
{
return
key
===
0
?
1
:
0
;
});
}
transform
(
value
,
args
:
string
[]):
any
{
let
keys
=
[];
for
(
let
key
in
value
)
{
keys
.
push
({
key
:
key
,
value
:
value
[
key
]});
}
return
keys
;
}
test
(
v
:
number
):
void
{
test
(
v
:
number
):
void
{
console
.
log
(
v
);
console
.
log
(
v
);
...
@@ -56,22 +40,4 @@ export class CubeDescriptionComponent {
...
@@ -56,22 +40,4 @@ export class CubeDescriptionComponent {
console
.
log
(
this
.
divOpacity
);
console
.
log
(
this
.
divOpacity
);
}
}
showxx
(
num
:
number
):
void
{
console
.
log
(
num
);
this
.
div1
=
0
;
this
.
div2
=
1
;
}
changecolor
()
{
this
.
color1
=
'
green
'
;
console
.
log
(
this
.
color1
);
this
.
ref
.
detectChanges
()
}
ngStyle
()
{
let
styles
=
{
'
background
'
:
this
.
color1
}
return
styles
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment