diff --git a/application/cache/index.html b/application/cache/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/cache/index.html +++ b/application/cache/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/config/autoload.php b/application/config/autoload.php index 7cdc9013c11..cecefb71eed 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -1,5 +1,5 @@ 'ua'); */ -$autoload['libraries'] = array(); +$autoload['libraries'] = array('database', 'session', 'form_validation'); /* | ------------------------------------------------------------------- @@ -89,7 +89,7 @@ | | $autoload['helper'] = array('url', 'file'); */ -$autoload['helper'] = array(); +$autoload['helper'] = array('url', 'file'); /* | ------------------------------------------------------------------- diff --git a/application/config/config.php b/application/config/config.php index 782b19c74b6..068481ade38 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -1,5 +1,5 @@ '', 'hostname' => 'localhost', - 'username' => '', + 'username' => 'root', 'password' => '', - 'database' => '', + 'database' => 'vietgram', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, diff --git a/application/config/index.html b/application/config/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/config/index.html +++ b/application/config/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/config/routes.php b/application/config/routes.php index 8ebf62bfa43..5e6d1d2b84f 100644 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -1,5 +1,5 @@ my_controller/index | my-controller/my-method -> my_controller/my_method */ -$route['default_controller'] = 'welcome'; +$route['default_controller'] = 'Login'; $route['404_override'] = ''; $route['translate_uri_dashes'] = FALSE; diff --git a/application/config/smileys.php b/application/config/smileys.php new file mode 100644 index 00000000000..abf9a898dde --- /dev/null +++ b/application/config/smileys.php @@ -0,0 +1,64 @@ + array('grin.gif', '19', '19', 'grin'), + ':lol:' => array('lol.gif', '19', '19', 'LOL'), + ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), + ':)' => array('smile.gif', '19', '19', 'smile'), + ';-)' => array('wink.gif', '19', '19', 'wink'), + ';)' => array('wink.gif', '19', '19', 'wink'), + ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), + ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), + ':-S' => array('confused.gif', '19', '19', 'confused'), + ':wow:' => array('surprise.gif', '19', '19', 'surprised'), + ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), + ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), + '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), + ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), + ':P' => array('raspberry.gif', '19', '19', 'raspberry'), + ':blank:' => array('blank.gif', '19', '19', 'blank stare'), + ':long:' => array('longface.gif', '19', '19', 'long face'), + ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), + ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), + ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), + '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), + ':down:' => array('downer.gif', '19', '19', 'downer'), + ':red:' => array('embarrassed.gif', '19', '19', 'red face'), + ':sick:' => array('sick.gif', '19', '19', 'sick'), + ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), + ':-/' => array('hmm.gif', '19', '19', 'hmmm'), + '>:(' => array('mad.gif', '19', '19', 'mad'), + ':mad:' => array('mad.gif', '19', '19', 'mad'), + '>:-(' => array('angry.gif', '19', '19', 'angry'), + ':angry:' => array('angry.gif', '19', '19', 'angry'), + ':zip:' => array('zip.gif', '19', '19', 'zipper'), + ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), + ':ahhh:' => array('shock.gif', '19', '19', 'shock'), + ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), + ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), + ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), + ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), + ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), + ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), + ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), + ':snake:' => array('snake.gif', '19', '19', 'snake'), + ':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'), + ':question:' => array('question.gif', '19', '19', 'question') + +); diff --git a/application/config/user_agents.php b/application/config/user_agents.php index c866903f6da..c1581e5cd3f 100644 --- a/application/config/user_agents.php +++ b/application/config/user_agents.php @@ -87,8 +87,7 @@ 'amaya' => 'Amaya', 'IBrowse' => 'IBrowse', 'Maxthon' => 'Maxthon', - 'Ubuntu' => 'Ubuntu Web Browser', - 'Vivaldi' => 'Vivaldi' + 'Ubuntu' => 'Ubuntu Web Browser' ); $mobiles = array( @@ -153,11 +152,6 @@ 'open web' => 'Open Web', 'openweb' => 'OpenWeb', 'meizu' => 'Meizu', - 'huawei' => 'Huawei', - 'xiaomi' => 'Xiaomi', - 'oppo' => 'Oppo', - 'vivo' => 'Vivo', - 'infinix' => 'Infinix', // Operating Systems 'android' => 'Android', diff --git a/application/controllers/Edit_profil.php b/application/controllers/Edit_profil.php new file mode 100644 index 00000000000..b9be7ed3bd7 --- /dev/null +++ b/application/controllers/Edit_profil.php @@ -0,0 +1,37 @@ +load->model('User'); + } + + public function index() + { + $data['title'] = 'Edit Profile | Vietgram'; + $username = $this->session->userdata('user'); + if ($username) { + $data['profile'] = $this->User->getUser($username); + $this->load->view('view_edit_profile', $data); + } else { + redirect('/login'); + } + } + + public function edit() + { + $id = $this->session->userdata('id'); + $data['username'] = $this->input->post('username'); + $data['name'] = $this->input->post('name'); + $data['website'] = $this->input->post('website'); + $data['bio'] = $this->input->post('bio'); + $data['email'] = $this->input->post('email'); + $data['phone'] = $this->input->post('phonenumber'); + $data['gender'] = $this->input->post('gender'); + $this->User->editUser($id, $data); + redirect('/profile'); + } +} diff --git a/application/controllers/Explore.php b/application/controllers/Explore.php new file mode 100644 index 00000000000..51bd451dca0 --- /dev/null +++ b/application/controllers/Explore.php @@ -0,0 +1,44 @@ +load->model('Follow'); + $this->load->model('User'); + } + + public function index() + { + $data['title'] = 'Explore | Vietgram'; + + $id = $this->session->userdata('id'); + if ($id) { + $data['users'] = $this->User->getSomeUser($id); + $this->load->view('view_explore', $data); + } else { + redirect('/login'); + } + } + + public function search() + { + $id = $this->session->userdata('id'); + $username = $this->input->get('search'); + $data['users'] = $this->User->searchUser($username, $id); + $this->load->view('view_explore', $data); + } + + public function add($id) + { + $data['id_user'] = $this->session->userdata('id'); + $data['id_user_follow'] = $id; + $followed = $this->Follow->checkFollowing($data); + if (!$followed) { + $this->Follow->addFollowing($data); + redirect('/explore'); + } + } +} diff --git a/application/controllers/Feed.php b/application/controllers/Feed.php new file mode 100644 index 00000000000..165daac53e3 --- /dev/null +++ b/application/controllers/Feed.php @@ -0,0 +1,24 @@ +load->model('User_model'); + $this->load->model('Post_model'); + } + + public function index() + { + $data['title'] = 'Feed | Vietgram'; + $username = $this->session->userdata('user'); + if ($username) { + $data['allPost'] = $this->Post->getAllPost(); + $this->load->view('view_feed', $data); + } else { + redirect('/login'); + } + } +} diff --git a/application/controllers/Login.php b/application/controllers/Login.php new file mode 100644 index 00000000000..7b58cb7e6c6 --- /dev/null +++ b/application/controllers/Login.php @@ -0,0 +1,32 @@ +load->model('User'); + } + + public function index() + { + $data['title'] = 'Vietgram | Login'; + $this->load->view('view_login'); + } + + public function login() + { + $data['username'] = $this->input->post('username'); + $data['password'] = $this->input->post('password'); + $result = $this->User->login($data); + if ($result) { + $this->session->set_userdata('id', $result->id_user); + $this->session->set_userdata('user', $data['username']); + redirect('/feed'); + } else { + $error = array('error_message' => "Username or Password ain't correct"); + $this->load->view('view_login', $error); + } + } +} diff --git a/application/controllers/Profile.php b/application/controllers/Profile.php new file mode 100644 index 00000000000..b5b936c19f4 --- /dev/null +++ b/application/controllers/Profile.php @@ -0,0 +1,39 @@ +load->model('User'); + $this->load->model('Follow'); + $this->load->model('Post'); + } + + public function index() + { + $data['title'] = 'Profile | Vietgram'; + + $id = $this->session->userdata('id'); + $username = $this->session->userdata('user'); + if ($username) { + $data = array( + 'profile' => $this->User->getUser($username), + 'post' => $this->Post->getPost($id), + 'followers' => $this->Follow->getFollowers($id), + 'following' => $this->Follow->getFollowing($id), + 'allPost' => $this->Post->getUserPost($id) + ); + $this->load->view('view_profile', $data); + } else { + redirect('/auth'); + } + } + + public function logout() + { + $this->session->sess_destroy(); + redirect('/login'); + } +} diff --git a/application/controllers/index.html b/application/controllers/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/controllers/index.html +++ b/application/controllers/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/controllers/login.php b/application/controllers/login.php new file mode 100644 index 00000000000..39df2dfd701 --- /dev/null +++ b/application/controllers/login.php @@ -0,0 +1,26 @@ + + * @see https://codeigniter.com/user_guide/general/urls.html + */ + public function index() + { + $this->load->view('view_login'); + } +} + diff --git a/application/core/index.html b/application/core/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/core/index.html +++ b/application/core/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/helpers/index.html b/application/helpers/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/helpers/index.html +++ b/application/helpers/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/hooks/index.html b/application/hooks/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/hooks/index.html +++ b/application/hooks/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/index.html b/application/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/index.html +++ b/application/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/language/english/index.html b/application/language/english/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/language/english/index.html +++ b/application/language/english/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/language/index.html b/application/language/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/language/index.html +++ b/application/language/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/libraries/index.html b/application/libraries/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/libraries/index.html +++ b/application/libraries/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/logs/index.html b/application/logs/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/logs/index.html +++ b/application/logs/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/models/Follow.php b/application/models/Follow.php new file mode 100644 index 00000000000..8b78d6016ae --- /dev/null +++ b/application/models/Follow.php @@ -0,0 +1,33 @@ +db->where('id_user', $data['id_user']); + $this->db->where('id_user_follow', $data['id_user_follow']); + $query = $this->db->get('follow'); + return ($query->num_rows() > 0) ? true : false; + } + + public function addFollowing($data) + { + $this->db->insert('follow', $data); + return ($this->db->affected_rows() == 1) ? true : false; + } + + public function getFollowing($id) + { + $this->db->where('id_user', $id); + $query = $this->db->get('follow'); + return $query->num_rows(); + } + + public function getFollowers($id) + { + $this->db->where('id_user_follow', $id); + $query = $this->db->get('follow'); + return $query->num_rows(); + } +} diff --git a/application/models/Post.php b/application/models/Post.php new file mode 100644 index 00000000000..4913719dbac --- /dev/null +++ b/application/models/Post.php @@ -0,0 +1,24 @@ +db->join('user', 'post.id_user = user.id_user'); + return $this->db->get('post')->result(); + } + + public function getPost($id) + { + $this->db->where('id_user', $id); + $query = $this->db->get('post'); + return $query->num_rows(); + } + + public function getUserPost($id) + { + $this->db->where('id_user', $id); + return $this->db->get('post')->result(); + } +} diff --git a/application/models/User.php b/application/models/User.php new file mode 100644 index 00000000000..c62135711ee --- /dev/null +++ b/application/models/User.php @@ -0,0 +1,50 @@ +db->where('username', $data['username']); + $this->db->where('password', $data['password']); + $query = $this->db->get('user'); + return ($query->num_rows() > 0) ? $query->row() : false; + } + + public function getUser($username) + { + $this->db->where('username', $username); + $query = $this->db->get('user'); + return ($query->num_rows() > 0) ? $query->row() : false; + } + + public function editUser($id, $data) + { + $this->db->where('id_user', $id); + $this->db->update('user', $data); + } + + public function getSomeUser($id) + { + $this->db->select('id_user_follow'); + $this->db->where('id_user', $id); + $data = $this->db->get('follow')->result_array(); + + foreach ($data as $following) { + $id_user_follow[] = $following['id_user_follow']; + } + + $this->db->where('id_user !=', $id); + if (!empty($id_user_follow)) { + $this->db->where_not_in('id_user', $id_user_follow); + } + return $this->db->get('user')->result(); + } + + public function searchUser($username, $id) + { + $this->db->where('id_user !=', $id); + $this->db->like('username', $username); + return $this->db->get('user')->result(); + } +} diff --git a/application/models/index.html b/application/models/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/models/index.html +++ b/application/models/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/third_party/index.html b/application/third_party/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/third_party/index.html +++ b/application/third_party/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/views/errors/cli/error_404.php b/application/views/errors/cli/error_404.php index 6984b61e993..af8fecd0ed7 100644 --- a/application/views/errors/cli/error_404.php +++ b/application/views/errors/cli/error_404.php @@ -1,8 +1,8 @@ - - -An uncaught Exception was encountered - -Type: -Message: -Filename: getFile(), "\n"; ?> -Line Number: getLine(); ?> - - - -Backtrace: -getTrace() as $error): ?> - - File: - Line: - Function: - - - - + + +An uncaught Exception was encountered + +Type: +Message: +Filename: getFile(), "\n"; ?> +Line Number: getLine(); ?> + + + +Backtrace: +getTrace() as $error): ?> + + File: + Line: + Function: + + + + diff --git a/application/views/errors/cli/error_general.php b/application/views/errors/cli/error_general.php index 6984b61e993..af8fecd0ed7 100644 --- a/application/views/errors/cli/error_general.php +++ b/application/views/errors/cli/error_general.php @@ -1,8 +1,8 @@ - - -A PHP Error was encountered - -Severity: -Message: -Filename: -Line Number: - - - -Backtrace: - - - File: - Line: - Function: - - - - + + +A PHP Error was encountered + +Severity: +Message: +Filename: +Line Number: + + + +Backtrace: + + + File: + Line: + Function: + + + + diff --git a/application/views/errors/cli/index.html b/application/views/errors/cli/index.html index bcb7cae3433..b48b4908687 100644 --- a/application/views/errors/cli/index.html +++ b/application/views/errors/cli/index.html @@ -1,11 +1,11 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - + + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + diff --git a/application/views/errors/html/error_404.php b/application/views/errors/html/error_404.php index d2f888c3f81..38689d75be5 100644 --- a/application/views/errors/html/error_404.php +++ b/application/views/errors/html/error_404.php @@ -1,87 +1,64 @@ - - - - - 404 Page Not Found - - - -
-

-
- -
-
- - + + + + +404 Page Not Found + + + +
+

+ +
+ + \ No newline at end of file diff --git a/application/views/errors/html/error_db.php b/application/views/errors/html/error_db.php index 23b0655fedc..899d072bd4b 100644 --- a/application/views/errors/html/error_db.php +++ b/application/views/errors/html/error_db.php @@ -1,87 +1,64 @@ - - - - - Database Error - - - -
-

-
- -
-
- - + + + + +Database Error + + + +
+

+ +
+ + \ No newline at end of file diff --git a/application/views/errors/html/error_exception.php b/application/views/errors/html/error_exception.php index befa12955e9..bde0dc3cffc 100644 --- a/application/views/errors/html/error_exception.php +++ b/application/views/errors/html/error_exception.php @@ -1,32 +1,32 @@ - - -
- -

An uncaught Exception was encountered

- -

Type:

-

Message:

-

Filename: getFile(); ?>

-

Line Number: getLine(); ?>

- - - -

Backtrace:

- getTrace() as $error): ?> - - - -

