Skip to content

Commit 9a1a1b5

Browse files
authored
Merge pull request #12 from JuliaPluto/lf-footnote
automatically include footnote in all pages
2 parents ab36bcc + cb28316 commit 9a1a1b5

File tree

5 files changed

+53
-11
lines changed

5 files changed

+53
-11
lines changed

PlutoPages.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ function template_handler(
709709
slider_server_url=$(pluto_deploy_settings.Export.slider_server_url)
710710
binder_url=$(pluto_deploy_settings.Export.binder_url)
711711
disable_ui
712-
>
712+
></pluto-editor>
713713
"""
714714

715715
frontmatter = Pluto.frontmatter(input.absolute_path)

src/_includes/layout.jlhtml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ $(pluto_head)
188188
""") : nothing)
189189
</div>"""))
190190
$(content)
191+
<div class="page-foot">
192+
<div class="copyright">
193+
<a href="$(metadata["course_info"]["repo"])"><b>Edit this page on <img class="github-logo" src="https://unpkg.com/[email protected]/dist/svg/logo-github.svg"></b></a><br>
194+
Website based on the MIT course <a href="https://computationalthinking.mit.edu"><em><b>Computational Thinking</b>, a live online Julia/Pluto textbook</em></a> and built with <a href="https://plutojl.org/">Pluto.jl</a> and the <a href="https://julialang.org">Julia programming language</a>.
195+
</div>
196+
</div>
191197
</div>
192198
</div>
193199
</body>

src/_includes/welcome.jlmd

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,4 @@ $(isempty(get(metadata["homepage"], "disclaimer", "")) ? nothing : @htl("""<bloc
1313
<main class="homepage">
1414
$(Base.include(@__MODULE__, joinpath(@__DIR__, "..", "assets", "scripts", "get_highlights.jl")))
1515
$(Base.include(@__MODULE__, joinpath(@__DIR__, "..", "assets", "scripts", "get_subjects.jl")))
16-
<div class="page-foot">
17-
<div class="copyright">
18-
<a href="$(metadata["course_info"]["repo"])"><b>Edit this page on <img class="github-logo" src="https://unpkg.com/[email protected]/dist/svg/logo-github.svg"></b></a><br>
19-
Website based on the MIT course <a href="https://computationalthinking.mit.edu"><em><b>Computational Thinking</b>, a live online Julia/Pluto textbook</em></a> and built with <a href="https://plutojl.org/">Pluto.jl</a> and the <a href="https://julialang.org">Julia programming language</a>.
20-
</div>
21-
</div>
2216
</main>

src/assets/styles/homepage.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ main {
9999
max-width: 86rem;
100100
z-index: -1;
101101
margin: 3em auto 0 auto;
102+
padding-bottom: 5rem !important;
102103
}
103104
main > div {
104105
z-index: 4;
@@ -293,10 +294,6 @@ section > div.preview > img {
293294
width: 100%;
294295
}
295296

296-
.github-logo {
297-
width: 1em;
298-
}
299-
300297
.homepage,
301298
.banner {
302299
color: #3c3c3c;

src/assets/styles/layout.css

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,3 +259,48 @@
259259
margin-right: auto;
260260
margin-top: 5rem;
261261
}
262+
263+
/* footnote */
264+
265+
main {
266+
padding-bottom: 5rem !important;
267+
}
268+
269+
.github-logo {
270+
width: 1em;
271+
}
272+
273+
.page-foot {
274+
z-index: 4;
275+
background: white;
276+
padding: 2rem;
277+
border-radius: 1rem;
278+
box-shadow: 0px 0px 10px 5px #1c12120d;
279+
280+
max-width: 700px;
281+
margin-left: auto;
282+
margin-right: auto;
283+
margin-block-end: 5rem;
284+
margin-bottom: 10em;
285+
}
286+
287+
.page-foot a {
288+
text-decoration: none;
289+
/* background: #f3f3ff; */
290+
/* border: 3px solid; */
291+
color: black;
292+
/* border-bottom: 0.2em solid rgba(0, 0, 0, 0.3); */
293+
}
294+
.page-foot a:not(.no-decoration) {
295+
background-position: 0 0.83em;
296+
background-repeat: repeat-x;
297+
background-size: 2px 8px;
298+
background-image: linear-gradient(to bottom, rgba(165, 213, 235, 0.3) 33%, rgba(165, 213, 235, 0.3));
299+
/* text-shadow: 2px 2px white, 2px -2px white, -2px 2px white, -2px -2px white; */
300+
transition: background-position 50ms linear, background-size 50ms linear;
301+
}
302+
303+
.page-foot a:hover {
304+
background-position: 0 0em;
305+
background-size: 2px auto;
306+
}

0 commit comments

Comments
 (0)