Depends: #5
Branch: fragments* (without the *, means see below)
Let's bring all that stuff from the static into the dynamic page, but we'll break it into separate fragments you can include from the index.html page.
- create a file called:
./freek666/templates/fragments/welcome_user_fragment.html
- copy all the stuff I told you to do in #5, from the templated index.html file into it.
- Replace all that in the template/index.html with one line
{% include "fragments/welcome_user_fragment.html %}
- Add all the html stuff from the static index to the template/index.html file.
----- BEGIN EXAMPLE OF template/index.html -----
<html>
<head>
<title>Welcome to K666</title>
</head>
<body>
<h1>Welcome to K666</h1>
<p>Free Speech as in Open Source.</p>
{% include "fragments/welcome_user_fragment.html" %}
<pre>
Welcome to the K666 Open Source Generic Discussion Forum, Feel Free to Fork Anytime:
Git Hub Repository: https://github.com/orionblaster/K666
</pre>
<p><a href="/admin">Admin</a></p>
<p><a href="/index">Index</a></p>
<p><a href="/login">Accounts Login</a>: but this probably doesn't work?</p>
<img src="/static/images/up.jpg" />
<img src="/static/images/down.jpg" />
<img src="/static/images/FreeK666.png" />
<img src="/static/images/FreeK666coin.jpg" />
<div><img src="http://i.imgur.com/B8sO2Hd.jpg" /></div>
<p>Donations: <a href="https://www.blocktrail.com/BTC/address/1Dy5rLHwt8wk79C6jfH6uRf2bpcVnJtNyQ">bitcoin:1Dy5rLHwt8wk79C6jfH6uRf2bpcVnJtNyQ</a></p>
</body>
</html>
----- END EXAMPLE OF template/index.html -----
Now probably fragment all of the other stuff out too... examples:
- fragments/intro_fragment.html
- fragments/common_links_fragment.html
- fragments/images_fragment.html
- fragments/donations_fragment.html
And then maybe even:
- fragments/title_fragment.html (Welcome to K666)
- fragments/tagline_fragment.html (Free Speech As In Money)
- fragments/page_header.html (includes title_fragment.html and tagline_fragment.html, marked up with html)
----- FINAL EXAMPLE OF templates/index.html -----
<html>
<head>
<title>{% include "fragments/title_fragment.html" %}</title>
</head>
<body>
{% include "fragments/page_header_fragment.html" %}
{% include "fragments/welcome_user_fragment.html" %}
{% include "fragments/intro_fragment.html" %}
{% include "fragments/common_links_fragment.html" %}
{% include "fragments/images_fragment.html" %}
{% include "fragments/donations_fragment.html" %}
</body>
</html>
----- END FINAL EXAMPLE OF templates/index.html -----
(please indent it nicely though... posting into github messes that up... how to post blocks of code with correct formatting? would be good to know for kr5ddit too... we probably use the same markup engine!)
Which would be a lot nicer, right?
*: You can push branches into your github repository as follows, full example from fragments
# Clone the repository into a working directory, and change into it
$ git clone https://github.com/orionblastar/K666 k6fragments
$ cd k6fragments
# Branch from mergetest... it's the latest thing... we haven't merged it into master yet... anyway.
$ git branch mergetest
# Create the branch you are going to work on, and switch to it
$ git branch fragments
$ git checkout fragments
# Push the new branch back to the original repository... you can do this at any time, before or after you've made commits for example.
$ git push -u origin fragments
# Now view that branch on github!