- File:
- Line:
- Function: -

- - - - - - -
+ + +
+ +

An uncaught Exception was encountered

+ +

Type:

+

Message:

+

Filename: getFile(); ?>

+

Line Number: getLine(); ?>

+ + + +

Backtrace:

+ getTrace() as $error): ?> + + + +

+ File:
+ Line:
+ Function: +

+ + + + + + +
\ No newline at end of file diff --git a/application/views/errors/html/error_general.php b/application/views/errors/html/error_general.php index ad106640970..3a64a4f456c 100644 --- a/application/views/errors/html/error_general.php +++ b/application/views/errors/html/error_general.php @@ -1,87 +1,64 @@ - - - - - Error - - - -
-

-
- -
-
- - + + + + +Error + + + +
+

+ +
+ + \ No newline at end of file diff --git a/application/views/errors/html/error_php.php b/application/views/errors/html/error_php.php index 8b445ef3960..be4d2f14e9f 100644 --- a/application/views/errors/html/error_php.php +++ b/application/views/errors/html/error_php.php @@ -1,33 +1,33 @@ - - -
- -

A PHP Error was encountered

- -

Severity:

-

Message:

-

Filename:

-

Line Number:

- - - -

Backtrace:

- - - - -

- File:
- Line:
- Function: -

- - - - - - - -
+ + +
+ +

