style: minor frontend cleanup wrt. monospace fonts

This commit is contained in:
Gregor Kleen 2020-08-28 14:00:35 +02:00
parent bbfd182ed9
commit 56c23ebd33
29 changed files with 81 additions and 53 deletions

View File

@ -5,5 +5,5 @@
@use "~@fortawesome/fontawesome-pro/scss/solid" @use "~@fortawesome/fontawesome-pro/scss/solid"
@use "~typeface-roboto" as roboto @use "~typeface-roboto" as roboto
@use "~typeface-source-sans-pro" as source-sans-pro @use "~typeface-source-sans-pro" as source-sans-pro
@use "~typeface-source-code-pro" as source-code-pro

View File

@ -22,6 +22,7 @@
// FONTS // FONTS
--font-base: "Source Sans Pro", "Trebuchet MS", sans-serif --font-base: "Source Sans Pro", "Trebuchet MS", sans-serif
--font-logo: "Roboto", var(--font-base) --font-logo: "Roboto", var(--font-base)
--font-monospace: "Source Code Pro", monospace
// DIMENSIONS // DIMENSIONS
--header-height: 100px --header-height: 100px
@ -585,9 +586,6 @@ section
border-bottom: none border-bottom: none
padding-bottom: 0px padding-bottom: 0px
.pseudonym
font-family: monospace
.headline-one .headline-one
margin-bottom: 10px margin-bottom: 10px
@ -717,8 +715,13 @@ section
background-color: hsla($hue, 75%, 50%, $opacity) !important background-color: hsla($hue, 75%, 50%, $opacity) !important
.uuid .uuid, .pseudonym, .ldap-primary-key, .email, .file-path, .metric-value, .metric-label
font-family: monospace font-family: var(--font-monospace)
.token
font-family: var(--font-monospace)
white-space: pre-wrap
word-break: break-all
.form--inline .form--inline
display: inline-block display: inline-block
@ -832,7 +835,7 @@ section
.comment, .literal-error .comment, .literal-error
white-space: pre-wrap white-space: pre-wrap
font-family: monospace font-family: var(--font-monospace)
th th
vertical-align: top vertical-align: top
@ -1099,12 +1102,12 @@ th, td
#changelog #changelog
font-size: 14px font-size: 14px
white-space: pre-wrap white-space: pre-wrap
font-family: monospace font-family: var(--font-monospace)
#gitrev #gitrev
font-size: 12px font-size: 12px
white-space: pre-wrap white-space: pre-wrap
font-family: monospace font-family: var(--font-monospace)
.breadcrumbs__container .breadcrumbs__container
position: relative position: relative
@ -1225,12 +1228,12 @@ a.breadcrumbs__home
top: 5px top: 5px
.table__td--csv, .table__th--csv .table__td--csv, .table__th--csv
font-family: monospace font-family: var(--font-monospace)
.confirmationText .confirmationText
white-space: pre-wrap white-space: pre-wrap
font-size: 14px font-size: 14px
font-family: monospace font-family: var(--font-monospace)
.func-field__wrapper, .allocation-missing-prios, .allocation-users__accept, .corrections-overview__section .func-field__wrapper, .allocation-missing-prios, .allocation-users__accept, .corrections-overview__section
max-height: 75vh max-height: 75vh
@ -1295,7 +1298,7 @@ a.breadcrumbs__home
.csv-parse-error .csv-parse-error
white-space: pre-wrap white-space: pre-wrap
font-family: monospace font-family: var(--font-monospace)
overflow: auto overflow: auto
max-height: 75vh max-height: 75vh

View File

@ -29,7 +29,7 @@
visibility: hidden; visibility: hidden;
direction: ltr; direction: ltr;
border-collapse: separate; border-collapse: separate;
font-family: "Open Sans", Calibri, Arial, sans-serif; /* font-family: "Open Sans", Calibri, Arial, sans-serif; */
background-color: white; background-color: white;
border-width: 0; border-width: 0;
border-style: solid; border-style: solid;

View File

