From acb3b18fdf540c2db07cffb4af06313a013d29bd Mon Sep 17 00:00:00 2001 From: cadihowley Date: Tue, 3 Nov 2020 12:41:39 +1300 Subject: [PATCH] DOCS: adds sphinx-panels extension - fixes table word-wrapping by adding custom css - adds the ability to use bootstrap elements in the output - trials a card-based front page --- doc/docportal/_static/custom.css | 14 ++++ doc/docportal/conf.py | 16 ++++- doc/docportal/index.rst | 112 ++++++++++++++++++++++++++----- doc/docportal/requirements.txt | 3 +- 4 files changed, 126 insertions(+), 19 deletions(-) create mode 100644 doc/docportal/_static/custom.css diff --git a/doc/docportal/_static/custom.css b/doc/docportal/_static/custom.css new file mode 100644 index 00000000000..06345495f93 --- /dev/null +++ b/doc/docportal/_static/custom.css @@ -0,0 +1,14 @@ +/* override table width restrictions */ +@media screen and (min-width: 1080px) { + + .wy-table-responsive table td { + /* !important prevents the common CSS stylesheets from overriding + this as on RTD they are loaded after this stylesheet */ + white-space: normal !important; + } + + .wy-table-responsive { + overflow: visible !important; + } + } + \ No newline at end of file diff --git a/doc/docportal/conf.py b/doc/docportal/conf.py index b8fa41ff42c..88aa779ff18 100644 --- a/doc/docportal/conf.py +++ b/doc/docportal/conf.py @@ -34,10 +34,11 @@ extensions = [ "sphinx_rtd_theme", "recommonmark", - + "sphinx_panels" ] extensions.append('sphinx_tabs.tabs') + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -54,10 +55,21 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # html_theme = "sphinx_rtd_theme" +html_css_files = ["https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"] + +html_js_files = ["https://kit.fontawesome.com/b9732bf460.js"] + +html_static_path = ['_static'] + +def setup(app): + app.add_css_file("custom.css") + # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". master_doc = 'index' -html_sidebars = {'**': ['localtoc.html']} \ No newline at end of file +html_sidebars = {'**': ['localtoc.html']} + +panels_add_fontawesome_latex = True \ No newline at end of file diff --git a/doc/docportal/index.rst b/doc/docportal/index.rst index f308bc4f0aa..308dd38c0a9 100644 --- a/doc/docportal/index.rst +++ b/doc/docportal/index.rst @@ -99,26 +99,68 @@ First steps We have guides available to show you how to get ScummVM up and running: -- **Quickstart**: :doc:`getting_started/mac_linux_windows` -- **Phones and Tablets**: :doc:`other_platforms/ios` | :doc:`other_platforms/android` -- **Consoles**: :doc:`other_platforms/ps_vita` | :doc:`other_platforms/psp` | :doc:`other_platforms/nintendo_switch` +.. panels:: + :container: container-fluid text-center mb-4 + + + Getting started + ^^^^^^^^^^^^ + + :doc:`getting_started/mac_linux_windows` + --- + + Phones and Tablets + ^^^^^^^^^^^^^^^^^^^ + :doc:`other_platforms/ios` + + :doc:`other_platforms/android` + + --- + + Consoles + ^^^^^^^^^^^^^^^^^^^ + :doc:`other_platforms/ps_vita` + + :doc:`other_platforms/psp` + + :doc:`other_platforms/nintendo_switch` + + --- + + Other systems + ^^^^^^^^^^^^^^^ -How do I...? -============= + +How do I use ScummVM? +========================= So you have ScummVM installed, but now you need to know how to add and play some games! We have lots of useful information to help you out: -- **Understanding the interface**: :doc:`using_scummvm/the_launcher` -- **Playing games**: :doc:`using_scummvm/add_play_games` | :doc:`using_scummvm/save_load_games` | :doc:`using_scummvm/keyboard_shortcuts` -- **Settings**: :doc:`using_scummvm/how_to_settings` +.. panels:: + :container: text-center mb-4 -Definitive guides -===================== + Understand the interface + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + :doc:`using_scummvm/the_launcher` -We do some deep dives into ScummVM features - from audio settings to our brand new Cloud functionality. Check out our Guides section! + --- + + Play games + ^^^^^^^^^^^^^^ + :doc:`using_scummvm/add_play_games` + + :doc:`using_scummvm/save_load_games` + + :doc:`using_scummvm/keyboard_shortcuts` + + --- + :column: col-lg-12 + + Change settings + ^^^^^^^^^^^^^^^^^^^^^ + :doc:`using_scummvm/how_to_settings` -:doc:`guides/understand_audio` | :doc:`guides/understand_graphics` The games! ============ @@ -130,12 +172,42 @@ If you haven't had a floppy disc or even a CD in your possession for a while, we Make sure you check out the `compatibility list `_ on our website and the `Supported Games page `_ on our wiki before you buy a game, to ensure it can run with ScummVM. +Definitive guides +===================== + +In our Guides section, we do some deep dives into ScummVM features. + +.. panels:: + :container: text-center mb-4 + + Settings + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + :doc:`guides/understand_audio` + + :doc:`guides/understand_graphics` + + --- + + How to: + ^^^^^^^^^^^^^^ + :doc:`guides/local_webserver` + + :doc:`guides/connect_cloud` + + Advanced options ============================ For our more experienced users, ScummVM has a command line interface, as well as the ability to edit settings directly in a configuration file. -:doc:`advanced_options/configuration_file` | :doc:`advanced_options/command_line` + +.. panels:: + :container: text-center mb-4 + :column: col-lg-12 + + :doc:`advanced_options/configuration_file` + + :doc:`advanced_options/command_line` Getting help @@ -145,7 +217,15 @@ ScummVM is still under development. While we do our best to make sure that as ma If you are having problems with any aspect of ScummVM, take a look at our help section. -:doc:`help/faq` | :doc:`How to report a bug ` | :doc:`help/contact` +.. panels:: + :container: text-center mb-4 + :column: col-lg-12 + + :doc:`help/faq` + + :doc:`How to report a bug ` + + :doc:`help/contact` What's changed since I was last here? ====================================== @@ -159,6 +239,6 @@ ScummVM is an open-source project. If you enjoy ScummVM, feel free to donate using the PayPal button on the `ScummVM homepage `__. This will help us buy the utilities to develop ScummVM faster and more efficiently. -If you cannot donate but you have the skills, you can help us by contributing a patch! +If you cannot donate but you have coding or writing skills, you can help us by contributing! -- **Contributing Guidelines**: `Code <#>`__ | `Documentation <#>`__ +For more information, see the `Contribution guide <#>`_ on our wiki. \ No newline at end of file diff --git a/doc/docportal/requirements.txt b/doc/docportal/requirements.txt index 0c4cdeebe66..04912bf16e7 100644 --- a/doc/docportal/requirements.txt +++ b/doc/docportal/requirements.txt @@ -1 +1,2 @@ -sphinx-tabs \ No newline at end of file +sphinx-tabs +sphinx-panels \ No newline at end of file