Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions assets/css/components/carousel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ img.reload {
font-weight: 600;

&:hover {
background-color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, 1);
}

&:focus {
padding: 4px;
border: 2px solid #fff;
background-color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, 1);
outline: none;
color: #fff;
}
Expand All @@ -80,7 +80,7 @@ img.reload {
border: 0 solid transparent;

&:hover {
background-color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, 1);
}
}

Expand Down
2 changes: 1 addition & 1 deletion assets/css/reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

*:not(article) {
> h1, > h2, > h3, > h4, > h5, > h6 {
margin: 0;

&:not(article &) {
font-size: inherit;
}
margin: 0;
}
}

Expand Down
32 changes: 16 additions & 16 deletions assets/css/typography.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
@import 'utilities/px-to-rem';

:root {
&:lang(zh) {
--body-font-family: helvetica, 'Noto Sans TC', system-ui, sans-serif;
}
&:lang(en) {
--body-font-family: helvetica, system-ui, sans-serif;
}
&:lang(ja) {
--body-font-family: helvetica, 'Noto Sans JP', system-ui, sans-serif;
}
&:lang(th) {
--body-font-family: helvetica, 'Noto Sans Thai', system-ui, sans-serif;
}
&:lang(vi) {
--body-font-family: inter, system-ui, sans-serif;
}

--body-line-height: 1.7em;
--body-font-size: #{px-to-rem(16px)};

Expand Down Expand Up @@ -44,6 +28,22 @@

--h1-font-size: #{px-to-rem(36px)};
--h1-font-weight: 600;

&:lang(zh) {
--body-font-family: helvetica, 'Noto Sans TC', system-ui, sans-serif;
}
&:lang(en) {
--body-font-family: helvetica, system-ui, sans-serif;
}
&:lang(ja) {
--body-font-family: helvetica, 'Noto Sans JP', system-ui, sans-serif;
}
&:lang(th) {
--body-font-family: helvetica, 'Noto Sans Thai', system-ui, sans-serif;
}
&:lang(vi) {
--body-font-family: inter, system-ui, sans-serif;
}
}

a {
Expand Down
2 changes: 1 addition & 1 deletion content/components/button-and-link/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ maturity: "alpha"

### 常見按鈕

{{< live-example partial="ctas/button.html" i18n_selector="button" i18n="en-US:Submit,Delete,Cancel;ja:送信,削除,キャンセル;vi:Gửi,Xóa,Hủy;th:ส่ง,ลบ,ยกเลิก" >}}
{{< live-example partial="ctas/button.html" i18n_selector="button" i18n="en-US:Submit,Delete,Next;ja:送信,削除,キャンセル;vi:Gửi,Xóa,Hủy;th:ส่ง,ลบ,ยกเลิก" >}}

#### CSS

Expand Down
8 changes: 4 additions & 4 deletions content/components/form/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ maturity: "alpha"

### 簡易欄位

{{< live-example partial="form/form-elements.html" i18n_selector="[for=name],[for=city],[for=desc]" i18n="en-US:Full name,City of residence,Description" >}}
{{< live-example partial="form/form-elements.html" i18n_selector="[for=name],[for=city],[for=desc],[value='select'],[value=taipei],[value=newtaipei],[value=keelung]" i18n="en-US:Full name,City of residence,Description,Select,Taipei,New Taipei,Keelung" >}}

#### CSS

Expand All @@ -23,7 +23,7 @@ maturity: "alpha"

### 選項欄位

{{< live-example partial="form/form-checkable.html" i18n_selector="[for=id],[for=items]" i18n="en-US:ID type,Lost document replacement" >}}
{{< live-example partial="form/form-checkable.html" i18n_selector="[for=id],[for=items],[for=v-healthid],[for=v-moica],[for=v-phone],[for=check-h-healthid],[for=check-h-moica],[for=check-h-id]" i18n="en-US:ID type,Lost document replacement,NHI Card,Digital Certificate,Cell phone,NHI Card,Digital Certificate,ID Card" >}}

#### CSS

Expand All @@ -33,7 +33,7 @@ maturity: "alpha"

### 欄位說明

{{< live-example partial="form/field.html" i18n_selector="label,.field-description li" i18n="en-US:Email,Address must end with @pdis.nat.gov.tw.;" >}}
{{< live-example partial="form/field.html" i18n_selector="label,.field-description li" i18n="en-US:Email,Address must end with @pdis.nat.gov.tw." >}}

#### CSS

Expand All @@ -45,7 +45,7 @@ maturity: "alpha"

### 必要欄位

{{< live-example partial="form/field-required.html" i18n_selector="label,.field-required" i18n="en-US:Email,required;" >}}
{{< live-example partial="form/field-required.html" i18n_selector="label,.field-required" i18n="en-US:Email,required" >}}

#### 親和力

Expand Down
4 changes: 2 additions & 2 deletions layouts/_partials/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
}}
<select
aria-label="語言選擇"
data-i18n-selector="{{ .i18n_selector }}"
data-i18n-selector="{{ $.i18n_selector }}"
class="field-select absolute nt2 lh-solid pa1 right-0 mr4 top-0 f7 pointer"
>
<option value="default">正體中文</option>
{{ range $i18n }} {{ $parts := split . ":" }}
<option lang="{{ index $parts 0 }}" data-phrases="{{ index $parts 1 }}">
{{ index $.Site.Params.i18n.langs (index $parts 0) }}
{{ index $.context.Site.Params.i18n.langs (index $parts 0) }}
</option>
{{ end }}
</select>
Expand Down
8 changes: 4 additions & 4 deletions layouts/_partials/form/form-elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<fieldset class="fieldset">
<label for="city" class="field-label">居住城市</label>
<select class="field-input" id="city">
<option for="select">選擇</option>
<option for="taipei">台北市</option>
<option for="newtaipei">新北市</option>
<option for="keelung">基隆市</option>
<option value="select">選擇</option>
<option value="taipei">台北市</option>
<option value="newtaipei">新北市</option>
<option value="keelung">基隆市</option>
</select>
</fieldset>
<fieldset class="fieldset">
Expand Down
2 changes: 1 addition & 1 deletion layouts/_shortcodes/live-example.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
{{ if eq $customElement "true" }}{{ $inject_data = $raw_content | base64Encode }}{{ end }}
{{ $rendered_content := cond (eq $customElement "true") "" (partial $partial_name .) }}
{{ $code_content := cond (eq $customElement "true") $raw_content $rendered_content }}
{{ partial "example.html" (dict "rendered_content" $rendered_content "raw_content" $code_content "inject_html_data" $inject_data "context" .) }}
{{ partial "example.html" (dict "rendered_content" $rendered_content "raw_content" $code_content "inject_html_data" $inject_data "i18n" (.Get "i18n") "i18n_selector" (.Get "i18n_selector") "context" .) }}
Loading