djgroen / hackerorslacker

Am I a hacker or a slacker?
GNU General Public License v3.0
1 stars 0 forks source link

Do not centre the source code. #1

Open bszcz opened 10 years ago

bszcz commented 10 years ago

Displaying the source code with centre alignment makes little sense, especially for indentation oriented languages like Python. Possible solution: remove centring here.

hogliux commented 10 years ago

Removing that centre also moves the whole source code box to the left on firefox. My html knowledge is pretty much 100% guess work so I'd be happy for any suggestions on how to get the source code box centred but the source code itself left aligned.

bszcz commented 10 years ago

The div encapsulating the source code could be centred on a page while the text inside it could be left aligned. However, the HTML of the frontend was moved to "gh-pages" here without a more specific location provided.

hogliux commented 10 years ago

It's now in the top level directory https://github.com/hogliux/hackerorslacker/blob/gh-pages/rate.html

bszcz commented 10 years ago

Right, I looked at the main page https://github.com/hogliux/hackerorslacker where the frontend is missing.

hogliux commented 10 years ago

Yes, we previously hosted the frontend on google app engine. However, it's cheaper and easier to maintain if we host the fronend on github-pages and therefore the frontend needs to be in the top-level directory in the gh-pages branch so that github-pages serves the pages correctly.

bszcz commented 10 years ago

OK, good to know.

bszcz commented 10 years ago

Couldn't run the app but here is an example of source code centring:

<body>
    <div style="width: 50%; margin-left: 25%; text-align: left">
        <pre>
for i in range(10):
    if i % 2 == 0:
        print i, "is even"
        </pre>
    </div>
</body>

Result can be seen at http://jsfiddle.net/j7NKv