Skip to content

Commit

Permalink
upgrade to Asciidoctor 1.5.0.rc.4
Browse files Browse the repository at this point in the history
- upgrade to Asciidoctor 1.5.0.rc.4
- enable compat-mode by default
- upgrade to Font Awesome 4.1
- align stylesheet with default stylesheet (mostly)
- update description
- cleanup styles
  • Loading branch information
mojavelinux committed Aug 4, 2014
1 parent 4c88a78 commit a791a01
Show file tree
Hide file tree
Showing 17 changed files with 1,309 additions and 1,791 deletions.
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

source 'https://rubygems.org'

gem 'awestruct', '0.5.4.rc'
gem 'awestruct', '0.5.5'
#gem 'awestruct', :github => 'awestruct'
#gem 'awestruct', :github => 'mojavelinux/awestruct', :branch => 'integration'
gem 'asciidoctor', '0.1.4'
gem 'asciidoctor', '1.5.0.rc.4'
#gem 'asciidoctor', :github => 'asciidoctor'
#gem 'asciidoctor-diagram', '1.2.0.preview.5'
gem 'coderay', '1.1.0'
gem 'erubis', '~> 2.7.0'
gem 'haml', '~> 4.0.0'
gem 'tilt', '~> 1.4.0'
gem 'tilt', '~> 2.0.0'
gem 'slim', '~> 2.0.0'
gem 'zurb-foundation', '~> 4.3.0'
gem 'rb-inotify', '~> 0.9.0', :platforms => [:ruby, :jruby]
Expand Down
7 changes: 4 additions & 3 deletions _config/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ disqus_developer: true
haml:
:ugly: true
asciidoctor:
:eruby: erubis
:base_dir: null
:attributes:
compat-mode: '@'
idprefix: ''
idseparator: '-'
icons: 'font'
icons: font
sectanchors: ''
linkattrs: ''
#source-highlighter: highlight.js
source-highlighter: coderay
'prewrap!': ''
prewrap: null
# if no profile is specified, the first with a deploy config is selected
profiles:
development:
Expand Down
11 changes: 11 additions & 0 deletions _ext/awestruct_ext.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
require 'asciidoctor'
require 'asciidoctor/extensions'

Asciidoctor::Extensions.register do
# workaround for Awestruct 0.5.5
# (change lib/awestruct/handlers/asciidoctor_handler.rb, line 108 to opts[:base_dir] = @site.config.dir unless opts.key? :base_dir)
if (docfile = @document.attributes['docfile'])
@document.instance_variable_set :@base_dir, File.dirname(docfile)
end
end

