Permalink
Browse files

Some templates markup fixes here and there

  • Loading branch information...
Yuuta
Yuuta committed Dec 23, 2010
1 parent d85108a commit 5942faaeb0ded2427dadc7a7bc4721cc71834555
Showing with 22 additions and 20 deletions.
  1. +12 −10 templates/base.html
  2. +4 −2 templates/form.html
  3. +4 −5 templates/home.html
  4. +2 −3 templates/modules/entry.html
View
@@ -1,17 +1,22 @@
{% set site_title = escape(handler.settings["site_title"]) %}
+{% set debug = handler.settings["debug"] %}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{% block title %}{{site_title}}{% end %}</title>
- <link rel="shortcut icon" href="/static/images/favicon.ico" />
+ <link rel="shortcut icon" href="/static/favicon.ico" />
<link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" title="main" charset="utf-8" />
{% block extrameta %}{% end %}
{% block extracss %}{% end %}
{% block pagejs %}
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
+ {% if debug %}
+ <script type="text/javascript" src="/static/js/jquery-1.4.4.min.js"></script>
+ {% else %}
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
+ {% end %}
{% end %}
{% block extrajs %}{% end %}
</head>
@@ -22,7 +27,7 @@
<div id="header">
<h1>
<a href="/" title="SELFICIOUS">
- <img src="/static/images/logo.png" alt="Selficious" width="336" height="88" />
+ <img src="/static/images/logo.png" alt="Selficious" width="315" height="72" />
</a>
</h1>
</div>
@@ -43,8 +48,8 @@ <h1>
<ul>
{% if current_user and current_user.administrator %}
<li><a href="{{ users.create_logout_url(request.uri) }}">Sign out</a></li>
- <li><a href="/bookmark">Post a new bookmarkw</a></li>
- <li><a href="/import">Import your delicious</a></li>
+ <li><a href="/post">Post something new</a></li>
+ <li><a href="/import">Import your stuff</a></li>
{% else %}
<li><a href="{{ users.create_login_url(request.uri) }}"><strong>Login</strong></a></li>
{% end %}
@@ -54,19 +59,16 @@ <h1>
<h2>What is this?</h2>
This is a simple application hosted on appengine that helped me
backup -quickly!- my delicious bookmarks and manage (add, edit,
- delete) them and my future ones.
- You can have your own copy by
+ delete) them and my future ones. You can have your own copy by
<a href="http://github.com/initpy/selficious">forking it on github</a>.
<h2>Who made it?</h2>
Yuuta did. You can follow him on twitter at
<a href="http://twitter.com/initpy">@initpy</a>. &mdash;Yes, I also
- started a <a href="http://big.appspot.com">blog</a>.
- So stay tuned :)
+ have a <a href="http://big.appspot.com">blog</a>. So stay tuned :)
</div>
</div>
{% end %}
</div>
</body>
</html>
-
View
@@ -2,8 +2,9 @@
{% block content %}
-<h2>{{ _("Edit this bookmark") if entry else _("Post a new bookmark") }}</h2>
+<h2>{{ _("Edit this post") if entry else _("Post Something New ") }}</h2>
+<div class="form">
<form action="{{ request.path }}" method="post" class="compose">
<p>
<label for="title">Title</label>
@@ -27,11 +28,12 @@ <h2>{{ _("Edit this bookmark") if entry else _("Post a new bookmark") }}</h2>
<p class="formfooter">
<input type="submit" value="{{ _("Save changes") if entry else _("Publish Bookmark") }}" class="submit"/>
- &nbsp;<a href="{{ "/" + entry.url if entry else "/" }}">{{ _("Cancel") }}</a>
+ &nbsp;<a href="/">{{ _("Cancel") }}</a>
</p>
{% if entry %}
<input type="hidden" name="key" value="{{ str(entry.key()) }}"/>
{% end %}
{{ xsrf_form_html() }}
</form>
+</div>
{% end %}
View
@@ -1,12 +1,11 @@
{% extends "base.html" %}
{% block content %}
- {% if import_success == 1 %}
- <p class="success">Yay! Your delicious bookmarks were successfully imported!</p>
+ {% if import_success == "1" %}
+ <p class="message ok">Yay! Your posts were successfully imported!</p>
{% else %}
- {% if import_success == 99 %}
- <p class="success">Oh No! Your delicious bookmarks coulden't be
- importeda! Please check your settings.py file</p>
+ {% if import_success == "0" %}
+ <p class="message error">Oh No! Your posts coulden't be imported! {{ _(error_message) }}</p>
{% end %}
{% end %}
{% for entry in entries %}
@@ -1,6 +1,5 @@
<div class="entry">
- <h2><a href="{{ entry.url }}">{{ escape(entry.title) }}</a></h2>
-
+ <h3><a href="{{ entry.url }}">{{ escape(entry.title) }}</a></h3>
<div class="meta">
{{ locale.format_date(entry.time, full_format=True, shorter=True) }}
{% if entry.tags %}
@@ -11,7 +10,7 @@ <h2><a href="{{ entry.url }}">{{ escape(entry.title) }}</a></h2>
{% end %}
{% if current_user and current_user.administrator %}
<span class="control">
- <a href="/bookmark?key={{ str(entry.key()) }}">{{ _("Edit") }}</a>
+ <a href="/post?key={{ str(entry.key()) }}">{{ _("Edit") }}</a>
&mdash;
<a href="/delete?key={{ str(entry.key()) }}" class="delete">{{ _("Delete") }}</a>
</span>

0 comments on commit 5942faa

Please sign in to comment.