Skip to content

Commit

Permalink
Merge 3532e06 into b82fb6a
Browse files Browse the repository at this point in the history
  • Loading branch information
dukesun99 committed Mar 11, 2019
2 parents b82fb6a + 3532e06 commit 9b7b772
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
55 changes: 55 additions & 0 deletions docs/templates/_header.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/ NOTE: You must restart the gradle daemon after modifying any template file for the changes to take effect.
- 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
3 changes: 3 additions & 0 deletions docs/templates/document.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ html lang=(attr :lang, 'en' unless attr? :nolang)
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

0 comments on commit 9b7b772

Please sign in to comment.