Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Yokihito Oki
/
kanoya-univercity-prod
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
15efb870
authored
2020-10-14 18:21:18 +0900
by
TaishiTokudome
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
フォトライブラリページの修正
1 parent
8d94c230
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
3 deletions
templates/protostar/css/style_org.css
templates/protostar/js/photo_popup.js
templates/protostar/css/style_org.css
View file @
15efb87
...
...
@@ -3797,12 +3797,19 @@ body.itemid-132 table {
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
z-index
:
220
;
max-width
:
90%
;
width
:
100%
;
max-width
:
1260px
;
max-height
:
90%
;
overflow
:
auto
;
}
.item-page.photos-custom
#photo-popup
.Vertical
{
width
:
60%
;
}
.item-page.photos-custom
#photo-popup
.horizontal
{
width
:
90%
;
}
.item-page.photos-custom
#photo-popup
#photo-popup-img
{
width
:
100%
;
transition
:
all
0.5s
;
...
...
@@ -3865,7 +3872,7 @@ body.itemid-132 table {
transform
:
translate
(
0
,
-50%
);
}
@media
(
max-width
:
5
00px
)
{
@media
(
max-width
:
8
00px
)
{
.item-page.photos-custom
#photo-popup-close
{
right
:
0
;
}
...
...
templates/protostar/js/photo_popup.js
View file @
15efb87
...
...
@@ -29,6 +29,23 @@ jQuery(function($) {
});
/**
* 画面サイズが4:3より縦長の場合は、写真を画面幅いっぱいに表示する。
*/
function
setPopup
()
{
const
winW
=
$
(
window
).
innerWidth
();
const
winH
=
$
(
window
).
innerHeight
();
// 画面表示領域のアスペクト比を取得
const
asp
=
winH
/
winW
;
if
(
asp
<
0.75
)
{
$
(
'#photo-popup'
).
removeClass
(
'horizontal'
);
$
(
'#photo-popup'
).
addClass
(
'Vertical'
);
}
else
{
$
(
'#photo-popup'
).
removeClass
(
'Vertical'
);
$
(
'#photo-popup'
).
addClass
(
'horizontal'
);
}
}
/**
* 画像のクリックをトリガーにして、ポップアップで表示する画像URLの取得と、
* popupの制御を行う関数の実行。
*/
...
...
@@ -43,6 +60,10 @@ jQuery(function($) {
const
$img
=
$
(
'#photo-popup-img'
);
// popupに画像URLをセット
$img
.
attr
(
'src'
,
src
);
setPopup
();
$
(
window
).
resize
(
function
()
{
setPopup
();
});
setTimeout
(
function
()
{
// popupの表示
$
(
'#photo-popup-wrapper'
).
fadeIn
();
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment