summaryrefslogtreecommitdiff
path: root/site/ox-html-uswds-components.el
blob: 08e9684931da2e42370853c0960cbe19ea050fea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
;;; ox-html-uswds-components.el --- Transcription functions for all USWDS components,  -*- lexical-binding: t; -*-
;; Copyright (C) 2021  Marius Peter

;; Author: Marius Peter (rot13 "?znevhf.crgre@ghgnabgn.pbz")
;; Created: March 2021
;; Package-Version: 0.1
;; Keywords: org export publish html
;; Homepage: http://www.smart-documents.org

;; This file is not part of GNU Emacs.

;;; License:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this file.  If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:

;; These are all the components made available by the USDWS.

;;; Code:

(defun uswds-component-accordion (contents)
  (format "<script>%s</script>" contents))

(defun uswds-component-alert-info (contents)
  (format "<div class=\"usa-alert usa-alert--info\" >
    <div class=\"usa-alert__body\">
        <h3 class=\"usa-alert__heading\">Informative status</h3>
        <p class=\"usa-alert__text\">%s</p>
    </div>
</div>" contents))

(defun uswds-component-alert-warning (contents)
  (format "<div class=\"usa-alert usa-alert--warning\" >
    <div class=\"usa-alert__body\">
        <h3 class=\"usa-alert__heading\">Warning status</h3>
        <p class=\"usa-alert__text\">%s</p>
    </div>
</div>" contents))

(defun uswds-component-alert-error (contents)
  (format "<div class=\"usa-alert usa-alert--error\" >
    <div class=\"usa-alert__body\">
        <h3 class=\"usa-alert__heading\">Error status</h3>
        <p class=\"usa-alert__text\">%s</p>
    </div>
</div>" contents))

(defun uswds-component-alert-success (contents)
  (format "<div class=\"usa-alert usa-alert--success\" >
    <div class=\"usa-alert__body\">
        <h3 class=\"usa-alert__heading\">Success status</h3>
        <p class=\"usa-alert__text\">%s</p>
    </div>
</div>" contents))

(defun uswds-component-alert-slim (contents)
  (format "<div class=\"usa-alert usa-alert--slim\" >
    <div class=\"usa-alert__body\">
        <p class=\"usa-alert__text\">%s</p>
    </div>
</div>" contents))

(defun uswds-component-alert-no-icon (contents)
  (format "<div class=\"usa-alert usa-alert--no-icon\" >
    <div class=\"usa-alert__body\">
        <p class=\"usa-alert__text\">%s</p>
    </div>
</div>" contents))

(defun uswds-component-banner (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

(defun uswds-component-breadcrumb (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

(defun uswds-component-button (contents)
        ;; <a class=\"usa-button\" href=\"https://github.com/Blendoit/.emacs.d\">%s</a>
  (format "<a class=\"usa-button\">%s</a>" contents))

(defun uswds-component-button-group (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

(defun uswds-component-card (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

(defun uswds-component-collection (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

(defun uswds-component-footer (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

;; TODO form controls and templates
(defun uswds-component-grid (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

(defun uswds-component-header (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

;; TODO icons

(defun uswds-component-identifier (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

(defun uswds-component-process (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

(defun uswds-component-search (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

(defun uswds-component-side (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

(defun uswds-component-site (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

(defun uswds-component-step (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

(defun uswds-component-summary (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

;; TODO table?

(defun uswds-component-tag (contents)
  (format "<span class=\"usa-tag\">%s</span>" contents))

(defun uswds-component-tooltip (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

(defun uswds-component-tooltip (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

(defun uswds-component-tooltip (contents)
  (format "<style type=\"text/css\">%s</style>" contents))

(provide 'ox-html-uswds-components)
;;; ox-html-uswds-components.el ends here

Copyright 2019--2024 Marius PETER