diff --git a/hugo/assets/js/main.js b/hugo/assets/js/main.js index 7959c93..26b9fca 100644 --- a/hugo/assets/js/main.js +++ b/hugo/assets/js/main.js @@ -7,4 +7,40 @@ window.addEventListener('resize', () => { // We execute the same script as before let vh = window.innerHeight * 0.01; root.style.setProperty('--vh', `${vh}px`); -}); \ No newline at end of file +}); + +function timeDifference(current, previous) { + + var msPerMinute = 60 * 1000; + var msPerHour = msPerMinute * 60; + var msPerDay = msPerHour * 24; + var msPerMonth = msPerDay * 30; + var msPerYear = msPerDay * 365; + + var elapsed = current - previous; + + if (elapsed < msPerMinute) { + return Math.round(elapsed/1000) + ' seconds ago'; + } + + else if (elapsed < msPerHour) { + return Math.round(elapsed/msPerMinute) + ' minutes ago'; + } + + else if (elapsed < msPerDay ) { + return Math.round(elapsed/msPerHour ) + ' hours ago'; + } + + else if (elapsed < msPerMonth) { + return 'approximately ' + Math.round(elapsed/msPerDay) + ' days ago'; + } + + else if (elapsed < msPerYear) { + return 'approximately ' + Math.round(elapsed/msPerMonth) + ' months ago'; + } + + else { + return 'approximately ' + Math.round(elapsed/msPerYear ) + ' years ago'; + } +} + diff --git a/hugo/assets/scss/base/variables.scss b/hugo/assets/scss/base/variables.scss index 2320337..215cf00 100644 --- a/hugo/assets/scss/base/variables.scss +++ b/hugo/assets/scss/base/variables.scss @@ -11,9 +11,4 @@ $header-height: 4em; --primary-accent: rgb(0,96,255); --primary-accent-transparent: rgba(0,96,255,0.25); --primary-accent-text: #fff; - --ui-background: #fff; - --ui-background-track: #aaa; - --ui-text: #212121; - --ui-text-muted: #777; - --ui-text-bold: #000; } \ No newline at end of file diff --git a/hugo/assets/scss/content/index.scss b/hugo/assets/scss/content/index.scss index dba62c7..ddee674 100644 --- a/hugo/assets/scss/content/index.scss +++ b/hugo/assets/scss/content/index.scss @@ -1,118 +1,72 @@ #index { - .title { - font-size: 1.5em; - font-weight: 700; - line-height: 1.2; - &:before { - font-size: 3em; - font-weight: 700; - color: #ddd; - position: absolute; - top: -0.5em; - left: -0.3em; - z-index: -1; - } - position: relative; - margin-bottom: 2em; - } - .subtitle { - font-size: 1.5em; - line-height: 1.2; - margin-bottom: 0.5em; - margin-top: 2em; - } - .quotes { - - padding: 2rem; - font-size: 1.25rem; - display: flex; - flex-flow: column; - justify-content: space-between; - line-height: 1.5; - gap: 2em; - font-family: monospace; - .heading { - font-weight: 700; - font-family: initial; - } - } - .quotes-container { - color: #555; - display: flex; - flex-flow: column; - justify-content: space-around; - flex-grow: 1; - gap: 3rem; - } - - #summary .container { + .h-feed { display: grid; - grid-template-columns: 1fr; - @media (min-width: 40rem) { - grid-template-columns: 18rem 1fr; - } - } - - #birdsounds { - background: black; - color: white; - text-align: center; - .container { - display: flex; - flex-flow: column; - align-items: center; - } - .photo { - max-height: 100vh; - height: 100%; - max-width: 100%; - object-fit: contain; - object-position: center bottom; - } - .info { - display: flex; - flex-flow: column; - align-items: center; - } - .logo { - margin: 2rem 0; - } - @media (min-width: 40rem) { - .photo { - height: 20rem; - } - .container { - flex-flow: row; - justify-content: space-between; - } - .info { - flex-grow: 1; - } - } - a { - color: white; - position: relative; - &:after { - content: '→'; - position: absolute; - right: -1em; - color: white; - } - } - } - #updates { - line-height: 1.5; - font-size: 1.25rem; + overflow: auto; .heading { font-size: 1.5em; font-weight: 700; - margin-bottom: 1em; - } - p + p { margin: 1em 0; } - p { - max-width: 55ch; + hr { + margin: 0; + } + } + .h-card { + place-self: center; + max-width: 60ch; + width: 100%; + } + .h-entry { + margin: 1em 0; + padding: 1em 0; + header { + display: flex; + align-items: center; + gap: 1em; + margin-bottom: 0.5em; + .icon { + padding: 0.5rem; + display: inline-flex; + background: black; + border-radius: 100em; + svg { + width: 20px; + height: 20px; + fill: white; + } + } + } + } + .reply { + line-height: 1.5; + + .p-name { + margin-bottom: 1em; + display: flex; + align-items: center; + gap: 0.5em; + + .u-url { + + } + } + .p-summary { + font-style: italic; + } + .meta { + margin-top: 1em; + } + } + .note { + line-height: 1.5; + .e-content { + font-size: 1.2em; + p { + margin: 1em 0; + } + } + .meta { + margin-top: 1em; } } } \ No newline at end of file diff --git a/hugo/assets/scss/partials/h-card.scss b/hugo/assets/scss/partials/h-card.scss index 0c95c9d..8ff76d1 100644 --- a/hugo/assets/scss/partials/h-card.scss +++ b/hugo/assets/scss/partials/h-card.scss @@ -1,4 +1,47 @@ -#index .h-card { - background: #ddd; - +.h-card { + display: grid; + grid-template-areas: + "header" + "name" + "note"; + .p-note, .u-email, .u-impp, .p-gender-identity, .u-url, p.p-name { + display: none; + } + header { + background-image: url('/header.jpg'); + background-size: cover; + background-position: center; + aspect-ratio: 2; + display: grid; + place-items: center; + } + section { + padding: 1em; + } + .e-note { + grid-area: note; + p { + margin: 1em 0; + max-width: 55ch; + } + } + .u-photo { + width: 100px; + height: 100px; + background: rgba(0,0,0,0.5); + padding: 2px; + border-radius: 100em; + box-sizing: border-box; + } + .u-author { + display: unset; + font-weight: 700; + text-decoration: none; + color: inherit; + } + span.p-nickname { + color: #555; + &:before {content: '('} + &:after {content: ')'} + } } \ No newline at end of file diff --git a/hugo/content/comments/smartphones-arent-as-exciting-as-they-used-to-be.md b/hugo/content/comments/smartphones-arent-as-exciting-as-they-used-to-be.md index f01292c..2f6cbd5 100644 --- a/hugo/content/comments/smartphones-arent-as-exciting-as-they-used-to-be.md +++ b/hugo/content/comments/smartphones-arent-as-exciting-as-they-used-to-be.md @@ -1,5 +1,6 @@ +++ type = "reply" +layout = "comment" title = "in response to \"You're not wrong -- smartphones aren't as exciting as they used to be\" from Android Police" summary = "Honestly, phones really aren't even getting better anymore — they're getting worse since 2013. And the factors are mostly not technological — the technology continues to improve, of course. It's the corporate decisions that go into the making of the phones, which are based not on what makes a “better” phone, but on what they think will be most profitable. I want to call out [...]" date = 2018-08-01 diff --git a/hugo/content/notes/108586326598121988/index.md b/hugo/content/notes/108586326598121988/index.md new file mode 100644 index 0000000..0bc97d5 --- /dev/null +++ b/hugo/content/notes/108586326598121988/index.md @@ -0,0 +1,7 @@ ++++ +type = "note" +tags = [] +date = "2022-07-03T19:50:00Z" +attachment = [] ++++ +lookin for quotes about me to put on my website, fire away \ No newline at end of file diff --git a/hugo/content/notes/108588546793521204/image.png b/hugo/content/notes/108588546793521204/image.png new file mode 100644 index 0000000..7a53309 Binary files /dev/null and b/hugo/content/notes/108588546793521204/image.png differ diff --git a/hugo/content/notes/108588546793521204/index.md b/hugo/content/notes/108588546793521204/index.md new file mode 100644 index 0000000..063c52e --- /dev/null +++ b/hugo/content/notes/108588546793521204/index.md @@ -0,0 +1,7 @@ ++++ +type = "note" +tags = [] +date = "2022-07-04T05:15:00Z" +attachment = ["image.png"] ++++ +is this anything \ No newline at end of file diff --git a/hugo/content/notes/108619642167941717/index.md b/hugo/content/notes/108619642167941717/index.md deleted file mode 100644 index 8fd9801..0000000 --- a/hugo/content/notes/108619642167941717/index.md +++ /dev/null @@ -1,7 +0,0 @@ -+++ -type = "note" -tags = [] -+++ -kinda need an account with somewhere between 2 and 2000 followers - -custom audiences when \ No newline at end of file diff --git a/hugo/layouts/_default/comment.html b/hugo/layouts/_default/comment.html new file mode 100644 index 0000000..8c79ba1 --- /dev/null +++ b/hugo/layouts/_default/comment.html @@ -0,0 +1,13 @@ +{{ define "main" }} +
+
+ +
+
+{{ end }} \ No newline at end of file diff --git a/hugo/layouts/index.html b/hugo/layouts/index.html index 0183311..c00a8b8 100644 --- a/hugo/layouts/index.html +++ b/hugo/layouts/index.html @@ -1,30 +1,64 @@ {{ define "head" }} {{ end }} {{ define "main" }} -
+
- {{partial "h-card.html" .}}
-

Latest content

- {{$paginator := .Paginate (.Site.RegularPages) 20}} - {{range $paginator.Pages}} + {{partial "h-card.html" .}} +
+

Latest activity

+ {{$paginator := .Paginate (.Site.RegularPages) 20}} + {{range $paginator.Pages}} {{if eq .Params.type "note" }}
-
{{.Content}}
+
+
+ + + +
+ posted a note +
+
{{.Content}}
+ {{$permalink := .Page.Permalink}} + {{ range .Params.attachment }} + {{if (strings.HasSuffix . "png") | or (strings.HasSuffix . "jpg") | or (strings.HasSuffix . "gif")}} + + attachment + + {{end}} + {{end}} + +

{{end}} {{if eq .Params.type "reply"}}
- {{.Title}} - - -

{{.Summary}}

+
+
+ +
+ posted a comment +
+

{{.Title}}

+

{{.Summary}}

+

Originally published at [source] in + reply to [article]

+
{{end}} - - {{end}} +
+ {{end}} +
diff --git a/hugo/layouts/partials/h-card.html b/hugo/layouts/partials/h-card.html index 52cc077..3a9c81e 100644 --- a/hugo/layouts/partials/h-card.html +++ b/hugo/layouts/partials/h-card.html @@ -1,22 +1,29 @@ -
- a -

trwnh

-

abdullah tarawneh

- - a@trwnh.com - a@trwnh.com - mastodon.social/@trwnh -

i have approximate knowledge of many things. perpetual student. (nb/ace/they)

-
-

- i have approximate knowledge of many things. perpetual student. (nb/ace/they) -

-

- xmpp/email: a@trwnh.com
- https://trwnh.com
- help me live: https://liberapay.com/trwnh or paypal
-

-

my triggers are moths and glitter

-
-

nonbinary

-
\ No newline at end of file +
+
+ +
+
+

+ a + trwnh +

+

abdullah tarawneh

+ a@trwnh.com + a@trwnh.com + mastodon.social/@trwnh + abdullahtarawneh.com +

i have approximate knowledge of many things. perpetual student. (nb/ace/they)

+
+

+ i have approximate knowledge of many things. perpetual student. (nb/ace/they) +

+

+ xmpp/email: a@trwnh.com
+ https://trwnh.com
+ help me live: https://liberapay.com/trwnh or paypal
+

+

my triggers are moths and glitter

+
+

nonbinary

+
+
\ No newline at end of file diff --git a/hugo/static/header.jpg b/hugo/static/header.jpg new file mode 100644 index 0000000..2f768b9 Binary files /dev/null and b/hugo/static/header.jpg differ