[Emacs Lisp] Personal ~/.emacs.d/ configuration folder.
1
;;; ox-html-uswds-components.el --- Transcription functions for all USWDS components, -*- lexical-binding: t; -*-
2
;; Copyright (C) 2021 Marius Peter
3
4
;; Author: Marius Peter (rot13 "?znevhf.crgre@ghgnabgn.pbz")
5
;; Created: March 2021
6
;; Package-Version: 0.1
7
;; Keywords: org export publish html
8
;; Homepage: http://www.smart-documents.org
9
10
;; This file is not part of GNU Emacs.
11
12
;;; License:
13
;; This program is free software; you can redistribute it and/or modify
14
;; it under the terms of the GNU General Public License as published by
15
;; the Free Software Foundation, either version 3 of the License, or
16
;; (at your option) any later version.
17
;;
18
;; This program is distributed in the hope that it will be useful,
19
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
;; GNU General Public License for more details.
22
;;
23
;; You should have received a copy of the GNU General Public License
24
;; along with this file. If not, see <http://www.gnu.org/licenses/>.
25
;;; Commentary:
26
27
;; These are all the components made available by the USDWS.
28
29
;;; Code:
30
31
(defun uswds-component-accordion (contents)
32
(format "<script>%s</script>" contents))
33
34
(defun uswds-component-alert-info (contents)
35
(format "<div class=\"usa-alert usa-alert--info\" >
36
<div class=\"usa-alert__body\">
37
<h3 class=\"usa-alert__heading\">Informative status</h3>
38
<p class=\"usa-alert__text\">%s</p>
39
</div>
40
</div>" contents))
41
42
(defun uswds-component-alert-warning (contents)
43
(format "<div class=\"usa-alert usa-alert--warning\" >
44
<div class=\"usa-alert__body\">
45
<h3 class=\"usa-alert__heading\">Warning status</h3>
46
<p class=\"usa-alert__text\">%s</p>
47
</div>
48
</div>" contents))
49
50
(defun uswds-component-alert-error (contents)
51
(format "<div class=\"usa-alert usa-alert--error\" >
52
<div class=\"usa-alert__body\">
53
<h3 class=\"usa-alert__heading\">Error status</h3>
54
<p class=\"usa-alert__text\">%s</p>
55
</div>
56
</div>" contents))
57
58
(defun uswds-component-alert-success (contents)
59
(format "<div class=\"usa-alert usa-alert--success\" >
60
<div class=\"usa-alert__body\">
61
<h3 class=\"usa-alert__heading\">Success status</h3>
62
<p class=\"usa-alert__text\">%s</p>
63
</div>
64
</div>" contents))
65
66
(defun uswds-component-alert-slim (contents)
67
(format "<div class=\"usa-alert usa-alert--slim\" >
68
<div class=\"usa-alert__body\">
69
<p class=\"usa-alert__text\">%s</p>
70
</div>
71
</div>" contents))
72
73
(defun uswds-component-alert-no-icon (contents)
74
(format "<div class=\"usa-alert usa-alert--no-icon\" >
75
<div class=\"usa-alert__body\">
76
<p class=\"usa-alert__text\">%s</p>
77
</div>
78
</div>" contents))
79
80
(defun uswds-component-banner (contents)
81
(format "<style type=\"text/css\">%s</style>" contents))
82
83
(defun uswds-component-breadcrumb (contents)
84
(format "<style type=\"text/css\">%s</style>" contents))
85
86
(defun uswds-component-button (contents)
87
;; <a class=\"usa-button\" href=\"https://github.com/Blendoit/.emacs.d\">%s</a>
88
(format "<a class=\"usa-button\">%s</a>" contents))
89
90
(defun uswds-component-button-group (contents)
91
(format "<style type=\"text/css\">%s</style>" contents))
92
93
(defun uswds-component-card (contents)
94
(format "<style type=\"text/css\">%s</style>" contents))
95
96
(defun uswds-component-collection (contents)
97
(format "<style type=\"text/css\">%s</style>" contents))
98
99
(defun uswds-component-footer (contents)
100
(format "<style type=\"text/css\">%s</style>" contents))
101
102
;; TODO form controls and templates
103
(defun uswds-component-grid (contents)
104
(format "<style type=\"text/css\">%s</style>" contents))
105
106
(defun uswds-component-header (contents)
107
(format "<style type=\"text/css\">%s</style>" contents))
108
109
;; TODO icons
110
111
(defun uswds-component-identifier (contents)
112
(format "<style type=\"text/css\">%s</style>" contents))
113
114
(defun uswds-component-process (contents)
115
(format "<style type=\"text/css\">%s</style>" contents))
116
117
(defun uswds-component-search (contents)
118
(format "<style type=\"text/css\">%s</style>" contents))
119
120
(defun uswds-component-side (contents)
121
(format "<style type=\"text/css\">%s</style>" contents))
122
123
(defun uswds-component-site (contents)
124
(format "<style type=\"text/css\">%s</style>" contents))
125
126
(defun uswds-component-step (contents)
127
(format "<style type=\"text/css\">%s</style>" contents))
128
129
(defun uswds-component-summary (contents)
130
(format "<style type=\"text/css\">%s</style>" contents))
131
132
;; TODO table?
133
134
(defun uswds-component-tag (contents)
135
(format "<span class=\"usa-tag\">%s</span>" contents))
136
137
(defun uswds-component-tooltip (contents)
138
(format "<style type=\"text/css\">%s</style>" contents))
139
140
(defun uswds-component-tooltip (contents)
141
(format "<style type=\"text/css\">%s</style>" contents))
142
143
(defun uswds-component-tooltip (contents)
144
(format "<style type=\"text/css\">%s</style>" contents))
145
146
(provide 'ox-html-uswds-components)
147
;;; ox-html-uswds-components.el ends here
148
149