Skip to content

Commit

Permalink
user profile stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Shemona Singh authored and Shemona Singh committed Dec 6, 2017
2 parents a910e39 + c8952e2 commit 0a41df5
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 20 deletions.
6 changes: 2 additions & 4 deletions www/application/views/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<!-- header used to be here -->

<div class="home container">
<h1>All Tweets</h1>
<?php echo $id; ?>
<h1>My Feed</h1>

<?php $this->load->library('form_validation'); ?>
<form class="form" action="/index.php/all_tweets/search_keyword" method="post">
<div class="form-group">
Expand All @@ -24,7 +24,6 @@
<div class="row">
<div class="col-md-6">
<?php echo "<h3>No tweets found</h3>"; ?>

</div>
</div>
<div class="row tweet">
Expand All @@ -47,7 +46,6 @@
<div class="row">
<div class="col-md-6">
<?php echo "<h3>" . $row['first_name'] . " " . $row['last_name'] . " " . "<span class=\"handle\">" . "@" . $row['username'] . "</span>" . "</h3>"; ?>

</div>
<div class="col-md-3 date">
<?php
Expand Down
18 changes: 9 additions & 9 deletions www/application/views/templates/nav.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="/index.php/all_tweets">
<img class="home-icon" alt="Twitter" src="../../img/twitter.png">
</a>
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="/index.php/all_tweets">
<img class="home-icon" alt="Twitter" src="../../img/twitter.png">
</a>
</div>
<ul class="nav navbar-nav">
<li><a href="/index.php/all_tweets">Feed</a></li>
<li><a href="/index.php/user_tweets">Profile</a></li>
</div>
<ul class="nav navbar-nav">
<li><a href="/index.php/all_tweets">Home</a></li>
<li><a href="/index.php/user_tweets">Profile</a></li>
</div>
</nav>
22 changes: 18 additions & 4 deletions www/application/views/user.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<?php defined('BASEPATH') OR exit('No direct script access allowed');
ini_set('error_reporting', ~E_NOTICE);
?>
<div class="home container">
<h1>My Tweets</h1>
<h1>My Profile</h1>

<?php $this->load->library('form_validation'); ?>

<div class="row">
<div class="col-md-4 user-content">
<?php echo "<h3>" . $this->session->userdata('first_name') . " " . $this->session->userdata('last_name') . "</h3>"; ?>
<div class="row">
<?php
if($this->session->userdata('username') === "mona") echo "<img class=\"profile-icon\" alt=\"user\" src=\"../../img/mona.png\">";
else if($this->session->userdata('username') === "chris") echo "<img class=\"profile-icon\" alt=\"user\" src=\"../../img/chris.png\">";
else echo "<img class=\"profile-icon\" alt=\"user\" src=\"../../img/anon.png\">";
?>
</div>
<div class="row">
<?php
echo "<h3>" . $this->session->userdata('first_name') . " " . $this->session->userdata('last_name') . " " . "<span class=\"handle\">" . "@" . $this->session->userdata('username') . "</span>" . "</h3>";
echo "<h4 class=\"location\">" . "<span class=\"glyphicon glyphicon-map-marker\"></span>" . " " . $this->session->userdata('location') . "</h4>";
?>
</div>
</div>
<div class="col-md-8">
<div class="col-md-8 tweet-submit">
<?php echo form_open('user_tweets/create'); ?>

<div class="form-group">
Expand Down
26 changes: 23 additions & 3 deletions www/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,32 @@ img.icon.reg {

.user-content{
background-color:#ffffff;
border-radius: 50px;
border:1px solid #eeeeee;
border-radius: 4px;
padding-left:0;
text-align:center
}

.tweet-container{
.user-content h3{
margin-top:10px
}

.user-content img{
float:none;
margin: auto;
display: block;
width:80px;
padding-top:15px
}

.user-content .location{
font-size:16px;
}

.tweet-submit .form-control {
height: 121px!important;
}

.tweet-container{
margin-bottom:15px;
margin-top: 15px;
max-width:100%;
Expand Down
Binary file modified www/img/mona.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0a41df5

Please sign in to comment.