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
34395a2c
authored
2020-08-05 17:16:11 +0900
by
TaishiTokudome
1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
サイドメニューのスタイル修正。画像が読み込まれてから追従を開始、リサイズした場合サイドメニュー表示位置の再計算を行う
1 parent
36698a70
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
27 deletions
templates/protostar/index.php
templates/protostar/index.php
View file @
34395a2
...
...
@@ -203,37 +203,51 @@ if ($this->params->get('logoFile')) {
<link
rel=
"apple-touch-icon"
href=
"/apple-touch-icon.png"
>
<script>
jQuery
(
function
(
$
)
{
var
obj
=
$
(
"#aside"
);
var
offset
=
$
(
obj
).
offset
();
var
topPadding
=
135
;
var
sW
=
window
.
innerWidth
;
var
sH
=
window
.
innerHeight
;
var
cW
=
obj
.
width
();
var
cH
=
obj
.
height
();
var
cwrapH
=
$
(
"#c_wrap"
).
height
();
if
(
cH
)
{
if
(
sH
>
cH
)
{
$
(
window
).
scroll
(
function
()
{
if
(
$
(
window
).
scrollTop
()
>
offset
.
top
)
{
if
(
$
(
window
).
scrollTop
()
<
cwrapH
)
{
window
.
onload
=
function
()
{
jQuery
(
function
(
$
)
{
var
obj
=
$
(
"#aside"
);
var
sW
=
window
.
innerWidth
;
var
sH
=
window
.
innerHeight
;
var
cW
=
obj
.
width
();
var
cH
=
obj
.
height
();
var
cwrapH
=
$
(
"#c_wrap"
).
height
();
// 特定のページではスクロールしない
var
excludedPages
=
[
".record-page"
];
var
excludedPagesSelector
=
excludedPages
.
join
(
', '
);
var
isExcluded
=
false
;
if
(
document
.
querySelector
(
excludedPagesSelector
))
{
isExcluded
=
true
;
}
var
customHeight
=
$
(
".custom"
).
height
();
var
paddingTop
=
customHeight
-
80
;
if
(
cH
)
{
if
(
sH
>
cH
)
{
if
(
isExcluded
)
return
false
;
$
(
window
).
resize
(
function
()
{
customHeight
=
$
(
".custom"
).
height
();
paddingTop
=
customHeight
-
80
;
});
$
(
window
).
scroll
(
function
()
{
if
(
$
(
window
).
scrollTop
()
>
customHeight
)
{
if
(
$
(
window
).
scrollTop
()
<
cwrapH
)
{
$
(
obj
).
stop
().
animate
({
duration
:
'fast'
,
marginTop
:
$
(
window
).
scrollTop
()
-
paddingTop
});
}
else
{
$
(
obj
).
stop
().
animate
({});
}
}
else
{
$
(
obj
).
stop
().
animate
({
duration
:
'fast'
,
marginTop
:
$
(
window
).
scrollTop
()
-
offset
.
top
+
topPadding
marginTop
:
0
});
}
else
{
$
(
obj
).
stop
().
animate
({});
}
}
else
{
$
(
obj
).
stop
().
animate
({
marginTop
:
0
});
}
});
});
}
}
}
}
)
;
}
);
};
</script>
</head>
...
...
TaishiTokudome
@tokudome
mentioned in commit
4da3dce2
2020-08-06 14:08:28 +0900
mentioned in commit
4da3dce2
Toggle commit list
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