diff options
| -rw-r--r-- | Makefile | 20 | ||||
| -rw-r--r-- | openring-build.html | 52 | ||||
| -rwxr-xr-x | template/index.html | 25 | ||||
| -rw-r--r-- | template/openring.tmpl | 34 | ||||
| -rwxr-xr-x | template/post.html | 29 | ||||
| -rwxr-xr-x | template/style.css | 18 |
6 files changed, 166 insertions, 12 deletions
| @@ -1,3 +1,19 @@ | |||
| 1 | deploy: | 1 | provision: |
| 2 | cd ~/Junk | ||
| 3 | git clone https://git.sr.ht/~sircmpwn/openring | ||
| 4 | cd openring | ||
| 5 | go build | ||
| 6 | go install | ||
| 7 | |||
| 8 | build: | ||
| 9 | openring -n 4 -p 2 \ | ||
| 10 | -s https://drewdevault.com/feed.xml \ | ||
| 11 | -s https://danluu.com/atom.xml \ | ||
| 12 | < template/openring.tmpl \ | ||
| 13 | > template/openring-build.html | ||
| 14 | |||
| 2 | alternator --build | 15 | alternator --build |
| 3 | cd public && scp -r * root@165.22.87.180:/var/www/html/mitjafelicijan.com/ \ No newline at end of file | 16 | rm template/openring-build.html |
| 17 | |||
| 18 | deploy: build | ||
| 19 | cd public && scp -r * root@165.22.87.180:/var/www/html/mitjafelicijan.com/ | ||
diff --git a/openring-build.html b/openring-build.html new file mode 100644 index 0000000..12e0589 --- /dev/null +++ b/openring-build.html | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | <section class="webring"> | ||
| 2 | <h3>Articles from blogs I follow around the net</h3> | ||
| 3 | <section class="articles"> | ||
| 4 | |||
| 5 | <div class="article"> | ||
| 6 | <h4 class="title"> | ||
| 7 | <a href="https://drewdevault.com/2021/01/20/FOSS-is-to-surrender-your-monopoly.html" target="_blank" rel="noopener">Open source means surrendering your monopoly over commercial exploitation</a> | ||
| 8 | </h4> | ||
| 9 | <p class="summary">Participation in open source requires you to surrender your monopoly over | ||
| 10 | commercial exploitation. This is a profound point about free and open source | ||
| 11 | software which seems to be causing a lot of companies to struggle with their | ||
| 12 | understanding of the philosoph…</p> | ||
| 13 | <small class="source"> | ||
| 14 | via <a href="https://drewdevault.com">Drew DeVault's blog</a> | ||
| 15 | </small> | ||
| 16 | <small class="date">January 20, 2021</small> | ||
| 17 | </div> | ||
| 18 | |||
| 19 | </section> | ||
| 20 | <p class="attribution"> | ||
| 21 | Generated by | ||
| 22 | <a href="https://git.sr.ht/~sircmpwn/openring">openring</a> | ||
| 23 | </p> | ||
| 24 | </section> | ||
| 25 | <style> | ||
| 26 | .webring .articles { | ||
| 27 | display: flex; | ||
| 28 | flex-wrap: wrap; | ||
| 29 | margin: -0.5rem; | ||
| 30 | } | ||
| 31 | .webring .title { | ||
| 32 | margin: 0; | ||
| 33 | } | ||
| 34 | .webring .article { | ||
| 35 | flex: 1 1 0; | ||
| 36 | display: flex; | ||
| 37 | flex-direction: column; | ||
| 38 | margin: 0.5rem; | ||
| 39 | padding: 0.5rem; | ||
| 40 | background: #eee; | ||
| 41 | min-width: 10rem; | ||
| 42 | } | ||
| 43 | .webring .summary { | ||
| 44 | font-size: 0.8rem; | ||
| 45 | flex: 1 1 0; | ||
| 46 | } | ||
| 47 | .webring .attribution { | ||
| 48 | text-align: right; | ||
| 49 | font-size: 0.8rem; | ||
| 50 | color: #555; | ||
| 51 | } | ||
| 52 | </style> | ||
diff --git a/template/index.html b/template/index.html index 7727f3b..a566d95 100755 --- a/template/index.html +++ b/template/index.html | |||
| @@ -21,20 +21,23 @@ | |||
| 21 | 21 | ||
| 22 | <ul class="post-list"> | 22 | <ul class="post-list"> |
| 23 | {{range $index, $post := .Posts}} | 23 | {{range $index, $post := .Posts}} |
| 24 | <li> | 24 | {{if $post.Listing}} |
| 25 | <time>{{.CreatedFormatted}}</time> | 25 | <li> |
| 26 | 26 | <time>{{.CreatedFormatted}}</time> | |
| 27 | <a href="/{{$post.Slug}}" title="{{$post.Title}}" itemprop="url"> | 27 | |
| 28 | <h2>{{$post.Title}}</h2> | 28 | <a href="/{{$post.Slug}}" title="{{$post.Title}}" itemprop="url"> |
| 29 | </a> | 29 | <h2>{{$post.Title}}</h2> |
| 30 | 30 | </a> | |
| 31 | </li> | 31 | </li> |
| 32 | {{end}} | ||
| 32 | {{end}} | 33 | {{end}} |
| 33 | </ul> | 34 | </ul> |
| 34 | </nav> | 35 | </nav> |
| 35 | 36 | ||
| 37 | <hr class="top-margin"> | ||
| 38 | |||
| 36 | <section class="project-list"> | 39 | <section class="project-list"> |
| 37 | <h2>Side projects</h2> | 40 | <h4>Side projects I work on</h4> |
| 38 | <ul> | 41 | <ul> |
| 39 | <li><a href="https://github.com/mitjafelicijan/redis-marshal" target="_blank" rel="noopener nofollow">redis-marshal - Lightweight Redis data exploration tool</a></li> | 42 | <li><a href="https://github.com/mitjafelicijan/redis-marshal" target="_blank" rel="noopener nofollow">redis-marshal - Lightweight Redis data exploration tool</a></li> |
| 40 | <li><a href="https://github.com/mitjafelicijan/dna-encoding" target="_blank" rel="noopener nofollow">dna-encoding - Tools for encoding files to DNA sequence</a></li> | 43 | <li><a href="https://github.com/mitjafelicijan/dna-encoding" target="_blank" rel="noopener nofollow">dna-encoding - Tools for encoding files to DNA sequence</a></li> |
| @@ -44,6 +47,10 @@ | |||
| 44 | <li><a href="https://github.com/mitjafelicijan/scarecrow" target="_blank" rel="noopener nofollow">scarecrow - Minimal configuration reverse proxy</a></li> | 47 | <li><a href="https://github.com/mitjafelicijan/scarecrow" target="_blank" rel="noopener nofollow">scarecrow - Minimal configuration reverse proxy</a></li> |
| 45 | </ul> | 48 | </ul> |
| 46 | </section> | 49 | </section> |
| 50 | |||
| 51 | <hr class="top-margin"> | ||
| 52 | |||
| 53 | {{template "openring-build.html"}} | ||
| 47 | </main> | 54 | </main> |
| 48 | 55 | ||
| 49 | {{template "_includes.html"}} | 56 | {{template "_includes.html"}} |
diff --git a/template/openring.tmpl b/template/openring.tmpl new file mode 100644 index 0000000..43ad6a2 --- /dev/null +++ b/template/openring.tmpl | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | <section class="webring top-margin"> | ||
| 2 | <h4>Articles from blogs I follow around the net</h3> | ||
| 3 | <section> | ||
| 4 | {{range .Articles}} | ||
| 5 | <article> | ||
| 6 | <a href="{{.Link}}" target="_blank" rel="noopener">{{.Title}}</a> | ||
| 7 | <p class="summary">{{.Summary}}</p> | ||
| 8 | <small> | ||
| 9 | via <a href="{{.SourceLink}}">{{.SourceTitle}}</a> | ||
| 10 | </small> | ||
| 11 | <small>{{.Date | datef "January 2, 2006"}}</small> | ||
| 12 | </article> | ||
| 13 | {{end}} | ||
| 14 | </section> | ||
| 15 | <p class="attribution"> | ||
| 16 | Generated by | ||
| 17 | <a href="https://git.sr.ht/~sircmpwn/openring">openring</a> | ||
| 18 | </p> | ||
| 19 | </section> | ||
| 20 | |||
| 21 | <style> | ||
| 22 | .webring article { | ||
| 23 | margin-block-end: 30px; | ||
| 24 | } | ||
| 25 | .webring article:last-child { | ||
| 26 | margin-block-end: 10px; | ||
| 27 | } | ||
| 28 | .webring article .summary { | ||
| 29 | margin: 0; | ||
| 30 | } | ||
| 31 | .webring .attribution { | ||
| 32 | font-size: small; | ||
| 33 | } | ||
| 34 | </style> | ||
diff --git a/template/post.html b/template/post.html index b59bb38..3247d8f 100755 --- a/template/post.html +++ b/template/post.html | |||
| @@ -24,6 +24,35 @@ | |||
| 24 | {{.Content}} | 24 | {{.Content}} |
| 25 | </div> | 25 | </div> |
| 26 | </article> | 26 | </article> |
| 27 | |||
| 28 | {{if .Listing}} | ||
| 29 | <section class="top-margin"> | ||
| 30 | <a href="mailto:m@mitjafelicijan.com">➝ Get in contact with me via email.</a> | ||
| 31 | </section> | ||
| 32 | |||
| 33 | <hr class="top-margin"> | ||
| 34 | |||
| 35 | {{if .Posts}} | ||
| 36 | <nav class="top-margin"> | ||
| 37 | <h4>Read more from this site</h4> | ||
| 38 | {{range $index, $post := .Posts}} | ||
| 39 | {{if (lt $index 5)}} | ||
| 40 | <p> | ||
| 41 | <time>{{$post.CreatedFormatted}}</time><br> | ||
| 42 | <a href="/{{$post.Slug}}" title="{{$post.Title}}" itemprop="url"> | ||
| 43 | {{$post.Title}} | ||
| 44 | </a> | ||
| 45 | </p> | ||
| 46 | {{end}} | ||
| 47 | {{end}} | ||
| 48 | </nav> | ||
| 49 | {{end}} | ||
| 50 | |||
| 51 | <hr class="top-margin"> | ||
| 52 | |||
| 53 | {{template "openring-build.html"}} | ||
| 54 | {{end}} | ||
| 55 | |||
| 27 | </main> | 56 | </main> |
| 28 | 57 | ||
| 29 | {{template "_includes.html"}} | 58 | {{template "_includes.html"}} |
diff --git a/template/style.css b/template/style.css index 5aee568..26913fb 100755 --- a/template/style.css +++ b/template/style.css | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | --link-color: #111111; | 6 | --link-color: #111111; |
| 7 | --link-color-hover: #111111; | 7 | --link-color-hover: #111111; |
| 8 | 8 | ||
| 9 | --label-color: #828282; | 9 | --label-color: #5f5f5f; |
| 10 | 10 | ||
| 11 | --border-color: #eeeeee; | 11 | --border-color: #eeeeee; |
| 12 | 12 | ||
| @@ -222,6 +222,10 @@ blockquote p { | |||
| 222 | margin-top: 60px; | 222 | margin-top: 60px; |
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | .top-margin-huge { | ||
| 226 | margin-top: 100px; | ||
| 227 | } | ||
| 228 | |||
| 225 | code { | 229 | code { |
| 226 | background: rgb(255, 241, 177); | 230 | background: rgb(255, 241, 177); |
| 227 | padding: 2px 5px; | 231 | padding: 2px 5px; |
| @@ -249,6 +253,18 @@ time { | |||
| 249 | font-size: 90%; | 253 | font-size: 90%; |
| 250 | } | 254 | } |
| 251 | 255 | ||
| 256 | /* article */ | ||
| 257 | |||
| 258 | article a { | ||
| 259 | overflow-wrap: break-word; | ||
| 260 | word-wrap: break-word; | ||
| 261 | -webkit-hyphens: auto; | ||
| 262 | -ms-hyphens: auto; | ||
| 263 | -moz-hyphens: auto; | ||
| 264 | hyphens: auto; | ||
| 265 | } | ||
| 266 | |||
| 267 | |||
| 252 | /* footer */ | 268 | /* footer */ |
| 253 | 269 | ||
| 254 | .footer { | 270 | .footer { |
