diff --git a/.github/workflows/pushToPages.yml b/.github/workflows/pushToPages.yml index d618053ea..b433f05fd 100644 --- a/.github/workflows/pushToPages.yml +++ b/.github/workflows/pushToPages.yml @@ -10,11 +10,11 @@ jobs: container: scottrules44/corona-container-doc-2 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v2 with: persist-credentials: false - name: Add Git safe directory - run: git config --global --add safe.directory /__w/corona-docs/corona-docs + run: git config --global --add safe.directory /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} - name: Checkout Submodules run: | git submodule sync --recursive diff --git a/bin/build.lua b/bin/build.lua index 24ab3bb2c..3d00fe966 100644 --- a/bin/build.lua +++ b/bin/build.lua @@ -674,8 +674,8 @@ for i=1,#markdown_files do pandoc = nil end - --local percent_completed = math_ceil((i/#markdown_files)*100) - --print( "PROGRESS:" .. percent_completed ) + -- local percent_completed = math_ceil((i/#markdown_files)*100) + -- print( "PROGRESS:" .. percent_completed ) end local execute = normpath(abspath( tmp_resources_dir .. "/execute" )) @@ -684,37 +684,39 @@ handle:write( table.concat( pandocCommands, "\0" ) ) io.close( handle ) utils.execute("cat '" .. execute .. "' | xargs -n1 -P8 -0 bash -c") - -- write last modified date to file local fh = io.open( ".lastbuild.log", "w" ) fh:write( Date():__tostring() ) io.close( fh ) --- Copy any 'html' directories to corresponding location in dst -for src in dirtree( markdown_dir ) do - if ( path.isdir( src ) ) then - if ( "html" == pbasename( src ) ) then - local srcNormalized = normpath( abspath(src) ) - local p1 = srcNormalized - local p2 = normpath( abspath(markdown_dir) ) - - -- remove prefix p2 from p1 - print( p1, p2 ) - local _, i = string_find( p1, p2, 1, true ) - print( i ) - local relPath = string.sub( p1, i + 1 ) - local dstNormalized = normpath( abspath( html_dir .. relPath ) ) - - -- remove trailing 'html' - dstNormalized = pdirname( dstNormalized ) - - print( srcNormalized, dstNormalized ) - os.execute( 'cp -rf "' .. srcNormalized .. '" "' .. dstNormalized .. '"' ) - --clonetree( srcNormalized, dstNormalized, copyfile, true ) - end - end +for src in dirtree(markdown_dir) do + if path.isdir(src) and pbasename(src) == "html" then + local srcNormalized = normpath(abspath(src)) + local p1 = srcNormalized + local p2 = normpath(abspath(markdown_dir)) + + -- Ensure p2 is a prefix of p1 + local _, i = string.find(p1, p2, 1, true) + if not i then + print("Error: markdown_dir is not a prefix of the current path:", p1) + else + -- Compute relative path + local relPath = string.sub(p1, i + 1) + local dstNormalized = normpath(abspath(html_dir .. relPath)) + + -- Remove trailing 'html' + dstNormalized = pdirname(dstNormalized) + + print("Copying from", srcNormalized, "to", dstNormalized) + local success, _, code = os.execute('cp -rf "' .. srcNormalized .. '" "' .. dstNormalized .. '"') + if not success then + print("Error copying directory:", srcNormalized, "to", dstNormalized, "Error code:", code) + end + end + end end + -- -- Cleanup -- (Disable cleanup to debug) diff --git a/resources/css/style.css b/resources/css/style.css index a6311bf06..1e411aabe 100644 --- a/resources/css/style.css +++ b/resources/css/style.css @@ -148,6 +148,17 @@ div[id="api-reference"] div[id="typesapi.type"] h4 a { cursor: pointer; /* re-actives cursor */ } +section[id="api-reference"] section[id="librariesapi.library"] h4 a, +section[id="api-reference"] section[id="eventsapi.event"] h4 a, +section[id="api-reference"] section[id="typesapi.type"] h4 a { + font-size: 15px; + text-decoration: none; + color: #504e4e; + font-weight: 600; + line-height: 22px; + cursor: pointer; /* re-actives cursor */ +} + /* ------------------------------------------------------------ OTHER CORE STYLES @@ -304,7 +315,7 @@ blockquote table tr td strong, blockquote table tr td em { MAIN PAGE SECTION ------------------------------------------------------------ */ -.section.level1 { +section.level1 { position: absolute; top: 74px; left: 246px; @@ -468,7 +479,7 @@ MEDIA QUERIES SECTION body { overflow: visible; width: auto; max-width: 1200px; } html { padding: 0px; } #TOC { display: none; overflow: visible; } - .section.level1 { left: 0px; overflow: visible; } + section.level1 { left: 0px !important; overflow: visible !important; } } @@ -601,6 +612,13 @@ div[id="api-reference"] div[id="eventsapi.event"] { width: 33%; float: left; } div[id="api-reference"] div[id="typesapi.type"] { width: 33%; float: left; } div#section { clear: both; } +section[id="api-reference"] section[id="librariesapi.library"] { width: 33%; float: left; } +section[id="api-reference"] section[id="eventsapi.event"] { width: 33%; float: left; } +section[id="api-reference"] section[id="typesapi.type"] { width: 33%; float: left; } +section#section { clear: both; } + +section[id="corona-documentation"] { left: 0px !important; overflow: visible !important; } + /* ------------------------------------------------------------ BREADCRUMB SECTION @@ -1159,6 +1177,9 @@ h3 code, h4 code, h6 code { div[id="methods"] pre, div[id="properties"] pre, div[id="functions"] pre { margin-bottom: 16px; } +section[id="methods"] pre, section[id="properties"] pre, section[id="functions"] pre { + margin-bottom: 16px; +} /* ------------------------------------------------------------ PRINTING STYLES @@ -1168,7 +1189,7 @@ PRINTING STYLES body{margin:0.5in;font-family:times; display:block; page-break-before:always; overflow: visible !important;} *{background:#fff !important;color:#000 !important;float:none !important;width:auto !important;height:auto !important;} .title, .SearchBar, #TOC, #footer{display:none !important;} - .section.level1 {width: 100%; left: 0; overflow: visible !important; padding: 0 10px !important;} + section .level1 {width: 100%; left: 0; overflow: visible !important; padding: 0 10px !important;} .guides-toc ul {padding: 0 10px;} .fa-list-element {min-height: 22px;} .fa-list-element-tile{display:none !important;}