Compare commits

..

8 Commits

Author SHA1 Message Date
Kevin C. Coram 7820886eca
Add padding around author photo 2019-12-06 23:22:47 -05:00
Kevin C. Coram d3e16031cc
Remove margin
Margins/etc should go in styles.css
2019-12-06 23:22:14 -05:00
Kevin C. Coram 626b5493f1
Remove redundant "box" div 2019-12-06 23:21:33 -05:00
Kevin C. Coram a53fb3666f
Configuration driven social network icon links
Defines three types of links: email, PGP public key, and profile links.
2019-12-06 23:11:23 -05:00
Kevin C. Coram 53baef4d8b
Reduce size for social icon glyphs 2019-12-06 23:09:28 -05:00
Kevin C. Coram 65404a5da6
Create author card using h-card microformats
* Update baseof to add block for styling
* Default styles block to link in layout.css and style.css
* Update baseof to add block for importing icons from a CSS font library
* Update baseof to add an aside block to the main content to put author
card in
* Create author card with a photo, author name, and general locale
* Create beginning of a social network link ribbon
2019-12-06 22:02:44 -05:00
Kevin C. Coram 1273db7290
Add one of the FA images to use as an example author photo 2019-12-06 22:00:52 -05:00
Kevin C. Coram 19f2519762
Add Fork Awesome v1.1.7 to static assets
See: https://forkaweso.me/Fork-Awesome/

Self-hosting the Fork Awesome font icon pack.
2019-12-06 21:56:55 -05:00
14 changed files with 2962 additions and 1 deletions

View File

@ -1,6 +1,6 @@
baseURL = "http://example.org/" baseURL = "http://example.org/"
languageCode = "en-us" languageCode = "en-us"
title = "Basic Hugo Theme" title = "Semantic IndieWeb Theme"
copyright = "Copyright © 2019, Copyright Owner Name | Built with [Hugo](https://gohugo.io/)" copyright = "Copyright © 2019, Copyright Owner Name | Built with [Hugo](https://gohugo.io/)"
theme = "semantic-indieweb" theme = "semantic-indieweb"
paginate = 5 paginate = 5
@ -12,6 +12,14 @@ paginate = 5
subtitle = "A theme with no CSS and only basic layouts" subtitle = "A theme with no CSS and only basic layouts"
mainSections = [ "posts" ] mainSections = [ "posts" ]
# Configuration Parameters for IndieWeb h-card
[params.Card]
Author = "Site Author Name"
Photo = "images/picture-o.svg"
Locality = "City/Town/Village"
Region = "State/County/Province"
Country = "Country Name"
# Configuration Parameters for IndieWeb Identity # Configuration Parameters for IndieWeb Identity
[[params.Identity]] [[params.Identity]]
type = "Email" type = "Email"
@ -47,3 +55,37 @@ paginate = 5
type = "PGP" type = "PGP"
value = "pgp_key_file.txt" value = "pgp_key_file.txt"
authn = false authn = false
# Configuration parameters for social network links
[[params.Social]]
profile = "MastodonProfileLink"
icon = "fa fa-mastodon"
[[params.Social]]
profile = "TwitterProfileLink"
icon = "fa fa-twitter"
[[params.Social]]
profile = "GitHubProfileLink"
icon = "fa fa-github"
[[params.Social]]
profile = "GitLabProfileLink"
icon = "fa fa-gitlab"
[[params.Social]]
profile = "GiteaProfileLink"
icon = "fa fa-gitea"
[[params.Social]]
profile = "FacebookProfileLink"
icon = "fa fa-facebook"
[[params.Social]]
email = "email@example.com"
icon = "fa fa-envelope-o"
[[params.Social]]
publicKey = "pgp_key_file.txt"
fingerprint = "AAAA BBBB CCCC DDDD"
icon = "fa fa-key"

View File

@ -8,6 +8,13 @@
<title>{{- block "title" . -}} <title>{{- block "title" . -}}
{{ .Site.Title }} {{ .Site.Title }}
{{- end -}}</title> {{- end -}}</title>
{{ block "styles" . }}
<link rel="stylesheet" href={{ "css/layout.css" | absURL }} />
<link rel="stylesheet" href={{ "css/style.css" | absURL }} />
{{ end }}
{{ block "icons" . }}
{{ partial "icons.html" . }}
{{ end }}
</head> </head>
<body> <body>
@ -40,6 +47,11 @@
{{- block "content-footer" . -}} {{- block "content-footer" . -}}
{{- end -}} {{- end -}}
</footer> </footer>
<aside>
{{ block "author-card" . }}
{{ partial "author-card.html" . }}
{{ end }}
</aside>
</main> </main>
<footer> <footer>
{{- block "footer" . -}} {{- block "footer" . -}}

View File

@ -0,0 +1,14 @@
<div class="h-card box">
<img class="u-photo" src="{{ .Site.Params.Card.Photo | absURL}}" alt="" />
<div class="author-card-content">
<div class="author-card-header">
<a class="p-name u-url" href="{{ .Site.BaseURL }}" rel="me">{{ .Site.Params.Card.Author }}</a>
</div>
<div class="author-card-subheader">
<span class="p-locality">{{ .Site.Params.Card.Locality }}</span>,
<span class="p-region">{{ .Site.Params.Card.Region }}</span>,
<span class="p-country-name">{{ .Site.Params.Card.Country }}</span>
</div>
{{ partial "social.html" . }}
</div>
</div>

View File

@ -0,0 +1 @@
<link rel="stylesheet" href={{ "css/fork-awesome.min.css" | absURL }} />

View File

@ -0,0 +1,11 @@
<div class="social-box">
{{ range .Site.Params.Social }}
{{ if .email }}
<a class="glyph u-email" href="mailto:{{ .email }}" rel="me"><i class="{{ .icon }}"></i></a>
{{ else if .publicKey }}
<a class="glyph p-pgp" href="{{ .publicKey }}" rel="pgpkey" title="{{ .fingerprint }}"><i class="{{ .icon }}"></i></a>
{{ else }}
<a class="glyph" href="{{ .profile }}" rel="me"><i class="{{ .icon }}"></i></a>
{{ end }}
{{ end }}
</div>

12
static/css/fork-awesome.min.css vendored Normal file

File diff suppressed because one or more lines are too long

9
static/css/layout.css Normal file
View File

@ -0,0 +1,9 @@
.box {
display: flex;
align-items: center;
flex-wrap: wrap;
}
div.author-card-content {
flex-grow: 1;
}

8
static/css/style.css Normal file
View File

@ -0,0 +1,8 @@
img.u-photo {
max-width: 60px;
padding: 0.5em;
}
.glyph {
font-size: 1.25em;
}

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 470 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
<svg width="1536" height="1536" xmlns="http://www.w3.org/2000/svg">
<path d="M640 576c0 106-86 192-192 192s-192-86-192-192 86-192 192-192 192 86 192 192zm1024 384v448H256v-192l320-320 160 160 512-512zm96-704H160c-17 0-32 15-32 32v1216c0 17 15 32 32 32h1600c17 0 32-15 32-32V288c0-17-15-32-32-32zm160 32v1216c0 88-72 160-160 160H160c-88 0-160-72-160-160V288c0-88 72-160 160-160h1600c88 0 160 72 160 160z"/>
</svg>

After

Width:  |  Height:  |  Size: 417 B