A PHP Error was encountered

+ +

Severity:

+

Message:

+

Filename:

+

Line Number:

+ + + +

Backtrace:

+ + + + +

+ File:
+ Line:
+ Function: +

+ + + + + + + +
\ No newline at end of file diff --git a/application/views/errors/html/index.html b/application/views/errors/html/index.html index bcb7cae3433..b48b4908687 100644 --- a/application/views/errors/html/index.html +++ b/application/views/errors/html/index.html @@ -1,11 +1,11 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - + + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + diff --git a/application/views/errors/index.html b/application/views/errors/index.html index bcb7cae3433..b48b4908687 100644 --- a/application/views/errors/index.html +++ b/application/views/errors/index.html @@ -1,11 +1,11 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - + + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + diff --git a/application/views/index.html b/application/views/index.html index bcb7cae3433..b48b4908687 100644 --- a/application/views/index.html +++ b/application/views/index.html @@ -1,11 +1,11 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - + + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + diff --git a/application/views/view_edit_profile.php b/application/views/view_edit_profile.php new file mode 100644 index 00000000000..2f036ff024c --- /dev/null +++ b/application/views/view_edit_profile.php @@ -0,0 +1,118 @@ + + + + + + + + Edit Profile | Vietgram + + + + + + +
+
+
+
+ +
+

