From b16d43be096e5cd12c92e8cd2d670b0dbd2da67c Mon Sep 17 00:00:00 2001 From: "Huang, Zeyu" Date: Thu, 2 May 2024 16:10:32 +0800 Subject: [PATCH] vcard --- assets/vcard.scss | 154 +++++++++++++++++++++++++++++ content/vcard.en.md | 64 ++++++++++++ content/vcard.md | 61 ++++++++++++ hugo.yaml | 19 +++- layouts/_default/plain-baseof.html | 17 ++++ layouts/blog/blog.html | 1 + layouts/card/single.html | 23 +++++ layouts/index-baseof.html | 1 + layouts/index.html | 1 + static/robots.txt | 3 + 10 files changed, 339 insertions(+), 5 deletions(-) create mode 100644 assets/vcard.scss create mode 100644 content/vcard.en.md create mode 100644 content/vcard.md create mode 100644 layouts/_default/plain-baseof.html create mode 100644 layouts/card/single.html create mode 100644 static/robots.txt diff --git a/assets/vcard.scss b/assets/vcard.scss new file mode 100644 index 0000000..ed17c16 --- /dev/null +++ b/assets/vcard.scss @@ -0,0 +1,154 @@ +html, body, main { + height: 100%; +} + +main { + overflow: auto; +} + +.container-outer { + width: 100%; + max-width: 90mm; + height: 100%; + padding: 10px; + margin: auto; + // background-color: wheat; + display: flex; + justify-content: center; + align-items: center; +} + +.container-inner { + height: 100%; + aspect-ratio: 6/4; + max-width: 100%; + // background-color: pink; + display: flex; + justify-content: center; + align-items: center; +} + +.card-wrapper { + width: 100%; + aspect-ratio: 16/9; + position: relative; +} + +.card { + width: 100%; + height: 100%; + position: relative; + + background-color: rgba(255, 255, 255, 0.6); + backdrop-filter: blur(30px) saturate(180%); + box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px; + border-radius: 6px; + + padding: 8% 5% 5%; + overflow:hidden; + font-size: 60%; // Every text inside the card will be relative to this size + + address { + height: 100%; + width: 100%; + font-style: normal; + display: flex; + flex-direction: column; + } + + p { + margin: 0 0 2%; + svg { + width: 0.8em; + height: 0.8em; + vertical-align: -0.1em; + margin: 0 0.1em; + } + } + + .info { + flex: 1; + display: flex; + } + + .info-text { + flex: 1; + } + + .name { + font-size: 1.5em; + font-weight: bold; + margin-bottom: 5%; + } + + .position { + font-family: 'Fira Sans Condensed', -apple-system, BlinkMacSystemFont, "Segoe UI", "Droid Sans", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Droid Sans Fallback", "Microsoft YaHei", sans-serif; + } + + ul.links { + list-style: none; + + padding: 0; + margin: auto; + width: 100%; + + display: flex; + justify-content: space-around; + + li { + display: block; + text-align: center; + + svg { + width: 2em; + height: 2em; + } + } + } + + .avatar { + border-radius: 9999px; + width: 5em; + height: 5em; + } +} + +.sphere { + z-index: -1; + position: absolute; + border-radius:50%; + // animation:spin 3s linear infinite; + // transform:rotate(-15deg); +} + +.sphere:after{ + content:""; + position:absolute; + z-index:12; + top:0; + left:0; + height:100%; + width:100%; + border-radius:50%; + box-shadow: + inset -30px -30px 20px 15px #6d6d6d29, + // inset -2px -2px 8px 0px #6d6d6d64, + inset 2px 2px 5px 0px rgba(255, 255, 255, 0.374), + inset 20px 20px 40px 15px rgba(255, 255, 255, 0.71); +} + +.sphere:nth-of-type(1) { + top: -150px; + left: -200px; + height:300px; + width:300px; + background-color: tomato; +} + +.sphere:nth-of-type(2) { + right: -100px; + bottom: -100px; + height:180px; + width:180px; + background-color:royalblue; +} \ No newline at end of file diff --git a/content/vcard.en.md b/content/vcard.en.md new file mode 100644 index 0000000..66573fe --- /dev/null +++ b/content/vcard.en.md @@ -0,0 +1,64 @@ +--- +title: "vCard" +date: 2024-05-02T10:45:07+08:00 +lang: en +draft: true +layout: plain +type: card +--- + +
+ +
+
+

HUANG, Zeyu (黄泽宇)

+

Ph.D. Candidate in Computer Science

+

+ Human-Computer Interaction Initiative
+ The Hong Kong University of Science and Technology +

+ {{< card-email.inline >}} + + {{< /card-email.inline >}} +
+ + {{< card-image.inline >}} + {{ $avatar := resources.Get "avatar.jpg" }} + A very handsome face of mine + {{< /card-image.inline >}} +
+ +{{< card-links.inline >}} + +{{< /card-links.inline >}} + +
diff --git a/content/vcard.md b/content/vcard.md new file mode 100644 index 0000000..4ba6066 --- /dev/null +++ b/content/vcard.md @@ -0,0 +1,61 @@ +--- +title: "vCard" +date: 2024-05-02T10:44:55+08:00 +lang: zh-cn +draft: true +layout: plain +type: card +--- + +
+ +
+
+

黄泽宇(HUANG, Zeyu)

+

香港科技大学计算机系

+

人机交互方向博士候选人

+ {{< card-email.inline >}} + + {{< /card-email.inline >}} +
+ + {{< card-image.inline >}} + {{ $avatar := resources.Get "avatar.jpg" }} + A very handsome face of mine + {{< /card-image.inline >}} +
+ +{{< card-links.inline >}} + +{{< /card-links.inline >}} + +
diff --git a/hugo.yaml b/hugo.yaml index 235bc3b..99b94bd 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -67,20 +67,26 @@ menu: params: icon: notebook social: - - name: GitHub - url: https://github.com/fhfuih - params: - icon: brand-github + # Serious platforms: 0x - name: LinkedIn url: https://www.linkedin.com/in/zeyu-huang-522a52178/ + weight: 1 params: icon: brand-linkedin - name: ORCiD url: https://orcid.org/0000-0001-8199-071X + weight: 2 params: icon: orcid - - name: bilibili + - name: GitHub + url: https://github.com/fhfuih + weight: 3 + params: + icon: brand-github + # Casual platforms: 1x + - name: Bilibili url: https://space.bilibili.com/7605906 + weight: 11 params: icon: brand-bilibili # params: @@ -124,6 +130,9 @@ markup: renderer: unsafe: true +security: + enableInlineShortcodes: true + capitalizeListTitles: false # do not capitalize section, taxonomy, and term pages not backed by a file # debug diff --git a/layouts/_default/plain-baseof.html b/layouts/_default/plain-baseof.html new file mode 100644 index 0000000..5586da2 --- /dev/null +++ b/layouts/_default/plain-baseof.html @@ -0,0 +1,17 @@ + + + + {{- partial "head/head.html" . -}} + {{- block "head" . -}}{{ end }} + + + {{ `` | safeHTML }} + {{- partial "head/colorScheme" . -}} + +
+ {{- block "main" . -}}{{- end -}} +
+ + {{ partial "footer/include.html" . }} + + diff --git a/layouts/blog/blog.html b/layouts/blog/blog.html index 0cd0b88..ad1fc3e 100644 --- a/layouts/blog/blog.html +++ b/layouts/blog/blog.html @@ -1,4 +1,5 @@ {{ define "main" }} + {{ `` | safeHTML }} {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} {{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }} {{ $filtered := ($pages | intersect $notHidden) }} diff --git a/layouts/card/single.html b/layouts/card/single.html new file mode 100644 index 0000000..b1a033c --- /dev/null +++ b/layouts/card/single.html @@ -0,0 +1,23 @@ +{{ define "head" }} +{{ $sass := resources.Get "vcard.scss" }} +{{ $style := $sass | resources.ToCSS | minify }} + + + + +{{ end }} + +{{ define "main" }} +{{ `` | safeHTML }} +
+
+
+
+
+
+ {{ .Content }} +
+
+
+
+{{ end }} \ No newline at end of file diff --git a/layouts/index-baseof.html b/layouts/index-baseof.html index 7c53ade..def1323 100644 --- a/layouts/index-baseof.html +++ b/layouts/index-baseof.html @@ -5,6 +5,7 @@ {{- block "head" . -}}{{ end }} + {{ `` | safeHTML }} {{- partial "head/colorScheme" . -}}
diff --git a/layouts/index.html b/layouts/index.html index fae6833..4596b22 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -38,6 +38,7 @@

{{ .Site.Title }}

{{ end }} {{ define "main" }} +{{ `` | safeHTML }} {{ $hasPublications := isset $.Site.Data.personal "publications" }} {{ $hasProjects := isset $.Site.Data.personal "projects" }} {{ $hasExperiences := isset $.Site.Data.personal "experiences" }} diff --git a/static/robots.txt b/static/robots.txt new file mode 100644 index 0000000..964dd57 --- /dev/null +++ b/static/robots.txt @@ -0,0 +1,3 @@ +User-agent: * +Disallow: /vcard +Disallow: /*/vcard \ No newline at end of file