Plaster
New
List
Login
text
apl
aspx
asterisk
brainfuck
c
c++hdr
c++src
cassandra
ceylon
clojure
clojurescript
cmake
cobol
coffeescript
common-lisp
crystal
csharp
css
cypher-query
cython
d
dart
diff
django
dockerfile
dylan
ebnf
ecl
ecmascript
edn
eiffel
ejs
elm
erb
erlang
ez80
factor
fcl
feature
forth
fortran
fragment
gfm
go
gql
groovy
gss
haml
handlebars-template
haskell
haxe
hive
html
http
httpd-php
httpd-php-open
hxml
ini
java
javascript
json
jsp
jsx
julia
kotlin
latex
less
literate-haskell
lua
mariadb
markdown
mbox
mirc
mscgen
msgenny
mssql
mumps
mysql
n-triples
nesc
nginx-conf
nsis
objectivec
octave
oz
pascal
perl
pgp
pgp-keys
pgp-signature
pgsql
php
pig
plsql
properties
protobuf
puppet
python
q
rpm-changes
rpm-spec
rsrc
ruby
rustsrc
sas
sass
scala
scheme
scss
sieve
slim
smarty
solr
soy
sparql-query
spreadsheet
sql
squirrel
stex
styl
swift
systemverilog
tcl
textile
tiddlywiki
tiki
tlv
tornado
ttcn-asn
ttcn-cfg
turtle
twig
typescript
typescript-jsx
vb
vbscript
velocity
verilog
vertex
vhdl
vue
webidl
xml
xml-dtd
xquery
xu
yaml
z80
default
Visibility:
public
unlisted
private
(defmacro with-html (&body body) "quick wrapper around cl-who:with-html-output" `(cl-who:with-html-output (s *html-output-stream*) ,@body)) (defmacro def-html (name doc-string &body body) "Quick macro to create functions of certain names which start with (with-html ..)" `(defun ,name () ,doc-string (with-html ,@body))) (defmacro content-html (content) `(with-html (:main :class "wrapper" (:section :class "container" :id "header" (:img :class "img" :src ,(website-standard-image) :height "45") ,@content)))) (def-html footer-for-webpages "Generates the constant footer for the webpages" (:div :class "footer" (:p "Made with Common Lisp and Hunchentoot")) ; (:script :src "/libraries/validate/jquery.validate.js") (:script :src "/scripts/hash-passwords-on-click.js") (:script :src "/scripts/validate-submission.js")) (defun basic-header () "Generates a basic header with no scripts and nothing special except css basically" (cl-who:with-html-output (x *html-output-stream* :prologue t) (:head (:meta :charset "utf-8") (:meta :http-equiv "X-UA-COMPATIBLE" :content "IE=edge") (:meta :name "viewport" :content "width=device-width, initial-scale=1") (:link :rel "stylesheet" :href "/css/roboto300.css") (:link :rel "stylesheet" :href "/css/normalize.css") (:link :rel "stylesheet" :href "/css/milligram.min.css") (:link :rel "stylesheet" :type "text/css" :href "/css/main.css")))) (defun header-for-webpages () "Generates the constant header for the webpages" (cl-who:with-html-output (x *html-output-stream* :prologue t) (:head ;(:noscript (:meta :http-equiv "refresh" ; :content 0 ; :URL "/nojs") ;(:style "html{display:none;}")) (:meta :charset "utf-8") (:meta :http-equiv "X-UA-COMPATIBLE" :content "IE=edge") (:meta :name "viewport" :content "width=device-width, initial-scale=1") (:script :src "/libraries/jquery/jquery-3.3.1.js") (:script :src "/libraries/validate/jquery.validate.js") (:script :src "/libraries/sha512/sha512.js") (:link :rel "stylesheet" :href "/css/roboto300.css") (:link :rel "stylesheet" :href "/css/normalize.css") (:link :rel "stylesheet" :href "/css/milligram.min.css") (:link :rel "stylesheet" :type "text/css" :href "/css/main.css")))) ;;(home login users register) (generate-navigation-bar ((home "/") logout));;nav bar with only home as an option and the url "/" ;;generates a function called (navigation-bar) (defmacro def-basic-page (name doc-string nav-keys &body body) "Same as def-page but uses basic-header instead" `(def-html ,name ,doc-string (basic-header) (navigation-bar ,@nav-keys) ,@body (footer-for-webpages))) (defmacro def-page (name doc-string nav-keys &body body) "Macro which just puts the building blocks of a webpage together" `(def-html ,name ,doc-string (header-for-webpages) (navigation-bar ,@nav-keys) ,@body (footer-for-webpages)))