+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/application/views/view_explore.php b/application/views/view_explore.php new file mode 100644 index 00000000000..8dbf00214b9 --- /dev/null +++ b/application/views/view_explore.php @@ -0,0 +1,105 @@ + + + + + + + + Explore | Vietgram + + + + + + +
+ + + Tidak ditemukan + + + +
+ + + + + \ No newline at end of file diff --git a/application/views/view_feed.php b/application/views/view_feed.php new file mode 100644 index 00000000000..6f046271e86 --- /dev/null +++ b/application/views/view_feed.php @@ -0,0 +1,118 @@ + + + + + + + + Feed | Vietgram + + + + + + +
+ +
+
+ + +
+ +
+
+ + + + + + +
+ +
    +
  • + username ?> status ?> +
  • +
  • + serranoarevalo love this! +
  • +
  • + serranoarevalo love this! +
  • +
  • + serranoarevalo love this! +
  • +
  • + serranoarevalo love this! +
  • +
+ 2 hours ago +
+ + +
+
+
+ +
+ + + + \ No newline at end of file diff --git a/application/views/view_login.php b/application/views/view_login.php new file mode 100644 index 00000000000..41b5302e348 --- /dev/null +++ b/application/views/view_login.php @@ -0,0 +1,74 @@ + + + + + Vietgram | Login + + + + + + + + + +
+
+ +
+
+ + + +
+
+ + + + \ No newline at end of file diff --git a/application/views/view_profile.php b/application/views/view_profile.php new file mode 100644 index 00000000000..1c101f3d269 --- /dev/null +++ b/application/views/view_profile.php @@ -0,0 +1,126 @@ + + + + + + + + Profile | Vietgram + + + + + + +
+
+
+ +
+
+
+

