Add CSS, various more options, we can now make php :D

This commit is contained in:
speedie 2022-11-12 15:31:53 +01:00
parent dec7a539c4
commit 0d5a47831d
10 changed files with 65 additions and 36 deletions

View file

@ -38,6 +38,7 @@ endif
clean:
rm -f speedwm *.o speedwm-${VERSION}.tar.gz
rm -f speedwm-ipc
rm -f *.html *.php
echo "Cleaned!"
dist: clean
@ -158,15 +159,20 @@ help:
@echo help: Displays this help sheet.
@echo docs: View documentation for speedwm
@echo html: Write HTML document based on documentation.
@echo php: Write PHP document based on documentation. This is almost identical to html.
@echo markdown: Write Markdown document based on documentation.
@echo readme: Write output of speedwm-help -a to readme.
@echo upload: git commit and git push this build.
@echo
@echo - Page -
@echo page: Creates the https://speedie.gq/speedwm page in HTML form.
@echo page_install: Copy the page to ${HTMLDIR}.
@echo page_push: git commit and git push the page in ${HTMLDIR}.
@echo page: Creates the https://speedie.gq/speedwm page in PHP form.
@echo page_php: Creates the https://speedie.gq/speedwm page in PHP form.
@echo page_html: Creates the https://speedie.gq/speedwm page in HTML form.
@echo page_install: Copy the page to ${PAGEDIR} and copy the preview image.
@echo page_push: git commit and git push the page in ${PAGEDIR}.
@echo page page_install page_push to do all of the above page changes instantly.
@echo css_install: Copy the CSS from docs/ to ${PAGEDIR}
@echo previmg_install: Copy the preview image to ${PAGEDIR}
@echo
@echo - Releasing -
@echo release to run make markdown, make upload, make page, make page_install, make page_push instantly.
@ -231,16 +237,36 @@ upload:
@echo "Uploaded everything."
page:
make page_php
page_html:
chmod +x scripts/speedwm-mkpage
chmod +x scripts/speedwm-help
./scripts/speedwm-mkpage -mkpage
page_php:
chmod +x scripts/speedwm-mkpage
chmod +x scripts/speedwm-help
./scripts/speedwm-mkpage -mkpage
mv readme.html readme.php
page_install:
cp speedwm.html ${HTMLDIR}
@echo "Copied speedwm.html to ${HTMLDIR}."
[ -f readme.html ] && cp -f readme.html ${PAGEDIR}/speedwm.html || \
[ -f readme.php ] && cp -f readme.php ${PAGEDIR}/speedwm.php || :
make previmg_install
make css_install
@echo "Copied readme.html/php to ${PAGEDIR}."
previmg_install:
[ -f docs/preview.png ] && cp -f docs/preview.png ${PAGEDIR}
@echo "Copied preview image to ${PAGEDIR}/preview.png"
css_install:
[ -f docs/speedwm.css.template ] && cp -f docs/speedwm.css.template ${PAGEDIR}/speedwm.css || :
@echo "Copied CSS to ${PAGEDIR}."
page_push:
echo ${HTMLDIR} > /tmp/speedwm-htmldir
echo ${PAGEDIR} > /tmp/speedwm-htmldir
chmod +x scripts/speedwm-mkpage
chmod +x scripts/speedwm-help
./scripts/speedwm-mkpage -page-push
@ -250,6 +276,12 @@ html:
chmod +x scripts/speedwm-help
./scripts/speedwm-mkpage -mkhtml
php:
chmod +x scripts/speedwm-mkpage
chmod +x scripts/speedwm-help
./scripts/speedwm-mkpage -mkpage
mv readme.html readme.php
markdown:
chmod +x scripts/speedwm-mkpage
chmod +x scripts/speedwm-help
@ -260,4 +292,4 @@ readme:
chmod +x scripts/speedwm-help
./scripts/speedwm-mkpage -mk
.PHONY: all options clean dist install install_only_bin install_only_misc modules_install uninstall help docs page page_install page_release html markdown readme page_push upload release
.PHONY: all options clean dist install install_only_bin install_only_misc modules_install uninstall help docs page page_html page_php page_install page_release html php markdown readme page_push upload release previmg_install css_install

View file

@ -1,4 +1,3 @@
# speedwm
![image](/docs/preview.png)
## What is speedwm?
@ -473,6 +472,7 @@ If it is not or you want it somewhere else, you can edit 'autostart.h' and 'make
- speedwm.tag.urgentwindows: 1
- speedwm.tiling.resizehints: 0
- speedwm.run.shell: /bin/sh
## Signals
Thanks to the 'fsignal' patch available on suckless.org's website, we can easily write shell scripts to interact with dwm and therefore speedwm.
I made some changes to this patch, because it has some.. questionable behaviour in my opinion.

View file

@ -1,3 +1,4 @@
-- Signals --
Thanks to the 'fsignal' patch available on suckless.org's website, we can easily write shell scripts to interact with dwm and therefore speedwm.
I made some changes to this patch, because it has some.. questionable behaviour in my opinion.

View file

