Skip to content

Commit

Permalink
Merge pull request danpros#838 from pftnhr/master
Browse files Browse the repository at this point in the history
Added Bluesky to social accounts by @pftnhr
  • Loading branch information
danpros authored Nov 19, 2024
2 parents 973a2c5 + 56f5460 commit cb7a8a6
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/config.ini.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ blog.path = "blog"
blog.string = "Blog"

; Social account
social.bluesky = ""
social.twitter = ""
social.facebook = ""
social.instagram = ""
Expand Down
3 changes: 3 additions & 0 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ protected function runForm()
<input name="blog_copyright" value="" placeholder="(c) Your name.">
<br/>
<br/>
<label for="social_bluesky">Bluesky Link:</label>
<input name="social_bluesky" type="url" value="" placeholder="https://bsky.app/profile/username.bsky.social">
<br/>
<label for="social_twitter">Twitter Link:</label>
<input name="social_twitter" type="url" value="" placeholder="https://twitter.com/gohtmly">
<br/>
Expand Down
6 changes: 6 additions & 0 deletions system/admin/views/config-widget.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@
<br>
<h4><?php echo i18n('Social_Media');?></h4>
<hr>
<div class="form-group row">
<label for="social.bluesky" class="col-sm-2 col-form-label">Bluesky</label>
<div class="col-sm-10">
<input type="text" name="-config-social.bluesky" class="form-control" id="social.bluesky" value="<?php echo config('social.bluesky');?>" placeholder="https://bsky.app/profile/username.bsky.social">
</div>
</div>
<div class="form-group row">
<label for="social.twitter" class="col-sm-2 col-form-label">Twitter</label>
<div class="col-sm-10">
Expand Down
1 change: 1 addition & 0 deletions system/configList.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"blog.enable",
"blog.path",
"blog.string",
"social.bluesky",
"social.twitter",
"social.facebook",
"social.instagram",
Expand Down
4 changes: 4 additions & 0 deletions system/includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2469,6 +2469,7 @@ function tab($p)
// Social links
function social($class = null)
{
$bluesky = config('social.bluesky');
$twitter = config('social.twitter');
$facebook = config('social.facebook');
$instagram = config('social.instagram');
Expand All @@ -2482,6 +2483,9 @@ function social($class = null)

$social .= '<div class="social-logo ' . $class . '">';
$social .= '<link rel="stylesheet" id="social-logo-style" href="'. site_url() .'system/resources/css/social-logos.css" type="text/css" media="all">';
if (!empty($bluesky)) {
$social .= '<a class="social-logo-bluesky" href="' . $bluesky . '" target="_blank" rel="nofollow"><span class="screen-reader-text">Bluesky</span></a>';
}
if (!empty($twitter)) {
$social .= '<a class="social-logo-x" href="' . $twitter . '" target="_blank" rel="nofollow"><span class="screen-reader-text">Twitter</span></a>';
}
Expand Down

0 comments on commit cb7a8a6

Please sign in to comment.