Browse Source

Template tweaks

widget
Lee Willis 6 years ago
parent
commit
73b1cdfdf2
  1. 8
      templates/author.php
  2. 14
      templates/repository_contributors.php
  3. 14
      templates/repository_milestone_summary.php

8
templates/author.php

@ -1,11 +1,11 @@
<div class="github-embed github-embed-user <?= $data['logo_class'] ?>">
<div class="github-embed github-embed-user <?php echo $data['logo_class'] ?>">
<p>
<a href="https://github.com/<?= esc_attr( $data['owner'] ) ?>" target="_blank">
<a href="https://github.com/<?php echo esc_attr( $data['owner'] ) ?>" target="_blank">
<strong>
<?= esc_html( $data['owner'] ) ?>
<?php echo esc_html( $data['owner'] ) ?>
</strong>
</a>
<br>
<?= esc_html( number_format_i18n( $data['owner_info']->public_repos ) ) ?> repositories, <?= esc_html( number_format_i18n( $data['owner_info']->followers ) ) ?> followers.
<?php echo esc_html( number_format_i18n( $data['owner_info']->public_repos ) ) ?> repositories, <?php echo esc_html( number_format_i18n( $data['owner_info']->followers ) ) ?> followers.
</p>
</div>

14
templates/repository_contributors.php

@ -1,8 +1,8 @@
<div class="github-embed github-embed-repo-contributors <?= $data['logo_class'] ?>">
<div class="github-embed github-embed-repo-contributors <?php echo $data['logo_class'] ?>">
<p>
<a href="<?= esc_attr( $data['repo']->html_url ) ?>" target="_blank">
<a href="<?php echo esc_attr( $data['repo']->html_url ) ?>" target="_blank">
<strong>
<?= esc_html( $data['repo']->description ) ?>
<?php echo esc_html( $data['repo']->description ) ?>
</strong>
</a>
<br>
@ -11,11 +11,11 @@
<?php foreach ( $data['contributors'] as $contributor ) : ?>
<li class="github-repo-contributor">
<img class="github-repo-contributor-avatar"
src="<?= esc_url( add_query_arg( array( 's' => $data['gravatar_size'] ), $contributor->author->avatar_url ) ); ?>"
alt="Picture of <?= esc_attr( $contributor->author->login ) ?>">
src="<?php echo esc_url( add_query_arg( array( 's' => $data['gravatar_size'] ), $contributor->author->avatar_url ) ); ?>"
alt="Picture of <?php echo esc_attr( $contributor->author->login ) ?>">
<span class="github-repo-contributor-login">
<a href="https://github.com/<?= esc_attr( $contributor->author->login ) ?>">
<?= esc_attr( $contributor->author->login ) ?>
<a href="https://github.com/<?php echo esc_attr( $contributor->author->login ) ?>">
<?php echo esc_attr( $contributor->author->login ) ?>
</a>
</span>
<?php endforeach; ?>

14
templates/repository_milestone_summary.php

@ -1,28 +1,28 @@
<div class="github-embed github-embed-milestone-summary <?= $data['logo_class'] ?>">
<div class="github-embed github-embed-milestone-summary <?php echo $data['logo_class'] ?>">
<p>
<a href="<?= esc_attr( $data['repo']->html_url ) ?>" target="_blank">
<a href="<?php echo esc_attr( $data['repo']->html_url ) ?>" target="_blank">
<strong>
<?= esc_html( $data['repo']->description ) ?>
<?php echo esc_html( $data['repo']->description ) ?>
</strong>
</a>
<br>
<span class="github-heading">Milestone: </span>
<span class="github-milestone-title"><?= esc_html( $data['summary']->title ) ?></span>
<span class="github-milestone-title"><?php echo esc_html( $data['summary']->title ) ?></span>
<br>
<span class="github-heading">Issues: </span>
<span class="github-milestone-issues">
<?= esc_html( number_format_i18n( $data['summary']->open_issues ) ) ?> open, <?= esc_html( number_format_i18n( $data['summary']->closed_issues ) ) ?> closed.
<?php echo esc_html( number_format_i18n( $data['summary']->open_issues ) ) ?> open, <?php echo esc_html( number_format_i18n( $data['summary']->closed_issues ) ) ?> closed.
</span>
<br>
<?php if ( ! empty( $data['summary']->due_on ) ) : ?>
<span class="github-heading">Due: </span>
<span class="github-milestone-due-date">
<?= esc_html( date_format( date_create( $data['summary']->due_on ), 'jS F Y' ) ) ?>
<?php echo esc_html( date_format( date_create( $data['summary']->due_on ), 'jS F Y' ) ) ?>
</span>
<br>
<?php endif ?>
<p class="github-milestone-description">
<?= nl2br( esc_html( $data['summary']->description ) ) ?>
<?php echo nl2br( esc_html( $data['summary']->description ) ) ?>
</p>
<br>
</p>

Loading…
Cancel
Save