forked from nus-cs2103-AY1819S1/addressbook-level1
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: port over template from AddressBook-Level4
The following commits implement the documentation template in AddressBook-Level4: 686ec9ac9b9a17e5962c2341c08471e89d452d23..a1b29c20c825312a14ffe6b8242baee056cb5017 For consistency with AddressBook-Level4, port over those commits into this repo. This is done by running the following shell script: git fetch https://github.com/se-edu/addressbook-level4 master && git diff --binary 686ec9ac9b9a17e5962c2341c08471e89d452d23..a1b29c20c825312a14ffe6b8242baee056cb5017 >patch && git apply --3way --include=build.gradle --include='docs/images/*' --include='docs/stylesheets/*' --include='docs/templates/*' patch and fixing the conflicts in build.gradle.
- Loading branch information
Showing
10 changed files
with
660 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 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,24 @@ | ||
This directory contains code from the Asciidoctor Project. | ||
(https://asciidoctor.org/) | ||
|
||
MIT License | ||
|
||
Copyright (C) 2012-2018 Dan Allen, Ryan Waldron and the Asciidoctor Project | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains 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,12 @@ | ||
/ NOTE: You must restart the gradle daemon after modifying any template file for the changes to take effect. | ||
#footer | ||
.container | ||
#footer-text | ||
- if attr? :revnumber | ||
|#{attr 'version-label'} #{attr :revnumber} | ||
- if attr? :revnumber && (attr? 'last-update-label') | ||
br | ||
- if attr? 'last-update-label' | ||
|#{attr 'last-update-label'} #{attr :docdatetime} | ||
- unless (docinfo_content = (docinfo :footer)).empty? | ||
=docinfo_content |
This file contains 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,7 @@ | ||
/ NOTE: You must restart the gradle daemon after modifying any template file for the changes to take effect. | ||
#footnotes | ||
hr | ||
- footnotes.each do |fn| | ||
.footnote id=(footnote_id fn.index) | ||
a href="##{footnoteref_id fn.index}" =fn.index | ||
|. #{fn.text} |
This file contains 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,76 @@ | ||
/ NOTE: You must restart the gradle daemon after modifying any template file for the changes to take effect. | ||
- if !(attr? 'no-site-header') && (attr? 'site-seedu') | ||
#seedu-header | ||
nav.navbar.navbar-lg.navbar-light.bg-lighter | ||
.container | ||
a.navbar-brand href='https://se-edu.github.io/' | ||
img src=(site_url 'images/SeEduLogo.png') alt='SE-EDU' | ||
ul.navbar-nav | ||
li.nav-item | ||
a.nav-link href='https://se-edu.github.io/addressbook-level1' AB-1 | ||
li.nav-item | ||
a.nav-link href='https://se-edu.github.io/addressbook-level2' AB-2 | ||
li.nav-item | ||
a.nav-link href='https://se-edu.github.io/addressbook-level3' AB-3 | ||
li.nav-item | ||
a.nav-link.active href=(site_url 'index.html') AB-4 | ||
li.nav-item | ||
a.nav-link href='https://se-edu.github.io/collate' Collate | ||
li.nav-item | ||
a.nav-link href='https://se-edu.github.io/se-book' Book | ||
li.nav-item | ||
a.nav-link href='https://se-edu.github.io/learningresources' Resources | ||
|
||
- if !(attr? 'no-site-header') | ||
#site-header | ||
nav.navbar.navbar-light.bg-light | ||
.container | ||
- if attr? 'site-name' | ||
a.navbar-brand href=(site_url 'index.html') =(attr 'site-name') | ||
ul.navbar-nav | ||
li.nav-item | ||
=nav_link('UserGuide', 'UserGuide.html', 'User Guide') | ||
li.nav-item | ||
=nav_link('DeveloperGuide', 'DeveloperGuide.html', 'Developer Guide') | ||
- if attr? 'site-seedu' | ||
li.nav-item | ||
=nav_link('LearningOutcomes', 'LearningOutcomes.html', 'LOs') | ||
li.nav-item | ||
=nav_link('AboutUs', 'AboutUs.html', 'About Us') | ||
li.nav-item | ||
=nav_link('ContactUs', 'ContactUs.html', 'Contact Us') | ||
- if attr? 'site-githuburl' | ||
li.navitem | ||
a.nav-link href=(attr 'site-githuburl') | ||
span.fa.fa-github.fa-lg aria-hidden='true' | ||
| View on GitHub | ||
|
||
/ AsciiDoc leaves an empty header div even if there's no doctitle | ||
#header | ||
- if has_header? | ||
- unless notitle | ||
h1 =header.title | ||
- if [:author, :revnumber, :revdate, :revremark].any? {|a| attr? a } | ||
.details | ||
- if attr? :author | ||
span.author#author =(attr :author) | ||
br | ||
- if attr? :email | ||
span.email#email =sub_macros(attr :email) | ||
br | ||
- if (authorcount = (attr :authorcount).to_i) > 1 | ||
- (2..authorcount).each do |idx| | ||
span.author id="author#{idx}" =(attr "author_#{idx}") | ||
br | ||
- if attr? "email_#{idx}" | ||
span.email id="email#{idx}" =sub_macros(attr "email_#{idx}") | ||
- if attr? :revnumber | ||
span#revnumber #{((attr 'version-label') || '').downcase} #{attr :revnumber}#{',' if attr? :revdate} | ||
' | ||
- if attr? :revdate | ||
span#revdate =attr :revdate | ||
- if attr? :revremark | ||
br | ||
span#revremark =(attr :revremark) | ||
- if (attr? :toc) && (attr? 'toc-placement', 'auto') | ||
include _toc.html |
This file contains 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,5 @@ | ||
/ NOTE: You must restart the gradle daemon after modifying any template file for the changes to take effect. | ||
#toc class=(attr 'toc-class', 'toc') | ||
#toctitle =(attr 'toc-title') | ||
/ Renders block_outline.html. | ||
= converter.convert document, 'outline' |
This file contains 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,29 @@ | ||
/ NOTE: You must restart the gradle daemon after modifying any template file for the changes to take effect. | ||
doctype 5 | ||
html lang=(attr :lang, 'en' unless attr? :nolang) | ||
head | ||
meta charset=(attr :encoding, 'UTF-8') | ||
/[if IE] | ||
meta http-equiv="X-UA-Compatible" content="IE=edge" | ||
meta name='viewport' content='width=device-width, initial-scale=1.0' | ||
meta name='generator' content="Asciidoctor #{attr 'asciidoctor-version'}" | ||
= html_meta_if 'application-name', (attr 'app-name') | ||
= html_meta_if 'author', (attr :authors) | ||
= html_meta_if 'copyright', (attr :copyright) | ||
= html_meta_if 'description', (attr :description) | ||
= html_meta_if 'keywords', (attr :keywords) | ||
title=((doctitle sanitize: true) || (attr 'untitled-label')) | ||
= styles_and_scripts | ||
- unless (docinfo_content = docinfo).empty? | ||
=docinfo_content | ||
body( | ||
id=id | ||
class=[(attr :doctype), ("#{attr 'toc-class'} toc-#{attr 'toc-position', 'left'}" if (attr? 'toc-class') && (attr? :toc) && (attr? 'toc-placement', 'auto'))] | ||
style=style_value(max_width: (attr 'max-width'))) | ||
- unless noheader | ||
include _header.html | ||
#content =content | ||
- unless !footnotes? || (attr? :nofootnotes) | ||
include _footnotes.html | ||
- unless nofooter | ||
include _footer.html |
Oops, something went wrong.