@ -235,7 +235,7 @@ option
padding-bottom: 0 padding-bottom: 0
.file-input__list-item .file-input__list-item
font-family: monospace font-family: var(--font-monospace)
font-size: 15px font-size: 15px
// PREVIOUSLY UPLOADED FILES // PREVIOUSLY UPLOADED FILES

5
package-lock.json generated
View File

@ -20773,6 +20773,11 @@
"integrity": "sha512-VrR/IiH00Z1tFP4vDGfwZ1esNqTiDMchBEXYY9kilT6wRGgFoCAlgkEUMHb1E3mB0FsfZhv756IF0+R+SFPfdg==", "integrity": "sha512-VrR/IiH00Z1tFP4vDGfwZ1esNqTiDMchBEXYY9kilT6wRGgFoCAlgkEUMHb1E3mB0FsfZhv756IF0+R+SFPfdg==",
"dev": true "dev": true
}, },
"typeface-source-code-pro": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/typeface-source-code-pro/-/typeface-source-code-pro-1.1.3.tgz",
"integrity": "sha512-BAQ8I7Xy5zS5+KuG+gjRPNYCdfwL8vSF9jT8q9wzCRiiOG4h7id5zt8wcQx59riGRbRsgycRfs/ubyAm2z/FJQ=="
},
"typeface-source-sans-pro": { "typeface-source-sans-pro": {
"version": "0.0.75", "version": "0.0.75",
"resolved": "https://registry.npmjs.org/typeface-source-sans-pro/-/typeface-source-sans-pro-0.0.75.tgz", "resolved": "https://registry.npmjs.org/typeface-source-sans-pro/-/typeface-source-sans-pro-0.0.75.tgz",

View File

@ -109,6 +109,7 @@
"tmp": "^0.1.0", "tmp": "^0.1.0",
"typeface-roboto": "0.0.75", "typeface-roboto": "0.0.75",
"typeface-source-sans-pro": "0.0.75", "typeface-source-sans-pro": "0.0.75",
"typeface-source-code-pro": "^1.1.3",
"webpack": "^4.44.1", "webpack": "^4.44.1",
"webpack-cli": "^3.3.12", "webpack-cli": "^3.3.12",
"webpack-manifest-plugin": "^2.2.0", "webpack-manifest-plugin": "^2.2.0",

View File

@ -44,29 +44,24 @@ errorHandler err = do
[whamlet| [whamlet|
<p>_{MsgErrorResponseEncrypted} <p>_{MsgErrorResponseEncrypted}
<pre .errMsg> <pre .literal-error>
#{ciphertext} #{ciphertext}
|] |]
| otherwise -> plaintext | otherwise -> plaintext
errPage = case err of errPage = case err of
NotFound -> [whamlet|<p>_{MsgErrorResponseNotFound}|] NotFound -> [whamlet|<p>_{MsgErrorResponseNotFound}|]
InternalError err' -> encrypted err' [whamlet|<p .errMsg>#{err'}|] InternalError err' -> encrypted err' [whamlet|<p .literal-error>#{err'}|]
InvalidArgs errs -> [whamlet| InvalidArgs errs -> [whamlet|
<ul> <ul>
$forall err' <- errs $forall err' <- errs
<li .errMsg>#{err'} <li .literal-error>
#{err'}
|] |]
NotAuthenticated -> [whamlet|<p>_{MsgErrorResponseNotAuthenticated}|] NotAuthenticated -> [whamlet|<p>_{MsgErrorResponseNotAuthenticated}|]
PermissionDenied err' -> [whamlet|<p .errMsg>#{err'}|] PermissionDenied err' -> [whamlet|<p .errMsg>#{err'}|]
BadMethod method -> [whamlet|<p>_{MsgErrorResponseBadMethod (decodeUtf8 method)}|] BadMethod method -> [whamlet|<p>_{MsgErrorResponseBadMethod (decodeUtf8 method)}|]
siteLayout (toWgt . mr $ ErrorResponseTitle err) $ do siteLayout (toWgt . mr $ ErrorResponseTitle err) $ do
toWidget
[cassius|
.errMsg
white-space: pre-wrap
font-family: monospace
|]
errPage errPage
provideRep . fmap PrettyValue $ case err of provideRep . fmap PrettyValue $ case err of
PermissionDenied err' -> return $ object [ "message" JSON..= err' ] PermissionDenied err' -> return $ object [ "message" JSON..= err' ]

