en.opensuse.org

The layout

You have a site that looks exactly as the site that you already can see online. You just see it offline, so some things have to be changed

The first thing to change is a lot of the layout. I want much less information. I only want to see the channels and none of the rest. To do this all you need to do is see that some part of the CSS do not show.

To look what are the things I want to eliminate, I first must know their name in css. I use Firefox and the plug in Web Developer I selected the Outline option and then looked what I wanted to hide. Next I need to insert it in the header. CSS is read in order and will overwrite anything that was decided before it.

To remove all of the datum, I just need to add the following

<style type="text/css">
.datum {display: none !important;}
</style>

It needs to be inserted just after all the rest of the css files, so I do the following:

#!/bin/bash
TMP=`mktemp`
trap "rm -rf $TMP*" 0 1 2 3 5 6 9 14 15
DIR=/srv/www/vhost/local/tv
FILE=$DIR/gids.php

cat > $TMP << EOF
<style type="text/css">
.footer { display: none !important; }
.crosslinks { display: none !important;}
.sites { display: none !important;}
.button_zenders_kiezen{ display: none !important;}
.curved {display: none !important;}
.datum {display: none !important;}
h3{ display: none !important;}
.insert{ display: none !important;}
.hgrid{ background-image: none;}
</style>
EOF
awk "/\[if IE\]/{system(\"cat $TMP\")};1" $FILE > $TMP.cat
mv $TMP.cat $FILE

This will not remove anything, it will just not show things. You can do any change to the layout that is done with CSS that you like. If you use Stylish for Firefox you can even do it to live sites that you see online and change the look of the site. It can odten hide a lot of the adds on your regular sites or just change the layout completely. Some knowedge of CSS to do big changes is needed. Just block, uh, blocks, is easy.

When you look at the site now, it should show you only the things that you want to see.

Next page