Doc: Fix the \youtube macro for use with liteHTML help backend

Create a common directory for extra image files, and move the video
thumbnails there. This folder structure is required to work around
the fact that relative image paths passed to qhp.<project>.extraFiles
are not resolved correctly when loading the generated help project.

Change-Id: Iff5583a9a318670571b7f706182723e54e0ec466
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This commit is contained in:
Leena Miettinen
2020-11-27 18:21:33 +01:00
parent 2c2c7255b9
commit b9886a4b04
16 changed files with 30 additions and 13 deletions

View File

@@ -0,0 +1,4 @@
macro.youtube.HTML = "<div class=\"video\">\n<span class=\"vspan\"></span>\n" \
"<iframe src=\"https://www.youtube.com/embed/\1\"" \
"frameborder=\"0\" allowfullscreen>\n" \
"</iframe></div>\n"

View File

@@ -55,10 +55,8 @@ macro.emptyspan.HTML = "<span></span>"
# HTML.extraimages += images/dQw4w9WgXcQ.jpg # HTML.extraimages += images/dQw4w9WgXcQ.jpg
# qhp.ProjectName.extraFiles += images/dQw4w9WgXcQ.jpg # qhp.ProjectName.extraFiles += images/dQw4w9WgXcQ.jpg
# #
macro.youtube.HTML = "<div class=\"video\">\n<span class=\"vspan\"></span>\n" \ macro.youtube.HTML = "<div class=\"video\">\n" \
"<iframe src=\"https://www.youtube.com/embed/\1\"" \
"frameborder=\"0\" allowfullscreen>\n" \
"<a href=\"https://www.youtube.com/watch/?v=\1\">\n"\ "<a href=\"https://www.youtube.com/watch/?v=\1\">\n"\
"<img src=\"images/\1.jpg\"" \ "<img src=\"images/\1.jpg\"" \
"title=\"Click to play in a browser\" /></a>\n" \ "title=\"Click to play in a browser\" /></a>\n" \
"</iframe></div>\n" "</div>\n"

View File

@@ -43,8 +43,7 @@ imagedirs = ../images \
exampledirs = ../examples exampledirs = ../examples
examples.fileextensions += *.qml *.svg examples.fileextensions += *.qml *.svg
HTML.extraimages = ../../config/images/commercial.png include(../../qtcreator/images/extraimages/qtcreator-extraimages.qdocconf)
qhp.QtCreator.extraFiles = ../../config/images/commercial.png
depends += qtandroidextras\ depends += qtandroidextras\
qtwidgets \ qtwidgets \

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 334 B

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

@@ -0,0 +1,4 @@
{HTML.extraimages,qhp.QtCreator.extraFiles} += \
images/commercial.png \
images/RfEYO-5Mw6s.jpg \
images/yOUdg1o2KJM.jpg

View File

@@ -0,0 +1,8 @@
{HTML.extraimages,qhp.qtdesignstudio.extraFiles} += \
images/commercial.png \
images/SsFWyUeAA_4.jpg \
images/9ihYeC0YJ0M.jpg \
images/aV6kFxH3Xws.jpg \
images/ZzbucmQPU44.jpg \
images/RfEYO-5Mw6s.jpg \
images/yOUdg1o2KJM.jpg

View File

@@ -16,5 +16,8 @@ HTML.footer = \
include($QT_INSTALL_DOCS/global/qt-html-templates-online.qdocconf) include($QT_INSTALL_DOCS/global/qt-html-templates-online.qdocconf)
# Override macros for online use
include(../config/macros-online.qdocconf)
# Add an .html file with sidebar content, used in the online style # Add an .html file with sidebar content, used in the online style
HTML.stylesheets += config/style/qt5-sidebar.html HTML.stylesheets += config/style/qt5-sidebar.html

View File

@@ -108,4 +108,7 @@
You can move the views anywhere on the screen and save them as You can move the views anywhere on the screen and save them as
\e workspaces, as instructed in \l {Managing Workspaces}. \e workspaces, as instructed in \l {Managing Workspaces}.
Watch a video about using the Design mode views:
\youtube RfEYO-5Mw6s
*/ */

View File

@@ -39,6 +39,8 @@ imagedirs = ../images \
../../../src/plugins/qmldesigner/qtquickplugin/images \ ../../../src/plugins/qmldesigner/qtquickplugin/images \
../../../src/plugins/texteditor/images ../../../src/plugins/texteditor/images
include(../../qtcreator/images/extraimages/qtdesignstudio-extraimages.qdocconf)
excludefiles += ../../qtcreator/src/qtcreator.qdoc \ excludefiles += ../../qtcreator/src/qtcreator.qdoc \
../../qtcreator/src/qtcreator-toc.qdoc ../../qtcreator/src/qtcreator-toc.qdoc
@@ -69,13 +71,6 @@ exampledirs = ../examples/ \
../../qtcreator/examples ../../qtcreator/examples
examples.fileextensions += *.qml *.svg *.ts *.qm examples.fileextensions += *.qml *.svg *.ts *.qm
{HTML.extraimages,qhp.qtdesignstudio.extraFiles} += ../../config/images/commercial.png \
../images/videoicons/SsFWyUeAA_4.jpg \
../images/videoicons/9ihYeC0YJ0M.jpg \
../images/videoicons/aV6kFxH3Xws.jpg \
../images/videoicons/ZzbucmQPU44.jpg
depends += qtwidgets \ depends += qtwidgets \
qtcore \ qtcore \
qtqml \ qtqml \

View File

@@ -3,6 +3,9 @@ include($QT_INSTALL_DOCS/global/qt-html-templates-online.qdocconf)
include(config/html-online.qdocconf) include(config/html-online.qdocconf)
include(config/qtdesignstudio.qdocconf) include(config/qtdesignstudio.qdocconf)
# Override macros for online use
include(../config/macros-online.qdocconf)
# Add an .html file with sidebar content, used in the online style # Add an .html file with sidebar content, used in the online style
HTML.stylesheets += config/style/qt5-sidebar.html HTML.stylesheets += config/style/qt5-sidebar.html