View File

@ -18,8 +18,9 @@ postAdminErrMsgR = do
let ctView' = wrapForm ctView def{ formAction = Just . SomeRoute $ AdminErrMsgR, formEncoding = ctEncoding } let ctView' = wrapForm ctView def{ formAction = Just . SomeRoute $ AdminErrMsgR, formEncoding = ctEncoding }
defaultLayout defaultLayout
[whamlet| [whamlet|
$newline never
$maybe t <- plaintext $maybe t <- plaintext
<pre style="white-space:pre-wrap; font-family:monospace"> <pre .literal-error>
$case t $case t
$of String t' $of String t'
#{t'} #{t'}

View File

@ -224,7 +224,7 @@ postAdminTestR = do
$forall err <- errs $forall err <- errs
<li>#{err} <li>#{err}
$of FormSuccess res $of FormSuccess res
<p style="white-space:pre-wrap; font-family:monospace;"> <p style="white-space:pre-wrap; font-family:var(--font-monospace);">
#{tshow res} #{tshow res}
|] |]

View File

@ -88,9 +88,9 @@ getInstanceR = do
$newline never $newline never
<dl .deflist> <dl .deflist>
<dt .deflist__dt>_{MsgClusterId} <dt .deflist__dt>_{MsgClusterId}
<dd .deflist__dd style="font-family: monospace">#{UUID.toText clusterId} <dd .deflist__dd .uuid>#{UUID.toText clusterId}
<dt .deflist__dt>_{MsgInstanceId} <dt .deflist__dt>_{MsgInstanceId}
<dd .deflist__dd style="font-family: monospace">#{UUID.toText instanceId} <dd .deflist__dd .uuid>#{UUID.toText instanceId}
|] |]
provideJson instanceInfo provideJson instanceInfo
provideRep . return $ tshow instanceInfo provideRep . return $ tshow instanceInfo

View File

@ -1,7 +1,7 @@
$newline never $newline never
<td> <td>
#{csrf} #{csrf}
<span style="font-family: monospace"> <span .email>
#{lEmail} #{lEmail}
<td> <td>
^{messageTooltip invWarnMsg} ^{messageTooltip invWarnMsg}

View File

@ -51,6 +51,6 @@ $maybe ExternalExamResult{externalExamResultResult} <- mResult
<li> <li>
^{nameEmailWidget userDisplayEmail userDisplayName userSurname} ^{nameEmailWidget userDisplayEmail userDisplayName userSurname}
$of Left email $of Left email
<li style="font-family: monospace"> <li .email>
#{email} #{email}

View File

@ -1,6 +1,6 @@
$newline never $newline never
<td> <td>
<span style="font-family: monospace"> <span .email>
#{email} #{email}
<td> <td>
^{messageTooltip invWarnMsg} ^{messageTooltip invWarnMsg}

View File

@ -3,6 +3,10 @@ $newline never
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<style>
.url {
font-family: monospace;
}
<body> <body>
<section> <section>
<dl> <dl>
@ -36,7 +40,7 @@ $newline never
$maybe referer <- jReferer $maybe referer <- jReferer
<dt>Referer <dt>Referer
<dd> <dd>
<a href=#{referer} style="font-family: monospace"> <a href=#{referer} .url>
#{referer} #{referer}
$maybe errName <- errPartName $maybe errName <- errPartName
<dt>Fehlermeldung <dt>Fehlermeldung

View File

