feat: Icons in navbar, use latest sass converter!

This commit is contained in:
David Lapshin 2023-09-25 05:44:41 +03:00
parent 95000cd0b0
commit b5cb64ab51
Signed by: daudix
GPG key ID: 93ECF15D3053D81C
9 changed files with 64 additions and 53 deletions

View file

@ -1,13 +1,11 @@
# Uses https://codeberg.org/Codeberg-CI/examples/src/branch/main/Jekyll/jekyll.yml
# Based on https://codeberg.org/Codeberg-CI/examples/src/branch/main/Jekyll/jekyll.yml
steps:
build:
# Use the official jekyll build container
image: jekyll/jekyll
# Use the official ruby build container
image: ruby:3.2.2
secrets: [ cbtoken, cbmail ]
commands:
# Avoid permission denied errors
- chmod -R a+w .
# Set up git in a working way
- git config --global --add safe.directory /woodpecker/src/codeberg.org/daudix-UFO/blog-source/_site
- git config --global user.email "$CBMAIL"
@ -16,12 +14,12 @@ steps:
# clone and move the target repo
- git clone -b pages https://codeberg.org/daudix-UFO/blog.git
- mv blog _site
- chmod -R a+w _site
- cd _site
# Prepare for push
- git remote set-url origin https://$CBTOKEN@codeberg.org/daudix-UFO/blog.git
- cd ..
# Run Jekyll build stage
- gem install bundler
- bundle install
- bundle exec jekyll build
# Only needed for custom domains

View file

@ -1,5 +1,5 @@
FROM jekyll/jekyll
FROM ruby:3.2.2
COPY Gemfile* ./
RUN chmod -R a+w . && bundle install
RUN gem install bundler && bundle install

View file

@ -7,7 +7,6 @@ group :jekyll_plugins do
gem 'jekyll-optional-front-matter'
gem 'jekyll-readme-index'
gem 'jekyll-relative-links'
gem 'jekyll-sass-converter', '~> 2.2'
gem 'jekyll-sitemap'
gem 'jekyll-titles-from-headings'
gem 'jekyll-toc'

View file

@ -9,8 +9,9 @@ GEM
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.15.5)
ffi (1.16.1)
forwardable-extended (2.6.0)
google-protobuf (3.24.3-x86_64-linux)
http_parser.rb (0.8.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
@ -43,8 +44,8 @@ GEM
jekyll (>= 3.0, < 5.0)
jekyll-relative-links (0.7.0)
jekyll (>= 3.3, < 5.0)
jekyll-sass-converter (2.2.0)
sassc (> 2.0.1, < 3.0)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-titles-from-headings (0.5.3)
@ -75,15 +76,15 @@ GEM
rexml (3.2.6)
rouge (4.1.3)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
sass-embedded (1.68.0-x86_64-linux-gnu)
google-protobuf (~> 3.23)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.4.2)
webrick (1.8.1)
PLATFORMS
x86_64-linux-musl
x86_64-linux
DEPENDENCIES
jekyll-default-layout
@ -92,11 +93,10 @@ DEPENDENCIES
jekyll-optional-front-matter
jekyll-readme-index
jekyll-relative-links
jekyll-sass-converter (~> 2.2)
jekyll-sitemap
jekyll-titles-from-headings
jekyll-toc
webrick
BUNDLED WITH
2.3.25
2.4.19

View file