@ -242,3 +242,4 @@
!! You have reached the bottom of the speedwm config file.
!! It may be used as a reference for writing a config file from scratch, or simply copied somewhere and edited.
!! Defaults here should more or less represent the settings in the speedwm source code.

View file

@ -0,0 +1,4 @@
img {
width: 50%;
padding-left: 10px;
}

View file

@ -1,24 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<div class="header">
<title>speedwm // speedie's website</title>
<?php include '../php/header.php';?>
<title>speedwm</title>
<meta charset="UTF-8">
<meta name="description" content="speedwm: Based fork of suckless.org's dynamic window manager.">
<meta name="description" content="speedie's fork of suckless.org's dwm">
<meta name="author" content="speedie">
<link rel="stylesheet" href="https://unpkg.com/terminal.css@0.7.2/dist/terminal.min.css" /><link rel="stylesheet" href="https://unpkg.com/terminal.css@0.7.1/dist/terminal.min.css" /><link rel="stylesheet" href="https://unpkg.com/terminal.css@0.7.1/dist/terminal.min.css" />
<link rel="stylesheet" href="css/dwm.css">
<h1>speedie's website</h1>
<link rel="icon" type="image/png" href="png/antibloat.png">
<a href="index.html">🏠 Home</a>
<a href="projects.html">💾 Projects</a>
<a href="blog.html">📘 Blog</a>
<a href="guides.html">📕 Guides</a>
<a href="mailto:speedie@duck.com">📧 Email</a>
<a href="https://github.com/speedie-de">🐧 Dotfiles</a>
<a href="rss.xml">📰 RSS</a>
<a href="donate.html">💰Donate</a>
</a>
</div>
<hr>
</header>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="speedwm.css">
<title>Welcome to speedie.gq</title>
</head>
<body>
<p><img src="img/gentoorice.png" alt="image"></p>
<div class="content">

View file

@ -1,9 +1,9 @@
<h2>Auto generated.</h2>
<p>This page was auto generated by the speedwm-help script bundled with speedwm. It acts as the help script and it writes documentation to HTML, Markdown and plain text from documentation in the docs folder and data grabbed from your current system.</p>
</div>
</body>
<footer>
<h2>Website made by speedie, proudly written in Vim on Gentoo Linux.</h2>
<h4>This website is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.</h4>
<?php include '../php/footer.php';?>
</footer>
</body>
</html>

View file

@ -6,9 +6,9 @@ CC = tcc
# Paths
# These should be fine for most users but if you use a distribution of GNU/Linux like NixOS or GNU Guix, consider changing this to fit your use case.
# HTMLDIR is only useful if you are using 'make release'.
# PAGEDIR is only useful if you are using 'make release'.
PREFIX = /usr
HTMLDIR = "/home/anon/Projects/page"
PAGEDIR = "/home/anon/Projects/page-improved/projects"
# GNU/Linux support
# If you use GNU/Linux, uncomment these lines (remove the # at the start of the line below)

View file

@ -95,7 +95,7 @@ case "$ARG1" in
sed "s|-- Maintaining settings easily --|## Maintaining settings easily|g" | \
sed "s|-- Additional note on autostart --|## Additional note on autostart|g" > ../README.md
markdown ../README.md > ../readme.html || printf "\nmarkdown-to-html not found, install using:\nnpm install markdown-to-html -g\n" && exit 1 ;;
"-whtml-wtemplate") test ../readme.html && cat ../docs/speedwm.html.template.1 ../readme.html ../docs/speedwm.html.template.2 >> ../speedwm.html && exit 0
"-whtml-wtemplate") test ../readme.html && cat ../docs/speedwm.html.template.1 ../readme.html ../docs/speedwm.html.template.2 >> ../readme.temp.html && exit 0
printf "\nYou need to $0 -whtml first." ; exit 1 ;;
"") $0 -h && exit 0 ;;
"-h") printf "speedwm help\n\nNo arguments to view this list of arguments.\n-h | View this list of arguments.\n-a | View everything.\n-1 | What is speedwm?\n-2 | List of all keybinds\n-3 | List of all dependencies\n-4 | .Xresources/Pywal information.\n-5 | Signals information\n-6 | Switching run launcher\n-7 | Installation\n-8 | Layouts\n-9| Important information.\n-w | Write documentation to ../readme\n-wmd | Write documentation (Markdown)\n-whtml | Write documentation (HTML) using markdown-to-html.\n-whtml-wtemplate | Combine template 1, output of -whtml and template 2 (from docs/) to create a full HTML document.\n\nIf second argument is -o, the requested output will be sent to stdout.\n-o can be replaced with a text editor or reader of your choice (such as less, vim, emacs, etc.)\n"; exit 0 ;;

View file

@ -10,8 +10,9 @@ MKPAGE() {
./speedwm-help -whtml
./speedwm-help -whtml-wtemplate
cd ..
rm -f readme.html
echo "Created speedwm.html"
mv readme.temp.html readme.html
sed -i "s|/docs/preview.png|preview.png|g" readme.html
echo "Created readme.html"
}
PUSHPAGE() {