module Awestruct
class Engine
def development?
Expand Down
1 change: 0 additions & 1 deletion _ext/pipeline.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require 'erubis'
require 'zurb-foundation'
require 'awestruct_ext'
require 'tagger_patch'
Expand Down
25 changes: 13 additions & 12 deletions _layouts/base.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ body.antialiased
- if page.url == '/'
.large-8.columns.hero
h1=page.title
p: strong An open source Ruby processor for converting AsciiDoc markup into HTML 5, DocBook 4.5 and other formats
p.description
|A <em>fast</em> text processor and publishing toolchain for converting AsciiDoc content to HTML5, DocBook and other formats.
.actions
a.button.secondary href='http://rubygems.org/gems/asciidoctor' style='color: #6d180b; max-width: 220px;'
i.icon-download.icon-2x.pull-left
i.fa.fa-download.fa-2x.pull-left
|Download gem from RubyGems
a.button.secondary href='http://github.com/asciidoctor/asciidoctor' style='max-width: 220px;'
i.icon-github.icon-2x.pull-left
i.fa.fa-github.fa-2x.pull-left
|Get source code from GitHub
.large-4.columns.hello
/ TODO make this an AsciiDoc snippet when it becomes available in Slim
Expand Down Expand Up @@ -84,11 +85,11 @@ body.antialiased
li: a.small.secondary.button href="https://github.com/asciidoctor/asciidoctor.org/edit/master#{page.relative_source_path}" Edit
li: a.small.secondary.button href="https://github.com/asciidoctor/asciidoctor.org/raw/master#{page.relative_source_path}" Raw
li: a.small.secondary.button href="https://github.com/asciidoctor/asciidoctor.org/commits/master#{page.relative_source_path}" History
li: i.icon-github.icon-2x
li: i.fa.fa-github.fa-2x
- if page.url =~ /^\/docs\/asciidoc-syntax-quick-reference/
li: a href='/docs/asciidoc-syntax-quick-reference.pdf' style='text-decoration: none' title='Download PDF': i.icon-file-text-alt.icon-2x
li: a href='/docs/asciidoc-syntax-quick-reference.pdf' style='text-decoration: none' title='Download PDF': i.fa.fa-file-text-alt.fa-2x
- if page.url =~ /^\/docs\/asciidoc-writers-guide/
li: a href='/docs/asciidoc-writers-guide.pdf' style='text-decoration: none' title='Download PDF': i.icon-file-text-alt.icon-2x
li: a href='/docs/asciidoc-writers-guide.pdf' style='text-decoration: none' title='Download PDF': i.fa.fa-file-text-alt.fa-2x
- if page.url == '/'
.quoteblock
blockquote
Expand All @@ -103,37 +104,37 @@ body.antialiased
br
|In addition to an AsciiDoc processor and a collection of stylesheets, the project provides plugins for Maven, Gradle and Guard and packages for operating systems such as Fedora. It also pushes AsciiDoc to evolve by introducing new ideas and innovation and helps promote AsciiDoc through education and advocacy.
p
i.icon-download
i.fa.fa-download
'
|Download:
'
a.rubygem href='http://badge.fury.io/rb/asciidoctor': img src='https://badge.fury.io/rb/asciidoctor.png' alt='Gem version' style='margin-top: -2px'
br
i.icon-github
i.fa.fa-github
'
|Development:
'
a href='http://github.com/asciidoctor' GitHub
br
i.icon-group
i.fa.fa-group
'
|Discussions:
'
a href='http://discuss.asciidoctor.org' Nabble
br
i.icon-comments
i.fa.fa-comments
'
|Chat (IRC):
'
a href='irc://irc.freenode.org/#asciidoctor' #asciidoctor on FreeNode
br
i.icon-twitter
i.fa.fa-twitter
'
|Twitter:
'
a.twitter href='http://twitter.com/#!/asciidoctor' @asciidoctor
br
i.icon-google-plus-sign
i.fa.fa-google-plus-sign
'
|Google+:
'
Expand Down
1 change: 1 addition & 0 deletions docs/user-manual.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Sarah White <https://twitter.com/carbonfray[@carbonfray]>; Dan Allen <https://gi
:description: This guide describes the Asciidoctor attributes, values, and layout options available for producing a customized and polished document.
:keywords: AsciiDoc, Asciidoctor, syntax, reference, learn, how to, AsciiMath, LaTeXMath, MathJax, Pygments, CodeRay
:doctype: book
:compat-mode:
:toc: right
:toclevels: 2
:sectanchors:
Expand Down
Binary file modified fonts/fontawesome-webfont.eot
Binary file not shown.
Binary file modified fonts/fontawesome-webfont.ttf
Binary file not shown.
Binary file modified fonts/fontawesome-webfont.woff
Binary file not shown.
4 changes: 2 additions & 2 deletions stylesheets/_asciidoctor-coderay.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* Foundation stylesheet for CodeRay (to match GitHub theme) | MIT License | http://foundation.zurb.com */
table.CodeRay { border-collapse: collapse; padding: 2px; margin-bottom: 0; border: 0; background: transparent; }
table.CodeRay td { padding: 0 .5em; vertical-align: top; }
table.CodeRay td { padding: 0 0.5em; vertical-align: top; }
table.CodeRay td.line-numbers { text-align: right; color: #999; border-right: 1px solid #e5e5e5; padding-left: 0; }
span.line-numbers { border-right: 1px solid #E5E5E5; color: #999; display: inline-block; margin-right: 0.5em; padding-right: 0.5em; }
span.line-numbers { border-right: 1px solid #e5e5e5; color: #999; display: inline-block; margin-right: 0.5em; padding-right: 0.5em; }
.CodeRay td.line-numbers strong, .CodeRay span.line-numbers strong { font-weight: normal; }
.CodeRay .debug { color: white !important; background: blue !important; }
.CodeRay .annotation { color: #007; }
Expand Down
53 changes: 23 additions & 30 deletions stylesheets/_awesome-icons.scss
Original file line number Diff line number Diff line change
@@ -1,64 +1,47 @@
@import "fonts/font-awesome";
@import "fonts/font-awesome-compat";

span.icon > [class^="icon-"],
span.icon > [class*=" icon-"] {
span.icon > .fa {
cursor: default;
}

.admonitionblock td.icon {
[class^="icon-"]:before {
[class^="fa icon-"] {
font-size: 2.5em;
text-shadow: $icon-text-shadow;
cursor: default;
}

.icon-note:before {
// @extend .icon-pushpin;
//content: "\f08d";
//color: scale-color(green, $lightness: $rainbow-lightness);

//@extend .icon-info-sign;
content: "\f05a";
//color: scale-color(mediumblue, $lightness: $rainbow-lightness);
color: $primary-color;
color: scale-color($primary-color, $lightness: $rainbow-lightness);
}

.icon-tip:before {
// @extend .icon-info-sign;
//content: "\f05a";
//color: scale-color(mediumblue, $lightness: $rainbow-lightness);
// @extend .icon-lightbulb;
content: "\f0eb";
//color: scale-color(yellow, $lightness: $rainbow-lightness);
//color: scale-color(yellow, $saturation: -15%);
//color: $primary-color;
text-shadow: 1px 1px 2px rgba(155, 155, 0, .8);
color: #111;
}

.icon-warning:before {
// @extend .icon-warning-sign;
content: "\f071";
color: scale-color(darkorange, $lightness: $rainbow-lightness);
}

.icon-caution:before {
// @extend .icon-fire;
content: "\f06d";
color: scale-color(orangered, $lightness: $rainbow-lightness);
}

.icon-important:before {
// @extend .icon-exclamation-sign;
content: "\f06a";
color: scale-color(red, $lightness: $rainbow-lightness);
}
}

// alternatively could use &#10122; through &#10131 to get the numbered circles,
// then style them as appropriate; would need to output them in the text, though
.conum {
.conum[data-value] {
display: inline-block;
color: white !important;
background-color: $body-font-color;
Expand All @@ -67,13 +50,13 @@ span.icon > [class*=" icon-"] {
width: 20px;
height: 20px;
font-size: 12px;
font-weight: bold;
line-height: 20px;
font-family: Arial, sans-serif;
// FIXME make this font a variable
font-family: "Open Sans", "Sans", sans-serif;
font-style: normal;
position: relative;
top: -2px;
letter-spacing: -1px;
// QUESTION should the callout numbers be regular weight?
font-weight: bold;
text-indent: -1px;

& * {
color: white !important;
Expand All @@ -87,9 +70,19 @@ span.icon > [class*=" icon-"] {
content: attr(data-value);
}

// hack for when highlight.js adds a bogus element into DOM
// we could solve this w/ javascript instead
&:not([data-value]):empty {
display: none;
pre & {
position: relative;
top: -2px;
}
}

// hack to disallow syntax highlighting from changing the color
b.conum * {
color: inherit !important;
}

// hack for when highlight.js adds a bogus element into DOM
// QUESTION should we solve this w/ javascript instead?
.conum:not([data-value]):empty {
display: none;
}
Loading

0 comments on commit a791a01

Please sign in to comment.