@ -1,5 +1,5 @@
<!--
Taken from https://github.com/cassidyjames/cassidyjames.github.io/blob/99782788a7e3ba3cc52d6803010873abd1b02b9e/_includes/comments.html
Based on https://github.com/cassidyjames/cassidyjames.github.io/blob/99782788a7e3ba3cc52d6803010873abd1b02b9e/_includes/comments.html
which were inspired by https://codeberg.org/jwildeboer/jwildeboersource/src/commit/45f9750bb53b9f0f6f28399ce4d21785a3bb7d22/_includes/fediverse_comments.html
-->
@ -54,8 +54,9 @@ which were inspired by https://codeberg.org/jwildeboer/jwildeboersource/src/comm
<p>Comment on this blog post by publicly replying to <a href="https://{{ host }}/@{{ username }}/{{ id }}">this Mastodon post</a> using a Mastodon or other ActivityPub/Fediverse account. Known non-private replies are displayed below.</p>
<div id="comments-wrapper">
<p><small>No known comments, yet. Reply to <a href="https://{{ host }}/@{{ username }}/{{ id }}">this Mastodon post</a> to add your own!</small></p>
<p><small>Press the button below to load comments if they exist, if not, be the first!</small></p>
<noscript><p>Loading comments relies on JavaScript. Try enabling JavaScript and reloading, or visit <a href="https://{{ host }}/@{{ username }}/{{ id }}">the original post</a> on Mastodon.</p></noscript>
<a onclick="loadComments()" class="inline-button">Load comments…</a>
</div>
<script>
@ -410,18 +411,4 @@ which were inspired by https://codeberg.org/jwildeboer/jwildeboersource/src/comm
;
}
</script>
<script>
const commentsSection = document.getElementById("comments");
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
loadComments();
observer.disconnect();
}
});
});
observer.observe(commentsSection);
</script>
</section>

View file

@ -22,7 +22,4 @@
<meta property="og:image:width" content="600" />
<meta property="og:image:height" content="400" />
<meta property="og:image:alt" content="A card with Daudix UFO written on it" />
<!-- Plausible -->
<script defer data-domain="daudix-ufo.codeberg.page" src="https://analytics.projectsegfau.lt/js/script.js"></script>
</head>

View file

