openstax_kitchen 17.1.0 → 18.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23c782f23dfd67f38174ddb5f51c28955ae7929854e17a6f9163f41bb644485e
4
- data.tar.gz: 4fafd85f2c59373ebe321e0ddc1b86f5b61e7453bbfe1ca66b94b9ec59c75a59
3
+ metadata.gz: 4343b799c2a49cec3c179ba3af59dae109cdb4fb4839fd7993710d6a1125d322
4
+ data.tar.gz: 6ac5fcdb6adda5fbf080b507676156c42dfc301f8060bae4dabe1bf3561fbebf
5
5
  SHA512:
6
- metadata.gz: 9cf25e0c145ec59512e2e53b52b7dc8e0146568153c04482f8832341389716d7f7682982b273ffebafebb9a0f0b579ac72cc8fee2141415f96ca652946c2f8be
7
- data.tar.gz: 15d806949cb3f91884cd09b3aa13bf9de30f0264e6ad2ab6a059531394e1d5016752ff1c01ab1fd19d4d82e513e4b465412ba685cef8cad646903baa9953a7ca
6
+ metadata.gz: 4dad4bfc3619807740965bc6d8f9c4332e13d2031433a5b32576d3fb66d79005ae08bebd9e25398097921ff15e1c835ebefa2b3a35d30185f194442412355f89
7
+ data.tar.gz: 6372b3c2860ef570dd6e0ff9011ee08759138843eef48953a2187452581edcccd96df337d1441bad5f03c32482c9058104f2ae20d4e50a905baf279a478fdb87
data/CHANGELOG.md CHANGED
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+
10
+ ## [18.0.0] - 2022-01-14
11
+
12
+ * Fix links in `BakeHanbook` outline to point sections (patch)
13
+ * Add unit title prefix with number to `BakeUnitPageTitle` (patch)
14
+ * Add `scope="col"` attribute to `BakeTableBody` and `BakeUnnumberedTables` (major)
15
+
9
16
  ## [17.1.0] - 2021-12-17
10
17
 
11
18
  * Add append_to support to `BakeChapterSummary` (minor)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openstax_kitchen (17.1.0)
4
+ openstax_kitchen (18.0.0)
5
5
  activesupport
6
6
  i18n
7
7
  nokogiri
@@ -36,7 +36,7 @@ GEM
36
36
  yard (~> 0.9.12)
37
37
  method_source (1.0.0)
38
38
  mini_portile2 (2.5.0)
39
- minitest (5.14.4)
39
+ minitest (5.15.0)
40
40
  nokogiri (1.11.1)
41
41
  mini_portile2 (~> 2.5.0)
42
42
  racc (~> 1.4)
@@ -99,7 +99,7 @@ GEM
99
99
  tins (~> 1.0)
100
100
  tins (1.26.0)
101
101
  sync
102
- twitter_cldr (6.9.0)
102
+ twitter_cldr (6.11.0)
103
103
  camertron-eprun
104
104
  cldr-plurals-runtime-rb (~> 1.1)
105
105
  tzinfo
@@ -107,7 +107,7 @@ GEM
107
107
  concurrent-ruby (~> 1.0)
108
108
  unicode-display_width (1.7.0)
109
109
  yard (0.9.24)
110
- zeitwerk (2.5.1)
110
+ zeitwerk (2.5.3)
111
111
 
112
112
  PLATFORMS
113
113
  ruby
@@ -43,7 +43,7 @@ module Kitchen::Directions::BakeHandbook
43
43
 
44
44
  outline_item_html = <<~HTML
45
45
  <div class="os-handbook-objective">
46
- <a class="os-handbook-objective" href="##{first_section_title[:id]}">
46
+ <a class="os-handbook-objective" href="##{section[:id]}">
47
47
  #{first_section_title.children}
48
48
  </a>
49
49
  </div>
@@ -40,6 +40,10 @@ module Kitchen
40
40
  table.remove_attribute('summary')
41
41
  table.wrap(%(<div class="os-table">))
42
42
 
43
+ table.search('th').each do |header|
44
+ header[:scope] = 'col'
45
+ end
46
+
43
47
  # Store label information
44
48
  table.target_label(label_text: 'table', custom_content: number, cases: cases)
45
49
 
@@ -4,17 +4,23 @@ module Kitchen::Directions::BakeUnitPageTitle
4
4
  class V1
5
5
  def bake(book:)
6
6
  book.units.each do |unit|
7
+ @unit_title = I18n.t(:unit)
8
+ @unit_number = unit.count_in(:book)
7
9
  unit.element_children.only(Kitchen::PageElement).each do |page|
8
- compose_unit_page_title(page: page)
10
+ compose_unit_page_title(page: page, unit_title_prefix: @unit_title,
11
+ unit_number: @unit_number)
9
12
  end
10
13
  end
11
14
  end
12
15
 
13
- def compose_unit_page_title(page:)
16
+ def compose_unit_page_title(page:, unit_title_prefix:, unit_number:)
14
17
  title = page.title
15
18
  title.name = 'h2'
16
19
  title.replace_children(with:
17
20
  <<~HTML
21
+ <span class="os-part-text">#{unit_title_prefix} </span>
22
+ <span class="os-number">#{unit_number}</span>
23
+ <span class="os-divider"> </span>
18
24
  <span data-type="" itemprop="" class="os-text">#{title.text}</span>
19
25
  HTML
20
26
  )
@@ -10,6 +10,10 @@ module Kitchen
10
10
  table.parent.add_class('os-unstyled-container') if table.unstyled?
11
11
  table.parent.add_class('os-column-header-container') if table.column_header?
12
12
  table.parent.add_class('os-top-titled-container') if table.top_titled?
13
+
14
+ table.search('th').each do |header|
15
+ header[:scope] = 'col'
16
+ end
13
17
  end
14
18
  end
15
19
  end
@@ -3,5 +3,5 @@
3
3
  # A library for modifying the structure of OpenStax book XML.
4
4
  #
5
5
  module Kitchen
6
- VERSION = '17.1.0'
6
+ VERSION = '18.0.0'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstax_kitchen
3
3
  version: !ruby/object:Gem::Version
4
- version: 17.1.0
4
+ version: 18.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Slavinsky
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-17 00:00:00.000000000 Z
11
+ date: 2022-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport