Skip to content

Commit

Permalink
add semibold font
Browse files Browse the repository at this point in the history
Adds a semi-bold font and uses it for table headers throughout.
Also applied to address on address page and txid on tx page.
  • Loading branch information
buck54321 committed Jun 28, 2019
1 parent d52d25c commit ef00b0c
Show file tree
Hide file tree
Showing 14 changed files with 18,147 additions and 48 deletions.
Binary file added public/fonts/source-sans-pro-semibold.eot
Binary file not shown.
18,081 changes: 18,081 additions & 0 deletions public/fonts/source-sans-pro-semibold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/fonts/source-sans-pro-semibold.ttf
Binary file not shown.
Binary file added public/fonts/source-sans-pro-semibold.woff
Binary file not shown.
Binary file added public/fonts/source-sans-pro-semibold.woff2
Binary file not shown.
12 changes: 12 additions & 0 deletions public/scss/fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
font-style: normal;
}

/* fonts */
@font-face {
font-family: 'source-sans-pro-semibold';
src: url('/fonts/source-sans-pro-semibold.eot');
src:
url('/fonts/source-sans-pro-semibold.eot#iefix') format('embedded-opentype'),
url('/fonts/source-sans-pro-semibold.woff') format('woff'),
url('/fonts/source-sans-pro-semibold.svg') format('svg');
font-weight: medium;
font-style: normal;
}

@font-face {
font-family: 'inconsolata-v15-latin-regular';
src: url('/fonts/inconsolata-v15-latin-regular.eot');
Expand Down
3 changes: 2 additions & 1 deletion public/scss/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ table {

thead tr {
background: #fff;
font-weight: bold;
font-family: 'source-sans-pro-semibold', sans-serif;

}
}

Expand Down
4 changes: 4 additions & 0 deletions public/scss/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
font-size: 16px;
}

.medium-sans {
font-family: 'source-sans-pro-semibold', sans-serif;
}

