Skip to content

Commit

Permalink
Introduce usage of DOAP file (#438)
Browse files Browse the repository at this point in the history
This adds a DOAP file that replaces the non-machine readable version in
xep.doc.  It also adds a XEP metadata file and styling files for a
human-readable version in the generated doxygen documentation.
  • Loading branch information
melvo authored Sep 9, 2022
1 parent 860640c commit a5908f6
Show file tree
Hide file tree
Showing 10 changed files with 1,346 additions and 74 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PR check list:
- [ ] Document your code
- [ ] Add `\since QXmpp 1.X`, `QXMPP_EXPORT`
- [ ] Fix doxygen warnings (see log when building with `-DBUILD_DOCUMENTATION=ON`)
- [ ] Update `doc/xep.doc`
- [ ] Update `doc/doap.xml`
- [ ] Add unit tests
- [ ] Format the code: Run `clang-format -i src/<edited-file(s)> tests/<edited-file(s)>`

Expand Down
5 changes: 4 additions & 1 deletion doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ INPUT = @PROJECT_SOURCE_DIR@/doc/index.doc \
@PROJECT_SOURCE_DIR@/doc/xep.doc \
@CMAKE_BINARY_DIR@/src/base/QXmppBuildConstants.h \
@PROJECT_SOURCE_DIR@/src

HTML_EXTRA_FILES = @PROJECT_SOURCE_DIR@/doc/doap.xml \
@PROJECT_SOURCE_DIR@/doc/doap-rendering/doap.xsl \
@PROJECT_SOURCE_DIR@/doc/doap-rendering/xeplist.xml \
@PROJECT_SOURCE_DIR@/doc/doap-rendering/doap.css
ALIASES = "xep{1}=<a href=\"https://xmpp.org/extensions/xep-\1.html\">XEP-\1</a>" \
"xep{2}=<a href=\"https://xmpp.org/extensions/xep-\1.html\">XEP-\1: \2</a>"
ALPHABETICAL_INDEX = NO
Expand Down
11 changes: 11 additions & 0 deletions doc/doap-rendering/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
SPDX-FileCopyrightText: 2022 Melvin Keskin <[email protected]>
SPDX-License-Identifier: CC0-1.0
-->

# DOAP rendering

Run `doc/doap-rendering/update-xeplist.sh` to get the latest XEP metadata
before building the documentation.

272 changes: 272 additions & 0 deletions doc/doap-rendering/doap.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,272 @@
/*
* SPDX-FileCopyrightText: 2019 Adrien Destugues <[email protected]>
*
* SPDX-License-Identifier: CC0-1.0
*/

:root {
/* Primary color in HSL: Change this to customize all colored elements */
--color-h: 210;
--color-s: 13%;
--color-l: 50%;
}
body {
font-family: sans-serif;
}
img {
margin-right: 1.7rem;
vertical-align: middle;
}
a {
text-decoration: none;
padding: 5px;
color: hsl(
var(--color-h),
calc(var(--color-s) + 15%),
calc(var(--color-l) - 10%)
);
}
a:hover {
text-decoration: none;
filter: brightness(110%);
}
a.button {
text-align: center;
text-decoration: none;
font-size: medium;
color: hsl(0, 0%, 100%);
background-color: hsl(
var(--color-h),
var(--color-s),
var(--color-l)
);
display: inline-block;
cursor: pointer;
border: none;
border-radius: 4px;
padding: 12px 24px;
margin: 4px 12px 4px 0;
}
a.button:hover {
filter: brightness(110%);
}
.header {
padding: 40px;
text-align: center;
background: linear-gradient(
40deg,
hsl(
var(--color-h), var(--color-s), calc(var(--color-l) + 30%)
) 0%,
hsl(0, 0%, 90%) 60%
);
color: hsl(0, 0%, 27%);
font-size: xx-large;
margin-bottom: 15px;
}
.shortdesc {
font-size: x-large;
font-weight: 300;
opacity: 0.8;
}
.description {
font-size: medium;
opacity: 0.9;
}
.os {
margin: auto;
margin-bottom: 30px;
width: 75%;
text-align: center;
opacity: 0.7;
}
.chip {
display: inline-block;
padding: 3px 10px;
margin: 3px 5px 3px 0;
height: 20px;
font-size: small;
font-weight: 700;
line-height: 20px;
border-radius: 12px;
color:hsl(0, 0%, 100%);
background-color: hsl(
var(--color-h),
var(--color-s),
calc(var(--color-l) - 20%)
);
}

/* XEP table */
table {
width: 100%;
border-collapse: collapse;
clear: both;
}
th {
border: 1px solid hsl(
var(--color-h),
var(--color-s),
calc(var(--color-l) + 15%)
);
background-color: hsl(
var(--color-h),
var(--color-s),
var(--color-l)
);
color: hsl(0, 0%, 100%);
padding: 10px;
}
th:nth-child(1) {
padding-left: 2.5rem;
padding-right: 2.5rem;
}
th:nth-child(5) {
text-align: left;
}
tr {
border: 1px solid hsl(0, 0%, 91%);
}
tr:nth-child(odd) {
background-color: hsl(0, 0%, 97%);
}
tr:hover {
background-color: hsl(0, 0%, 94%);
}
td {
padding: 10px;
color: hsl(0, 0%, 11%);
}
td:nth-child(2) {
text-align: end;
}
td:nth-child(3) {
text-align: center;
}
td:nth-child(4) {
text-align: end;
}

.xep-implementation-status {
font-size: small;
padding: 5px;
}
.complete {
color: hsl(120, 25%, 42%);
background-color: hsl(103, 46%, 90%);
}
.partial {
color: hsl(36, 66%, 43%);
background-color: hsl(56, 62%, 86%);
}
.planned {
color: hsl(208, 41%, 39%);
background-color: hsl(197, 62%, 86%);
}
.removed,
.deprecated,
.wontfix {
color:hsl(0, 0%, 25%);
background-color: hsl(0, 0%, 91%);
}
.version {
font-family: monospace;
margin: 1px;
}
.version-outdated {
color: hsl(36, 66%, 43%);
background-color: hsl(56, 62%, 86%);
}
.small {
font-size: small;
}
.no-info {
text-align: center;
opacity: 0.5;
margin: 20px;
}

@media (prefers-color-scheme: dark) {
body {
background-color: hsl(0, 0%, 9%);
color: hsl(0, 0%, 90%);
}
a {
color: hsl(
var(--color-h),
calc(var(--color-s) + 15%),
calc(var(--color-l) + 15%)
);
}
a.button {
color: hsl(0, 0%, 91%);
background-color: hsl(
var(--color-h),
var(--color-s),
calc(var(--color-l) - 20%)
);
}
.header {
color: hsl(0, 0%, 91%);
background: linear-gradient(
40deg,
hsl(
var(--color-h), var(--color-s), calc(var(--color-l) - 30%)
) 0%,
hsl(0, 0%, 10%) 60%
);
}
.chip {
color:hsl(0, 0%, 100%);
background-color: hsl(0, 0%, 22%);
}

/* XEP table */
th {
border: 1px solid hsl(
var(--color-h),
var(--color-s),
calc(var(--color-l) - 20%)
);
background-color: hsl(
var(--color-h),
var(--color-s),
calc(var(--color-l) - 30%)
);
color: hsl(0, 0%, 90%);
}
tr {
border: 1px solid hsl(0, 0%, 14%);
}
tr:nth-child(odd) {
background-color: hsl(0, 0%, 11%);
}
tr:hover {
background-color: hsl(0, 0%, 9%);
}
td {
color: hsl(0, 0%, 93%);
}
.complete {
color: hsl(120, 54%, 81%);
background-color: hsl(105, 23%, 17%);
}
.partial {
color: hsl(36, 100%, 92%);
background-color: hsl(55, 45%, 16%);
}
.planned {
color: hsl(205, 80%, 76%);
background-color: hsl(191, 52%, 17%);
}
.removed,
.deprecated,
.wontfix {
color: hsl(0, 0%, 100%);
background-color: hsl(0, 0%, 31%);
}
.version-outdated {
color: hsl(36, 100%, 92%);
background-color: hsl(55, 45%, 16%);
}
}
Loading

0 comments on commit a5908f6

Please sign in to comment.