Skip to content

Commit 709f28c

Browse files
committed
add phpdoc custom template
1 parent 6a27c6b commit 709f28c

File tree

147 files changed

+2981
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+2981
-0
lines changed

.phpdoc-template/base.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{% extends 'layout.html.twig' %}

.phpdoc-template/class.html.twig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{% extends 'base.html.twig' %}
2+
3+
{% block content %}
4+
{% include 'components/breadcrumbs.html.twig' %}
5+
6+
<article class="phpdocumentor-element -class">
7+
{{ include('components/class-title.html.twig') }}
8+
{{ include('components/element-found-in.html.twig') }}
9+
{{ include('components/element-header.html.twig') }}
10+
11+
{{ include('components/constants.html.twig') }}
12+
{{ include('components/properties.html.twig') }}
13+
{{ include('components/methods.html.twig') }}
14+
</article>
15+
{% endblock %}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.phpdocumentor-admonition {
2+
border: 1px solid var(--admonition-border-color);
3+
border-radius: var(--border-radius-base-size);
4+
border-color: var(--primary-color-lighten);
5+
background-color: var(--primary-color-lighter);
6+
font-size: 85%;
7+
padding: .5rem;
8+
margin: 2rem 0;
9+
display: flex;
10+
flex-direction: row;
11+
}
12+
13+
.phpdocumentor-admonition--success {
14+
border-color: var(--admonition-success-color);
15+
}
16+
17+
.phpdocumentor-admonition__icon {
18+
font-size: 2rem;
19+
margin: .75rem 0.75rem 1.25rem 0.5rem;
20+
color: var(--primary-color);
21+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.phpdocumentor .phpdocumentor-back-to-top {
2+
position: fixed;
3+
bottom: 2rem;
4+
font-size: 2.5rem;
5+
opacity: .25;
6+
transition: all .3s ease-in-out;
7+
right: 2rem;
8+
}
9+
10+
.phpdocumentor .phpdocumentor-back-to-top:hover {
11+
color: var(--link-color-primary);
12+
opacity: 1;
13+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<a href="#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.phpdocumentor ul.phpdocumentor-breadcrumbs {
2+
font-size: var(--text-md);
3+
list-style: none;
4+
margin: 0;
5+
padding: 0;
6+
}
7+
8+
.phpdocumentor ul.phpdocumentor-breadcrumbs a {
9+
color: var(--text-color);
10+
text-decoration: none;
11+
}
12+
13+
.phpdocumentor ul.phpdocumentor-breadcrumbs > li {
14+
display: inline-block;
15+
margin: 0;
16+
}
17+
18+
.phpdocumentor ul.phpdocumentor-breadcrumbs > li + li:before {
19+
color: var(--dark-gray);
20+
content: "\\\A0";
21+
padding: 0;
22+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{% set breadcrumbs = usesNamespaces ? breadcrumbs(node) : packages(node) %}
2+
<ul class="phpdocumentor-breadcrumbs">
3+
{% for breadcrumb in breadcrumbs %}
4+
<li class="phpdocumentor-breadcrumb"><a href="{{ link(breadcrumb) }}">{{ breadcrumb.name }}</a></li>
5+
{% endfor %}
6+
</ul>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.phpdocumentor-class-graph {
2+
width: 100%; height: 600px; border:1px solid black; overflow: hidden
3+
}
4+
5+
.phpdocumentor-class-graph__graph {
6+
width: 100%;
7+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<h2 class="phpdocumentor-content__title">
2+
{{ node.name }}
3+
4+
{% if node.parent %}
5+
<span class="phpdocumentor-element__extends">
6+
extends {{ node.parent|route('class:short') }}
7+
</span>
8+
{% endif %}
9+
10+
{% if usesPackages %}
11+
<div class="phpdocumentor-element__package">
12+
in package
13+
<ul class="phpdocumentor-breadcrumbs">
14+
{% for breadcrumb in packages(node) %}
15+
<li class="phpdocumentor-breadcrumb"><a href="{{ link(breadcrumb) }}">{{ breadcrumb.name }}</a></li>
16+
{% endfor %}
17+
</ul>
18+
</div>
19+
{% endif %}
20+
21+
{% if node.interfaces is not empty %}
22+
<span class="phpdocumentor-element__implements">
23+
implements
24+
{% for interface in node.interfaces %}
25+
{{ interface|route('class:short') }}{% if not loop.last %}, {% endif %}
26+
{% endfor %}
27+
</span>
28+
{% endif %}
29+
30+
{% if node.usedTraits is not empty %}
31+
<span class="phpdocumentor-element__extends">
32+
Uses
33+
{% for trait in node.usedTraits %}
34+
{{ trait|route('class:short') }}{% if not loop.last %}, {% endif %}
35+
{% endfor %}
36+
</span>
37+
{% endif %}
38+
</h2>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<code class="phpdocumentor-signature phpdocumentor-code {% if node.deprecated %}-deprecated{% endif %}">
2+
<span class="phpdocumentor-signature__visibility">{{ node.visibility }}</span>
3+
<span class="phpdocumentor-signature__type">{{ not node.type ? "mixed" : node.type|route('class:short')|join('|')|raw }}</span>
4+
<span class="phpdocumentor-signature__name">{{ node.name }}</span>
5+
= <span class="phpdocumentor-signature__default-value">{{ node.value ?: '""' }}</span>
6+
</code>

0 commit comments

Comments
 (0)