Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tcms
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
tcms
Commits
34bf3f2e
Commit
34bf3f2e
authored
Nov 14, 2011
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
This should have been in the previous commit too...
parent
acbe79bd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
46 deletions
+96
-46
css/main.css
css/main.css
+27
-24
index.php
index.php
+57
-17
templates/layout.tpl
templates/layout.tpl
+12
-5
No files found.
css/main.css
View file @
34bf3f2e
...
...
@@ -49,29 +49,32 @@ a, input {
padding
:
41px
10px
41px
0
;
border-right
:
1px
solid
#c5c5c5
;
font
:
normal
21px
/
23px
BebasNeueRegular
;
color
:
#7e7e7e
;
list-style
:
none
;
}
#menu
li
{
a
{
position
:
relative
;
display
:
block
;
width
:
138px
;
height
:
31px
;
padding
:
10px
40px
0
12px
;
cursor
:
pointer
;
}
#menu
li
:hover
{
color
:
#7e7e7e
;
text-decoration
:
none
;
self
:
hover
{
background-color
:
#e9e9e9
;
}
#menu
.active
{
}
}
.active
{
background-color
:
#9b9b9b
!important
;
color
:
#fff
;
}
}
#menu
.icon
{
.icon
{
position
:
absolute
;
top
:
14px
;
right
:
12px
;
width
:
16px
;
height
:
14px
;
}
}
\ No newline at end of file
index.php
View file @
34bf3f2e
<?php
//include_once '../debug.php';
include_once
'pquery.config.php'
;
include_once
PQUERY_ROOT
.
'pquery.php'
;
__p
::
require_plugins
(
'template'
,
'sql'
);
__p
::
require_plugins
(
'template'
,
'sql'
,
'url'
,
'js'
,
'css'
);
__tpl
::
set_root
(
'templates'
);
$menu
=
array
(
__url
::
add_handlers
(
array
(
'css/(.*)'
=>
'css_handler'
,
'js/(.*)'
=>
'js_handler'
,
''
=>
'layout'
,
'(.*)'
=>
'content'
));
header
(
'Vary: Accept-Encoding'
);
$handler
=
strstr
(
$_SERVER
[
'HTTP_ACCEPT_ENCODING'
],
'gzip'
)
!==
false
?
'ob_gzhandler'
:
''
;
ob_start
(
$handler
);
_url
(
$_SERVER
[
'QUERY_STRING'
])
->
handler
();
ob_end_flush
();
/**
*
*
* @param string $files One or more scripts separated by commas (',').
*/
function
js_handler
(
$files
)
{
$prepend_folder
=
create_function
(
'$x'
,
'return "js/$x";'
);
_js
(
array_map
(
$prepend_folder
,
explode
(
','
,
$files
)))
->
output
();
}
function
css_handler
(
$files
)
{
$prepend_folder
=
create_function
(
'$x'
,
'return "css/$x";'
);
_css
(
array_map
(
$prepend_folder
,
explode
(
','
,
$files
)))
->
output
();
}
function
content
()
{
header
(
'Content-Type: text/html; charset=utf-8'
);
echo
'content'
;
}
function
layout
()
{
header
(
'Content-Type: text/html; charset=utf-8'
);
$menu
=
array
(
array
(
'Pagina\'s'
,
'pages'
),
array
(
'Nieuws'
,
'news'
),
array
(
'Foto\'s'
,
'photos'
),
array
(
'Accounts'
,
'accounts'
),
array
(
'Instellingen'
,
'settings'
),
array
(
'Uitloggen'
,
'logout'
)
);
);
$layout
=
_tpl
(
'layout'
);
$layout
=
_tpl
(
'layout'
);
foreach
(
$menu
as
$i
=>
$item
)
{
foreach
(
$menu
as
$i
=>
$item
)
{
list
(
$title
,
$icon
)
=
$item
;
$item
=
$layout
->
data
->
add
(
'menu'
)
->
set
(
array
(
'title'
=>
$title
,
'icon'
=>
$icon
));
$i
||
$item
->
set
(
'active'
,
'active'
);
}
}
echo
$layout
->
parse
();
echo
$layout
->
parse
();
}
?>
\ No newline at end of file
templates/layout.tpl
View file @
34bf3f2e
...
...
@@ -3,19 +3,26 @@
<head>
<title>
Tcms
</title>
<meta
charset=
"utf-8"
/>
<link
href=
"css/main.css"
rel=
"stylesheet"
/>
<link
href=
"css/main"
rel=
"stylesheet"
/>
<script
async
type=
"text/javascript"
src=
"js/jquery-1.7.min,menu,list"
></script>
<!--
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$.getScript('js/menu,list');
</script>
-->
</head>
<body>
<div
id=
"wrapper"
>
<
ul
id=
"menu"
>
<
div
id=
"menu"
>
{
block
:
menu
}
<
li
class=
"
{
active
}
"
>
<
a
href=
"#
{
icon
}
"
class=
"
{
active
}
"
>
{
title
}
<div
class=
"icon
{
icon
}
"
></div>
</
li
>
</
a
>
{
end
}
</
ul
>
</
div
>
</div>
</body>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment