Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrules44 committed Dec 4, 2024
1 parent 93c3487 commit 14db232
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pushToPages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
54 changes: 28 additions & 26 deletions bin/build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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" ))
Expand All @@ -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)
Expand Down
27 changes: 24 additions & 3 deletions resources/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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; }
}


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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;}
Expand Down

0 comments on commit 14db232

Please sign in to comment.