Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOOD
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
whb
10 years ago
Commit
1fa9b69ff4a6adc42e4e24dd0246de14a0b6263d
1 parent
0978ecbd
修改瀑布流
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
4 deletions
website/view/script/video/indexmobile.php
website/view/widget/news/list.php
website/view/widget/news/listmobile.php
website/view/script/video/indexmobile.php
View file @
1fa9b69
...
...
@@ -4,7 +4,7 @@
<div
class=
"video-main content-main"
>
<div
class=
"video-wrap"
>
<div
class=
"main-layout clearfix"
>
<?php
$this
->
_widget
(
'news_list'
,
array
(
'list'
=>
$this
->
view
->
list
,
'video'
=>
1
));
?>
<?php
$this
->
_widget
(
'news_list
mobile
'
,
array
(
'list'
=>
$this
->
view
->
list
,
'video'
=>
1
));
?>
</div>
</div>
<div
id=
"pageContent"
style=
"text-align: center;"
class=
"pagination"
>
...
...
website/view/widget/news/list.php
View file @
1fa9b69
...
...
@@ -26,11 +26,11 @@ else
<div
class=
"image-box"
>
<a
href=
"
<?php
echo
url
(
'news/detail'
,
array
(
'id'
=>
$news
[
'id'
]))
?>
"
title=
"
<?php
echo
$news
[
'title'
];
?>
"
>
<img
src=
"
<?php
echo
$thumb
;
?>
"
alt=
""
style=
"
<?php
echo
sprintf
(
"height:%spx;width:%spx;"
,
$height
,
$width
);
?>
"
>
<i
class=
"play-icon"
></i>
<?php
if
(
trim
(
$news
[
'tag'
])
==
'视频'
)
:?>
<
i
class
="
play
-
icon
"></i>
<?php endif;?>
</a>
<a class="
item
-
tag
" href="
<?
php
echo
url
(
'news/index'
,
array
(
'tag'
=>
$news
[
'tag'
]))
?>
">
<?php
echo
$news
[
'tag'
];
?>
</a>
<?php
if
(
trim
(
$news
[
'tag'
])
==
'视频'
)
:?>
<?
php
endif
;
?>
</div>
<div
class=
"content"
>
<h2
<?php
echo
$news
[
'main_title_type'
]
==
1
?
'class="volupia"'
:
''
;
?>
>
...
...
website/view/widget/news/listmobile.php
0 → 100644
View file @
1fa9b69
<?php
foreach
(
$list
as
$news
)
:
$title
=
Util_StringHelper
::
substr_cn
(
$news
[
'title'
],
90
);
$description
=
Lib_Utils_StringHelper
::
substr_cn
(
Lib_Utils_StringHelper
::
stripTags
(
$news
[
'content'
]),
68
);
$height
=
$width
=
0
;
$thumb_size
=
json_decode
(
$news
[
'thumb_size'
],
true
);
if
(
$news
[
'thumb'
])
{
$thumb
=
Lib_Images
::
getImageUrl
(
$news
[
'thumb'
],
'source'
,
'fragmentimg'
);
}
else
{
$thumb
=
SITE_IMG
.
'/pic01.png'
;
}
if
(
$thumb_size
[
'height'
]
<
308
&&
$thumb_size
[
'width'
]
<
308
)
{
$height
=
$thumb_size
[
'height'
];
$width
=
$thumb_size
[
'width'
];
}
else
{
$height
=
ceil
(
$thumb_size
[
'height'
]
*
(
308
/
$thumb_size
[
'width'
]));
$width
=
308
;
}
?>
<div
class=
"layout-item tiled"
>
<div
class=
"image-box"
>
<a
href=
"
<?php
echo
url
(
'news/detail'
,
array
(
'id'
=>
$news
[
'id'
]))
?>
"
title=
"
<?php
echo
$news
[
'title'
];
?>
"
>
<img
src=
"
<?php
echo
$thumb
;
?>
"
alt=
""
>
<?php
if
(
trim
(
$news
[
'tag'
])
==
'视频'
)
:?>
<
i
class
="
play
-
icon
"></i>
<?php endif;?>
</a>
<a class="
item
-
tag
" href="
<?
php
echo
url
(
'news/index'
,
array
(
'tag'
=>
$news
[
'tag'
]))
?>
">
<?php
echo
$news
[
'tag'
];
?>
</a>
</div>
<div
class=
"content"
>
<h2
<?php
echo
$news
[
'main_title_type'
]
==
1
?
'class="volupia"'
:
''
;
?>
>
<a
href=
"
<?php
echo
url
(
'news/detail'
,
array
(
'id'
=>
$news
[
'id'
]))
?>
"
>
<?php
echo
$news
[
'title'
];
?>
</a>
</h2>
<p
class=
"text-content"
>
<?php
echo
$description
;
?>
</p>
<p
class=
"time"
>
<?php
echo
date
(
'Y.m.d'
,
$news
[
'create_time'
])
?>
</p>
</div>
</div>
<?php
endforeach
;
?>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment