Skip to content

Commit

Permalink
WIP (until #17)
Browse files Browse the repository at this point in the history
  • Loading branch information
carstingaxion committed Sep 16, 2023
1 parent f89f0ff commit cab5697
Show file tree
Hide file tree
Showing 6 changed files with 718 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/hookdoc-tmpl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- PROJECT LOGO -->
<br />
<div align="center">
<a href="https://github.com/figuren-theater/ft-admin-ui">
<img src="https://raw.githubusercontent.com/figuren-theater/logos/main/favicon.png" alt="figuren.theater Logo" width="100" height="100">
</a>

<h1 align="center">Welcome to the <pre>ft-admin-ui</pre> Developer Documentation</h1>
<p align="center">This resource is generated documentation on actions and filters found in the <pre>ft-admin-ui</pre> module. Use the sidebar to browse and navigate.</p>

<p align="center">
For more information about the WordPress Multisite network for puppeteers <a href="https://figuren.theater">figuren.theater</a>, where this module is a part of, come on this way:
<br /><br /><br />
<a href="https://meta.figuren.theater/blog"><strong>Read our blog</strong></a>
<br />
<br />
<a href="https://figuren.theater">See the network in action</a>
<a href="https://mein.figuren.theater">Join the network</a>
<a href="https://websites.fuer.figuren.theater">Create your own network</a>
</p>
</div>

55 changes: 55 additions & 0 deletions .github/hookdoc-tmpl/layout.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><?js= title ?> - ft-admin-ui Distributor Developer Documentation</title>

<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">

<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Mono|IBM+Plex+Sans:300,400|Playfair+Display:900&display=swap" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="styles-ft.css">
</head>

<body<?js if (title === 'Home') { ?> class="home"<?js } ?>>

<div id="main">

<?js if (title !== 'Home') { ?>
<h1 class="page-title"><?js= title ?></h1>
<?js } ?>

<?js= content ?>

<footer>
<a href="https://meta.figuren.theater/blog">Read our blog</a> &bull;
<a href="https://figuren.theater">See the network in action</a> &bull;
<a href="https://mein.figuren.theater">Join the network</a> &bull;
<a href="https://websites.fuer.figuren.theater">Create your own network</a>
</footer>

</div>

<nav>
<?js
// Re-order tutorials to the top of the nav. The nav is hard-coded in wp-hooksdoc.
const indexOfFirstSubHeading = this.nav.indexOf('<h3');
const indexOfTutorial = this.nav.indexOf('<h3>Tutorials');
const headingLink = this.nav.substr(0, indexOfFirstSubHeading);
const hooksSection = this.nav.substr(indexOfFirstSubHeading, indexOfTutorial - indexOfFirstSubHeading);
const tutorialSection = this.nav.substr(indexOfTutorial);
?>
<?js= headingLink + tutorialSection+ hooksSection ?>
</nav>

<br class="clear">

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>
99 changes: 99 additions & 0 deletions .github/hookdoc-tmpl/static/styles-ft.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
body {
background: #fefefe;
color: #232323;
font-family: 'IBM Plex Sans', sans-serif;
font-size: 1.3rem;
font-weight: 300;
}

h1, h2, h3 {
line-height: 1.2;
font-family: 'Playfair Display', sans-serif;
font-weight: 900;
letter-spacing: -.01em;
}

h1.page-title {
font-size: 42px;
margin-top: .5em;
}

nav ul {
font-size: 1.2rem;
}

nav li a {
background-image: none;
}

nav li a:hover {
text-decoration: underline;
}

code, pre,
nav ul a, nav ul a:visited, nav ul a:active,
.name, .signature,
.params .name, .props .name,
.name code {
font-family: 'IBM Plex Mono', monospace;
}

article h1 {
margin: 12px 0 32px;
}

a {
background-image: linear-gradient(transparent calc(100% - 7px), #f2dede 0),
linear-gradient(transparent calc(100% - 7px), #cef8f7 0);
background-position: 0 0;
background-repeat: no-repeat;
background-size: 0 100%, 100% 100%;
color: #232323;
text-decoration: none;
transition: all .1s;
}

a:visited,
a:active {
color: #232323;
}

a:focus,
a:hover {
background-size: 100% 100%, 100% 100%;
color: #232323;
text-decoration: none;
}

a.banner {
background-image: none;
margin-left: -10px;
}

a.banner img {
width: 100%;
max-width: 888px;
}

footer {
text-align: center;
font-size: .8em;
font-style: normal;
font-weight: 300;
}

.home #main > section:first-of-type,
.home nav > h2 {
display: none;
}

.prettyprint.source {
font-size: 14px;
}

.prettyprint code {
padding: 2px 10px;
line-height: 16px;
min-height: 16px;
height: auto;
}
29 changes: 29 additions & 0 deletions hookdoc-conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"opts": {
"destination": "docs/dev/hooks",
"template": "node_modules/wp-hookdoc/template",
"recurse": true,
"readme": "./.github/hookdoc-tmpl/README.md"
},
"source": {
"include": [ "./plugin.php", "./inc" ],
"includePattern": ".+\\.(php)?$"
},
"plugins": [
"node_modules/wp-hookdoc/plugin",
"plugins/markdown"
],
"markdown": {
"idInHeadings": true
},
"templates": {
"default": {
"layoutFile": "./.github/hookdoc-tmpl/layout.tmpl",
"staticFiles": {
"include": [
"./.github/hookdoc-tmpl/static"
]
}
}
}
}
Loading

0 comments on commit cab5697

Please sign in to comment.