|
|
|
(in-package #:cl-user)
|
|
|
|
(defpackage #:site-settings
|
|
|
|
(:use #:cl
|
|
|
|
#:ritherdon-archive.db
|
|
|
|
#:mito
|
|
|
|
#:app-constants)
|
|
|
|
(:export #:site-settings
|
|
|
|
#:nav-menu))
|
|
|
|
|
|
|
|
(in-package #:site-settings)
|
|
|
|
|
|
|
|
(defclass site-settings ()
|
|
|
|
((enable-sign-up
|
|
|
|
:documentation "Allow non-registered users to create accounts."
|
|
|
|
:col-type (or :integer :null)
|
|
|
|
:initarg :enable-sign-up
|
|
|
|
:initform +true+ ; SQLite: 0 -> false 1 -> true.
|
|
|
|
:accessor enable-sign-up-p)
|
|
|
|
|
|
|
|
(enable-site-logo
|
|
|
|
:documentation "Show site logo in website's header."
|
|
|
|
:col-type (or :integer :null)
|
|
|
|
:initarg :enable-site-logo
|
|
|
|
:initform +true+ ; SQLite: 0 -> false 1 -> true.
|
|
|
|
:accessor enable-site-logo-p)
|
|
|
|
|
|
|
|
(site-name
|
|
|
|
:documentation "The name of the site, shown in website's header."
|
|
|
|
:col-type (or :text :null)
|
|
|
|
:initarg :site-name
|
|
|
|
:initform "NERA"
|
|
|
|
:accessor site-name-of)
|
|
|
|
|
|
|
|
(home-page
|
|
|
|
:documentation "The page (found in /storage/pages) which is rendered for '/' defroute."
|
|
|
|
:col-type (or :text :null)
|
|
|
|
:initarg :home-page
|
|
|
|
:initform "home"
|
|
|
|
:accessor home-page-of)
|
|
|
|
|
|
|
|
(search-url
|
|
|
|
:documentation "The URL for the Meilisearch instance this site calls out to
|
|
|
|
for it's search features."
|
|
|
|
:col-type (or :text :null)
|
|
|
|
:initarg :search-url
|
|
|
|
:initform "http://localhost:7700" ; Default Meilisearch URL.
|
|
|
|
:accessor search-url-of))
|
|
|
|
|
|
|
|
(:documentation "Model used to track the site-wide settings -- stored in the database.")
|
|
|
|
(:metaclass mito:dao-table-class))
|