username; ?>

+ Edit profile + +
+
    +
  • + posts +
  • +
  • + followers +
  • +
  • + following +
  • +
+

+ + name; ?> +
+
bio; ?> + website; ?> +

+
+
+ + + +
+ +
+ +
+ + + likes; ?> + + + + 344 + +
+
+ +
+
+ + + + \ No newline at end of file diff --git a/application/views/welcome_message.php b/application/views/welcome_message.php index dae768bc899..10d05975eb5 100644 --- a/application/views/welcome_message.php +++ b/application/views/welcome_message.php @@ -1,116 +1,100 @@ - - - - - Welcome to CodeIgniter - - - - -
-

- CodeIgniter -

- -
-

The page you are looking at is being generated dynamically by CodeIgniter.

- -

If you would like to edit this page you'll find it located at:

- application/views/welcome_message.php - -

The corresponding controller for this page is found at:

- application/controllers/Welcome.php - -

If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.

-
- - -
- - + + + + + Welcome to CodeIgniter + + + + + +
+

Welcome to CodeIgniter!

+ +
+

The page you are looking at is being generated dynamically by CodeIgniter.

+ +

If you would like to edit this page you'll find it located at:

+ application/views/welcome_message.php + +

The corresponding controller for this page is found at:

+ application/controllers/Welcome.php + +

If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.

