Creating a Graffiti Theme from Scratch

Last post 01-15-2008 1:28 PM by KevinTunis. 4 replies.
Page 1 of 1 (5 items)
  • Creating a Graffiti Theme from Scratch

    01-04-2008 3:34 PM

    First I just wanted to show the title and make it a link back for home - here is the basic idea http://www.screencast.com/t/a1Wj8bii . Now here is where I ran into some issues with CSS, when copied the html I had to make some changes. Below are the style.css page and the view layout.view page that Graffiti uses. When using the html the page looks like I want it with the title position but in the layout.view page, the title is not in the location I wanted; it is in the top left and it seem that no matter what changes I make it does not affect the title.

     

    Style.css

    body

    {

        margin: 0px;

        background-color: #000000;

        font-family: Arial, Helvetica, sans-serif;

        font-size: medium;

        font-weight: normal;

        color: #FFFFFF;

    }

    #header

    {

       margin: 0px;

        height: 150px;

    }

    #logo

    {

        margin: 40px 50px 10px 50px;

        font-family: Arial, Helvetica, sans-serif;

        font-size: x-large;

        color: #FFFFFF;

    }

     

    Layout.view

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

     

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

        <title>$title</title>

                                    $macros.Style("style.css","screen")

                                    $macros.Head()

    </head>

     

    <body>

     

            <div id="header">

                <div id="logo">

                <a href="$urls.Home" title="$data.Site.Title">$data.Site.Title</a>

                </div>

            </div>

     

    </body>

    </html>

     

  • Re: Creating a Graffiti Theme from Scratch

    01-04-2008 6:22 PM

    Update:

    I cleared my cache on my browser and refreshed; this didn't seem to do anything. I then copied the style.css and then deleted the file after that I created a new file with the same name than pasted the code back in. This seemed to take care of the location of the logo. Doing this I now have another issue, since I have used the logo div inside the header div my header image is not all the way to the top of the page but instead is the margin I set for the logo.

  • Re: Creating a Graffiti Theme from Scratch

    01-09-2008 12:29 AM

     Wow, that sounds brutal, the issues with the css and such not working. Man I would honestly markup and build the whole site out, grab the rendered html, and then style against that locally instead of messing with issues like that. If I had to stop styling everytime a CMS randomly decided it didn't like the css file for some reason, I think I'd be bald by now with frustration, lol. 

    But good work with the fix. Bookmarking this now, as I think I've run into something similar to that before.

    So the margin issue sounds like a fun css issue though, lol. For starters, what browser are you using Kevin?

    There's alot of different ways to do CSS-P, so if I can understand what it is exactly your trying to do with the logo inside the header, I think I could help ya out. For instance, I think if you adjust your CSS to take the exact same values as your logo's margins, take them out of the logo selector, and move them into your header selector as padding instead of margin, you'll nail what your looking for.

     Granted, I'm just guessing at what you actually are trying to do, hehe, and without seeing something I'm not sure, but I don't see any widths or anything on the logo / header, so I'm taking a stab. 

    ----
    Ken Hanson
    www.MarkupNinjas.com
    Damn Good Markup
  • Re: Creating a Graffiti Theme from Scratch

    01-09-2008 6:24 PM

    Ken,

    I had already created an HTML file with the theme as I wanted it. I ran into some behavior issue when I brought it over to the CSS and view files in Graffiti

    I wanted to try this in live mode as I feel that other users are likely to do just that. Besides converting a theme I know also that some are not going to want some of the themes available today and will probably go from scratch. I have been trying both IE 7 and Firefox -haven't tried any of the others yet.

    Let me update you and others to what I have so far. I have managed to get the margins where I want them. I have figured out the menu and how I want it to show up. I will include the code for the style.view and the layout.view below. My hopes are that when I am through here I can share the theme in XML as a basic theme without background images - let you add what you want.

    Kind of thinking out loud here, in the add widgets area, what would happen if instead of two columns there were three plus a top and bottom box and if in the widgets your post were a widget too, this way when a user went to a site and wanted the post on the left, it could be dragged and dropped just like the other widgets and then the user could put twitter widget in the center and the tag widget in the right as an example.

    I am currently working on how the code works for the post from what I see so far in most of the themes that came with the beta is after the navigation there is this code;

    <div id="content_box">

    <div id="content">        

    $childContent

    </div>

    <div id="sidebar">

     

    $childContent calling the file index.view which than calls the post.view. I did not include the div close above as the next called is the sidebar which I will get into later. My thoughts here are to wrap the post and to the left side of the post the leftsidebar and the rightsidebar.

    style.css
    body
    {
        margin: 0px;
        background-color: #000000;
        font-family: Arial, Helvetica, sans-serif;
        font-size: medium;
        font-weight: normal;
        color: #FFFFFF;
    }
    .header
    {
        margin: 0px;
        background-position: left top;
        background-image: url( 'Images/header.png' );
        background-repeat: repeat-x;
        height: 150px;
        top: 0px;
        
    }
    #logo
    {
        margin: 40px 50px 10px 50px;
        font-family: Arial, Helvetica, sans-serif;
        font-size: x-large;
        color: #FFFFFF;
        position: absolute;
     
    }
    #logo a
    {
            display: block;
        text-decoration: none;
        font-size: x-large;
        color: #FFFFFF;
    }
    #menu
    {
        background-image: url( 'images/navbar.png' );
        background-repeat: repeat-x;
        height: 30px;
       
    }
    #menu ul
    {
        list-style-type: none;
        margin: 0px 50px 0px 50px;
        padding-top: 5px;
    }
    #menu li {
        display: inline;
    }

    #menu ul li
    {
        font-size: 18px;
        float: left;
        padding-left: 5px;
        padding-right: 5px;
        text-decoration: none;
        color: #FFFFFF;
    }
    #menu a {
        display: block;
        text-decoration: none;
        font-size: 18px;
        color: #FFFFFF;
    }
    #menu a:hover {
        border: thin solid #3d3d3d;
            padding-right: 5px;
            padding-left: 5px;
    }
    #menu .selectedli a {
        border: thin solid #3d3d3d;
            background: #808080 left bottom;
            background-image: url( 'images/Button.png' );
            background-repeat: repeat-x;
            height: 22px;
            padding-right: 5px;
            padding-left: 5px;
    }
    #container
    {
        margin-right: 50px;
        margin-left: 50px;
        background-image: url('Images/content.png' );
        background-repeat: repeat-x;
        height: 250px;
        background-color: #474747;
    }
    #content
    {
        margin: 10px;
        float: left;
        width: 400px;
    }

    layout.view
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>$title</title>
            $macros.Style("style.css","screen")
            $macros.Head()
    </head>

    <body>
    <div class="header">
           
                <div id="logo">
                <a href="$urls.Home" title="$data.Site.Title">$data.Site.Title</a>
                </div>
    </div>      
    <div id="menu">

                <ul>
                    $macros.NavBar()
                    <li></li>
                </ul>
           
    </div>
    <div id="container">
    <div id="content">$post</div>
    </div>
    </body>
    </html>

  • Re: Creating a Graffiti Theme from Scratch

    01-15-2008 1:28 PM

    [re-post from my blog http://kevintunis.com/projects/new-graffiti-cms-theme/#comment_list]

    After several attempts to get the theme the way I wanted. I emailed Scott Watermasysk in which he replied that it was the CSS I was working on. I finally ended up deleting the theme I was working on as it simply was not responding at all. I did however get my theme to basically look like I wanted by modifying the theme that Rich Mercer ported from Free CSS Templates designed by NodeThirtyThree. In retrospect I am finding it seems easier to convert or port a theme to Graffiti.

    Some of the items that still need work;

    After you click on a post the title is not linked and shows up as grey in color supposed to be white

    Need a RSS icon or text to link to my feeds

    Sort order of my feed needs to be reversed - newest to the oldest

Page 1 of 1 (5 items)