Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tcms
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
tcms
Commits
34bf3f2e
Commit
34bf3f2e
authored
13 years ago
by
Taddeus Kroes
Browse files
Options
Downloads
Patches
Plain Diff
This should have been in the previous commit too...
parent
acbe79bd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
css/main.css
+27
-24
27 additions, 24 deletions
css/main.css
index.php
+57
-17
57 additions, 17 deletions
index.php
templates/layout.tpl
+12
-5
12 additions, 5 deletions
templates/layout.tpl
with
96 additions
and
46 deletions
css/main.css
+
27
−
24
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
{
position
:
relative
;
width
:
138px
;
height
:
31px
;
padding
:
10px
40px
0
12px
;
cursor
:
pointer
;
}
#menu
li
:hover
{
background-color
:
#e9e9e9
;
}
#menu
.active
{
background-color
:
#9b9b9b
!important
;
color
:
#fff
;
}
#menu
.icon
{
position
:
absolute
;
top
:
14px
;
right
:
12px
;
width
:
16px
;
height
:
14px
;
a
{
position
:
relative
;
display
:
block
;
width
:
138px
;
height
:
31px
;
padding
:
10px
40px
0
12px
;
color
:
#7e7e7e
;
text-decoration
:
none
;
self
:
hover
{
background-color
:
#e9e9e9
;
}
}
.active
{
background-color
:
#9b9b9b
!important
;
color
:
#fff
;
}
.icon
{
position
:
absolute
;
top
:
14px
;
right
:
12px
;
width
:
16px
;
height
:
14px
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
index.php
+
57
−
17
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
(
array
(
'Pagina\'s'
,
'pages'
),
array
(
'Nieuws'
,
'news'
),
array
(
'Foto\'s'
,
'photos'
),
array
(
'Accounts'
,
'accounts'
),
array
(
'Instellingen'
,
'settings'
),
array
(
'Uitloggen'
,
'logout'
)
);
$layout
=
_tpl
(
'layout'
);
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'
);
__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'
;
}
echo
$layout
->
parse
();
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'
);
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
();
}
?>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
templates/layout.tpl
+
12
−
5
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>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment