mirror of
https://git.sr.ht/~magic_rb/website
synced 2024-11-22 00:04:20 +01:00
Make the cards more generic
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
32a525d75e
commit
67a66d2e4c
|
@ -0,0 +1,16 @@
|
|||
#+ATTR_CTAG: project
|
||||
#+ATTR_CLINK: https://gitea.redalder.org/Magic_RB/NixNG
|
||||
#+ATTR_CIMAGE: /icons/nix-ng-greener-no-gradient.svg
|
||||
#+BEGIN_SRC fundamental
|
||||
A NixOS derivative with simpler design, currently replacing systemd with runit,
|
||||
aiming to deliver lighter systems and containers.
|
||||
#+END_SRC
|
||||
|
||||
#+ATTR_CTAG: project
|
||||
#+ATTR_CLINK: https://gitea.redalder.org/RedAlder/ra-containers
|
||||
#+ATTR_CIMAGE: /icons/nix-flake.svg
|
||||
#+BEGIN_SRC fundamental
|
||||
Nix built, fully declarative and configurable container images. They are similar in
|
||||
function to the official Docker container images and have similar APIs therefore are
|
||||
a convenient replacement for your existing images, if you need more Nix in your
|
||||
#+END_SRC
|
24
make.el
24
make.el
|
@ -7,6 +7,8 @@
|
|||
|
||||
(require 'org)
|
||||
|
||||
(require 'cl-lib)
|
||||
|
||||
(require 'ox)
|
||||
(require 'ox-html)
|
||||
|
||||
|
@ -38,6 +40,28 @@
|
|||
(defvar magic_rb/asset-include
|
||||
"\\(ttf\\|svg\\|jpg\\|gif\\|png\\|css\\|js\\|el\\|nb\\|ipynb\\|pdf\\|xml\\)")
|
||||
|
||||
(cl-defstruct (magic_rb/card (:constructor magic_rb/card-create)
|
||||
(:copier nil))
|
||||
link image description)
|
||||
|
||||
(defun magic_rb/cards-with-tag (tag)
|
||||
(let ((symbol 'src-block)
|
||||
(path buffer-file-name))
|
||||
(mapcar
|
||||
(lambda (object)
|
||||
(magic_rb/card-create
|
||||
:link (car (org-element-property :attr_clink object))
|
||||
:image (car (org-element-property :attr_cimage object))
|
||||
:description (org-element-property :value object)))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents path)
|
||||
|
||||
(org-element-map (org-element-parse-buffer) symbol
|
||||
(lambda (object)
|
||||
(if (string-equal (car (org-element-property :attr_ctag object)) tag)
|
||||
object
|
||||
nil)) nil nil nil t)))))
|
||||
|
||||
(defun magic_rb/source-with-name (name symbol property)
|
||||
""
|
||||
(string-trim
|
||||
|
|
|
@ -7,36 +7,20 @@
|
|||
<div class="sidebar"></div>
|
||||
<div id="content">
|
||||
<div class="card-toplevel">
|
||||
<a class="card-link" href="https://gitea.redalder.org/Magic_RB/NixNG">
|
||||
{{:each (magic_rb/cards-with-tag "project")}}
|
||||
<a class="card-link" href="{{magic_rb/card-link item}}">
|
||||
<div class="card-entry">
|
||||
<img src="/icons/nix-ng.svg" class="card-icon"/>
|
||||
<img src="{{magic_rb/card-image item}}" class="card-icon"/>
|
||||
<div class="card-separator"></div>
|
||||
<div class="card-body">
|
||||
<h4 class="card-heading"> NixNG </h4>
|
||||
<p class="card-content">
|
||||
A GNU/Linux distribution, similar to NixOS with the main distintion beings its
|
||||
simpler design, akin to BSDs and Void Linux. It replaces SystemD with runit and in
|
||||
the future OpenRC, this allows for much lighter systems, which are suitable for
|
||||
running in containers.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="card-link" href="https://gitea.redalder.org/RedAlder/ra-containers">
|
||||
<div class="card-entry">
|
||||
<img src="/icons/nix-flake.svg" class="card-icon"/>
|
||||
<div class="card-separator"></div>
|
||||
<div class="card-body">
|
||||
<h4 class="card-heading"> ra-containers </h4>
|
||||
<p class="card-content">
|
||||
Nix built, fully declarative and configurable container images. They are similar in
|
||||
function to the official Docker container images and have similar APIs therefore are
|
||||
a convenient replacement for your existing images, if you need more Nix in your
|
||||
life.
|
||||
{{magic_rb/card-description item}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{{:endeach}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar"></div>
|
||||
|
|
Loading…
Reference in a new issue