134 lines
8.0 KiB
PHP
134 lines
8.0 KiB
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
?>
|
|
<section id="profile-header" class="container-fluid" data-type="background" data-speed="2.14"
|
|
style="background-image: url('<?= $data['headerImage'] ?>?w=1920')">
|
|
</section>
|
|
<div id="scroll-trigger"></div>
|
|
<section id="profile-sub-header" data-type="foreground" data-speed="10">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-xs-3 col-sm-2 col-md-4 col-lg-4 profile-card profile-picture-container">
|
|
<img src="<?= $data['profilePicture'] ?>?w=300" class="img-fluid rounded-circle profile-picture">
|
|
<?php if (isset($_SESSION['user']) && $_SESSION['user']['username'] == $data['username']): ?>
|
|
<div class="avatar-upload-overlay">
|
|
<i class="fa fa-upload"></i>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="col-xs-9 col-sm-10 col-md-8 col-lg-8">
|
|
<div class="row">
|
|
<div class="profile-stats border-custom">
|
|
<div class="item border-custom <?= isset($active) && $active == 'profile' ? 'active' : '' ?>">
|
|
<a href="<?= base_url('user/' . $data['username']) ?>">
|
|
<span class="label"><?= lang('profile_contributions') ?></span>
|
|
<span class="count <?= isset($active) && $active == 'profile' ? 'text-custom' : '' ?>"
|
|
data-count="<?= $stats['postCount'] + $stats['blogCount'] + $stats['commentCount'] ?>"><?= $stats['postCount'] + $stats['blogCount'] + $stats['commentCount'] ?></span>
|
|
</a>
|
|
</div>
|
|
<div class="item border-custom <?= isset($active) && $active == 'posts' ? 'active' : '' ?>">
|
|
<a href="<?= base_url('user/' . $data['username'] . '/posts') ?>">
|
|
<span class="label"><?= lang('profile_posts') ?></span>
|
|
<span class="count <?= isset($active) && $active == 'posts' ? 'text-custom' : '' ?>"
|
|
data-count="<?= $stats['postCount'] ?>"><?= $stats['postCount'] ?></span>
|
|
</a>
|
|
</div>
|
|
<div class="item border-custom <?= isset($active) && $active == 'blog-posts' ? 'active' : '' ?>">
|
|
<a href="<?= base_url('user/' . $data['username'] . '/blogposts') ?>">
|
|
<span class="label"><?= lang('profile_blog_posts') ?></span>
|
|
<span class="count <?= isset($active) && $active == 'blog-posts' ? 'text-custom' : '' ?>"
|
|
data-count="<?= $stats['blogCount'] ?>"><?= $stats['blogCount'] ?></span>
|
|
</a>
|
|
</div>
|
|
<div class="item border-custom <?= isset($active) && $active == 'blog-comments' ? 'active' : '' ?>">
|
|
<a href="<?= base_url('user/' . $data['username'] . '/comments') ?>">
|
|
<span class="label"><?= lang('profile_blog_comments') ?></span>
|
|
<span class="count <?= isset($active) && $active == 'blog-comments' ? 'text-custom' : '' ?>"
|
|
data-count="<?= $stats['commentCount'] ?>"><?= $stats['commentCount'] ?></span>
|
|
</a>
|
|
</div>
|
|
<div class="item border-custom <?= isset($active) && $active == 'followers' ? 'active' : '' ?>">
|
|
<a href="<?= base_url('user/' . $data['username'] . '/followers') ?>">
|
|
<span class="label"><?= lang('profile_followers') ?></span>
|
|
<span class="count <?= isset($active) && $active == 'followers' ? 'text-custom' : '' ?>"
|
|
data-count="<?= $stats['followerCount'] ?>"><?= $stats['followerCount'] ?></span>
|
|
</a>
|
|
</div>
|
|
<div class="item border-custom <?= isset($active) && $active == 'following' ? 'active' : '' ?>">
|
|
<a href="<?= base_url('user/' . $data['username'] . '/following') ?>">
|
|
<span class="label"><?= lang('profile_followed_users') ?></span>
|
|
<span class="count <?= isset($active) && $active == 'followers' ? 'text-custom' : '' ?>"
|
|
data-count="<?= $stats['followedCount'] ?>"><?= $stats['followedCount'] ?></span>
|
|
</a>
|
|
</div>
|
|
<?php if (isset($_SESSION['user']) && $_SESSION['user']['username'] == $data['username']): ?>
|
|
<a class="btn btn-default btn-sm edit-profile"
|
|
href="<?= base_url('user/' . $data['username'] . '/edit') ?>"><?= lang('profile_edit') ?></a>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<div class="modal fade" id="mustBeLoggedInModal" tabindex="-1" role="dialog" aria-labelledby="mustBeLoggedInModalLabel">
|
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title" id="mustBeLoggedInModalLabel">Du musst eingeloggt sein!</h4>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Schließen">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p class="text-danger"><b>Du musst in einen Account eingeloggt sein, um Nutzern folgen zu können!</b>
|
|
</p>
|
|
<p>Solltest du noch keinen Account besitzen, kannst du kostenlos einen erstellen. Es dauert nicht
|
|
lange!</p>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal"><?= lang('close') ?></button>
|
|
<a type="button" class="btn btn-primary"
|
|
href="<?= base_url('login?r=' . base64_encode(base_url(uri_string()))) ?>"><?= lang('login') ?></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="cantFollowYourself" tabindex="-1" role="dialog" aria-labelledby="cantFollowYourselfLabel">
|
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title" id="cantFollowYourselfLabel">Du kannst nicht dir selbst folgen!</h4>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Schließen">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p class="text-danger"><b>Aus Gründen der physikalischen Gesetze ist es leider nicht möglich, dass du
|
|
dir selbst folgst - geschweige denn, dass du dich selbst <i>ver</i>folgst.</b></p>
|
|
<p>Daher können wir es dir leider auch auf dieser Webseite nicht gewähren, dir selbst zu folgen! Außer,
|
|
du hast zufälligerweise ein Wurmloch entdeckt, oder, du weißt wie man durch die Zeit reisen kann.
|
|
Dann würden wir diese Entscheidung eventuell überdenken.</p>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Schließen</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style id="customColor">
|
|
.text-custom {
|
|
color: #2272ff;
|
|
}
|
|
|
|
.bg-custom {
|
|
background-color: #2272ff;
|
|
}
|
|
|
|
.border-custom {
|
|
border-color: #2272ff;
|
|
}
|
|
</style>
|