Skip to content

Commit

Permalink
Got first bits working
Browse files Browse the repository at this point in the history
  • Loading branch information
gregturn committed Jun 18, 2014
1 parent 29baaff commit a4e1cd5
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 0 deletions.
2 changes: 2 additions & 0 deletions slim/packt/inline_anchor.fodt.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
text:span text:style-name="URL_20__5b_PACKT_5d_"
=@target
13 changes: 13 additions & 0 deletions slim/packt/olist.fodt.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
text:list text:style-name="LFO3"
- items.each_with_index do |item, index|
text:list-item
- if index < items.size - 1
text:p text:style-name="Numbered_20_Bullet_20__5b_PACKT_5d_"
=item.text
- if item.blocks?
=item.content
- else
text:p text:style-name="Numbered_20_Bullet_20_End_20__5b_PACKT_5d_"
=item.text
- if item.blocks?
=item.content
2 changes: 2 additions & 0 deletions slim/packt/paragraph.fodt.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
text:p text:style-name="Normal_20__5b_PACKT_5d_"
=content
25 changes: 25 additions & 0 deletions slim/packt/section.fodt.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
- slevel = @level == 0 && @special ? 1 : @level
- if slevel == 1
text:h text:style-name="Chapter_20_Number_20__5b_PACKT_5d_" text:outline-level="1"
text:bookmark-start text:name="#{@id}"
|#{title}
text:bookmark-end text:name="#{@id}"
=content
- if slevel == 2
text:h text:style-name="Chapter_20_Title_20__5b_PACKT_5d_" text:outline-level="2"
text:bookmark-start text:name="#{@id}"
|#{title}
text:bookmark-end text:name="#{@id}"
=content
- if slevel == 3
text:h text:style-name="Heading_20_1" text:outline-level="3"
text:bookmark-start text:name="#{@id}"
|#{title}
text:bookmark-end text:name="#{@id}"
=content
- if slevel == 4
text:h text:style-name="Heading_20_2" text:outline-level="4"
text:bookmark-start text:name="#{@id}"
|#{title}
text:bookmark-end text:name="#{@id}"
=content
13 changes: 13 additions & 0 deletions slim/packt/ulist.fodt.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
text:list text:style-name="LFO22"
- items.each_with_index do |item, index|
text:list-item
- if index < items.size - 1
text:p text:style-name="Bullet_20__5b_PACKT_5d_"
=item.text
- if item.blocks?
=item.content
- else
text:p text:style-name="Bullet_20_End_20__5b_PACKT_5d_"
=item.text
- if item.blocks?
=item.content

0 comments on commit a4e1cd5

Please sign in to comment.