From 6d6862cf7b0d9195f38baf92924e8cada39d0626 Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Sat, 2 Sep 2023 16:18:25 +0200 Subject: [PATCH] Improve card display and add more of them Signed-off-by: Magic_RB --- assets/css/style.css | 15 ++++++++-- assets/icons/file-dotfiles.svg | 54 ++++++++++++++++++++++++++++++++++ home/index.org | 11 ++++++- lisp/extra-blocks.el | 6 ++-- 4 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 assets/icons/file-dotfiles.svg diff --git a/assets/css/style.css b/assets/css/style.css index dafc16c..507420b 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -86,6 +86,10 @@ pre { color: black; } +a.card-link { + text-decoration: none !important; +} + #organizer { display: flex; flex-direction: column; @@ -150,9 +154,16 @@ pre { .card-icon { max-width: 10rem; max-height: 10rem; - width: auto; - height: auto; + width: 10rem; + height: 10rem; + min-width: 10rem; + min-height: 10rem; margin: 0 1rem 0 0; + margin: 0 1rem 0 0; +} + +.card-icon-text { + text-size-adjust: auto; } .card-body { diff --git a/assets/icons/file-dotfiles.svg b/assets/icons/file-dotfiles.svg new file mode 100644 index 0000000..5feb4dd --- /dev/null +++ b/assets/icons/file-dotfiles.svg @@ -0,0 +1,54 @@ + + + + + + + + + ~/. + diff --git a/home/index.org b/home/index.org index caffbc9..2fa0fe4 100644 --- a/home/index.org +++ b/home/index.org @@ -1,4 +1,13 @@ #+begin_card NixNG :link "https://github.com/nix-community/NixNG" :image "/icons/nix-ng-greener-no-gradient.svg" A NixOS derivative with simpler design, currently replacing systemd with runit, - aiming to deliver lighter systems and containers. TEST + aiming to deliver lighter systems and containers. +#+end_card + +#+begin_card NixNG :link "https://git.sr.ht/~magic_rb/dotfiles" :image "/icons/file-dotfiles.svg" + Set of Nix files and other configuration files, which define my every past, present and future system. Including a Raspberry Pi 3, a complex SuperMicro server, a laptop and in the future many more. Also contains definition for a multitude of NixNG containers. +#+end_card + +# dont add links, nesting :( +#+begin_card NixNG :link "https://git.sr.ht/~magic_rb/website" :image "/icons/favicon-512x512.png" + The repository from which this website is built. It utilizes a =org-thtml= and =org-special-block-extra= to turn Emacs into a pretty good static website generator, complete with unparalleled syntax highlighting thanks to =emacs-htmlize= and =modus-themes=. #+end_card diff --git a/lisp/extra-blocks.el b/lisp/extra-blocks.el index 1dbf382..2f8689b 100644 --- a/lisp/extra-blocks.el +++ b/lisp/extra-blocks.el @@ -15,14 +15,16 @@ title contents)) (org-defblock - card (name "Card" link "" image "") + card (name "Card" link "" image nil image-html nil) "Card" (cl-case backend ((html templated-html) (concat "" "
" - " " + (if image + (concat "") + (concat "
" image-html "
")) "
" "
" "

" name "

"