1<?php ?>
2
3<div class="znx-acct">
4
5<div class="znx-acct-head">ZnoteX</div>
6<div class="znx-acct-info"><?= t('credits.znotex_text') ?></div>
7
8<div class="znx-acct-head"><?= t('credits.maintained') ?></div>
9<div class="developers">
10 <div class="developer">
11 <div class="avatar"><img src="<?php echo $creditsMaintainer['avatar']; ?>" alt="<?= t('credits.avatar_of', ['name' => $creditsMaintainer['login']]) ?>"></div>
12 <p class="username"><a href="<?php echo $creditsMaintainer['url']; ?>" target="_blank" rel="noopener"><?php echo $creditsMaintainer['login']; ?></a>
13 <br><?php echo $creditsMaintainer['role']; ?></p>
14 </div>
15</div>
16
17<div class="znx-acct-head">Znote AAC</div>
18<div class="znx-acct-info">
19 <p><?= t('credits.znote_text') ?></p>
20 <p><?= t('credits.ot_website') ?> <a href="https://otland.net/members/znote.5993/">Znote</a> <?= t('credits.from_community') ?> <a href="https://otland.net">otland.net</a>.</p>
21 <p><?= t('credits.opensource') ?></p>
22</div>
23
24<div class="znx-acct-head"><?= t('credits.developers') ?></div>
25<?php // If CURL isn't enabled show default version.
26if(!function_exists('curl_version')):
27 ?>
28 <p><a href="https://github.com/Znote/ZnoteAAC/graphs/contributors"><?= t('credits.full_list') ?></a>.</p>
29<?php else:
30 // CURL enabled. Lets create an API web request to github.
31 $request = curl_init();
32 curl_setopt($request, CURLOPT_URL, 'https://api.github.com/repos/Znote/ZnoteAAC/contributors');
33 curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);
34 curl_setopt($request, CURLOPT_USERAGENT, 'ZnoteAAC'); // GitHub requires user agent header.
35 curl_setopt($request, CURLOPT_SSL_VERIFYPEER, false);
36
37 // Load contributors and close the request.
38 $developers = json_decode((string)curl_exec($request), true); // Sorted by contributions.
39 curl_close($request);
40 if (!is_array($developers)) $developers = array();
41 ?>
42 <div class="developers">
43 <?php foreach ($developers as $developer): ?>
44 <div class="developer">
45 <div class="avatar"><img src="<?php echo $developer['avatar_url']; ?>" alt="<?= t('credits.avatar_of', ['name' => $developer['login']]) ?>"></div>
46 <p class="username"><a href="<?php echo $developer['html_url']; ?>"><?php echo $developer['login']; ?></a>
47 <br><?= t('credits.updates') ?> <?php echo $developer['contributions']; ?></p>
48 </div>
49 <?php endforeach; ?>
50 </div>
51 <style type="text/css">
52 /* Credits.php specific CSS alterations */
53 .developers {
54 width: 100%;
55 }
56 .developers:after {
57 content: '';
58 display: block;
59 clear: both;
60 }
61 .developer {
62 width: calc(20% - 16px);
63 float: left;
64 padding: 0 8px 16px;
65 }
66 .developer img {
67 width: 100%;
68 }
69 .username {
70 margin: 8px 0 0;
71 text-align: center;
72 overflow: hidden;
73 }
74 </style>
75 <?php
76endif;
77?>
78
79<div class="znx-acct-head"><?= t('credits.thanks') ?></div>
80<div class="znx-acct-info">
81 <a href="https://otland.net/members/chris.13882/">Chris</a> - <?= t('credits.thanks_chris') ?>
82 <br><a href="https://otland.net/members/kiwi-dan.152/">Kiwi Dan</a> - <?= t('credits.thanks_kiwidan') ?>
83 <br><a href="https://otland.net/members/amoaz.26626/">Amoaz</a> - <?= t('credits.thanks_amoaz') ?>
84 <br><a href="https://otland.net/members/evan.40401/">Evan</a>, <a href="https://otland.net/members/gremlee.12075/">Gremlee</a> - <?= t('credits.thanks_evan_gremlee') ?>
85 <br><a href="https://otland.net/members/att3.98289/">ATT3</a> - <?= t('credits.thanks_att3') ?>
86 <br><a href="https://otland.net/members/mark.1/">Mark</a> - <?= t('credits.thanks_mark') ?>
87 <br><a href="https://github.com/tedbro">Tedbro</a>, <a href="https://github.com/exura">Exura</a>, <a href="https://github.com/PrinterLUA">PrinterLUA</a> - <?= t('credits.thanks_bugreporters') ?>
88 <br><a href="https://github.com/Nottinghster">Nottinghster</a> - <?= t('credits.thanks_nottinghster') ?>
89</div>
90<style>
91.contributors {
92 margin-top: 10px;
93 padding: 5px;
94 border: 1px solid rgb(184, 184, 184);
95 display: inline-flex;
96 width: 100%;
97}
98.contributor {
99 padding: 10px;
100 text-align: center;
101}
102</style>
103
104</div><!-- .znx-acct -->
105