@ -4,16 +4,50 @@
<h2 class="nav-title">{{ site.title }}</h2>
</a>
<ul>
<li><a href="{{ '/' | prepend: relative_url }}">Home</a></li>
<li><a href="{{ '/posts' | prepend: site.baseurl }}">Posts</a></li>
<li><a href="{{ '/tags' | prepend: site.baseurl }}">Tags</a></li>
<li><a href="{{ '/feed.xml' | prepend: site.baseurl }}">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">
<li>
<a href="{{ '/' | prepend: relative_url }}">
<svg viewBox="0 0 16 16" width="16" height="16">
<path
d="M1.988 1.988V3c.008.547.453.984 1 .988.004-.004.008-.004.012-.004v.028A8.977 8.977 0 0 1 11.988 13a.991.991 0 0 0 1 .984h1V13h-.004c0-.004 0-.004.004-.008C13.984 7.02 9.184 2.148 3.242 2.02A1.004 1.004 0 0 0 3 1.988v-.004zm0 4V7c.008.547.453.984 1 .988.004-.004.008-.004.012-.004V8a4.985 4.985 0 0 1 4.996 4.844 1.002 1.002 0 0 0 .988 1.145c.008-.005.012-.005.016-.005v.004h.984V13H10c0-3.793-3.047-6.898-6.82-6.992 0-.004-.004-.004-.004-.004A.892.892 0 0 0 3 5.988v-.004zm2 4a1.999 1.999 0 1 0-.002 3.998 1.999 1.999 0 0 0 .002-3.998zm0 0" />
fill="currentColor"
d="M8 .361a2.2 2.2 0 0 0-1.41.51L2.129 4.59A3.143 3.143 0 0 0 1 7v6c0 1.66 1.34 3 3 3h8c1.66 0 3-1.34 3-3V7c0-.93-.414-1.813-1.129-2.41L9.411.87A2.2 2.2 0 0 0 8 .361zm0 2.002a.2.2 0 0 1 .129.047l4.46 3.719c.263.215.411.535.411.871v6c0 .547-.453 1-1 1h-2V9c0-.55-.45-1-1-1H7c-.55 0-1 .45-1 1v5H4c-.547 0-1-.453-1-1V7c0-.336.148-.656.41-.871L7.871 2.41A.2.2 0 0 1 8 2.363z"
/>
</svg>
Home
</a>
</li>
<li>
<a href="{{ '/posts' | prepend: site.baseurl }}">
<svg viewBox="0 0 16 16" width="16" height="16">
<path
fill="currentColor"
d="M11.771 1.184a.496.496 0 0 0-.1.015l-.964.262a.499.499 0 0 0-.355.613l3.363 12.555a.506.506 0 0 0 .613.355l.969-.261a.497.497 0 0 0 .351-.61L12.285 1.555a.507.507 0 0 0-.514-.371zM1.5 2c-.277 0-.5.223-.5.5v12c0 .277.223.5.5.5h2c.277 0 .5-.223.5-.5v-12c0-.277-.223-.5-.5-.5h-2zm7 1c-.277 0-.5.223-.5.5v11c0 .277.223.5.5.5h1c.277 0 .5-.223.5-.5v-11c0-.277-.223-.5-.5-.5h-1zm-3 1c-.277 0-.5.223-.5.5v10c0 .277.223.5.5.5h1c.277 0 .5-.223.5-.5v-10c0-.277-.223-.5-.5-.5h-1z"
/>
</svg>
Posts
</a>
</li>
<li>
<a href="{{ '/tags' | prepend: site.baseurl }}">
<svg viewBox="0 0 16 16" width="16" height="16">
<path
fill="currentColor"
d="M4 0C1.785 0 0 1.785 0 4v3.09c0 .847.336 1.66.938 2.262l5.382 5.382c.93.934 2.43.934 3.36 0l4.965-4.964c.98-.98.98-2.56 0-3.54L9.227.812A2.777 2.777 0 0 0 7.266 0H4zm0 2h3.266c.207 0 .402.082.546.227l5.418 5.418a.512.512 0 0 1 0 .71L8.266 13.32a.38.38 0 0 1-.532 0L2.352 7.937A1.198 1.198 0 0 1 2 7.09V4c0-1.098.902-2 2-2zm.5 1a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z"
/>
</svg>
Tags
</a>
</li>
<li>
<a href="{{ '/feed.xml' | prepend: site.baseurl }}">
<svg viewBox="0 0 16 16" width="16" height="16">
<path
fill="currentColor"
d="M1.988 1.988V3c.008.547.453.984 1 .988.004-.004.008-.004.012-.004v.028A8.977 8.977 0 0 1 11.988 13a.991.991 0 0 0 1 .984h1V13h-.004c0-.004 0-.004.004-.008C13.984 7.02 9.184 2.148 3.242 2.02A1.004 1.004 0 0 0 3 1.988v-.004zm0 4V7c.008.547.453.984 1 .988.004-.004.008-.004.012-.004V8a4.985 4.985 0 0 1 4.996 4.844 1.002 1.002 0 0 0 .988 1.145c.008-.005.012-.005.016-.005v.004h.984V13H10c0-3.793-3.047-6.898-6.82-6.992 0-.004-.004-.004-.004-.004A.892.892 0 0 0 3 5.988v-.004zm2 4a1.999 1.999 0 1 0-.002 3.998 1.999 1.999 0 0 0 .002-3.998zm0 0"
/>
</svg>
Feed
</a></li>
</a>
</li>
</ul>
</div>
</nav>

View file

@ -303,15 +303,10 @@ video.pixels {
}
.nav-title {
color: var(--fg50);
display: inline-block;
margin: 0;
}
.nav-title:hover {
text-decoration: underline;
}
.nav ul {
list-style-type: none;
margin: 1rem 0 0;
@ -332,20 +327,21 @@ video.pixels {
border-radius: var(--border-radius);
background-color: transparent;
color: var(--fg50);
/* transition: var(--transition); */
transition: var(--transition);
text-decoration: none;
}
.nav a:hover {
background-color: var(--fg05);
/* box-shadow: var(--glow); */
color: var(--accent-color);
// box-shadow: var(--glow);
}
.nav svg {
fill: var(--fg50);
height: 1rem;
width: 1rem;
vertical-align: middle;
transform: translateY(-0.125rem);
transform: translateY(-0.125rem) translateX(-0.125rem);
}
@media (min-width: 640px) {

View file

@ -48,7 +48,7 @@ EOF
echo -e "\e[1;32mBuilding Podman image\e[0m"
podman build --tag pages .
echo -e "\e[1;32mBuilding Jekyll site\e[0m"
echo -e "\e[1;32mBuilding Jekyll site\e[0m"
podman run \
-it --rm --volume="$PWD:/srv/jekyll:Z" \
-w /srv/jekyll -p 4000:4000 pages \