@ -9,6 +9,9 @@ $newline never
font-variant: small-caps; font-variant: small-caps;
font-weight: normal; font-weight: normal;
} }
.email {
font-family: monospace;
}
<body> <body>
<h1> <h1>
$case userAuthentication $case userAuthentication
@ -20,8 +23,10 @@ $newline never
<p> <p>
_{SomeMessage MsgAuthPWHashTip} _{SomeMessage MsgAuthPWHashTip}
<dd> <dd>
<dt>_{SomeMessage MsgPWHashIdent} <dt>
<dd style="font-family: monospace">#{userIdent} _{SomeMessage MsgPWHashIdent}
<dd .email>
#{userIdent}
<dt>_{SomeMessage MsgPWHashPassword} <dt>_{SomeMessage MsgPWHashPassword}
<dd> <dd>
_{SomeMessage MsgPasswordResetEmailIncoming} _{SomeMessage MsgPasswordResetEmailIncoming}

View File

@ -2,4 +2,5 @@
_{MsgCourseParticipantsAlreadyRegistered (length aurAlreadyRegistered)} _{MsgCourseParticipantsAlreadyRegistered (length aurAlreadyRegistered)}
<ul> <ul>
$forall email <- aurAlreadyRegistered' $forall email <- aurAlreadyRegistered'
<li style="font-family: monospace">#{email} <li .email>
#{email}

View File

@ -2,4 +2,5 @@
_{MsgCourseParticipantsRegisteredWithoutField (length aurNoUniquePrimaryField)} _{MsgCourseParticipantsRegisteredWithoutField (length aurNoUniquePrimaryField)}
<ul> <ul>
$forall email <- aurNoUniquePrimaryField' $forall email <- aurNoUniquePrimaryField'
<li style="font-family: monospace">#{email} <li .email>
#{email}

View File

@ -2,4 +2,5 @@
_{MsgExamRegistrationNotRegisteredWithoutCourse (length aurNoCourseRegistration)} _{MsgExamRegistrationNotRegisteredWithoutCourse (length aurNoCourseRegistration)}
<ul> <ul>
$forall email <- aurNoCourseRegistration $forall email <- aurNoCourseRegistration
<li style="font-family: monospace">#{email} <li .email>
#{email}

View File

@ -2,4 +2,5 @@
_{MsgExamRegistrationRegisteredWithoutField (length aurNoUniquePrimaryField)} _{MsgExamRegistrationRegisteredWithoutField (length aurNoUniquePrimaryField)}
<ul> <ul>
$forall email <- aurNoUniquePrimaryField $forall email <- aurNoUniquePrimaryField
<li style="font-family: monospace">#{email} <li .email>
#{email}

View File

