Skip to content

Commit

Permalink
added logo and support for changing it
Browse files Browse the repository at this point in the history
  • Loading branch information
pejg12 committed Dec 25, 2012
1 parent fc2d91b commit e46b4c1
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 2 deletions.
4 changes: 4 additions & 0 deletions site/config.php
Expand Up @@ -116,6 +116,10 @@
'site_title' => 'Another MVC',
'slogan' => 'A PHP-based MVC-inspired CMF',
'footer' => '<p>Another MVC &copy; pejg12 (pejg12@student.bth.se) <br /> Fork of Lydia &copy; Mikael Roos (mos@dbwebb.se)</p>',
'favicon' => 'logo_60x72.png',
'logo' => 'logo_60x72.png',
'logo_width' => 60,
'logo_height'=> 72,
),
);

Expand Down
2 changes: 1 addition & 1 deletion themes/functions.php
Expand Up @@ -54,7 +54,7 @@ function get_debug() {
/**
* Prepend the base_url.
*/
function base_url($url) {
function base_url($url=null) {
return $amvc->request->base_url . trim($url, '/');
}

Expand Down
4 changes: 3 additions & 1 deletion themes/grid/default.tpl.php
Expand Up @@ -12,10 +12,11 @@

<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->

<link rel='shortcut icon' href='<?=theme_url($favicon)?>'/>
<link rel="stylesheet" href="<?=theme_parent_url('css/normalize.css')?>">
<link rel="stylesheet" href="<?=theme_parent_url('css/main.css')?>">
<link rel="stylesheet" href="<?=theme_url($stylesheet)?>">
<script src="<?=$themeUrl?>/js/vendor/modernizr-2.6.2.min.js"></script>
<script src="<?=theme_parent_url('js/vendor/modernizr-2.6.2.min.js')?>"></script>

<?php if(isset($inline_style)): ?>
<style>
Expand All @@ -41,6 +42,7 @@
</header>

<header>
<a href='<?=base_url()?>'><img src='<?=theme_url($logo)?>' alt='Logo' width='<?=$logo_width?>' height='<?=$logo_height?>' /></a>
<h1><?=$site_title?></h1>
<p><?=$slogan?></p>
</header>
Expand Down
Binary file added themes/grid/logo_60x72.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions themes/grid/style.css
Expand Up @@ -31,6 +31,13 @@ body>header {
body>header:nth-child(2) {
margin-top: 24px;
}
body>header:nth-child(2) img {
float: left;
margin-right: 20px;
}
body>header:nth-child(2) h1 {
margin-top: 0;
}
body>header#top {
position: absolute;
top: 0;
Expand Down
7 changes: 7 additions & 0 deletions themes/grid/style.less
Expand Up @@ -44,6 +44,13 @@ body>header {
clear: both;
&:nth-child(2) {
margin-top: @grid-height;
img {
float: left;
margin-right: (@gutter-width * 1px);
}
h1 {
margin-top: 0;
}
}
margin-bottom: @grid-height;
&#top {
Expand Down
1 change: 1 addition & 0 deletions themes/grid/verbose.tpl.php
Expand Up @@ -43,6 +43,7 @@
</header>

<header>
<a href='<?=base_url()?>'><img src='<?=theme_url($logo)?>' alt='Logo' width='<?=$logo_width?>' height='<?=$logo_height?>' /></a>
<h1><?=$site_title?></h1>
<p><?=$slogan?></p>
</header>
Expand Down

0 comments on commit e46b4c1

Please sign in to comment.