Table Styling and Formatting should work for non-js use cases

未關閉
#300 6 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
css, html, powershell
領域
frontend, web-dev

研究方向

重現所提供的 PowerShell 範例,重點關注 New-HTMLTableStyle、New-HTMLTableColumnOption、New-HTMLTableHeader 和 New-HTMLTableContent。追蹤這些命令如何產生表格的 HTML 和樣式,然後驗證在非 JavaScript 輸出中,欄寬、字型大小以及整個表格的格式設定是否有效。

由索引模型根據 Issue 內容生成。

描述

CSS enhancement JS

I have issues related to formatting:

  1. Custom column widths. As you can see I am trying to set column width to 50 but whatever number I put in, nothing changes
  2. Custom font size. I am trying to set the font size to 12 but it keeps being 8
  3. Would like to define font info / formatting only once per whole HTML object and not multiple times.
    I tried to use New-HTMLTableStyle with hopes that I could set my fonts for whole table in one place but it does not work and I have to set the fonts by using New-HTMLTableHeader and New-HTMLTableContent. That way I can actually set the font type but custom font size never works.
$UniqueRecipients | ForEach-Object {
        $Mail = $_
        # Construct HTML object
        $EmailTable = $Table | Where-Object {$_.Mail -eq $Mail}
        $Html = New-HTML {           
            New-HTMLText -Text "Your server(s) just started patching." -FontFamily 'Calibri' -FontStyle 'normal' -FontSize 12            
            New-HTMLTable -DataTable $EmailTable -HideFooter {
                New-HTMLTableStyle -Type Table -FontFamily 'Calibri' -FontStyle 'normal' -FontSize 12
                New-HTMLTableColumnOption -AllColumns -Width 50
                New-HTMLTableHeader -Names ServerFQDN,PatchingStartDateTime,SkipXmonths,UtcOffset -FontFamily 'Calibri' -FontStyle 'normal' -FontSize 12
                New-HTMLTableContent -ColumnIndex 1,2,3,4 -FontFamily 'Calibri' -FontStyle 'normal' -FontSize 12
            }
        }        
       Send-MailMessage -From "[email protected]" -To $Mail -Subject "OnDemand Patching - Startup notification" -Body $Html -SmtpServer smtp.server.com -Credential $Creds -BodyAsHtml
    }
主要語言
PowerShell
星號
1k
分支
115
平均合併
4 小時 41 分鐘
30 天內合併 PR
4

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

EvotecIT/PSWriteHTML 的其他 Issue

查看 EvotecIT/PSWriteHTML 的全部 Issue

相似的 Issue

更多 Web Dev Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。