-
Notifications
You must be signed in to change notification settings - Fork 68
Add navigation structure for learn section #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b1c78c0
Draft navigation structure for tutorials
LKedward ffdc722
Merge remote-tracking branch 'upstream/master' into tutorial-navigation
LKedward fb961e1
Restructure learn section for mini-books
LKedward 1c132c9
Break quickstart mini-book tutorial into multiple pages
LKedward e537fd0
Minor update: always highlight Learn in book layout.
LKedward 006e858
Add: link to J3 Fortran Proposals repo.
LKedward 3441dcc
Update _data/learning.yml
LKedward fc92089
Update _data/learning.yml
LKedward 893aa90
Update _data/learning.yml
LKedward 2859497
Update: sort ref books by year descending.
LKedward d108c20
Merge branch 'tutorial-navigation' of github.com:LKedward/fortran-lan…
LKedward File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# Categories group mini-books on the 'Learn' landing page | ||
# | ||
# 'fa-icon' refers to the font-awesome icon to display | ||
# next to the category on the landing page | ||
# | ||
categories: | ||
- name: Getting started | ||
fa-icon: fas fa-cubes | ||
# - name: Advanced programming methods | ||
# fa-icon: fas fa-laptop-code | ||
|
||
|
||
|
||
# Mini-books are single-page or multi-page tutorials | ||
# | ||
# 'link' refers to the 'permalink' field of the corresponding page | ||
# | ||
books: | ||
- title: Quickstart Fortran Tutorial | ||
description: An introduction to the Fortran syntax and its capabilities | ||
category: Getting started | ||
link: /learn/quickstart | ||
pages: | ||
- link: /learn/quickstart/hello_world | ||
- link: /learn/quickstart/variables | ||
- link: /learn/quickstart/arrays_strings | ||
- link: /learn/quickstart/operators_control_flow | ||
- link: /learn/quickstart/organising_code | ||
|
||
|
||
|
||
# Web links listed at the bottom of the 'Learn' landing page | ||
# | ||
reference-links: | ||
- name: Fortran wiki | ||
url: http://fortranwiki.org/ | ||
description: A rich collection of Fortran articles and resources in an editable wiki format | ||
|
||
- name: "Fortran 2018 Standard Interpretation Document" | ||
url: https://j3-fortran.org/doc/year/18/18-007r1.pdf | ||
description: "J3/18-007r1 F2018, specification of the base Fortran 2018 language" | ||
|
||
- name: "J3 Fortran Proposals" | ||
url: https://github.com/j3-fortran/fortran_proposals | ||
description: a repository for community collaboration on proposals for the Fortran Standards Committee | ||
|
||
- name: "J3: US Fortran Standards Committee" | ||
url: https://j3-fortran.org/ | ||
description: J3 is the US National Body for the international Fortran standards committee | ||
|
||
- name: "WG5: International Fortran Standards Committe" | ||
url: https://wg5-fortran.org/ | ||
description: | ||
|
||
- name: "Scivision Fortran 2018 Examples" | ||
url: https://github.com/scivision/fortran2018-examples | ||
description: A github repository containing code samples for various Fortran 2018 features | ||
|
||
|
||
|
||
|
||
# Print books listed at the bottom of the 'Learn' landing page | ||
# | ||
reference-books: | ||
- author: Metcalf, M., Reid, J. and Cohen M. | ||
year: 2018 | ||
title: Modern Fortran Explained | ||
url: https://global.oup.com/academic/product/modern-fortran-explained-9780198811893 | ||
edition: 5th ed | ||
location: Oxford, UK | ||
publisher: Oxford Universtiy Press | ||
|
||
- author: Curcic, M. | ||
year: 2020 | ||
title: "Modern Fortran: Building Efficient Parallel Applications" | ||
url: https://www.manning.com/books/modern-fortran | ||
edition: 1st ed | ||
location: Shelter Island, NY | ||
publisher: Manning Publications | ||
|
||
- author: Markus, A. | ||
year: 2012 | ||
title: "Modern Fortran in Practice" | ||
url: https://www.cambridge.org/core/books/modern-fortran-in-practice/BC5BD23B2E478B4D457C5D6265BA9363 | ||
edition: 1st ed | ||
location: Cambridge, UK | ||
publisher: Cambridge University Press | ||
|
||
- author: Chivers, I. and Sleightholme, J. | ||
year: 2018 | ||
title: Introduction to Programming with Fortran | ||
url: https://doi.org/10.1007/978-3-319-75502-1 | ||
edition: 4th ed | ||
publisher: Springer International Publishing | ||
|
||
- author: Chapman S. J. | ||
year: 2018 | ||
title: Fortran for Scientists and Engineers | ||
url: https://www.mheducation.com/highered/product/fortran-scientists-engineers-chapman/M9780073385891.html | ||
edition: 4th ed | ||
location: New York | ||
publisher: McGraw-Hill Education |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<div class="col-fixed" id="pagenav-sidebar"> | ||
|
||
<!-- Find parent book using page.permalink --> | ||
<!-- NB. This search is inefficient but simplifies | ||
the definition of book pages in learning.yml --> | ||
{% for book_i in site.data.learning.books %} | ||
{% if book_i.link == page.permalink %} | ||
{% assign book = book_i %} | ||
{% break %} | ||
{% endif %} | ||
{% if book_i.pages %} | ||
{% for bookPage in book_i.pages %} | ||
{% if bookPage.link == page.permalink %} | ||
{% assign book = book_i %} | ||
{% break %} | ||
{% endif %} | ||
{% endfor %} | ||
{% else %} | ||
{% if book_i.link == page.permalink %} | ||
{% assign book = book_i %} | ||
{% break %} | ||
{% endif %} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
<a href="{{site.baseurl}}/learn#book-index"> | ||
<i class="fas fa-arrow-circle-left"></i> | ||
Back to Learn Fortran index | ||
</a> | ||
|
||
<h3> | ||
<i class="fas fa-book"></i> | ||
{{ book.title }}</h3> | ||
|
||
<div class="content"> | ||
{% if book.pages %} <!-- If this book has multiple pages --> | ||
|
||
{% assign nPage = book.pages | size %} | ||
|
||
<ul> | ||
|
||
<!-- Add link to book introduction (index) --> | ||
{% if page.permalink == book.link %} | ||
<li><b><a href="{{site.baseurl}}{{ book.link }}"> | ||
Introduction</a></b></li> | ||
<ul id="page-nav"></ul> | ||
{% assign nextPage = 0 %} | ||
{% else %} | ||
<li><a href="{{site.baseurl}}{{ book.link }}"> | ||
Introduction</a></li> | ||
{% endif %} | ||
|
||
<!-- List pages in this book --> | ||
{% for page_link in book.pages %} | ||
|
||
<!-- Get page title from page metadata --> | ||
{% for sitePage in site.pages %} | ||
{% if sitePage.permalink == page_link.link %} | ||
{% assign bookPage = sitePage %} | ||
{% break %} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% if bookPage.permalink == page.permalink %} | ||
<li> | ||
<b><a href="{{site.baseurl}}{{ bookPage.url }}"> | ||
{{ bookPage.title }}</a></b> | ||
<ul id="page-nav"></ul> | ||
</li> | ||
{% assign prevPage = forloop.index | minus: 2 %} | ||
{% assign nextPage = forloop.index %} | ||
|
||
{% else %} | ||
<li><a href="{{site.baseurl}}{{ bookPage.url }}"> | ||
{{ bookPage.title }}</a></li> | ||
{% endif %} | ||
|
||
{% endfor %} | ||
</ul> | ||
|
||
{% else %} | ||
|
||
<!-- If this book is single-page --> | ||
<ul id="page-nav"></ul> | ||
|
||
{% endif %} | ||
</div> | ||
|
||
</div> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
{% include nav.html active="Learn" %} | ||
|
||
<section class="front-section"> | ||
<div class="container"> | ||
|
||
{% include book_navbar.html %} | ||
|
||
<div class="newsletter col-right"> | ||
|
||
<h1>{{ page.title }}</h1> | ||
|
||
<div style="margin-top: 0.5em; margin-bottom: 0.5em;"> | ||
<i>{{ page.date | date: "%B %d, %Y" }}</i> | ||
{% if page.author != null %} | ||
<p><i>Authors:</i> {{ page.author }}</p> | ||
{% endif %} | ||
</div> | ||
|
||
{{ content }} | ||
|
||
<div class="container-flex"> | ||
|
||
{% if prevPage %} | ||
{% if prevPage < 0 %} | ||
<a href="{{ site.baseurl }}{{ book.link }}" style="margin-right: auto;"> | ||
{% else %} | ||
<a href="{{ site.baseurl }}{{ book.pages[prevPage].link }}" style="margin-right: auto;"> | ||
{% endif %} | ||
<h3><i class="fas fa-arrow-circle-left"></i> | ||
Back | ||
</h3> | ||
</a> | ||
{% endif %} | ||
|
||
{% if nextPage %} | ||
{% if nextPage < nPage %} | ||
<a href="{{ site.baseurl }}{{ book.pages[nextPage].link }}" | ||
style="margin-left: auto;"> | ||
<h3> | ||
Next | ||
<i class="fas fa-arrow-circle-right"></i> | ||
</h3> | ||
</a> | ||
{% endif %} | ||
{% endif %} | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
</section> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.