[Emacs Lisp] Personal ~/.emacs.d/ configuration folder.
Taking the meta to a new level.
Changed files
- site/Makefile
- site/about.org
- site/assets/.gitignore
- site/assets/images/PDF-icon.png
- site/assets/images/PowerPoint-icon.png
- site/assets/images/html-icon.png
- site/assets/images/space.jpg
- site/assets/stylesheets/sd.css
- site/index-old.org
- site/index.html
- site/index.org
- site/index.pdf
- site/jobs.org
- site/original-paper.org
- site/ox-html-uswds-components.el
- site/ox-html-uswds.el
- site/page-header.html
- site/posts/test.org
- site/publish.el
- site/sitemap.html
- site/sitemap.org
site/Makefile
@@ -0,0 +1,22 @@
1
Added:
# Makefile for Smart Documents.
2
Added:
3
Added:
.PHONY: all content styles
4
Added:
5
Added:
all: content styles
6
Added:
7
Added:
content: publish.el
8
Added:
@echo "Publishing site's content (html and site media)."
9
Added:
emacs --batch --load publish.el --eval="(org-publish \"content\")"
10
Added:
11
Added:
styles: publish.el
12
Added:
@echo "Publishing site's assets (css, js, img, fonts etc.)."
13
Added:
emacs --batch --load publish.el --eval="(org-publish \"assets\")"
14
Added:
15
Added:
css: publish.el
16
Added:
@echo "Publishing site's css stylesheets."
17
Added:
emacs --batch --load publish.el --eval="(org-publish \"css\")"
18
Added:
19
Added:
clean:
20
Added:
@echo "Cleaning up.."
21
Added:
@rm -rvf *.elc
22
Added:
@rm -rvf ~/.org-timestamps/*
site/about.org
@@ -0,0 +1,42 @@
1
Added:
# -*- mode: org; -*-
2
Added:
3
Added:
#+TITLE: About
4
Added:
#+AUTHOR: Marius Peter
5
Added:
#+DATE: <2021-02-13 Sat>
6
Added:
7
Added:
#+INCLUDE: page-header.html export html
8
Added:
9
Added:
#+begin_export html
10
Added:
<div class="usa-section">
11
Added:
<div class="grid-container">
12
Added:
<div class="grid-row grid-gap">
13
Added:
<main class="usa-layout-docs__main desktop:grid-col-9 usa-prose usa-layout-docs" id="main-content">
14
Added:
#+end_export
15
Added:
16
Added:
* Contact
17
Added:
18
Added:
Contact me at [[https://t.me/Blendoit][t.me/Blendoit]] or at [[mailto:smart-documents@tuta.io][smart-documents@tuta.io]].
19
Added:
20
Added:
* Sources
21
Added:
22
Added:
** Home
23
Added:
24
Added:
- PDF icon: [[https://commons.wikimedia.org/wiki/File:PDF_file_icon.svg][commons.wikimedia.org]]
25
Added:
- PowerPoint icon: [[https://www.pngwing.com/en/free-png-zfutu/download][www.pngwing.com]]
26
Added:
- HTML icon: Icon made from [[http://www.onlinewebfonts.com/icon][Icon Fonts]] is licensed by CC BY 3.0
27
Added:
28
Added:
** The Original Paper
29
Added:
30
Added:
External materials used are referred throughout the paper as
31
Added:
footnotes.
32
Added:
33
Added:
** I am...
34
Added:
35
Added:
** About
36
Added:
37
Added:
#+begin_export html
38
Added:
</main>
39
Added:
</div>
40
Added:
</div>
41
Added:
</div>
42
Added:
#+end_export
site/assets/.gitignore
@@ -0,0 +1,3 @@
1
Added:
# .gitignore for Smart Documents assets
2
Added:
3
Added:
uswds*
site/assets/images/PDF-icon.png
Binary files differ
site/assets/images/PowerPoint-icon.png
Binary files differ
site/assets/images/html-icon.png
Binary files differ
site/assets/images/space.jpg
Binary files differ
site/assets/stylesheets/sd.css
@@ -0,0 +1,22 @@
1
Added:
#sd-intro-card{
2
Added:
font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;
3
Added:
font-size:1.06rem;
4
Added:
line-height:1.5;
5
Added:
padding-bottom:2rem;
6
Added:
padding-top:2rem;
7
Added:
background-image:url("/assets/images/space.jpg");
8
Added:
background-position:center;
9
Added:
background-size:cover;
10
Added:
color:white;
11
Added:
}
12
Added:
13
Added:
/* .sd-header{ */
14
Added:
/* position:sticky; */
15
Added:
/* top:0; */
16
Added:
/* z-index:10; */
17
Added:
/* background-color: white; */
18
Added:
/* } */
19
Added:
20
Added:
/* .sd-sidenav{ */
21
Added:
/* position:fixed; */
22
Added:
/* } */
site/index-old.org
@@ -0,0 +1,133 @@
1
Added:
# -*- mode: org; -*-
2
Added:
3
Added:
#+TITLE: Smart Documents
4
Added:
#+AUTHOR: Marius Peter
5
Added:
#+DATE: <2021-02-09 Tue>
6
Added:
#+EMAIL: smart-documents@tuta.io
7
Added:
#+OPTIONS: toc:nil html-style:nil num:nil title:nil
8
Added:
9
Added:
#+INCLUDE: page-header.html export html
10
Added:
11
Added:
#+begin_export html
12
Added:
<section id="sd-intro-card" aria-label="Introduction">
13
Added:
<div class="grid-container">
14
Added:
<div class="usa-hero__callout">
15
Added:
<h1 class="usa-hero__heading">
16
Added:
<span class="usa-hero__heading--alt">Emacs</span> but
17
Added:
accessible & beautiful.
18
Added:
</h1>
19
Added:
<p>
20
Added:
Smart Documents is a document production system created to
21
Added:
raise mainstream awareness of
22
Added:
the <a href="https://www.gnu.org/software/emacs/">Emacs</a>
23
Added:
software on which it is based.
24
Added:
</p>
25
Added:
<a class="usa-button" href="https://github.com/Blendoit/.emacs.d">Try it now!</a>
26
Added:
</div>
27
Added:
</div>
28
Added:
</section>
29
Added:
#+end_export
30
Added:
31
Added:
#+begin_export html
32
Added:
<div class="usa-section">
33
Added:
<div class="grid-container">
34
Added:
<div class="grid-row grid-gap">
35
Added:
<main class="usa-layout-docs__main desktop:grid-col-9 usa-prose usa-layout-docs" id="main-content">
36
Added:
#+end_export
37
Added:
38
Added:
# #+begin_alert-success
39
Added:
# Finally online thank God :pray:
40
Added:
# #+end_alert-success
41
Added:
42
Added:
* Perfect documents every time.
43
Added:
:PROPERTIES:
44
Added:
:CUSTOM_ID: perfect-document
45
Added:
:END:
46
Added:
47
Added:
Focus on your content and let the powerful export engine work out the
48
Added:
appearance, for flawless results every time.
49
Added:
50
Added:
* Maximum productivity.
51
Added:
:PROPERTIES:
52
Added:
:CUSTOM_ID: easy-document
53
Added:
:END:
54
Added:
55
Added:
Collect feedback and create new document versions through an efficient
56
Added:
wizard.
57
Added:
58
Added:
* Everything linked together.
59
Added:
:PROPERTIES:
60
Added:
:CUSTOM_ID: linked-document
61
Added:
:END:
62
Added:
63
Added:
Create links between files to keep track of dates, people, tags, and
64
Added:
compile them into neatly filtered agendas---perfect for sharing a
65
Added:
project status or roadmap!
66
Added:
67
Added:
* COMMENT A single authoritative document.
68
Added:
:PROPERTIES:
69
Added:
:CUSTOM_ID: single-document
70
Added:
:END:
71
Added:
72
Added:
#+NAME: pdf-icon
73
Added:
#+ATTR_HTML: :height 100px
74
Added:
#+ATTR_LATEX: :height 100px
75
Added:
[[file:assets/images/PDF-icon.png]]
76
Added:
77
Added:
#+NAME: powerpoint-icon
78
Added:
#+ATTR_HTML: :height 100px
79
Added:
#+ATTR_LATEX: :height 100px
80
Added:
[[file:assets/images/PowerPoint-icon.png]]
81
Added:
82
Added:
#+NAME: html-icon
83
Added:
#+ATTR_HTML: :height 100px
84
Added:
#+ATTR_LATEX: :height 100px
85
Added:
[[file:assets/images/html-icon.png]]
86
Added:
87
Added:
Each document can be declined into a report, a presentation
88
Added:
summarizing the document's outline, or a website page that can be
89
Added:
added to your wiki.
90
Added:
91
Added:
* COMMENT Program your documents.
92
Added:
:PROPERTIES:
93
Added:
:CUSTOM_ID: single-document
94
Added:
:END:
95
Added:
96
Added:
Program your documents in your favorite language. Python, C++, Go,
97
Added:
Clojure, you name it---you can develop interactive features from
98
Added:
within the document itself.
99
Added:
100
Added:
* Download
101
Added:
102
Added:
You can download the current development snapshot on GitHub.
103
Added:
104
Added:
#+begin_export html
105
Added:
<a class="usa-button" href="https://github.com/Blendoit/.emacs.d">Github</a>
106
Added:
#+end_export
107
Added:
108
Added:
# #+begin_button
109
Added:
# [[https://github.com/Blendoit/.emacs.d][Download]]
110
Added:
# #+end_button
111
Added:
112
Added:
* Support this project
113
Added:
114
Added:
#+begin_export html
115
Added:
<a class="usa-button" href="https://venmo.com/blendoit">Venmo</a>
116
Added:
#+end_export
117
Added:
118
Added:
# #+begin_button
119
Added:
# [[https://venmo.com/blendoit][Venmo]]
120
Added:
# #+end_button
121
Added:
122
Added:
* Contact
123
Added:
124
Added:
For all inquiries, please send an e-mail to [[mailto:smart-documents@tuta.io][smart-documents@tuta.io]].
125
Added:
126
Added:
# Dirty! :P
127
Added:
#+begin_export html
128
Added:
</div>
129
Added:
</main>
130
Added:
</div>
131
Added:
</div>
132
Added:
</div>
133
Added:
#+end_export
site/index.html
@@ -0,0 +1,243 @@
1
Added:
<?xml version="1.0" encoding="utf-8"?>
2
Added:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
Added:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
Added:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5
Added:
<head>
6
Added:
<!-- 2021-09-29 Wed 19:37 -->
7
Added:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8
Added:
<meta name="viewport" content="width=device-width, initial-scale=1" />
9
Added:
<title>Smart Documents</title>
10
Added:
<meta name="generator" content="Org mode" />
11
Added:
<meta name="author" content="Marius Peter" />
12
Added:
<script type="text/javascript">
13
Added:
// @license magnet:?xt=urn:btih:e95b018ef3580986a04669f1b5879592219e2a7a&dn=public-domain.txt Public Domain
14
Added:
<!--/*--><![CDATA[/*><!--*/
15
Added:
function CodeHighlightOn(elem, id)
16
Added:
{
17
Added:
var target = document.getElementById(id);
18
Added:
if(null != target) {
19
Added:
elem.classList.add("code-highlighted");
20
Added:
target.classList.add("code-highlighted");
21
Added:
}
22
Added:
}
23
Added:
function CodeHighlightOff(elem, id)
24
Added:
{
25
Added:
var target = document.getElementById(id);
26
Added:
if(null != target) {
27
Added:
elem.classList.remove("code-highlighted");
28
Added:
target.classList.remove("code-highlighted");
29
Added:
}
30
Added:
}
31
Added:
/*]]>*///-->
32
Added:
// @license-end
33
Added:
</script>
34
Added:
</head>
35
Added:
<body>
36
Added:
<div id="content">
37
Added:
<section class="usa-banner" aria-label="Accessible website">
38
Added:
<div class="usa-accordion">
39
Added:
40
Added:
<header class="usa-banner__header">
41
Added:
<div class="usa-banner__inner">
42
Added:
<div class="grid-col-auto">
43
Added:
<img class="usa-banner__header-flag" src="assets/uswds-2.10.1/img/us_flag_small.png" alt="U.S. flag">
44
Added:
</div>
45
Added:
<div class="grid-col-fill tablet:grid-col-auto">
46
Added:
<p class="usa-banner__header-text">Proudly designed with the U.S. Web Design System.</p>
47
Added:
<p class="usa-banner__header-action" aria-hidden="true">Here's how you know</p>
48
Added:
</div>
49
Added:
<button class="usa-accordion__button usa-banner__button" aria-expanded="false" aria-controls="gov-banner">
50
Added:
<span class="usa-banner__button-text">Here's how you know</span>
51
Added:
</button>
52
Added:
</div>
53
Added:
</header>
54
Added:
55
Added:
<div class="usa-banner__content usa-accordion__content" id="gov-banner">
56
Added:
<div class="grid-row grid-gap-lg">
57
Added:
<div class="usa-banner__guidance tablet:grid-col-6">
58
Added:
<img class="usa-banner__icon usa-media-block__img" src="assets/uswds-2.10.1/img/icon-dot-gov.svg" role="img" alt="" aria-hidden="true">
59
Added:
<div class="usa-media-block__body">
60
Added:
<p>
61
Added:
<strong>Design for democracy</strong>
62
Added:
<br/>
63
Added:
The <a href="https://designsystem.digital.gov/">U.S. Web Design System</a> emphasizes universal accessibility.
64
Added:
</p>
65
Added:
</div>
66
Added:
</div>
67
Added:
<div class="usa-banner__guidance tablet:grid-col-6">
68
Added:
<img class="usa-banner__icon usa-media-block__img" src="assets/uswds-2.10.1/img/icon-https.svg" role="img" alt="" aria-hidden="true">
69
Added:
<div class="usa-media-block__body">
70
Added:
<p>
71
Added:
<strong>Secure .gov websites use HTTPS</strong>
72
Added:
<br/>
73
Added:
This website will soon feature identical protection features!
74
Added:
</p>
75
Added:
</div>
76
Added:
</div>
77
Added:
</div>
78
Added:
</div>
79
Added:
80
Added:
</div>
81
Added:
</section>
82
Added:
83
Added:
<header class="usa-header usa-header--extended sd-header">
84
Added:
<div class="usa-navbar">
85
Added:
<div class="usa-logo" id="extended-logo">
86
Added:
<em class="usa-logo__text"><a href="index.html" title="Home" aria-label="Home">Smart Documents</a></em>
87
Added:
</div>
88
Added:
<button class="usa-menu-btn">Menu</button>
89
Added:
</div>
90
Added:
91
Added:
<nav aria-label="Primary navigation" class="usa-nav">
92
Added:
<div class="usa-nav__inner">
93
Added:
94
Added:
<button class="usa-nav__close">
95
Added:
<img src="assets/img/usa-icons/close.svg" role="img" alt="close">
96
Added:
</button>
97
Added:
98
Added:
<ul class="usa-nav__primary usa-accordion">
99
Added:
100
Added:
<li class="usa-nav__primary-item">
101
Added:
<button class="usa-accordion__button usa-nav__link" aria-expanded="false" aria-controls="extended-nav-section-two">
102
Added:
<span>Features</span>
103
Added:
</button>
104
Added:
<ul id="extended-nav-section-two" class="usa-nav__submenu">
105
Added:
<li class="usa-nav__submenu-item"><a href="#" class=""> wan</a></li>
106
Added:
<li class="usa-nav__submenu-item"><a href="#" class=""> tu</a></li>
107
Added:
<li class="usa-nav__submenu-item"><a href="#" class=""> mute</a></li>
108
Added:
</ul>
109
Added:
</li>
110
Added:
111
Added:
<li class="usa-nav__primary-item">
112
Added:
<a class="usa-nav__link" href="original-paper.html"><span>The original paper</span></a>
113
Added:
</li>
114
Added:
115
Added:
<li class="usa-nav__primary-item">
116
Added:
<a class="usa-nav__link" href="jobs.html"><span>I am...</span></a>
117
Added:
</li>
118
Added:
119
Added:
<li class="usa-nav__primary-item">
120
Added:
<a class="usa-nav__link" href="about.html"><span>About</span></a>
121
Added:
</li>
122
Added:
123
Added:
</ul>
124
Added:
125
Added:
<div class="usa-nav__secondary">
126
Added:
<ul class="usa-nav__secondary-links">
127
Added:
<li class="usa-nav__secondary-item"><a href="">Contact</a></li>
128
Added:
<li class="usa-nav__secondary-item"><a href="">Contribute</a></li>
129
Added:
</ul>
130
Added:
131
Added:
<form class="usa-search usa-search--small " role="search">
132
Added:
<label class="usa-sr-only" for="extended-search-field-small">Search small</label>
133
Added:
<input class="usa-input" id="extended-search-field-small" type="search" name="search">
134
Added:
<button class="usa-button" type="submit"><span class="usa-sr-only">Search</span></button>
135
Added:
</form>
136
Added:
</div>
137
Added:
</div>
138
Added:
</nav>
139
Added:
</header>
140
Added:
141
Added:
<section id="sd-intro-card" aria-label="Introduction">
142
Added:
<div class="grid-container">
143
Added:
<div class="usa-hero__callout">
144
Added:
<h1 class="usa-hero__heading">
145
Added:
<span class="usa-hero__heading--alt">Emacs</span> but
146
Added:
accessible & beautiful.
147
Added:
</h1>
148
Added:
<p>
149
Added:
Smart Documents is a document production system created to
150
Added:
raise mainstream awareness of
151
Added:
the <a href="https://www.gnu.org/software/emacs/">Emacs</a>
152
Added:
software on which it is based.
153
Added:
</p>
154
Added:
<a class="usa-button" href="https://github.com/Blendoit/.emacs.d">Try it now!</a>
155
Added:
</div>
156
Added:
</div>
157
Added:
</section>
158
Added:
159
Added:
<div class="usa-section">
160
Added:
<div class="grid-container">
161
Added:
<div class="grid-row grid-gap">
162
Added:
<main class="usa-layout-docs__main desktop:grid-col-9 usa-prose usa-layout-docs" id="main-content">
163
Added:
164
Added:
<p>
165
Added:
The self-publishing publishing tool
166
Added:
</p>
167
Added:
168
Added:
<ul class="org-ul">
169
Added:
<li>This website is a <code>Smart Document</code> comprised of different <code>Smart Documents</code>.</li>
170
Added:
</ul>
171
Added:
172
Added:
<div id="outline-container-perfect-document" class="outline-2">
173
Added:
<h2 id="perfect-document">Perfect documents every time.</h2>
174
Added:
<div class="outline-text-2" id="text-perfect-document">
175
Added:
<p>
176
Added:
Focus on your content and let the powerful export engine work out the
177
Added:
appearance, for flawless results every time.
178
Added:
</p>
179
Added:
</div>
180
Added:
</div>
181
Added:
182
Added:
<div id="outline-container-easy-document" class="outline-2">
183
Added:
<h2 id="easy-document">Maximum productivity.</h2>
184
Added:
<div class="outline-text-2" id="text-easy-document">
185
Added:
<p>
186
Added:
Collect feedback and create new document versions through an efficient
187
Added:
wizard.
188
Added:
</p>
189
Added:
</div>
190
Added:
</div>
191
Added:
192
Added:
<div id="outline-container-linked-document" class="outline-2">
193
Added:
<h2 id="linked-document">Everything linked together.</h2>
194
Added:
<div class="outline-text-2" id="text-linked-document">
195
Added:
<p>
196
Added:
Create links between files to keep track of dates, people, tags, and
197
Added:
compile them into neatly filtered agendas—perfect for sharing a
198
Added:
project status or roadmap!
199
Added:
</p>
200
Added:
</div>
201
Added:
</div>
202
Added:
203
Added:
<div id="outline-container-orgbd48720" class="outline-2">
204
Added:
<h2 id="orgbd48720">Download</h2>
205
Added:
<div class="outline-text-2" id="text-orgbd48720">
206
Added:
<p>
207
Added:
You can download the current development snapshot on GitHub.
208
Added:
</p>
209
Added:
210
Added:
<a class="usa-button" href="https://github.com/Blendoit/.emacs.d">Github</a>
211
Added:
</div>
212
Added:
</div>
213
Added:
214
Added:
<div id="outline-container-org563d56b" class="outline-2">
215
Added:
<h2 id="org563d56b">Support this project</h2>
216
Added:
<div class="outline-text-2" id="text-org563d56b">
217
Added:
<a class="usa-button" href="https://venmo.com/blendoit">Venmo</a>
218
Added:
</div>
219
Added:
</div>
220
Added:
221
Added:
<div id="outline-container-org5edb15d" class="outline-2">
222
Added:
<h2 id="org5edb15d">Contact</h2>
223
Added:
<div class="outline-text-2" id="text-org5edb15d">
224
Added:
<p>
225
Added:
For all inquiries, please send an e-mail to <a href="mailto:smart-documents@tuta.io">smart-documents@tuta.io</a>.
226
Added:
</p>
227
Added:
228
Added:
</div>
229
Added:
</main>
230
Added:
</div>
231
Added:
</div>
232
Added:
</div>
233
Added:
</div>
234
Added:
</div>
235
Added:
</div>
236
Added:
<div id="postamble" class="status">
237
Added:
<p class="date">Date: 2021-02-09 Tue 00:00</p>
238
Added:
<p class="author">Author: Marius Peter</p>
239
Added:
<p class="date">Created: 2021-09-29 Wed 19:37</p>
240
Added:
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
241
Added:
</div>
242
Added:
</body>
243
Added:
</html>
site/index.org
@@ -0,0 +1,141 @@
1
Added:
# -*- mode: org; -*-
2
Added:
3
Added:
#+TITLE: Smart Documents
4
Added:
#+AUTHOR: Marius Peter
5
Added:
#+DATE: <2021-02-09 Tue>
6
Added:
#+EMAIL: smart-documents@tuta.io
7
Added:
#+OPTIONS: toc:nil html-style:nil num:nil title:nil
8
Added:
#+MACRO: SD =Smart Document=
9
Added:
#+MACRO: SDs =Smart Documents=
10
Added:
11
Added:
#+SETUPFILE: /home/blendux/.emacs.d/resources/templates/documents/gnu-default.setup
12
Added:
#+INCLUDE: page-header.html export html
13
Added:
14
Added:
#+begin_export html
15
Added:
<section id="sd-intro-card" aria-label="Introduction">
16
Added:
<div class="grid-container">
17
Added:
<div class="usa-hero__callout">
18
Added:
<h1 class="usa-hero__heading">
19
Added:
<span class="usa-hero__heading--alt">Emacs</span> but
20
Added:
accessible & beautiful.
21
Added:
</h1>
22
Added:
<p>
23
Added:
Smart Documents is a document production system created to
24
Added:
raise mainstream awareness of
25
Added:
the <a href="https://www.gnu.org/software/emacs/">Emacs</a>
26
Added:
software on which it is based.
27
Added:
</p>
28
Added:
<a class="usa-button" href="https://github.com/Blendoit/.emacs.d">Try it now!</a>
29
Added:
</div>
30
Added:
</div>
31
Added:
</section>
32
Added:
#+end_export
33
Added:
34
Added:
#+begin_export html
35
Added:
<div class="usa-section">
36
Added:
<div class="grid-container">
37
Added:
<div class="grid-row grid-gap">
38
Added:
<main class="usa-layout-docs__main desktop:grid-col-9 usa-prose usa-layout-docs" id="main-content">
39
Added:
#+end_export
40
Added:
41
Added:
The self-publishing publishing tool
42
Added:
43
Added:
As in, this website is a {{{SD}}} that exists just as comfortably as
44
Added:
HTML (what you are most likely viewing now) as PDF.
45
Added:
46
Added:
- This website is a {{{SD}}} comprised of different {{{SDs}}}.
47
Added:
48
Added:
- This is
49
Added:
50
Added:
* Perfect documents every time.
51
Added:
:PROPERTIES:
52
Added:
:CUSTOM_ID: perfect-document
53
Added:
:END:
54
Added:
55
Added:
Focus on your content and let the powerful export engine work out the
56
Added:
appearance, for flawless results every time.
57
Added:
58
Added:
* Maximum productivity.
59
Added:
:PROPERTIES:
60
Added:
:CUSTOM_ID: easy-document
61
Added:
:END:
62
Added:
63
Added:
Collect feedback and create new document versions through an efficient
64
Added:
wizard.
65
Added:
66
Added:
* Everything linked together.
67
Added:
:PROPERTIES:
68
Added:
:CUSTOM_ID: linked-document
69
Added:
:END:
70
Added:
71
Added:
Create links between files to keep track of dates, people, tags, and
72
Added:
compile them into neatly filtered agendas---perfect for sharing a
73
Added:
project status or roadmap!
74
Added:
75
Added:
* COMMENT A single authoritative document.
76
Added:
:PROPERTIES:
77
Added:
:CUSTOM_ID: single-document
78
Added:
:END:
79
Added:
80
Added:
#+NAME: pdf-icon
81
Added:
#+ATTR_HTML: :height 100px
82
Added:
#+ATTR_LATEX: :height 100px
83
Added:
[[file:assets/images/PDF-icon.png]]
84
Added:
85
Added:
#+NAME: powerpoint-icon
86
Added:
#+ATTR_HTML: :height 100px
87
Added:
#+ATTR_LATEX: :height 100px
88
Added:
[[file:assets/images/PowerPoint-icon.png]]
89
Added:
90
Added:
#+NAME: html-icon
91
Added:
#+ATTR_HTML: :height 100px
92
Added:
#+ATTR_LATEX: :height 100px
93
Added:
[[file:assets/images/html-icon.png]]
94
Added:
95
Added:
Each document can be declined into a report, a presentation
96
Added:
summarizing the document's outline, or a website page that can be
97
Added:
added to your wiki.
98
Added:
99
Added:
* COMMENT Program your documents.
100
Added:
:PROPERTIES:
101
Added:
:CUSTOM_ID: single-document
102
Added:
:END:
103
Added:
104
Added:
Program your documents in your favorite language. Python, C++, Go,
105
Added:
Clojure, you name it---you can develop interactive features from
106
Added:
within the document itself.
107
Added:
108
Added:
* Download
109
Added:
110
Added:
You can download the current development snapshot on GitHub.
111
Added:
112
Added:
#+begin_export html
113
Added:
<a class="usa-button" href="https://github.com/Blendoit/.emacs.d">Github</a>
114
Added:
#+end_export
115
Added:
116
Added:
# #+begin_button
117
Added:
# [[https://github.com/Blendoit/.emacs.d][Download]]
118
Added:
# #+end_button
119
Added:
120
Added:
* Support this project
121
Added:
122
Added:
#+begin_export html
123
Added:
<a class="usa-button" href="https://venmo.com/blendoit">Venmo</a>
124
Added:
#+end_export
125
Added:
126
Added:
# #+begin_button
127
Added:
# [[https://venmo.com/blendoit][Venmo]]
128
Added:
# #+end_button
129
Added:
130
Added:
* Contact
131
Added:
132
Added:
For all inquiries, please send an e-mail to [[mailto:smart-documents@tuta.io][smart-documents@tuta.io]].
133
Added:
134
Added:
# Dirty! :P
135
Added:
#+begin_export html
136
Added:
</div>
137
Added:
</main>
138
Added:
</div>
139
Added:
</div>
140
Added:
</div>
141
Added:
#+end_export
site/index.pdf
Binary files differ
site/jobs.org
@@ -0,0 +1,121 @@
1
Added:
# -*- mode: org; -*-
2
Added:
3
Added:
#+TITLE: My job is...
4
Added:
#+AUTHOR: Marius Peter
5
Added:
#+DATE: <2021-02-09 Tue>
6
Added:
7
Added:
#+INCLUDE: page-header.html export html
8
Added:
9
Added:
#+begin_export html
10
Added:
<div class="usa-section">
11
Added:
<div class="grid-container">
12
Added:
<div class="grid-row grid-gap">
13
Added:
<div class="usa-layout-docs__sidenav desktop:grid-col-3">
14
Added:
<nav aria-label="Secondary navigation">
15
Added:
<ul class="usa-sidenav sd-sidenav">
16
Added:
<li class="usa-sidenav__item">
17
Added:
<a href="">Parent link</a>
18
Added:
</li><li class="usa-sidenav__item">
19
Added:
<a href="" class="usa-current">Current page
20
Added:
</a><ul class="usa-sidenav__sublist">
21
Added:
<li class="usa-sidenav__item">
22
Added:
<a href="">Child link</a>
23
Added:
</li><li class="usa-sidenav__item">
24
Added:
<a href="" class="usa-current">Child link</a><ul class="usa-sidenav__sublist">
25
Added:
<li class="usa-sidenav__item">
26
Added:
<a href="">Grandchild link</a>
27
Added:
</li><li class="usa-sidenav__item">
28
Added:
<a href="">Grandchild link</a>
29
Added:
</li><li class="usa-sidenav__item">
30
Added:
<a href="" class="usa-current">Grandchild link</a>
31
Added:
</li><li class="usa-sidenav__item">
32
Added:
<a href="">Grandchild link</a>
33
Added:
</li>
34
Added:
</ul>
35
Added:
</li><li class="usa-sidenav__item">
36
Added:
<a href="">Child link</a>
37
Added:
</li><li class="usa-sidenav__item">
38
Added:
<a href="">Child link</a>
39
Added:
</li><li class="usa-sidenav__item">
40
Added:
<a href="">Child link</a>
41
Added:
</li>
42
Added:
</ul>
43
Added:
</li><li class="usa-sidenav__item">
44
Added:
<a href="">Parent link</a>
45
Added:
</li>
46
Added:
</ul>
47
Added:
</nav>
48
Added:
49
Added:
</div>
50
Added:
51
Added:
<main class="usa-layout-docs__main desktop:grid-col-9 usa-prose usa-layout-docs" id="main-content">
52
Added:
#+end_export
53
Added:
54
Added:
* Educators & Academics
55
Added:
56
Added:
** Teacher
57
Added:
58
Added:
*** Kindergarten
59
Added:
60
Added:
*** Middle School
61
Added:
62
Added:
*** High School
63
Added:
64
Added:
** Student
65
Added:
66
Added:
*** Middle and High School
67
Added:
68
Added:
*** College
69
Added:
70
Added:
**** MLA
71
Added:
**** APA
72
Added:
73
Added:
** Professor
74
Added:
75
Added:
*** Syllabus
76
Added:
77
Added:
*** Homework assignment
78
Added:
79
Added:
** Researchers
80
Added:
81
Added:
*** Thesis
82
Added:
83
Added:
* Businesspersons
84
Added:
85
Added:
** Reports
86
Added:
87
Added:
* Legal
88
Added:
89
Added:
** Lawyer
90
Added:
91
Added:
** Judge
92
Added:
93
Added:
** Stenographer
94
Added:
95
Added:
* Technicians
96
Added:
97
Added:
** Engineer
98
Added:
99
Added:
** Product Line Manager
100
Added:
101
Added:
* Managers & Executives
102
Added:
103
Added:
** CEO
104
Added:
105
Added:
** Board Member
106
Added:
107
Added:
** Manager
108
Added:
109
Added:
* Artists
110
Added:
111
Added:
** Painter
112
Added:
113
Added:
** Screenwriter
114
Added:
115
Added:
#+begin_export html
116
Added:
</main>
117
Added:
</div>
118
Added:
</div>
119
Added:
</div>
120
Added:
#+end_export
121
Added:
site/original-paper.org
@@ -0,0 +1,64 @@
1
Added:
# -*- mode: org; -*-
2
Added:
3
Added:
#+TITLE: The Original Paper
4
Added:
#+AUTHOR: Marius Peter
5
Added:
#+DATE: <2021-03-01 Mon>
6
Added:
#+EMAIL: smart-documents@tuta.io
7
Added:
8
Added:
#+INCLUDE: page-header.html export html
9
Added:
10
Added:
#+begin_export html
11
Added:
<div class="usa-section">
12
Added:
<div class="grid-container">
13
Added:
<div class="grid-row grid-gap">
14
Added:
<div class="usa-layout-docs__sidenav desktop:grid-col-3">
15
Added:
<nav aria-label="Secondary navigation">
16
Added:
<ul class="usa-sidenav sd-sidenav">
17
Added:
<li class="usa-sidenav__item">
18
Added:
<a href="">Parent link</a>
19
Added:
</li><li class="usa-sidenav__item">
20
Added:
<a href="" class="usa-current">Current page
21
Added:
</a><ul class="usa-sidenav__sublist">
22
Added:
<li class="usa-sidenav__item">
23
Added:
<a href="">Child link</a>
24
Added:
</li><li class="usa-sidenav__item">
25
Added:
<a href="" class="usa-current">Child link</a><ul class="usa-sidenav__sublist">
26
Added:
<li class="usa-sidenav__item">
27
Added:
<a href="">Grandchild link</a>
28
Added:
</li><li class="usa-sidenav__item">
29
Added:
<a href="">Grandchild link</a>
30
Added:
</li><li class="usa-sidenav__item">
31
Added:
<a href="" class="usa-current">Grandchild link</a>
32
Added:
</li><li class="usa-sidenav__item">
33
Added:
<a href="">Grandchild link</a>
34
Added:
</li>
35
Added:
</ul>
36
Added:
</li><li class="usa-sidenav__item">
37
Added:
<a href="">Child link</a>
38
Added:
</li><li class="usa-sidenav__item">
39
Added:
<a href="">Child link</a>
40
Added:
</li><li class="usa-sidenav__item">
41
Added:
<a href="">Child link</a>
42
Added:
</li>
43
Added:
</ul>
44
Added:
</li><li class="usa-sidenav__item">
45
Added:
<a href="">Parent link</a>
46
Added:
</li>
47
Added:
</ul>
48
Added:
</nav>
49
Added:
50
Added:
</div>
51
Added:
52
Added:
<main class="usa-layout-docs__main desktop:grid-col-9 usa-prose usa-layout-docs" id="main-content">
53
Added:
#+end_export
54
Added:
55
Added:
* My Configuration for Emacs
56
Added:
57
Added:
#+INCLUDE: ~/.emacs.d/smart-documents.org
58
Added:
59
Added:
#+begin_export html
60
Added:
</main>
61
Added:
</div>
62
Added:
</div>
63
Added:
</div>
64
Added:
#+end_export
site/ox-html-uswds-components.el
@@ -0,0 +1,148 @@
1
Added:
;;; ox-html-uswds-components.el --- Transcription functions for all USWDS components, -*- lexical-binding: t; -*-
2
Added:
;; Copyright (C) 2021 Marius Peter
3
Added:
4
Added:
;; Author: Marius Peter (rot13 "?znevhf.crgre@ghgnabgn.pbz")
5
Added:
;; Created: March 2021
6
Added:
;; Package-Version: 0.1
7
Added:
;; Keywords: org export publish html
8
Added:
;; Homepage: http://www.smart-documents.org
9
Added:
10
Added:
;; This file is not part of GNU Emacs.
11
Added:
12
Added:
;;; License:
13
Added:
;; This program is free software; you can redistribute it and/or modify
14
Added:
;; it under the terms of the GNU General Public License as published by
15
Added:
;; the Free Software Foundation, either version 3 of the License, or
16
Added:
;; (at your option) any later version.
17
Added:
;;
18
Added:
;; This program is distributed in the hope that it will be useful,
19
Added:
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20
Added:
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
Added:
;; GNU General Public License for more details.
22
Added:
;;
23
Added:
;; You should have received a copy of the GNU General Public License
24
Added:
;; along with this file. If not, see <http://www.gnu.org/licenses/>.
25
Added:
;;; Commentary:
26
Added:
27
Added:
;; These are all the components made available by the USDWS.
28
Added:
29
Added:
;;; Code:
30
Added:
31
Added:
(defun uswds-component-accordion (contents)
32
Added:
(format "<script>%s</script>" contents))
33
Added:
34
Added:
(defun uswds-component-alert-info (contents)
35
Added:
(format "<div class=\"usa-alert usa-alert--info\" >
36
Added:
<div class=\"usa-alert__body\">
37
Added:
<h3 class=\"usa-alert__heading\">Informative status</h3>
38
Added:
<p class=\"usa-alert__text\">%s</p>
39
Added:
</div>
40
Added:
</div>" contents))
41
Added:
42
Added:
(defun uswds-component-alert-warning (contents)
43
Added:
(format "<div class=\"usa-alert usa-alert--warning\" >
44
Added:
<div class=\"usa-alert__body\">
45
Added:
<h3 class=\"usa-alert__heading\">Warning status</h3>
46
Added:
<p class=\"usa-alert__text\">%s</p>
47
Added:
</div>
48
Added:
</div>" contents))
49
Added:
50
Added:
(defun uswds-component-alert-error (contents)
51
Added:
(format "<div class=\"usa-alert usa-alert--error\" >
52
Added:
<div class=\"usa-alert__body\">
53
Added:
<h3 class=\"usa-alert__heading\">Error status</h3>
54
Added:
<p class=\"usa-alert__text\">%s</p>
55
Added:
</div>
56
Added:
</div>" contents))
57
Added:
58
Added:
(defun uswds-component-alert-success (contents)
59
Added:
(format "<div class=\"usa-alert usa-alert--success\" >
60
Added:
<div class=\"usa-alert__body\">
61
Added:
<h3 class=\"usa-alert__heading\">Success status</h3>
62
Added:
<p class=\"usa-alert__text\">%s</p>
63
Added:
</div>
64
Added:
</div>" contents))
65
Added:
66
Added:
(defun uswds-component-alert-slim (contents)
67
Added:
(format "<div class=\"usa-alert usa-alert--slim\" >
68
Added:
<div class=\"usa-alert__body\">
69
Added:
<p class=\"usa-alert__text\">%s</p>
70
Added:
</div>
71
Added:
</div>" contents))
72
Added:
73
Added:
(defun uswds-component-alert-no-icon (contents)
74
Added:
(format "<div class=\"usa-alert usa-alert--no-icon\" >
75
Added:
<div class=\"usa-alert__body\">
76
Added:
<p class=\"usa-alert__text\">%s</p>
77
Added:
</div>
78
Added:
</div>" contents))
79
Added:
80
Added:
(defun uswds-component-banner (contents)
81
Added:
(format "<style type=\"text/css\">%s</style>" contents))
82
Added:
83
Added:
(defun uswds-component-breadcrumb (contents)
84
Added:
(format "<style type=\"text/css\">%s</style>" contents))
85
Added:
86
Added:
(defun uswds-component-button (contents)
87
Added:
;; <a class=\"usa-button\" href=\"https://github.com/Blendoit/.emacs.d\">%s</a>
88
Added:
(format "<a class=\"usa-button\">%s</a>" contents))
89
Added:
90
Added:
(defun uswds-component-button-group (contents)
91
Added:
(format "<style type=\"text/css\">%s</style>" contents))
92
Added:
93
Added:
(defun uswds-component-card (contents)
94
Added:
(format "<style type=\"text/css\">%s</style>" contents))
95
Added:
96
Added:
(defun uswds-component-collection (contents)
97
Added:
(format "<style type=\"text/css\">%s</style>" contents))
98
Added:
99
Added:
(defun uswds-component-footer (contents)
100
Added:
(format "<style type=\"text/css\">%s</style>" contents))
101
Added:
102
Added:
;; TODO form controls and templates
103
Added:
(defun uswds-component-grid (contents)
104
Added:
(format "<style type=\"text/css\">%s</style>" contents))
105
Added:
106
Added:
(defun uswds-component-header (contents)
107
Added:
(format "<style type=\"text/css\">%s</style>" contents))
108
Added:
109
Added:
;; TODO icons
110
Added:
111
Added:
(defun uswds-component-identifier (contents)
112
Added:
(format "<style type=\"text/css\">%s</style>" contents))
113
Added:
114
Added:
(defun uswds-component-process (contents)
115
Added:
(format "<style type=\"text/css\">%s</style>" contents))
116
Added:
117
Added:
(defun uswds-component-search (contents)
118
Added:
(format "<style type=\"text/css\">%s</style>" contents))
119
Added:
120
Added:
(defun uswds-component-side (contents)
121
Added:
(format "<style type=\"text/css\">%s</style>" contents))
122
Added:
123
Added:
(defun uswds-component-site (contents)
124
Added:
(format "<style type=\"text/css\">%s</style>" contents))
125
Added:
126
Added:
(defun uswds-component-step (contents)
127
Added:
(format "<style type=\"text/css\">%s</style>" contents))
128
Added:
129
Added:
(defun uswds-component-summary (contents)
130
Added:
(format "<style type=\"text/css\">%s</style>" contents))
131
Added:
132
Added:
;; TODO table?
133
Added:
134
Added:
(defun uswds-component-tag (contents)
135
Added:
(format "<span class=\"usa-tag\">%s</span>" contents))
136
Added:
137
Added:
(defun uswds-component-tooltip (contents)
138
Added:
(format "<style type=\"text/css\">%s</style>" contents))
139
Added:
140
Added:
(defun uswds-component-tooltip (contents)
141
Added:
(format "<style type=\"text/css\">%s</style>" contents))
142
Added:
143
Added:
(defun uswds-component-tooltip (contents)
144
Added:
(format "<style type=\"text/css\">%s</style>" contents))
145
Added:
146
Added:
(provide 'ox-html-uswds-components)
147
Added:
;;; ox-html-uswds-components.el ends here
148
Added:
site/ox-html-uswds.el
@@ -0,0 +1,672 @@
1
Added:
;;; ox-slimhtml.el --- an HTML org export backend for the USWDS -*- lexical-binding: t; -*-
2
Added:
;; Copyright (C) 2021 Marius Peter
3
Added:
4
Added:
;; Author: Marius Peter (rot13 "?znevhf.crgre@ghgnabgn.pbz")
5
Added:
;; Created: March 2021
6
Added:
;; Package-Version: 0.1
7
Added:
;; Keywords: org export publish html
8
Added:
;; Homepage: http://www.smart-documents.org
9
Added:
10
Added:
;; This file is not part of GNU Emacs.
11
Added:
12
Added:
;;; License:
13
Added:
;; This program is free software; you can redistribute it and/or modify
14
Added:
;; it under the terms of the GNU General Public License as published by
15
Added:
;; the Free Software Foundation, either version 3 of the License, or
16
Added:
;; (at your option) any later version.
17
Added:
;;
18
Added:
;; This program is distributed in the hope that it will be useful,
19
Added:
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20
Added:
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
Added:
;; GNU General Public License for more details.
22
Added:
;;
23
Added:
;; You should have received a copy of the GNU General Public License
24
Added:
;; along with this file. If not, see <http://www.gnu.org/licenses/>.
25
Added:
26
Added:
;;; Commentary:
27
Added:
;; html-uswds is an Org mode export backend derived from the
28
Added:
;; `ox-slimhtml' backend. It is intended to produce HTML compatible
29
Added:
;; with the USWDS (https://designsystem.digital.gov/). A key feature
30
Added:
;; of resulting web pages is their accessibility---the USWDS initially
31
Added:
;; caters to American federal agencies wishing to adopt a common
32
Added:
;; design language intelligible for all cultures and levels of
33
Added:
;; computer literacy.
34
Added:
35
Added:
;;; Code:
36
Added:
(require 'ox-html)
37
Added:
(require 'cl-lib)
38
Added:
39
Added:
;; formatting
40
Added:
;; #+BEGIN_EXAMPLE
41
Added:
;; ,*bold* # <strong>bold</strong>
42
Added:
;; /italic/ # <em>italic</em>
43
Added:
;; =verbatim= # <kbd>verbatim</kbd>
44
Added:
;; #+END_EXAMPLE
45
Added:
46
Added:
(defun ox-html-uswds-bold (bold contents info)
47
Added:
"Transcode BOLD from Org to HTML.
48
Added:
49
Added:
CONTENTS is the text with bold markup.
50
Added:
INFO is a plist holding contextual information."
51
Added:
(when contents (format "<strong>%s</strong>" contents)))
52
Added:
53
Added:
(defun ox-html-uswds-italic (italic contents info)
54
Added:
"Transcode ITALIC from Org to HTML.
55
Added:
56
Added:
CONTENTS is the text with italic markup.
57
Added:
INFO is a plist holding contextual information."
58
Added:
(when contents (format "<em>%s</em>" contents)))
59
Added:
60
Added:
(defun ox-html-uswds-verbatim (verbatim contents info)
61
Added:
"Transcode VERBATIM string from Org to HTML.
62
Added:
63
Added:
CONTENTS is nil.
64
Added:
INFO is a plist holding contextual information."
65
Added:
(let ((contents (org-html-encode-plain-text
66
Added:
(org-element-property :value verbatim))))
67
Added:
(when contents (format "<kbd>%s</kbd>" contents))))
68
Added:
69
Added:
;; headlines
70
Added:
;; #+BEGIN_EXAMPLE
71
Added:
;; ,* headline text # <section class="container">
72
Added:
;; :PROPERTIES: # <h1 class="headline">headline text</h1>
73
Added:
;; :attr_html: :class headline # </section>
74
Added:
;; :html_container: section
75
Added:
;; :html_container_class: container
76
Added:
;; :END:
77
Added:
78
Added:
;; ,#+OPTIONS: H:[headline level]
79
Added:
;; ,#+HTML_CONTAINER: [default container]
80
Added:
;; #+END_EXAMPLE
81
Added:
82
Added:
(defun ox-html-uswds-headline (headline contents info)
83
Added:
"Transcode HEADLINE from Org to HTML.
84
Added:
85
Added:
CONTENTS is the section as defined under the HEADLINE.
86
Added:
INFO is a plist holding contextual information."
87
Added:
(let* ((text (org-export-data (org-element-property :title headline) info))
88
Added:
(level (org-export-get-relative-level headline info))
89
Added:
(attributes (org-element-property :ATTR_HTML headline))
90
Added:
(container (org-element-property :HTML_CONTAINER headline))
91
Added:
(container-class (and container (org-element-property :HTML_CONTAINER_CLASS headline))))
92
Added:
(when attributes
93
Added:
(setq attributes
94
Added:
(format " %s" (org-html--make-attribute-string
95
Added:
(org-export-read-attribute 'attr_html `(nil
96
Added:
(attr_html ,(split-string attributes))))))))
97
Added:
(concat
98
Added:
(when (and container (not (string= "" container)))
99
Added:
(format "<%s%s>" container (if container-class (format " class=\"%s\"" container-class) "")))
100
Added:
(if (not (org-export-low-level-p headline info))
101
Added:
(format "<h%d%s>%s</h%d>%s" level (or attributes "") text level (or contents ""))
102
Added:
(concat
103
Added:
(when (org-export-first-sibling-p headline info) "<ul>")
104
Added:
(format "<li>%s%s</li>" text (or contents ""))
105
Added:
(when (org-export-last-sibling-p headline info) "</ul>")))
106
Added:
(when (and container (not (string= "" container)))
107
Added:
(format "</%s>" (cl-subseq container 0 (cl-search " " container)))))))
108
Added:
109
Added:
;; sections
110
Added:
111
Added:
(defun ox-html-uswds-section (section contents info)
112
Added:
"Transcode a SECTION element from Org to HTML.
113
Added:
114
Added:
CONTENTS is the contents of the section.
115
Added:
INFO is a plist holding contextual information.
116
Added:
117
Added:
Sections are child elements of org headlines;
118
Added:
'container' settings are found in slim-headlines."
119
Added:
contents)
120
Added:
121
Added:
;; links
122
Added:
;; #+BEGIN_EXAMPLE
123
Added:
;; ,#+attr_html: :class link # <a href="link" class="link">content</a>
124
Added:
;; [[link][content]]
125
Added:
126
Added:
;; ,#+OPTIONS: html-link-org-files-as-html:[t/nil] || org-html-link-org-files-as-html
127
Added:
;; ,#+HTML_EXTENSION: [html] || org-html-extension
128
Added:
129
Added:
;; ,#+OPTIONS: html-link-use-abs-url:[t/nil] || org-html-link-use-abs-url
130
Added:
;; #+END_EXAMPLE
131
Added:
132
Added:
(defun ox-html-uswds-link (link contents info)
133
Added:
"Transcode LINK from Org to HTML.
134
Added:
135
Added:
CONTENTS is the text of the link.
136
Added:
INFO is a plist holding contextual information."
137
Added:
(if (ox-html-uswds--immediate-child-of-p link 'link) (org-element-property :raw-link link)
138
Added:
(if (not contents) (format "<em>%s</em>" (org-element-property :path link))
139
Added:
(let ((link-type (org-element-property :type link))
140
Added:
(href (org-element-property :raw-link link))
141
Added:
(attributes (if (ox-html-uswds--immediate-child-of-p link 'paragraph)
142
Added:
(ox-html-uswds--attr (org-export-get-parent link))
143
Added:
""))
144
Added:
(element "<a href=\"%s\"%s>%s</a>"))
145
Added:
(cond ((string= "file" link-type)
146
Added:
(let ((html-extension (or (plist-get info :html-extension) ""))
147
Added:
(use-abs-url (plist-get info :html-link-use-abs-url))
148
Added:
(link-org-files-as-html (plist-get info :html-link-org-as-html))
149
Added:
(path (or (org-element-property :path link) "")))
150
Added:
(format element
151
Added:
(concat (if (and use-abs-url (file-name-absolute-p path)) "file:" "")
152
Added:
(if (and link-org-files-as-html (string= "org" (downcase (or (file-name-extension path) ""))))
153
Added:
(if (and html-extension (not (string= "" html-extension)))
154
Added:
(concat (file-name-sans-extension path) "." html-extension)
155
Added:
(file-name-sans-extension path))
156
Added:
path))
157
Added:
attributes contents)))
158
Added:
(t
159
Added:
(format element href attributes contents)))))))
160
Added:
161
Added:
;; plain lists
162
Added:
;; #+BEGIN_EXAMPLE
163
Added:
;; ,#+attr_html: :class this # <ul class="this">
164
Added:
;; - item 1 # <li>item 1</li>
165
Added:
;; - item 2 # <li>item 2</li>
166
Added:
;; # </ul>
167
Added:
168
Added:
;; + item 1 # <ol><li>item 1</li></ol>
169
Added:
;; - definition :: list # <dl><dt>definition</dt><dd>list</dd></dl>
170
Added:
;; #+END_EXAMPLE
171
Added:
172
Added:
(defun ox-html-uswds-plain-list (plain-list contents info)
173
Added:
"Transcode a PLAIN-LIST string from Org to HTML.
174
Added:
175
Added:
CONTENTS is the contents of the list element.
176
Added:
INFO is a plist holding contextual information."
177
Added:
(when contents
178
Added:
(let ((type (cl-case (org-element-property :type plain-list)
179
Added:
(ordered "ol")
180
Added:
(unordered "ul")
181
Added:
(descriptive "dl"))))
182
Added:
(format "<%s%s>%s</%s>" type (ox-html-uswds--attr plain-list) contents type))))
183
Added:
184
Added:
;; paragraphs
185
Added:
;; #+BEGIN_EXAMPLE
186
Added:
;; ,#+attr_html: :class this # <p class="this">content</p>
187
Added:
;; content
188
Added:
;; #+END_EXAMPLE
189
Added:
190
Added:
(defun ox-html-uswds-paragraph (paragraph contents info)
191
Added:
"Transcode a PARAGRAPH element from Org to HTML.
192
Added:
193
Added:
CONTENTS is the contents of the paragraph.
194
Added:
INFO is a plist holding contextual information."
195
Added:
(when contents
196
Added:
(if (or (ox-html-uswds--immediate-child-of-p paragraph 'item)
197
Added:
(ox-html-uswds--immediate-child-of-p paragraph 'special-block))
198
Added:
contents
199
Added:
(if (ox-html-uswds--has-immediate-child-of-p paragraph 'link)
200
Added:
(format "<p>%s</p>" contents)
201
Added:
(format "<p%s>%s</p>" (ox-html-uswds--attr paragraph) contents)))))
202
Added:
203
Added:
;; examples
204
Added:
;; #+BEGIN_EXAMPLE
205
Added:
;; ,#+BEGIN_EXAMPLE # content
206
Added:
;; content
207
Added:
;; ,#+END_EXAMPLE
208
Added:
;; #+END_EXAMPLE
209
Added:
210
Added:
(defun ox-html-uswds-example-block (example-block contents info)
211
Added:
"Transcode an EXAMPLE-BLOCK element from Org to HTML.
212
Added:
213
Added:
CONTENTS is nil. INFO is a plist holding contextual information."
214
Added:
(let ((code (org-html-format-code example-block info)))
215
Added:
(when code
216
Added:
(format "<pre><code class=\"%s\">%s</code></pre>"
217
Added:
(or (org-element-property :language example-block) "example")
218
Added:
code))))
219
Added:
220
Added:
;; raw html
221
Added:
;; #+BEGIN_EXAMPLE
222
Added:
;; ,#+BEGIN_EXPORT html # <span>export block</span>
223
Added:
;; <span>export block</span>
224
Added:
;; ,#+END_EXPORT
225
Added:
226
Added:
;; ,#+BEGIN_EXPORT javascript # <script>console.log()</script>
227
Added:
;; console.log()
228
Added:
;; ,#+END_EXPORT
229
Added:
230
Added:
;; ,#+BEGIN_EXPORT css # <style type="text/css">span{}</style>
231
Added:
;; span {}
232
Added:
;; ,#+END_EXPORT
233
Added:
;; #+END_EXAMPLE
234
Added:
235
Added:
(defun ox-html-uswds-export-block (export-block contents info)
236
Added:
"Transcode an EXPORT-BLOCK element from Org to HTML.
237
Added:
CONTENTS is nil. INFO is a plist holding contextual information."
238
Added:
(let ((contents (org-element-property :value export-block))
239
Added:
(language (org-element-property :type export-block)))
240
Added:
(when contents
241
Added:
(cond ((string= "JAVASCRIPT" language)
242
Added:
(format "<script>%s</script>" contents))
243
Added:
((string= "CSS" language)
244
Added:
(format "<style type=\"text/css\">%s</style>" contents))
245
Added:
(t
246
Added:
(org-remove-indentation contents))))))
247
Added:
248
Added:
;; snippet
249
Added:
;; #+BEGIN_EXAMPLE
250
Added:
;; @@html:<span>snippet</span>@@ # <span>snippet</span>
251
Added:
;; #+END_EXAMPLE
252
Added:
253
Added:
(defun ox-html-uswds-export-snippet (export-snippet contents info)
254
Added:
"Transcode a EXPORT-SNIPPET object from Org to HTML.
255
Added:
256
Added:
CONTENTS is nil. INFO is a plist holding contextual information."
257
Added:
(let ((contents (org-element-property :value export-snippet)))
258
Added:
(when contents contents)))
259
Added:
260
Added:
;; special block
261
Added:
;; #+BEGIN_EXAMPLE
262
Added:
;; ,#+attr_html: :type text/css # <style type="text/css">
263
Added:
;; ,#+BEGIN_STYLE # p { font-weight:500; }
264
Added:
;; p { font-weight:500; } # </style>
265
Added:
;; ,#+END_STYLE
266
Added:
;; #+END_EXAMPLE
267
Added:
268
Added:
(load-file "./ox-html-uswds-components.el")
269
Added:
270
Added:
(defun ox-html-uswds-special-block (special-block contents info)
271
Added:
"Transcode SPECIAL-BLOCK from Org to HTML.
272
Added:
273
Added:
CONTENTS is the text within the #+BEGIN_ and #+END_ markers.
274
Added:
INFO is a plist holding contextual information."
275
Added:
(when contents
276
Added:
(let ((block-type (downcase (org-element-property :type special-block))))
277
Added:
(cond ((string= "accordion" block-type)(uswds-component-accordion contents))
278
Added:
((string= "alert-info" block-type) (uswds-component-alert-info contents))
279
Added:
((string= "alert-warning" block-type) (uswds-component-alert-warning contents))
280
Added:
((string= "alert-error" block-type) (uswds-component-alert-error contents))
281
Added:
((string= "alert-success" block-type) (uswds-component-alert-success contents))
282
Added:
((string= "alert-slim" block-type) (uswds-component-alert-slim contents))
283
Added:
((string= "alert-no-icon" block-type) (uswds-component-alert-no-icon contents))
284
Added:
((string= "banner" block-type) (uswds-component-banner contents))
285
Added:
((string= "breadcrumb" block-type) (uswds-component-breadcrumb contents))
286
Added:
((string= "button" block-type) (uswds-component-button contents))
287
Added:
((string= "button-group" block-type) (uswds-component-button-group contents))
288
Added:
((string= "card" block-type) (uswds-component-card contents))
289
Added:
((string= "collection" block-type) (uswds-component-collection contents))
290
Added:
((string= "footer" block-type) (uswds-component-footer contents))
291
Added:
;; TODO form controls and templates
292
Added:
((string= "grid" block-type) (uswds-component-grid contents))
293
Added:
((string= "header" block-type) (uswds-component-header contents))
294
Added:
;; TODO icons
295
Added:
((string= "identifier" block-type) (uswds-component-identifier contents))
296
Added:
((string= "process-list" block-type) (uswds-component-process contents))
297
Added:
((string= "search" block-type) (uswds-component-search contents))
298
Added:
((string= "side-navigation" block-type) (uswds-component-side contents))
299
Added:
((string= "site-alert" block-type) (uswds-component-site-alert contents))
300
Added:
((string= "step-indicator" block-type) (uswds-component-step-indicator contents))
301
Added:
((string= "summary-box" block-type) (uswds-component-summary-box contents))
302
Added:
;; TODO table?
303
Added:
((string= "tag" block-type) (uswds-component-tag contents))
304
Added:
((string= "tooltip" block-type) (uswds-component-tooltip contents))
305
Added:
(t (format "<div>\n%s No suitable special block found. \n</div>" contents))))))
306
Added:
307
Added:
;; source code
308
Added:
;; #+BEGIN_EXAMPLE
309
Added:
;; ,#+BEGIN_SRC javascript # <pre>
310
Added:
;; code # <code class="javascript">code</code>
311
Added:
;; ,#+END_SRC # </pre>
312
Added:
;; #+END_EXAMPLE
313
Added:
314
Added:
(defun ox-html-uswds-src-block (src-block contents info)
315
Added:
"Transcode SRC-BLOCK from Org to HTML.
316
Added:
317
Added:
CONTENTS is the text of a #+BEGIN_SRC...#+END_SRC block.
318
Added:
INFO is a plist holding contextual information."
319
Added:
(let ((code (org-html-format-code src-block info))
320
Added:
(language (org-element-property :language src-block)))
321
Added:
(when code
322
Added:
(format "<pre><code class=\"%s\"%s>%s</code></pre>"
323
Added:
language (ox-html-uswds--attr src-block) code))))
324
Added:
325
Added:
;; body
326
Added:
;; #+BEGIN_EXAMPLE
327
Added:
;; ,#+HTML_PREAMBLE: preamble {{{macro}}} # preamble
328
Added:
;; content # content
329
Added:
;; ,#+HTML_POSTAMBLE: postamble {{{macro}}} # postamble
330
Added:
;; #+END_EXAMPLE
331
Added:
332
Added:
(defun ox-html-uswds-inner-template (contents info)
333
Added:
"Return body of document string after HTML conversion.
334
Added:
335
Added:
CONTENTS is the transcoded contents string.
336
Added:
INFO is a plist holding export options."
337
Added:
(when (and contents (not (string= "" contents)))
338
Added:
(let ((container (plist-get info :html-container)))
339
Added:
(concat
340
Added:
(when (and container (not (string= "" container))) (format "<%s>" container))
341
Added:
(or (ox-html-uswds--expand-macros (plist-get info :html-preamble) info) "")
342
Added:
contents
343
Added:
(or (ox-html-uswds--expand-macros (plist-get info :html-postamble) info) "")
344
Added:
(when (and container (not (string= "" container)))
345
Added:
(format "</%s>" (cl-subseq container 0 (cl-search " " container))))))))
346
Added:
347
Added:
;; html page
348
Added:
;; #+BEGIN_EXAMPLE
349
Added:
;; ,#+HTML_DOCTYPE: || org-html-doctype # <!DOCTYPE html> ; html5
350
Added:
;; ,#+HTML_HEAD: || org-html-head # <html lang="en"> ; when language is set
351
Added:
;; ,#+HTML_TITLE: %t # <head>
352
Added:
;; ,#+HTML_HEAD_EXTRA: || org-html-head-extra # head
353
Added:
;; ,#+HTML_BODY_ATTR: id="test" # <title>document title</title>
354
Added:
;; ,#+HTML_HEADER: {{{macro}}} # head-extra
355
Added:
;; ,#+HTML_FOOTER: {{{macro}}} # </head>
356
Added:
;; # <body id="test">
357
Added:
;; # header
358
Added:
;; # content
359
Added:
;; # footer
360
Added:
;; # </body>
361
Added:
;; # </html>
362
Added:
363
Added:
;; {{{macro}}} tokens can also be set in INFO;
364
Added:
;; :html-head, :html-head-extra and :html-header.
365
Added:
366
Added:
;; :html-title is a string with optional tokens;
367
Added:
;; %t is the document's #+TITLE: property.
368
Added:
;; #+END_EXAMPLE
369
Added:
370
Added:
(defun ox-html-uswds-template (contents info)
371
Added:
"Return full document string after HTML conversion.
372
Added:
373
Added:
CONTENTS is the transcoded contents string.
374
Added:
INFO is a plist holding export options."
375
Added:
(let ((doctype (assoc (plist-get info :html-doctype) org-html-doctype-alist))
376
Added:
(language (plist-get info :language))
377
Added:
(head (ox-html-uswds--expand-macros (plist-get info :html-head) info))
378
Added:
(head-extra (ox-html-uswds--expand-macros (plist-get info :html-head-extra) info))
379
Added:
(title (plist-get info :title))
380
Added:
(title-format (plist-get info :html-title))
381
Added:
(body-attr (plist-get info :html-body-attr))
382
Added:
(header (plist-get info :html-header))
383
Added:
(newline "\n"))
384
Added:
(when (listp title)
385
Added:
(setq title (car title)))
386
Added:
(concat
387
Added:
(when doctype (concat (cdr doctype) newline))
388
Added:
"<html" (when language (concat " lang=\"" language "\"")) ">" newline
389
Added:
;; Start if the document head.
390
Added:
"<head>" newline
391
Added:
(when (not (string= "" head)) (concat head newline))
392
Added:
(when (and title (not (string= "" title)))
393
Added:
(if title-format
394
Added:
(format-spec (concat "<title>" title-format "</title>\n")
395
Added:
(format-spec-make ?t title))
396
Added:
(concat "<title>" title "</title>" newline)))
397
Added:
(when (not (string= "" head-extra)) (concat head-extra newline))
398
Added:
"<link rel=\"stylesheet\" href=\"../assets/uswds-2.10.1/css/uswds.min.css\" />"
399
Added:
"<link rel=\"stylesheet\" href=\"../assets/stylesheets/sd.css\" />"
400
Added:
;; USWDS init
401
Added:
"<script src=\"../assets/uswds-2.10.1/js/uswds-init.min.js\" type=\"text/javascript\"></script>"
402
Added:
"</head>" newline
403
Added:
;; Start of the document body.
404
Added:
"<body" (and body-attr (not (string= "" body-attr)) (format " %s" body-attr)) ">"
405
Added:
"<a class=\"usa-skipnav\" href=\"#main-content\">Skip to main content</a>"
406
Added:
""
407
Added:
(when (and header (not (string= "" header)))
408
Added:
(or (ox-html-uswds--expand-macros header info) ""))
409
Added:
;; When not the index page, add side navigation links.
410
Added:
;; (when (not (string= (substring (buffer-name) 0 5) "index"))
411
Added:
;; "<a class=\"usa-skipnav\" href=\"#main-content\">Skip to main content</a>"
412
Added:
;; "<div class=\"usa-section\">
413
Added:
;; <div class=\"grid-container\">
414
Added:
;; <div class=\"grid-row grid-gap\">
415
Added:
;; <div class=\"usa-layout-docs__sidenav desktop:grid-col-3\">
416
Added:
;; <nav aria-label=\"Secondary navigation\">
417
Added:
;; <ul class=\"usa-sidenav sd-sidenav\">
418
Added:
;; <li class=\"usa-sidenav__item\">
419
Added:
;; <a href=\"\">Parent link</a>
420
Added:
;; </li><li class=\"usa-sidenav__item\">
421
Added:
;; <a href=\"\" class=\"usa-current\">Current page</a><ul class=\"usa-sidenav__sublist\">
422
Added:
;; <li class=\"usa-sidenav__item\">
423
Added:
;; <a href=\"\">Child link</a>
424
Added:
;; </li><li class=\"usa-sidenav__item\">
425
Added:
;; <a href=\"\" class=\"usa-current\">Child link</a><ul class=\"usa-sidenav__sublist\">
426
Added:
;; <li class=\"usa-sidenav__item\">
427
Added:
;; <a href=\"\">Grandchild link</a>
428
Added:
;; </li><li class=\"usa-sidenav__item\">
429
Added:
;; <a href=\"\">Grandchild link</a>
430
Added:
;; </li><li class=\"usa-sidenav__item\">
431
Added:
;; <a href=\"\" class=\"usa-current\">Grandchild link</a>
432
Added:
;; </li><li class=\"usa-sidenav__item\">
433
Added:
;; <a href=\"\">Grandchild link</a>
434
Added:
;; </li>
435
Added:
;; </ul>
436
Added:
;; </li><li class=\"usa-sidenav__item\">
437
Added:
;; <a href=\"\">Child link</a>
438
Added:
;; </li><li class=\"usa-sidenav__item\">
439
Added:
;; <a href=\"\">Child link</a>
440
Added:
;; </li><li class=\"usa-sidenav__item\">
441
Added:
;; <a href=\"\">Child link</a>
442
Added:
;; </li>
443
Added:
;; </ul>
444
Added:
;; </li><li class=\"usa-sidenav__item\">
445
Added:
;; <a href=\"\">Parent link</a>
446
Added:
;; </li>
447
Added:
;; </ul>
448
Added:
;; </nav>
449
Added:
450
Added:
;; </div>)
451
Added:
contents
452
Added:
(or (ox-html-uswds--expand-macros (plist-get info :html-footer) info) "")
453
Added:
"<script src=\"../assets/uswds-2.10.1/js/uswds.min.js\"></script>" newline
454
Added:
"</body>" newline
455
Added:
"</html>")))
456
Added:
457
Added:
;; plain text
458
Added:
459
Added:
(defun ox-html-uswds-plain-text (plain-text info)
460
Added:
"Transcode a PLAIN-TEXT string from Org to HTML.
461
Added:
462
Added:
PLAIN-TEXT is the string to transcode.
463
Added:
INFO is a plist holding contextual information."
464
Added:
(org-html-encode-plain-text plain-text))
465
Added:
466
Added:
;; attributes
467
Added:
468
Added:
(defun ox-html-uswds--attr (element &optional property)
469
Added:
"Return ELEMENT's html attribute properties as a string.
470
Added:
471
Added:
When optional argument PROPERTY is non-nil, return the value of
472
Added:
that property within attributes."
473
Added:
(let ((attributes (org-export-read-attribute :attr_html element property)))
474
Added:
(if attributes (concat " " (org-html--make-attribute-string attributes)) "")))
475
Added:
476
Added:
;; is an immediate child of [element]?
477
Added:
478
Added:
(defun ox-html-uswds--immediate-child-of-p (element container-type)
479
Added:
"Is ELEMENT an immediate child of an org CONTAINER-TYPE element?"
480
Added:
(let ((container (org-export-get-parent element)))
481
Added:
(and (eq (org-element-type container) container-type)
482
Added:
(= (org-element-property :begin element)
483
Added:
(org-element-property :contents-begin container)))))
484
Added:
485
Added:
;; has an immediate child of [element-type]?
486
Added:
487
Added:
(defun ox-html-uswds--has-immediate-child-of-p (element element-type)
488
Added:
"Does ELEMENT have an immediate ELEMENT-TYPE child?"
489
Added:
(org-element-map element element-type
490
Added:
(lambda (link) (= (org-element-property :begin link)
491
Added:
(org-element-property :contents-begin element)))
492
Added:
nil t))
493
Added:
494
Added:
;; expand macros
495
Added:
;; Macro expansion takes place in a separate buffer - as such buffer local variables
496
Added:
;; are not directly available, which might be important when using self-evaluating
497
Added:
;; macros such as =,#+MACRO: x (eval (fn $1))=. To help with this, the original
498
Added:
;; =buffer-file-name= is shadowed.
499
Added:
500
Added:
(defun ox-html-uswds--expand-macros (contents info)
501
Added:
"Return CONTENTS string, with macros expanded.
502
Added:
503
Added:
CONTENTS is a string, optionally with {{{macro}}}
504
Added:
tokens. INFO is a plist holding export options."
505
Added:
(if (cl-search "{{{" contents)
506
Added:
(let* ((author (org-element-interpret-data (plist-get info :author)))
507
Added:
(date (org-element-interpret-data (plist-get info :date)))
508
Added:
(email (or (plist-get info :email) ""))
509
Added:
(title (org-element-interpret-data (plist-get info :title)))
510
Added:
(export-specific-templates
511
Added:
(list (cons "author" author)
512
Added:
(cons "date"
513
Added:
(format "(eval (format-time-string \"$1\" '%s))"
514
Added:
(org-read-date nil t date nil)))
515
Added:
(cons "email" email)
516
Added:
(cons "title" title)))
517
Added:
(templates (org-combine-plists export-specific-templates
518
Added:
org-macro-templates))
519
Added:
(buffer-name buffer-file-name))
520
Added:
(with-temp-buffer (insert contents)
521
Added:
(let ((buffer-file-name buffer-name))
522
Added:
(org-macro-replace-all templates))
523
Added:
(buffer-string)))
524
Added:
contents))
525
Added:
526
Added:
;; org-mode publishing function
527
Added:
;; #+BEGIN_EXAMPLE
528
Added:
;; (setq org-publish-project-alist
529
Added:
;; '(("project-name"
530
Added:
;; :base-directory "~/src"
531
Added:
;; :publishing-directory "~/public"
532
Added:
;; :publishing-function ox-html-uswds-publish-to-html)))
533
Added:
;; #+END_EXAMPLE
534
Added:
535
Added:
;;;###autoload
536
Added:
(defun ox-html-uswds-publish-to-html (plist filename pub-dir)
537
Added:
"Publish an org file to HTML adapted for the USWDS.
538
Added:
539
Added:
PLIST is the property list for the given project. FILENAME
540
Added:
is the filename of the Org file to be published. PUB-DIR is
541
Added:
the publishing directory.
542
Added:
543
Added:
Return output file name."
544
Added:
(let ((html-extension (or (plist-get plist :html-extension) org-html-extension)))
545
Added:
(org-publish-org-to 'html-uswds
546
Added:
filename
547
Added:
(when (and html-extension (not (string= "" html-extension)))
548
Added:
(concat "." html-extension))
549
Added:
plist
550
Added:
pub-dir)))
551
Added:
552
Added:
;; org-export backend definition
553
Added:
(org-export-define-backend
554
Added:
'html-uswds
555
Added:
'((bold . ox-html-uswds-bold)
556
Added:
(example-block . ox-html-uswds-example-block)
557
Added:
(export-block . ox-html-uswds-export-block)
558
Added:
(export-snippet . ox-html-uswds-export-snippet)
559
Added:
(headline . ox-html-uswds-headline)
560
Added:
(inner-template . ox-html-uswds-inner-template)
561
Added:
(italic . ox-html-uswds-italic)
562
Added:
(item . org-html-item)
563
Added:
(link . ox-html-uswds-link)
564
Added:
(paragraph . ox-html-uswds-paragraph)
565
Added:
(plain-list . ox-html-uswds-plain-list)
566
Added:
(plain-text . ox-html-uswds-plain-text)
567
Added:
(section . ox-html-uswds-section)
568
Added:
(special-block . ox-html-uswds-special-block)
569
Added:
(src-block . ox-html-uswds-src-block)
570
Added:
(template . ox-html-uswds-template)
571
Added:
(verbatim . ox-html-uswds-verbatim))
572
Added:
:menu-entry
573
Added:
'(?u "Export to html-uswds"
574
Added:
((?U "As html-uswds buffer" ox-html-uswds-export-as-html)
575
Added:
(?u "As html-uswds file" ox-html-uswds-export-to-html)))
576
Added:
:options-alist
577
Added:
'((:html-extension "HTML_EXTENSION" nil org-html-extension)
578
Added:
(:html-link-org-as-html nil "html-link-org-files-as-html" org-html-link-org-files-as-html)
579
Added:
(:html-doctype "HTML_DOCTYPE" nil org-html-doctype)
580
Added:
(:html-container "HTML_CONTAINER" nil org-html-container-element t)
581
Added:
(:html-link-use-abs-url nil "html-link-use-abs-url" org-html-link-use-abs-url)
582
Added:
(:html-link-home "HTML_LINK_HOME" nil org-html-link-home)
583
Added:
(:html-preamble "HTML_PREAMBLE" nil "" newline)
584
Added:
(:html-postamble "HTML_POSTAMBLE" nil "" newline)
585
Added:
(:html-head "HTML_HEAD" nil org-html-head newline)
586
Added:
(:html-head-extra "HTML_HEAD_EXTRA" nil org-html-head-extra newline)
587
Added:
(:html-header "HTML_HEADER" nil "" newline)
588
Added:
(:html-footer "HTML_FOOTER" nil "" newline)
589
Added:
(:html-title "HTML_TITLE" nil "%t" t)
590
Added:
(:html-body-attr "HTML_BODY_ATTR" nil "" t)))
591
Added:
592
Added:
;;;###autoload
593
Added:
(defun ox-html-uswds-export-as-html
594
Added:
(&optional async subtreep visible-only body-only ext-plist)
595
Added:
"Export current buffer to a HTML-USWDS buffer.
596
Added:
597
Added:
Export as `org-html-export-as-html' does, with html-uswds
598
Added:
org-export-backend.
599
Added:
600
Added:
If narrowing is active in the current buffer, only export its
601
Added:
narrowed part.
602
Added:
603
Added:
If a region is active, export that region.
604
Added:
605
Added:
A non-nil optional argument ASYNC means the process should happen
606
Added:
asynchronously. The resulting buffer should be accessible
607
Added:
through the `org-export-stack' interface.
608
Added:
609
Added:
When optional argument SUBTREEP is non-nil, export the sub-tree
610
Added:
at point, extracting information from the headline properties
611
Added:
first.
612
Added:
613
Added:
When optional argument VISIBLE-ONLY is non-nil, don't export
614
Added:
contents of hidden elements.
615
Added:
616
Added:
When optional argument BODY-ONLY is non-nil, only write code
617
Added:
between \"<body>\" and \"</body>\" tags.
618
Added:
619
Added:
EXT-PLIST, when provided, is a property list with external
620
Added:
parameters overriding Org default settings, but still inferior to
621
Added:
file-local settings.
622
Added:
623
Added:
Export is done in a buffer named \"*Org HTML-USWDS export*\", which
624
Added:
will be displayed when `org-export-show-temporary-export-buffer'
625
Added:
is non-nil."
626
Added:
(interactive)
627
Added:
(org-export-to-buffer 'html-uswds "*Org HTML-USWDS Export*"
628
Added:
async subtreep visible-only body-only ext-plist
629
Added:
(lambda () (set-auto-mode t))))
630
Added:
631
Added:
;;;###autoload
632
Added:
(defun ox-html-uswds-export-to-html (&optional async subtreep visible-only body-only ext-plist)
633
Added:
"Export current buffer to an HTML file.
634
Added:
635
Added:
Export as `org-html-export-as-html' does, with html-uswds
636
Added:
org-export-backend.
637
Added:
638
Added:
If narrowing is active in the current buffer, only export its
639
Added:
narrowed part.
640
Added:
641
Added:
If a region is active, export that region.
642
Added:
643
Added:
A non-nil optional argument ASYNC means the process should happen
644
Added:
asynchronously. The resulting file should be accessible through
645
Added:
the `org-export-stack' interface.
646
Added:
647
Added:
When optional argument SUBTREEP is non-nil, export the sub-tree
648
Added:
at point, extracting information from the headline properties
649
Added:
first.
650
Added:
651
Added:
When optional argument VISIBLE-ONLY is non-nil, don't export
652
Added:
contents of hidden elements.
653
Added:
654
Added:
When optional argument BODY-ONLY is non-nil, only write code
655
Added:
between \"<body>\" and \"</body>\" tags.
656
Added:
657
Added:
EXT-PLIST, when provided, is a property list with external
658
Added:
parameters overriding Org default settings, but still inferior to
659
Added:
file-local settings.
660
Added:
661
Added:
Return output file's name."
662
Added:
(interactive)
663
Added:
(let* ((extension (concat "." (or (plist-get ext-plist :html-extension)
664
Added:
org-html-extension
665
Added:
"html")))
666
Added:
(file (org-export-output-file-name extension subtreep))
667
Added:
(org-export-coding-system org-html-coding-system))
668
Added:
(org-export-to-file 'html-uswds file
669
Added:
async subtreep visible-only body-only ext-plist)))
670
Added:
671
Added:
(provide 'ox-html.uswds)
672
Added:
;;; ox-html-uswds.el ends here
site/page-header.html
@@ -0,0 +1,103 @@
1
Added:
<section class="usa-banner" aria-label="Accessible website">
2
Added:
<div class="usa-accordion">
3
Added:
4
Added:
<header class="usa-banner__header">
5
Added:
<div class="usa-banner__inner">
6
Added:
<div class="grid-col-auto">
7
Added:
<img class="usa-banner__header-flag" src="assets/uswds-2.10.1/img/us_flag_small.png" alt="U.S. flag">
8
Added:
</div>
9
Added:
<div class="grid-col-fill tablet:grid-col-auto">
10
Added:
<p class="usa-banner__header-text">Proudly designed with the U.S. Web Design System.</p>
11
Added:
<p class="usa-banner__header-action" aria-hidden="true">Here's how you know</p>
12
Added:
</div>
13
Added:
<button class="usa-accordion__button usa-banner__button" aria-expanded="false" aria-controls="gov-banner">
14
Added:
<span class="usa-banner__button-text">Here's how you know</span>
15
Added:
</button>
16
Added:
</div>
17
Added:
</header>
18
Added:
19
Added:
<div class="usa-banner__content usa-accordion__content" id="gov-banner">
20
Added:
<div class="grid-row grid-gap-lg">
21
Added:
<div class="usa-banner__guidance tablet:grid-col-6">
22
Added:
<img class="usa-banner__icon usa-media-block__img" src="assets/uswds-2.10.1/img/icon-dot-gov.svg" role="img" alt="" aria-hidden="true">
23
Added:
<div class="usa-media-block__body">
24
Added:
<p>
25
Added:
<strong>Design for democracy</strong>
26
Added:
<br/>
27
Added:
The <a href="https://designsystem.digital.gov/">U.S. Web Design System</a> emphasizes universal accessibility.
28
Added:
</p>
29
Added:
</div>
30
Added:
</div>
31
Added:
<div class="usa-banner__guidance tablet:grid-col-6">
32
Added:
<img class="usa-banner__icon usa-media-block__img" src="assets/uswds-2.10.1/img/icon-https.svg" role="img" alt="" aria-hidden="true">
33
Added:
<div class="usa-media-block__body">
34
Added:
<p>
35
Added:
<strong>Secure .gov websites use HTTPS</strong>
36
Added:
<br/>
37
Added:
This website will soon feature identical protection features!
38
Added:
</p>
39
Added:
</div>
40
Added:
</div>
41
Added:
</div>
42
Added:
</div>
43
Added:
44
Added:
</div>
45
Added:
</section>
46
Added:
47
Added:
<header class="usa-header usa-header--extended sd-header">
48
Added:
<div class="usa-navbar">
49
Added:
<div class="usa-logo" id="extended-logo">
50
Added:
<em class="usa-logo__text"><a href="index.html" title="Home" aria-label="Home">Smart Documents</a></em>
51
Added:
</div>
52
Added:
<button class="usa-menu-btn">Menu</button>
53
Added:
</div>
54
Added:
55
Added:
<nav aria-label="Primary navigation" class="usa-nav">
56
Added:
<div class="usa-nav__inner">
57
Added:
58
Added:
<button class="usa-nav__close">
59
Added:
<img src="assets/img/usa-icons/close.svg" role="img" alt="close">
60
Added:
</button>
61
Added:
62
Added:
<ul class="usa-nav__primary usa-accordion">
63
Added:
64
Added:
<li class="usa-nav__primary-item">
65
Added:
<button class="usa-accordion__button usa-nav__link" aria-expanded="false" aria-controls="extended-nav-section-two">
66
Added:
<span>Features</span>
67
Added:
</button>
68
Added:
<ul id="extended-nav-section-two" class="usa-nav__submenu">
69
Added:
<li class="usa-nav__submenu-item"><a href="#" class=""> wan</a></li>
70
Added:
<li class="usa-nav__submenu-item"><a href="#" class=""> tu</a></li>
71
Added:
<li class="usa-nav__submenu-item"><a href="#" class=""> mute</a></li>
72
Added:
</ul>
73
Added:
</li>
74
Added:
75
Added:
<li class="usa-nav__primary-item">
76
Added:
<a class="usa-nav__link" href="original-paper.html"><span>The original paper</span></a>
77
Added:
</li>
78
Added:
79
Added:
<li class="usa-nav__primary-item">
80
Added:
<a class="usa-nav__link" href="jobs.html"><span>I am...</span></a>
81
Added:
</li>
82
Added:
83
Added:
<li class="usa-nav__primary-item">
84
Added:
<a class="usa-nav__link" href="about.html"><span>About</span></a>
85
Added:
</li>
86
Added:
87
Added:
</ul>
88
Added:
89
Added:
<div class="usa-nav__secondary">
90
Added:
<ul class="usa-nav__secondary-links">
91
Added:
<li class="usa-nav__secondary-item"><a href="">Contact</a></li>
92
Added:
<li class="usa-nav__secondary-item"><a href="">Contribute</a></li>
93
Added:
</ul>
94
Added:
95
Added:
<form class="usa-search usa-search--small " role="search">
96
Added:
<label class="usa-sr-only" for="extended-search-field-small">Search small</label>
97
Added:
<input class="usa-input" id="extended-search-field-small" type="search" name="search">
98
Added:
<button class="usa-button" type="submit"><span class="usa-sr-only">Search</span></button>
99
Added:
</form>
100
Added:
</div>
101
Added:
</div>
102
Added:
</nav>
103
Added:
</header>
site/posts/test.org
@@ -0,0 +1,23 @@
1
Added:
# -*- mode: org; -*-
2
Added:
3
Added:
#+TITLE: First Post
4
Added:
#+AUTHOR: Marius Peter
5
Added:
#+DATE: <2021-03-28 Sun>
6
Added:
7
Added:
#+INCLUDE: page-header.html export html
8
Added:
9
Added:
#+begin_export html
10
Added:
<div class="usa-section">
11
Added:
<div class="grid-container">
12
Added:
<div class="grid-row grid-gap">
13
Added:
<main class="usa-layout-docs__main desktop:grid-col-9 usa-prose usa-layout-docs" id="main-content">
14
Added:
#+end_export
15
Added:
16
Added:
In this post, I wanted to talk about a couple of things.
17
Added:
18
Added:
#+begin_export html
19
Added:
</main>
20
Added:
</div>
21
Added:
</div>
22
Added:
</div>
23
Added:
#+end_export
site/publish.el
@@ -0,0 +1,74 @@
1
Added:
;;; publish.el --- Publish the Smart Documents website.
2
Added:
3
Added:
;; Copyright (C) 2021 Marius Peter
4
Added:
5
Added:
;; Author: Marius Peter
6
Added:
7
Added:
;;; Commentary:
8
Added:
9
Added:
;; This file is intended to be run as a script for the Makefile used
10
Added:
;; to generate the Smart Documents website.
11
Added:
12
Added:
;;; Code:
13
Added:
14
Added:
(require 'ox-publish)
15
Added:
(load-file "./ox-html-uswds.el")
16
Added:
17
Added:
;; (let ((publishing-location "~/Documents/www/"))
18
Added:
(let ((publishing-location "/ssh:root@192.162.71.223:/var/www/smart-documents.org/"))
19
Added:
(setq org-publish-project-alist
20
Added:
`(("page"
21
Added:
:base-directory "."
22
Added:
:base-extension "org"
23
Added:
:publishing-directory ,publishing-location
24
Added:
:recursive nil ; Top-level pages are all in top-level org directory.
25
Added:
:publishing-function ox-html-uswds-publish-to-html
26
Added:
:auto-sitemap t)
27
Added:
("page-media"
28
Added:
:base-directory "assets/images/"
29
Added:
:base-extension "jpg\\|gif\\|png\\|svg\\|mp3"
30
Added:
:publishing-directory ,(concat publishing-location "assets/images/")
31
Added:
:recursive t
32
Added:
:publishing-function org-publish-attachment)
33
Added:
("posts"
34
Added:
:base-directory "posts/"
35
Added:
:base-extension "org"
36
Added:
:publishing-directory ,(concat publishing-location "posts/")
37
Added:
:recursive t
38
Added:
:publishing-function ox-html-uswds-publish-to-html)
39
Added:
("css"
40
Added:
:base-directory "assets/"
41
Added:
:base-extension "css\\|map"
42
Added:
:publishing-directory ,(concat publishing-location "assets/")
43
Added:
:publishing-function org-publish-attachment
44
Added:
:recursive t)
45
Added:
("js"
46
Added:
:base-directory "assets/"
47
Added:
:base-extension "js"
48
Added:
:publishing-directory ,(concat publishing-location "assets/")
49
Added:
:publishing-function org-publish-attachment
50
Added:
:recursive t)
51
Added:
("fonts"
52
Added:
:base-directory "assets/"
53
Added:
:base-extension "ttf\\|woff2"
54
Added:
:publishing-directory ,(concat publishing-location "assets/")
55
Added:
:publishing-function org-publish-attachment
56
Added:
:recursive t)
57
Added:
("img"
58
Added:
:base-directory "assets/uswds-2.10.1/"
59
Added:
:base-extension "png\\|svg"
60
Added:
:publishing-directory ,(concat publishing-location "assets/uswds-2.10.1/")
61
Added:
:publishing-function org-publish-attachment
62
Added:
:recursive t)
63
Added:
("content"
64
Added:
:components ("page"
65
Added:
"page-media"))
66
Added:
("assets"
67
Added:
:components ("css"
68
Added:
"js"
69
Added:
"fonts"
70
Added:
"img"))
71
Added:
("all" :components ("content" "assets")))))
72
Added:
73
Added:
(provide 'publish)
74
Added:
;;; publish.el ends here
site/sitemap.html
site/sitemap.org
@@ -0,0 +1,6 @@
1
Added:
#+TITLE: Sitemap for project page
2
Added:
3
Added:
- [[file:about.org][About]]
4
Added:
- [[file:jobs.org][My job is...]]
5
Added:
- [[file:index.org][Smart Documents]]
6
Added:
- [[file:original-paper.org][The Original Paper]]