History

Merge pull request #1386 from scherepn/love-update

Update LÖVE documentation

Simon Legner committed 5 years ago

Commit a705f2e2 parents 81abc5a 8c782fb5 files · +22 −10Browse files

Unified · Split

5 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +1 −1
  2. assets/stylesheets/pages/_love.scss +1 −0
  3. lib/docs/filters/love/clean_html.rb +5 −0
  4. lib/docs/filters/love/entries.rb +6 −2
  5. lib/docs/scrapers/love.rb +9 −7
assets/javascripts/templates/pages/about_tmpl.coffee+1−1
@@ -463,7 +463,7 @@ credits = [ · 462 unmodified lines
463 'http://www.lua.org/license.html'463 'http://www.lua.org/license.html'
464 ], [464 ], [
465 'LÖVE',465 'LÖVE',
466 '2006-2016 LÖVE Development Team',466 '2006-2020 LÖVE Development Team',
467 'GFDL',467 'GFDL',
468 'http://www.gnu.org/copyleft/fdl.html'468 'http://www.gnu.org/copyleft/fdl.html'
469 ], [469 ], [
assets/stylesheets/pages/_love.scss+1−0
@@ -12,6 +12,7 @@ · 11 unmodified lines
12 .smwtable { width: 100%; }12 .smwtable { width: 100%; }
13 .smwtable td:nth-last-child(2), .smwtable td:last-child { width: 2.5em; }13 .smwtable td:nth-last-child(2), .smwtable td:last-child { width: 2.5em; }
14 14
15 .cell-orange { background: var(--noteOrangeBackground); }
15 .cell-green { background: var(--noteGreenBackground); }16 .cell-green { background: var(--noteGreenBackground); }
16 .cell-red { background: var(--noteRedBackground); }17 .cell-red { background: var(--noteRedBackground); }
17}18}
lib/docs/filters/love/clean_html.rb+5−0
@@ -45,6 +45,11 @@ module Docs · 44 unmodified lines
45 node.remove45 node.remove
46 end46 end
47 47
48 css('img[src$="Deprecate.png"]').each do |node|
49 node.parent['class'] = 'cell-orange'
50 node.remove
51 end
52
48 css('table, tr, td, th').each do |node|53 css('table, tr, td, th').each do |node|
49 %w(style cellpadding cellspacing width height valign).each do |attribute|54 %w(style cellpadding cellspacing width height valign).each do |attribute|
50 node.remove_attribute(attribute)55 node.remove_attribute(attribute)
lib/docs/filters/love/entries.rb+6−2
@@ -2,23 +2,27 @@ module Docs · 1 unmodified line
2 class Love2 class Love
3 class EntriesFilter < Docs::EntriesFilter3 class EntriesFilter < Docs::EntriesFilter
4 TYPES = {4 TYPES = {
5 'cdata' => 'Lua',
5 'require' => 'Lua',6 'require' => 'Lua',
6 'light_userdata' => 'Lua',7 'light_userdata' => 'Lua',
7 'value' => 'Lua',8 'value' => 'Lua',
8 'variable' => 'Lua',9 'variable' => 'Lua',
9 10
10 'Audio_Formats' => 'love.sound',11 'Audio_Formats' => 'love.sound',
12 'Image_Formats' => 'love.graphics',
11 'ImageFontFormat' => 'love.font',13 'ImageFontFormat' => 'love.font',
12 'BlendMode_Formulas' => 'love.graphics',14 'BlendMode_Formulas' => 'love.graphics',
13 'Shader_Variables' => 'love.graphics',15 'Shader_Variables' => 'love.graphics',
14 16
17 'AttributeDataType' => 'love.graphics',
15 'AreaSpreadDistribution' => 'love.graphics',18 'AreaSpreadDistribution' => 'love.graphics',
16 'BodyType' => 'love.physics',
17 'BufferMode' => 'love.filesystem',19 'BufferMode' => 'love.filesystem',
18 'CompressedFormat' => 'love.image',20 'CompressedFormat' => 'love.image',
21 'FilterType' => 'love.audio',
22 'ImageFlag' => 'love.graphics',
19 'JoystickConstant' => 'love.joystick',23 'JoystickConstant' => 'love.joystick',
24 'MatrixLayout' => 'love.math',
20 'ParticleInsertMode' => 'love.graphics',25 'ParticleInsertMode' => 'love.graphics',
21 'String' => 'love',
22 'TextureMode' => 'love.graphics'26 'TextureMode' => 'love.graphics'
23 }27 }
24 28
lib/docs/scrapers/love.rb+9−7
@@ -3,15 +3,16 @@ module Docs · 2 unmodified lines
3 self.name = 'LÖVE'3 self.name = 'LÖVE'
4 self.slug = 'love'4 self.slug = 'love'
5 self.type = 'love'5 self.type = 'love'
6 self.release = '0.10.2'6 self.release = '11.3'
7 self.base_url = 'https://love2d.org/wiki/'7 self.base_url = 'https://love2d.org/wiki/'
8 self.root_path = 'Main_Page'8 self.root_path = 'Main_Page'
9 self.initial_paths = %w(love love.audio love.event love.filesystem love.font love.graphics9 self.initial_paths = %w(love love.audio love.data love.event love.filesystem love.font
10 love.image love.joystick love.keyboard love.math love.mouse love.physics love.sound10 love.graphics love.image love.joystick love.keyboard love.math love.mouse love.physics
11 love.system love.thread love.timer love.touch love.video love.window enet socket utf8)11 love.sound love.system love.thread love.timer love.touch love.video love.window lua-enet
12 socket utf8)
12 self.links = {13 self.links = {
13 home: 'https://love2d.org/',14 home: 'https://love2d.org/',
14 code: 'https://bitbucket.org/rude/love'15 code: 'https://github.com/love2d/love'
15 }16 }
16 17
17 html_filters.push 'love/entries', 'love/clean_html', 'title'18 html_filters.push 'love/entries', 'love/clean_html', 'title'
@@ -32,11 +33,12 @@ module Docs · 14 unmodified lines
32 options[:replace_paths] = {33 options[:replace_paths] = {
33 'Config_Files' => 'love.conf',34 'Config_Files' => 'love.conf',
34 'conf.lua' => 'love.conf',35 'conf.lua' => 'love.conf',
35 'lua-enet' => 'enet'36 'enet' => 'lua-enet',
37 'ImageFormat' => 'ImageEncodeFormat'
36 }38 }
37 39
38 options[:attribution] = <<-HTML40 options[:attribution] = <<-HTML
39 &copy; 2006&ndash;2016 L&Ouml;VE Development Team<br>41 &copy; 2006&ndash;2020 L&Ouml;VE Development Team<br>
40 Licensed under the GNU Free Documentation License, Version 1.3.42 Licensed under the GNU Free Documentation License, Version 1.3.
41 HTML43 HTML
42 44

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t