+
+ + +
+ + + diff --git a/assets/css/edit-profile.css b/assets/css/edit-profile.css new file mode 100644 index 00000000000..75465431998 --- /dev/null +++ b/assets/css/edit-profile.css @@ -0,0 +1,100 @@ +#edit-profile { + display: flex; + justify-content: center; +} + +#edit-profile .edit-profile__container { + background-color: white; + border: 1px solid #e6e6e6; + width: 100%; + max-width: 800px; +} + +#edit-profile .edit-profile__container { + padding: 40px 0; +} + +#edit-profile .edit-profile__header { + display: flex; + align-items: center; + margin-bottom: 50px; +} + +.edit-profile__header .edit-profile__avatar-container { + width: 200px; +} + +.edit-profile__avatar-container { + display: flex; + justify-content: flex-end; + margin-right: 35px; +} + +.edit-profile__avatar-container img { + width: 38px; + height: 38px; + border-radius: 50%; +} +.edit-profile__header h4 { + font-size: 18px; + font-weight: 600; +} + +.edit-profile__form .form__row { + display: flex; +} + +.form__row { + margin-bottom: 20px; + display: flex; + align-items: center; +} + +.form__row .form__label { + width: 200px; + display: block; + text-align: right; + margin-right: 35px; + font-weight: 600; + font-size: 16px; +} + +.form__row label { + font-size: 15px; + width: 80%; +} + +.form__row .form__input, +.form__row textarea { + padding: 8px; + width: 255px; + resize: vertical; + border: 0; + border: 1px solid #e6e6e6; + border-radius: 3px; +} + +.form__row input[type="checkbox"] { + margin-right: 15px; +} + +#edit-profile select { + background: 0 0; + border: 1px solid #efefef; + border-radius: 3px; + color: #262626; + font-size: 16px; + height: 32px; + padding: 0 30px 0 10px; +} + +#edit-profile input[type="submit"] { + margin-left: 235px; + border: 0; + color: white; + font-weight: 600; + border-radius: 3px; + background-color: var(--fd-blue); + font-size: 14px; + padding: 7px 25px; +} diff --git a/assets/css/explore.css b/assets/css/explore.css new file mode 100644 index 00000000000..d4a8f6ba2af --- /dev/null +++ b/assets/css/explore.css @@ -0,0 +1,70 @@ +#explore { + display: flex; + justify-content: center; + align-items: flex-start; + min-height: 500px; +} + +#explore .explore__users { + background-color: white; + border: 1px solid #e6e6e6; + border-radius: 3px; + width: 100%; + max-width: 600px; +} + +.explore__users .explore__user { + padding: 10px 15px; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 1px solid #e6e6e6; +} + +.explore__users .explore__user:last-child { + border: 0; +} + +.explore__user .explore__avatar { + width: 55px; + border-radius: 50%; +} + +.explore__user .explore__user-column { + display: flex; + align-items: center; +} + +.explore__user .explore__info { + margin-left: 15px; +} + +.explore__info .explore__username { + display: block; + font-weight: 600; + margin-bottom: 5px; +} + +.explore__info .explore__full-name { + color: #999; +} + +.explore__user-column button { + background-color: var(--fd-blue); + color: white; + border: 0; + font-weight: 600; + padding: 5px 10px; + font-size: 14px; + border-radius: 3px; + cursor: pointer; +} + +.explore__user-column button:active, +.explore__user-column button:focus { + outline: none; +} + +.explore__user-column:active { + opacity: 0.9; +} diff --git a/assets/css/feed.css b/assets/css/feed.css new file mode 100644 index 00000000000..cc88c16ef17 --- /dev/null +++ b/assets/css/feed.css @@ -0,0 +1,101 @@ +#feed { + display: flex; + align-items: center; + flex-direction: column; +} + +#feed .photo { + background-color: white; + border: 1px solid #e6e6e6; + border-radius: 3px; + width: 100%; + max-width: 600px; + margin-bottom: 65px; +} + +.photo .photo__header { + padding: 15px; + display: flex; + align-items: center; +} + +.photo__header .photo__avatar { + width: 32px; + border-radius: 50%; + margin-right: 10px; +} + +.photo .photo__user-info .photo__author { + display: block; + font-weight: 600; + margin-bottom: 5px; +} + +.photo > img { + max-width: 100%; +} + +.photo .photo__info { + padding: 15px 20px; +} + +.photo__actions { + margin-bottom: 15px; + font-size: 115%; +} + +.photo__actions .photo__action:first-child { + margin-right: 15px; +} + +.photo__actions .photo__action { + cursor: pointer; +} + +.photo .photo__likes { + font-weight: 600; + margin-bottom: 10px; + display: block; +} + +.photo .photo__add-comment-container { + margin-top: 15px; + border-top: 1px solid #e6e6e6; + padding-top: 10px; + display: flex; + justify-content: space-between; + align-items: center; +} + +.photo__add-comment-container textarea { + width: 90%; + border: 0; + font-size: 14px; + resize: none; + height: 20px; +} + +.photo__add-comment-container textarea:focus, +.photo__add-comment-container textarea:active { + outline: none; +} + +.photo__add-comment-container i { + cursor: pointer; +} + +.photo .photo__time-ago { + font-size: 10px; + text-transform: uppercase; + color: #999; + margin-top: 10px; + display: block; +} + +.photo__comment { + margin-bottom: 10px; +} + +.photo__comments .photo__comment-author { + font-weight: 600; +} diff --git a/assets/css/footer.css b/assets/css/footer.css new file mode 100644 index 00000000000..0d5b8cbae0e --- /dev/null +++ b/assets/css/footer.css @@ -0,0 +1,30 @@ +.footer { + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + max-width: 900px; + margin: 30px auto; + text-transform: uppercase; + font-size: 12px; + font-weight: 600; +} + +.footer .footer__list { + padding: 0; + list-style-type: none; + display: flex; +} + +.footer .footer__copyright { + color: hsl(0, 0%, 60%); +} + +.footer__list .footer__list-item { + margin-right: 10px; +} + +.footer .footer__link { + text-decoration: none; + color: var(--link-color); +} diff --git a/assets/css/globals.css b/assets/css/globals.css new file mode 100644 index 00000000000..cea96117b23 --- /dev/null +++ b/assets/css/globals.css @@ -0,0 +1,21 @@ +body { + background-color: white; + background-color: var(--background-color); + font-size: 14px; + font-family: "Open Sans", sans-serif; +} + +main { + animation: fadeInMain 0.5s linear; +} + +@keyframes fadeInMain { + from { + opacity: 0; + transform: translateY(10px); + } + to { + opacity: 1; + transform: translateY(0px); + } +} diff --git a/assets/css/login.css b/assets/css/login.css new file mode 100644 index 00000000000..f5657f0c13a --- /dev/null +++ b/assets/css/login.css @@ -0,0 +1,128 @@ +#login { + width: 100%; + max-width: 800px; + margin: 45px auto; + display: flex; + justify-content: space-around; +} + +#login .login__column { + width: 45%; +} + +.login__column .login__phone { + max-width: 100%; +} + +.login__column .login__box { + background-color: white; + border: 1px solid #e6e6e6; +} + +.login__column .login__box--transparent { + background: none; + border: 0; + display: flex; + flex-direction: column; + align-items: center; + margin-top: 35px; +} + +.login__column .login__appstores { + margin-top: 20px; +} + +.login__appstores .login__appstore { + height: 40px; +} + +#login .login__box { + padding: 30px 0; + text-align: center; +} + +#login .login__box:first-child { + margin-bottom: 10px; + padding-left: 40px; + padding-right: 40px; +} + +.login__column .login__logo { + height: 50px; +} + +.login__form input { + display: block; + width: 100%; + box-sizing: border-box; + padding: 7px; + font-size: 14px; + border: 0; + border: 1px solid #e6e6e6; + border-radius: 5px; + background: #fafafa; +} + +.login__form input:focus { + outline: none; + border: 1px solid #a9a9a9; +} + +.login__form input:first-child { + margin-bottom: 5px; +} + +.login__form input[type="submit"] { + background-color: #3f99ed; + border: 0; + padding: 5px; + margin-top: 15px; + margin-bottom: 20px; + color: white; + font-weight: 600; +} + +#login .login__divider { + display: block; + text-transform: uppercase; + font-weight: 600; + color: #999; + margin-bottom: 20px; + position: relative; + width: 100%; +} + +#login .login__link { + display: block; + text-decoration: none; + color: #003569; +} + +#login .login__link--small { + margin-top: 30px; +} + +.login__box a { + text-decoration: none; + color: var(--fd-blue); +} + +#login .login__divider:before { + content: ""; + height: 1px; + background-color: rgba(153, 153, 153, 0.5); + width: 40%; + position: absolute; + left: 0; + top: 10px; +} + +#login .login__divider:after { + content: ""; + height: 1px; + background-color: rgba(153, 153, 153, 0.5); + width: 40%; + position: absolute; + right: 0; + top: 10px; +} diff --git a/assets/css/mobile.css b/assets/css/mobile.css new file mode 100644 index 00000000000..fc236e0553c --- /dev/null +++ b/assets/css/mobile.css @@ -0,0 +1,110 @@ +@media screen and (min-width: 375px) and (max-width: 667px) { + .navigation { + padding: 0 20px; + margin-bottom: 0; + } + .navigation input, + .navigation .fa-search { + display: none; + } + #feed .photo { + background-color: transparent; + border: 0; + margin-bottom: 20px; + } + #feed .photo .photo__add-comment-container { + display: none; + } + .footer { + width: 80%; + } + .footer, + .footer .footer__list { + flex-wrap: wrap; + justify-content: center; + } + .footer__list .footer__list-item { + margin-bottom: 10px; + } + #login .login__column { + width: 100%; + } + #login .login__column:first-child { + display: none; + } + #login .login__box { + background-color: transparent; + border: 0; + } + #profile { + margin-top: 50px; + } + #profile .profile__header { + flex-direction: column; + align-items: center; + } + #profile .profile__title { + flex-wrap: wrap; + justify-content: center; + width: 100%; + } + .profile__title h3 { + margin: 20px 0; + } + .profile__title a { + margin-right: auto; + } + .profile__stats { + justify-content: space-between; + } + .profile__stats .profile__stat { + text-align: center; + margin-right: 0; + } + .profile__stat span { + display: block; + } + .profile__photos .profile__photo { + width: 33%; + margin-bottom: 0; + } + .profile__photos { + margin-bottom: 50px; + } + #explore .explore__users { + background-color: transparent; + border: 0; + } + .explore__users .explore__user { + border: 0; + } + #edit-profile > .edit-profile__container { + border: 0; + } + #edit-profile .form__row { + flex-direction: column; + } + .form__row .form__label { + margin: 0; + text-align: center; + margin-bottom: 10px; + } + #edit-profile input[type="submit"] { + width: 120px; + margin: 0; + margin-top: 20px; + } + #edit-profile .edit-profile__container { + display: flex; + flex-direction: column; + align-items: center; + } + #edit-profile .edit-profile__form { + display: flex; + flex-direction: column; + align-items: center; + } + .edit-profile__header .edit-profile__avatar-container { + width: 0; + } +} diff --git a/assets/css/navigation.css b/assets/css/navigation.css new file mode 100644 index 00000000000..cb729669732 --- /dev/null +++ b/assets/css/navigation.css @@ -0,0 +1,77 @@ +.navigation { + height: 75px; + background-color: white; + border-bottom: 1px solid #e6e6e6; + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 100px; + margin-bottom: 60px; +} + +.navigation .navigation__column:first-child img { + height: 45px; +} + +.navigation .navigations__links { + display: flex; + padding: 0; + list-style-type: none; +} + +.navigation .navigation__list-item { + margin-left: 30px; + padding: 0 2px; + opacity: 0; + animation: slideNavLink 0.5s ease-out forwards; +} + +@keyframes slideNavLink { + from { + transform: translateY(-10px); + } + to { + opacity: 1; + transform: none; + } +} + +.navigation .navigation__list-item:nth-child(2) { + animation-delay: 0.2s; +} + +.navigation .navigation__list-item:last-child { + animation-delay: 0.3s; +} + +.navigation__link { + color: rgba(0, 0, 0, 0.8); + font-size: 18px; +} + +.navigation__column input { + padding: 5px 0; + padding-left: 60px; + border: 0; + border: 1px solid #e6e6e6; + border-radius: 3px; + background: #fafafa; + font-size: 16px; +} + +.navigation__column input:focus { + outline: none; + border: 1px solid #a9a9a9; +} + +.navigation__column { + position: relative; +} + +.navigation__column .fa-search { + position: absolute; + top: 10px; + left: 10px; + color: rgba(0, 0, 0, 0.5); + font-size: 12px; +} diff --git a/assets/css/profile.css b/assets/css/profile.css new file mode 100644 index 00000000000..5d115215978 --- /dev/null +++ b/assets/css/profile.css @@ -0,0 +1,161 @@ +#profile { + display: flex; + flex-direction: column; + align-items: center; +} + +#profile .profile__header { + max-width: 935px; + width: 100%; + display: flex; + margin-bottom: 50px; + font-size: 110%; +} + +.profile__header .profile__column { + width: 70%; +} + +.profile__header .profile__column:first-child { + width: 30%; + display: flex; + align-items: center; + justify-content: center; +} + +.profile__column:first-child img { + border-radius: 50%; + transform-style: preserve-3d; + transition: transform 0.5s linear; + animation: rotateLynn 1s linear infinite; +} + +@keyframes rotateLynn { + from { + transform: rotateY(0turn); + } + to { + transform: rotateY(1turn); + } +} + +.profile__column .profile__title, +.profile__column .profile__stats { + display: flex; + align-items: center; +} + +.profile__column .profile__title { + margin-bottom: 30px; +} + +.profile__title .profile__username { + margin-right: 25px; + font-size: 32px; + font-weight: 300; +} + +.profile__title a { + margin-right: 10px; + text-decoration: none; + color: inherit; + font-weight: 600; + padding: 5px 25px; + border: 1px solid #e6e6e6; + border-radius: 3px; + transition: all 0.3s ease-in-out; +} + +.profile__title a:hover { + background-color: #3f99ed; + color: white; + border-color: #3f99ed; +} + +.profile__title i { + cursor: pointer; + transition: transform 1s ease-in; +} + +.profile__title i:hover { + transform: rotate(2turn); +} + +.profile__column .profile__stats { + margin-bottom: 30px; +} + +.profile__stats .profile__stat { + margin-right: 40px; +} + +.profile__stat .stat__number { + font-weight: 600; +} + +.profile__bio .profile__full-name { + font-weight: 600; +} + +.profile__bio a { + color: var(--link-color); + font-weight: 600; + text-decoration: none; + display: block; +} + +.profile__column .profile__bio { + line-height: 125%; +} + +#profile .profile__photos { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + max-width: 936px; + width: 100%; +} + +.profile__photos .profile__photo { + width: 31%; + margin-bottom: 35px; + position: relative; +} + +.profile__photo img { + max-width: 100%; +} + +.profile__photo .profile__photo-overlay { + position: absolute; + top: 0; + background-color: rgba(0, 0, 0, 0.5); + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + color: white; + font-weight: 600; + opacity: 0; + transition: opacity 0.2s linear; +} + +.profile__photo:hover .profile__photo-overlay { + opacity: 1; +} + +.profile__photo-overlay .overlay__item { + font-size: 130%; + display: flex; + align-items: center; +} +.profile__photo-overlay .overlay__item:last-child { + margin-left: 10px; + /**/ +} + +.profile__photo-overlay .overlay__item i { + font-size: 130%; + margin-right: 5px; +} diff --git a/assets/css/reset.css b/assets/css/reset.css new file mode 100644 index 00000000000..82935aeceff --- /dev/null +++ b/assets/css/reset.css @@ -0,0 +1,124 @@ +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} +body { + line-height: 1; +} +ol, +ul { + list-style: none; +} +blockquote, +q { + quotes: none; +} +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ""; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/assets/css/styles.css b/assets/css/styles.css new file mode 100644 index 00000000000..09dd98497fc --- /dev/null +++ b/assets/css/styles.css @@ -0,0 +1,12 @@ +@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,600"); +@import "reset.css"; +@import "variables.css"; +@import "globals.css"; +@import "login.css"; +@import "footer.css"; +@import "navigation.css"; +@import "explore.css"; +@import "feed.css"; +@import "profile.css"; +@import "edit-profile.css"; +@import "mobile.css"; diff --git a/assets/css/variables.css b/assets/css/variables.css new file mode 100644 index 00000000000..0620c7ea3f3 --- /dev/null +++ b/assets/css/variables.css @@ -0,0 +1,5 @@ +:root { + --background-color: #fafafa; + --fd-blue: #3897f0; + --link-color: #003569; +} diff --git a/assets/images/android.png b/assets/images/android.png new file mode 100644 index 00000000000..306aa45f29e Binary files /dev/null and b/assets/images/android.png differ diff --git a/assets/images/avatar.jpg b/assets/images/avatar.jpg new file mode 100644 index 00000000000..5ef783b9abf Binary files /dev/null and b/assets/images/avatar.jpg differ diff --git a/assets/images/feedPhoto.jpg b/assets/images/feedPhoto.jpg new file mode 100644 index 00000000000..f1da1a8cf0d Binary files /dev/null and b/assets/images/feedPhoto.jpg differ diff --git a/assets/images/ios.png b/assets/images/ios.png new file mode 100644 index 00000000000..460f81ab32d Binary files /dev/null and b/assets/images/ios.png differ diff --git a/assets/images/loginLogo.png b/assets/images/loginLogo.png new file mode 100644 index 00000000000..332881b2ad3 Binary files /dev/null and b/assets/images/loginLogo.png differ diff --git a/assets/images/logo.png b/assets/images/logo.png new file mode 100644 index 00000000000..e2ab02a7522 Binary files /dev/null and b/assets/images/logo.png differ diff --git a/assets/images/phoneImage.png b/assets/images/phoneImage.png new file mode 100644 index 00000000000..949173e7366 Binary files /dev/null and b/assets/images/phoneImage.png differ