.sep {
position: relative;
top: 3px;
Expand Down
2 changes: 1 addition & 1 deletion views/address.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="fs22 pb-3">Address</div>
{{- end}}
<div class="text-left d-flex align-items-start flex-wrap">
<div class="fs15 font-weight-bold break-word d-inline-block hash-box mb-3" data-target="address.addr">{{.Address}}</div>
<div class="fs15 medium-sans break-word d-inline-block hash-box mb-3" data-target="address.addr">{{.Address}}</div>
<a
data-action="click->address#showQRCode"
data-target="address.qricon"
Expand Down
22 changes: 11 additions & 11 deletions views/agenda.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@
<div class="col-lg-12 col-sm-12 d-flex">
<table class="">
<tr>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 font-weight-bold">Description</td>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 medium-sans">Description</td>
<td>
<span class="hash lh1rem">{{.Description}}</span>
</td>
</tr>
<tr>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 font-weight-bold">Vote Version</td>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 medium-sans">Vote Version</td>
<td class="lh1rem">
<span class="hash break-word">v{{.VoteVersion}}</span>
</td>
</tr>
<tr>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 font-weight-bold">Agenda Valid</td>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 medium-sans">Agenda Valid</td>
<td>
<span class="hash break-word">{{TimeConversion .StartTime}}</span>
</td>
</tr>
<tr>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 font-weight-bold">Agenda Expire</td>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 medium-sans">Agenda Expire</td>
<td>
<span class="hash break-word">{{TimeConversion .ExpireTime}}</span>
</td>
Expand All @@ -46,28 +46,28 @@
<div class="col-lg-7 col-sm-12 d-flex">
<table class="">
<tr>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 font-weight-bold">Voting Start</td>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 medium-sans">Voting Start</td>
<td class="lh1rem">
<span class="hash break-word"><a href="/block/{{$.VotingStarted}}">{{$.VotingStarted}}</a></span>
</td>
</tr>
<tr>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 font-weight-bold">Voting End</td>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 medium-sans">Voting End</td>
<td class="lh1rem">
<span class="hash break-word"></a><a href="/block/{{$.LockedIn}}">{{$.LockedIn}}</a></span>
</td>
</tr>
<tr>
{{if gt $.BlocksLeft 0}}
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 font-weight-bold">Blocks Left</td>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 medium-sans">Blocks Left</td>
<td class="lh1rem">
<span class="hash break-word">{{intComma $.BlocksLeft}}</span>
</td>
{{end}}
</tr>
<tr>
{{if ne $.TimeRemaining ""}}
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 font-weight-bold">Remaining</td>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 medium-sans">Remaining</td>
<td class="lh1rem">
<span class="hash break-word">{{$.TimeRemaining}}</span>
</td>
Expand All @@ -79,20 +79,20 @@
<table class="">

<tr>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 font-weight-bold">Status</td>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 medium-sans">Status</td>
<td class="lh1rem">
<span class="hash break-word">{{toTitleCase .Status.String}}</span>
</td>
</tr>
<tr>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 font-weight-bold">Total Votes</td>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 medium-sans">Total Votes</td>
<td>
<span class="hash break-word">{{$.TotalVotes}}</span>
</td>
</tr>
<tr>
{{if gt .QuorumProgress 0.0}}
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 font-weight-bold">Quorum</td>
<td class="text-right pr-2 lh1rem vam nowrap xs-w117 medium-sans">Quorum</td>
<td class="lh1rem">
<span class="hash break-word">{{$.QuorumVotes}}/{{$.RuleChangeI}} ({{printf "%.2f" (x100 .QuorumProgress)}}%)</span>
</td>
Expand Down
8 changes: 4 additions & 4 deletions views/agendas.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<table class="w-100 fs14 mt-2">
<tbody>
<tr>
<td class="text-right font-weight-bold">Ayes: &nbsp;</td>
<td class="text-right medium-sans">Ayes: &nbsp;</td>
<td class="text-left"> &nbsp;{{.Aye}}</td>
<td class="text-right font-weight-bold">Approved: &nbsp;</td>
<td class="text-right medium-sans">Approved: &nbsp;</td>
<td class="text-left"> &nbsp;{{printf "%.1f" (f32x100 .Approval)}}%</td>
</tr>
<tr>
<td class="text-right font-weight-bold">Nays: &nbsp;</td>
<td class="text-right medium-sans">Nays: &nbsp;</td>
<td class="text-left"> &nbsp;{{.Nay}}</td>
<td class="text-right font-weight-bold">Abstain: &nbsp;</td>
<td class="text-right medium-sans">Abstain: &nbsp;</td>
<td class="text-left"> &nbsp;{{.Abstain}} ({{printf "%.1f" (f32x100 .AbstainRate)}}%)</td>
</tr>
</tbody>
Expand Down
13 changes: 7 additions & 6 deletions views/extras.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<link rel="preload" href="/fonts/icomoon.ttf?g003m6" as="font" type="font/ttf" crossorigin="anonymous" />
<link rel="preload" href="/fonts/inconsolata-v15-latin-regular.woff" as="font" type="font/woff" crossorigin="anonymous" />
<link rel="preload" href="/fonts/source-sans-pro-v9-latin-regular.woff" as="font" type="font/woff" crossorigin="anonymous" />
<link rel="preload" href="/fonts/source-sans-pro-semibold.woff" as="font" type="font/woff" crossorigin="anonymous" />
<link rel="preload" href="/images/connecting.svg" as="image" type="image/svg+xml" />
<link rel="preload" href="/images/themes/light/logo.svg" as="image" type="image/svg+xml" />
<link rel="preload" href="/images/connected.svg" as="image" type="image/svg+xml" />
Expand Down Expand Up @@ -314,12 +315,12 @@
<span data-controller="time" data-target="time.age" data-age="{{.Time.UNIX}}"></span>
{{- end}}
</td>
<td class="addr-tx-confirms text-right" {{/*Update confirmations with Stimulus*/ -}}
data-target="newblock.confirmations" {{/*trim*/ -}}
data-confirmations="{{.Confirmations}}" {{/*trim*/ -}}
data-confirmation-block-height="{{if eq .Confirmations 0}}-1{{else}}{{.BlockHeight}}{{end}}" {{/*trim*/ -}}
data-yes="#" {{/*trim*/ -}}
data-no="(unconfirmed)" {{/*trim*/ -}}
<td class="addr-tx-confirms text-right" {{/*Update confirmations with Stimulus*/ -}}
data-target="newblock.confirmations" {{/*trim*/ -}}
data-confirmations="{{.Confirmations}}" {{/*trim*/ -}}
data-confirmation-block-height="{{if eq .Confirmations 0}}-1{{else}}{{.BlockHeight}}{{end}}" {{/*trim*/ -}}
data-yes="#" {{/*trim*/ -}}
data-no="(unconfirmed)" {{/*trim*/ -}}
>{{.Confirmations}}</td>
<td class="text-right d-none d-sm-table-cell text-right">{{.FormattedSize}}</td>
</tr>
Expand Down
34 changes: 17 additions & 17 deletions views/proposal.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,49 +17,49 @@
<div class="col-lg-12 col-sm-12 d-flex">
<table>
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">Token:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">Token:</td>
<td>
<span class="break-word py-1 lh1rem">
<a href="{{$.PoliteiaURL}}/proposals/{{.TokenVal}}">{{.TokenVal}}</a>
</span>
</td>
</tr>
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">Author:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">Author:</td>
<td>
<span class="break-word py-1 lh1rem">{{.Username}}</span>
</td>
</tr>
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">Published:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">Published:</td>
<td>
<span class="break-word py-1 lh1rem">{{TimeConversion .PublishedDate}}</span>
</td>
</tr>
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">Updated:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">Updated:</td>
<td>
<span class="break-word py-1 lh1rem">{{TimeConversion .Timestamp}}</span>
</td>
</tr>
{{if ne .CensoredDate 0}}
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">Censored:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">Censored:</td>
<td>
<span class="break-word py-1 lh1rem">{{TimeConversion .CensoredDate}}</span>
</td>
</tr>
{{end}}
{{if ne .AbandonedDate 0}}
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">Abandoned:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">Abandoned:</td>
<td>
<span class="break-word py-1 lh1rem">{{TimeConversion .AbandonedDate}}</span>
</td>
</tr>
{{end}}
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">Comments Count:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">Comments Count:</td>
<td>
<span class="break-word py-1 lh1rem">{{.NumComments}}</span>
</td>
Expand All @@ -69,25 +69,25 @@
<div class="col-lg-4 col-sm-12 d-flex">
<table>
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">State:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">State:</td>
<td>
<span class="break-word py-1 lh1rem">{{with .State}}{{toTitleCase .String}}{{end}}</span>
</td>
</tr>
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">Status:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">Status:</td>
<td>
<span class="break-word py-1 lh1rem">{{with .Status}}{{toTitleCase .String}}{{end}}</span>
</td>
</tr>
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">Version:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">Version:</td>
<td>
<span class="break-word lh1rem">v{{.Version}}</span>
</td>
</tr>
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">End Height:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">End Height:</td>
<td>
<span class="break-word py-1 lh1rem">
{{if .Endheight}}
Expand All @@ -100,7 +100,7 @@
</tr>
{{if ne $.TimeRemaining ""}}
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">Remaining:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">Remaining:</td>
<td>
<span class="break-word py-1 lh1rem">{{$.TimeRemaining}}</span>
</td>
Expand All @@ -114,7 +114,7 @@
{{range $i, $v := .VoteResults}}
{{if eq $v.Option.OptionID "yes"}}
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">Yes Votes:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">Yes Votes:</td>
<td>
<span class="break-word py-1 lh1rem">{{$v.VotesReceived}}</span>
</td>
Expand All @@ -126,7 +126,7 @@
{{range $i, $v := .VoteResults}}
{{if eq $v.Option.OptionID "no"}}
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">No Votes:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">No Votes:</td>
<td>
<span class="break-word py-1 lh1rem">{{$v.VotesReceived}}</span>
</td>
Expand All @@ -135,7 +135,7 @@
{{end}}
{{end}}
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">Vote Status:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">Vote Status:</td>
<td>
<span class="break-word py-1 lh1rem">
{{if .VoteStatus}}
Expand All @@ -150,7 +150,7 @@
</td>
</tr>
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">Quorum:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">Quorum:</td>
<td>
<span class="break-word py-1 lh1rem">
{{if and .QuorumPercentage (and .NumOfEligibleVotes .TotalVotes)}}
Expand All @@ -166,7 +166,7 @@
{{range $i, $v := .VoteResults}}
{{if eq $v.Option.OptionID "yes"}}
<tr>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 font-weight-bold">Total:</td>
<td class="text-right pr-2 py-2 vam nowrap xs-w117 medium-sans">Total:</td>
<td>
<span class="break-word py-1 lh1rem">
{{printf "%.2f" (percentage $v.VotesReceived $.Data.TotalVotes)}}% yes, {{if $.Data.PassPercentage}}{{$.Data.PassPercentage}}%{{end}} needed
Expand Down
Loading

0 comments on commit ef00b0c

Please sign in to comment.