Contoh Syntax Highligher
Contoh Penulisan Syntax
<?php
class Home extends CIF_Controller {
public $layout = 'full';
public $module = 'home';
public $model = 'Projects_model';
public function __construct() {
parent::__construct();
$this->load->model($this->model);
$this->_primary_key = $this->{$this->model}->_primary_keys[0];
}
public function index() {
$data['testimonials'] = $this->db->get('testimonials')->result();
$data['clients'] = $this->db->get('clients')->result();
$data['experiences'] = $this->db->order_by('experience_id', 'DESC')->get('experiences')->result();
$data['education'] = $this->db->order_by('education_id', 'DESC')->get('education')->result();
$data['services'] = $this->db->get('services')->result();
$data['skills_cats'] = $this->db->get('skills_categories')->result();
$data['skills'] = $this->db->get('skills')->result();
$data['projects_categories'] = $this->db->select('projects_categories.*, (SELECT COUNT(*) FROM projects where projects_categories.project_category_id = projects.project_category_id) as count')->order_by('title')->get('projects_categories')->result();
$data['projects_count'] = $this->db
->select("COUNT(*) AS projects_count")
->get('projects')->row()->projects_count;
$data['projects'] = $this->db
->join('projects_categories', 'projects_categories.project_category_id = projects.project_category_id', 'inner')
->select('projects.*, projects_categories.title as category_project')
->get('projects')->result();
$data['posts'] = $this->db
->join('blog_categories', 'blog_categories.blog_category_id = blog.blog_category_id', 'inner')
->select('blog.*, blog_categories.title as post_category')
->limit(9)
->get('blog')->result();
$data['success'] = FALSE;
//CONTACT
$this->load->library('form_validation');
$this->form_validation->set_rules('name', 'lang:global_Name', 'trim|required');
$this->form_validation->set_rules('email', 'lang:global_email', 'trim|required|valid_email');
$this->form_validation->set_rules('message', 'lang:global_Message', 'trim|required');
if ($this->form_validation->run() == TRUE) {
$_data = [
'created' => date('Y-m-d H:i:s'),
'name' => $this->input->post('name'),
'email' => $this->input->post('email'),
'message' => $this->input->post('message')
];
$this->db->insert('messages', $_data);
$id = $this->db->insert_id();
//SEND EMAIL
@mail(config('webmaster_email'), config('title'), ""
. "Full Name: $_POST[name]\n"
. "Email: $_POST[email]\n"
. "Message: $_POST[message]\n"
. "Message_url: " . site_url("admin/messages/view/$id"));
$data['success'] = true;
}
$this->load->view($this->module, $data);
}
}
JavaSCript
/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here.
// For complete reference see:
// https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html
// The toolbar groups arrangement, optimized for two toolbar rows.
config.toolbarGroups = [
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
{ name: 'links' },
{ name: 'insert' },
{ name: 'forms' },
{ name: 'tools' },
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'others' },
'/',
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
{ name: 'styles' },
{ name: 'colors' },
{ name: 'about' }
];
// Remove some buttons provided by the standard plugins, which are
// not needed in the Standard(s) toolbar.
config.removeButtons = 'Underline,Subscript,Superscript';
// Set the most common block elements.
config.format_tags = 'p;h1;h2;h3;pre';
// Simplify the dialog windows.
config.removeDialogTabs = 'image:advanced;link:advanced';
config.extraPlugins = 'lineutils,widget,codesnippet,prism';
};
Css
/* Scrollbar Page */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track-piece {
background-color: #e6e7e8;
}
::-webkit-scrollbar-thumb {
height: 30px;
background-color: #bbdefb;
}
@media only screen and (min-width: 991px) {
body::-webkit-scrollbar,
.sub-page::-webkit-scrollbar,
.single-page-content::-webkit-scrollbar,
.header::-webkit-scrollbar,
.sub-page::-webkit-scrollbar-track,
.header::-webkit-scrollbar-track {
background-color: #f1f1f1;
}
}
/*Pagination*/
.pagination {
display: table;
margin: 40px auto 0;
}
.pagination li{
display: inline-block;
}
.pagination a {
float: left;
font-size: 16px;
padding: 15px 26px;
text-transform: capitalize;
transition: all 0.3s ease 0s;
position: relative;
border-radius: 0;
background-color: #f7f9fc;
color: #999;
}
.pagination .paginate_button.active a {
color: #ffffff;
}
.pagination a:hover{
opacity: 0.7;
}
.btn.active, .btn:active, .btn:focus{
outline: none;
box-shadow: none;
}
.pagination{
text-align: center;
}
/* Titles page*/
.section-title {
margin-bottom: 65px;
padding-top: 20px;
}
.main-title {
position: relative;
text-align: center;
}
.title-main-page {
position: relative;
z-index: 1;
}
.main-title h4 {
font-size: 35px;
text-transform: uppercase;
margin-bottom: 0px;
font-weight: 600;
}
.title-main-page h4:before {
content: '';
display: inline-block;
width: 60px;
height: 15px;
border-style: solid;
border-width: 5px 5px 0 5px;
position: absolute;
top: -20px;
left: 0;
right: 0;
margin: auto;
}
.section-title p {
font-weight: 400;
text-transform: uppercase;
padding-top: 5px;
}
.title-main-page p:after {
content: '';
display: block;
width: 57px;
margin-left: auto;
margin-right: auto;
padding-top: 10px;
}
.sub-title h6 {
color: #fff;
font-size: 25px;
font-weight: 500;
margin-left: 70px;
margin-bottom: 15px;
text-transform: uppercase;
}
.sub-title h6:before {
content: "";
position: absolute;
width: 60px;
height: 2px;
margin-top: 15px;
left: 15px;
}
.sub-title h2 {
font-size: 38px;
text-transform: uppercase;
font-weight: 700;
color: #fff;
}
.video-section .sub-title h6:before {
background: #f8f9fa;
}
.section-head {
margin-bottom: 60px;
position: relative;
}
.section-head h4 {
position: relative;
padding: 0 0 0 15px;
line-height: 1;
border-left: 1px solid #eee;
letter-spacing: 2px;
font-size: 26px;
font-weight: 600;
margin-bottom: 0;
}
.section-head h4:before {
content: '';
width: 1px;
height: 35px;
position: absolute;
left: -1px;
bottom: 0;
}
.section-head h4 span {
font-weight: 200;
padding-bottom: 15px;
display: block;
}
@media only screen and (max-width: 768px) {
.main-title h4 {
font-size: 28px;
}
.section-title {
margin-bottom: 40px;
padding-top: 40px;
}
.list-skills .section-head {
margin-bottom: 40px;
}
.section-head {
margin-bottom: 40px;
}
.section-head h4{
font-size: 24px;
}
.section-head h4 span {
font-size: 20px;
}
#titlebar {
margin-top: 30px;
}
#titlebar h2 {
font-size: 24px;
}
}