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

Aperta
#300 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
css, html, powershell
Ambito
frontend, web-dev

Direzione di ricerca

Riproduci l’esempio PowerShell fornito, concentrandoti su New-HTMLTableStyle, New-HTMLTableColumnOption, New-HTMLTableHeader e New-HTMLTableContent. Traccia il modo in cui questi comandi producono l’HTML e lo stile della tabella, quindi verifica che le larghezze delle colonne, le dimensioni dei caratteri e la formattazione dell’intera tabella funzionino nell’output senza JavaScript.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
    }
Lingua principale
PowerShell
Stelle
1k
Fork
115
Merge medio
4h 41m
PR unite (30g)
4

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di EvotecIT/PSWriteHTML

Tutte le issue di EvotecIT/PSWriteHTML

Issue simili

Altre issue su Web Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.