@ -3,7 +3,8 @@
$forall ident <- ignoredFiles $forall ident <- ignoredFiles
$case ident $case ident
$of Right fileTitle $of Right fileTitle
<li style="font-family: monospace">#{fileTitle} <li .file-path>
#{fileTitle}
$of Left cID $of Left cID
<li>_{MsgRatingFile} (<span style="font-family: monospace">#{toPathPiece cID}</span>) <li>_{MsgRatingFile} (<span .file-path>#{toPathPiece cID}</span>)

View File

@ -1,7 +1,7 @@
$newline never $newline never
$maybe t <- metricsBearer $maybe t <- metricsBearer
<section> <section>
<pre style="font-family: monospace; white-space: pre-wrap; word-break: break-all;"> <pre .token>
#{toPathPiece t} #{toPathPiece t}
<section> <section>
<dl .deflist> <dl .deflist>
@ -23,7 +23,12 @@ $maybe t <- metricsBearer
$of _ $of _
<ul .list-inline .list--comma-separated> <ul .list-inline .list--comma-separated>
$forall (lName, lValue) <- lPairs $forall (lName, lValue) <- lPairs
<li>#{lName}=#{lValue} <li>
<span .metric-label>
#{lName}
=
<span .metric-value>
#{lValue}
$nothing $nothing
$with allLabels <- getLabels mSamples $with allLabels <- getLabels mSamples
<table .table .table--striped .table--hover> <table .table .table--striped .table--hover>
@ -32,7 +37,8 @@ $maybe t <- metricsBearer
$if showMetricName metricName mSamples $if showMetricName metricName mSamples
<th .table__th>_{MsgMetricName} <th .table__th>_{MsgMetricName}
$forall l <- allLabels $forall l <- allLabels
<th .table__th style="font-family: monospace">#{l} <th .table__th .metric-label>
#{l}
<th .table__th>_{MsgMetricValue} <th .table__th>_{MsgMetricValue}
<tbody> <tbody>
$forall Sample sName lPairs sValue <- mSamples $forall Sample sName lPairs sValue <- mSamples
@ -41,8 +47,8 @@ $maybe t <- metricsBearer
<td .table__td title=#{sName}> <td .table__td title=#{sName}>
#{metricBasename metricName sName} #{metricBasename metricName sName}
$forall l <- allLabels $forall l <- allLabels
<td .table__td> <td .table__td .metric-value>
$maybe lValue <- lookup l lPairs $maybe lValue <- lookup l lPairs
#{lValue} #{lValue}
<td .table__td> <td .table__td .metric-value>
#{decodeUtf8 sValue} #{decodeUtf8 sValue}

View File

@ -1,6 +1,6 @@
$newline never $newline never
<td> <td>
<span style="font-family: monospace"> <span .email>
#{email} #{email}
<td> <td>
^{messageTooltip invWarnMsg} ^{messageTooltip invWarnMsg}

View File

@ -1,2 +1,2 @@
<span style="font-family: monospace"> <span .email>
^{toHtml email} ^{toHtml email}

View File

@ -43,7 +43,8 @@ $maybe exts <- fmap toNullable fieldRestrictExtensions
_{MsgUploadModeExtensionRestriction}: # _{MsgUploadModeExtensionRestriction}: #
<ul .list--inline .list--comma-separated .list--iconless> <ul .list--inline .list--comma-separated .list--iconless>
$forall ext <- bool id (mappend zipExtensions) mayUnpack exts $forall ext <- bool id (mappend zipExtensions) mayUnpack exts
<li style="font-family: monospace">#{ext} <li .file-path>
#{ext}
$if fieldMultiple $if fieldMultiple
<br> <br>
_{MsgUploadModeExtensionRestrictionMultipleTip} _{MsgUploadModeExtensionRestrictionMultipleTip}

View File

@ -1,6 +1,6 @@
$newline never $newline never
<td> <td>
<span style="font-family: monospace"> <span .email>
#{email} #{email}
<td> <td>
^{messageTooltip invWarnMsg} ^{messageTooltip invWarnMsg}

View File

@ -1,6 +1,6 @@
$newline never $newline never
<td> <td>
<span style="font-family: monospace"> <span .email>
#{email} #{email}
<td> <td>
^{messageTooltip invWarnMsg} ^{messageTooltip invWarnMsg}

View File

@ -1,7 +1,7 @@
$newline never $newline never
<td> <td>
#{csrf} #{csrf}
<span style="font-family: monospace"> <span .email>
#{email} #{email}
<td> <td>
^{messageTooltip invWarnMsg} ^{messageTooltip invWarnMsg}

View File

@ -5,4 +5,5 @@ $if acceptRestricted
_{MsgUploadModeExtensionRestriction}: _{MsgUploadModeExtensionRestriction}:
<ul .list--inline .list--comma-separated .list--iconless> <ul .list--inline .list--comma-separated .list--iconless>
$forall ext <- extensions $forall ext <- extensions
<li style="font-family: monospace">#{ext} <li .file-path>
#{ext}

View File

@ -5,4 +5,5 @@ $maybe exts <- fmap toNullable permittedExtensions
_{MsgUploadModeExtensionRestriction}: _{MsgUploadModeExtensionRestriction}:
<ul .list--inline .list--comma-separated .list--iconless> <ul .list--inline .list--comma-separated .list--iconless>
$forall ext <- bool id (mappend zipExtensions) doUnpack exts $forall ext <- bool id (mappend zipExtensions) doUnpack exts
<li style="font-family: monospace">#{ext} <li .file-path>
#{ext}