Mercurial > hatta-flask
changeset 2362:863b3720e327
Fix more HTML classes and ids
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Sun, 14 Oct 2012 22:32:45 +0200 |
| parents | fdd7ffb25454 |
| children | 73826ed2d401 |
| files | hatta/static/scripts.js hatta/static/style.css hatta/templates/changes.html hatta/templates/edit_file.html hatta/templates/edit_text.html hatta/templates/history.html hatta/wiki.py |
| diffstat | 7 files changed, 32 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/hatta/static/scripts.js Sun Oct 14 22:12:20 2012 +0200 +++ b/hatta/static/scripts.js Sun Oct 14 22:32:45 2012 +0200 @@ -44,7 +44,7 @@ var js_editor = function () { /* Make double click invoke the editor and scroll it to the right place. */ - var textBox = document.getElementById('editortext'); + var textBox = document.getElementById('hatta-editortext'); if (textBox) { /* We have an editor, so scroll it to the right place. */ var jumpLine = 0 + document.location.hash.substring(1);
--- a/hatta/static/style.css Sun Oct 14 22:12:20 2012 +0200 +++ b/hatta/static/style.css Sun Oct 14 22:32:45 2012 +0200 @@ -138,11 +138,11 @@ } /* Buttons */ -div.buttons { +div#hatta-buttons { text-align: center; } input.button, -div.buttons input { +div#hatta-buttons input { font-weight: bold; font-size: 100%; background: #eee; @@ -150,31 +150,36 @@ margin: 0.25em; color: #888a85; } -.history input.button { +#hatta-history input.button { font-size: 75%; } +input.button:hover, +div#hatta-buttons input:hover { + border: solid 1px #888a85; + color: #2e3436; +} /* Editor */ -.editor textarea { +form#hatta-editor textarea { width: 100%; display: block; font-size: 100%; border: solid 1px #babdb6; } -.editor label { +form#hatta-editor label { display:block; text-align: right; } -.editor .upload { +form#hatta-editor .upload { margin: 2em auto; text-align: center; } -.editor label input { +form#hatta-editor label input { font-size: 100%; border: solid 1px #babdb6; margin: 0.125em 0; } -.editor label.comment input { +form#hatta-editor label#hatta-comment input { width: 32em; } @@ -189,7 +194,7 @@ text-align: right; font-size: 80%; } -div.snippet { +#hatta-search-results div.hatta-snippet { font-size: 80%; color: #888a85; }
--- a/hatta/templates/changes.html Sun Oct 14 22:12:20 2012 +0200 +++ b/hatta/templates/changes.html Sun Oct 14 22:32:45 2012 +0200 @@ -4,12 +4,12 @@ {% block title %}{{ _("Recent changes") }} - {{ wiki.site_name }}{% endblock %} {% block content %} - <ul class="changes"> + <ul id="hatta-changes"> {% for date, date_url, title, author, comment in changes %} <li><a href="{{ date_url }}">{{ date_html(date)|safe }}</a> <b>{{ page.wiki_link(title)|safe }}</b> . . . . - <i>{{ page.wiki_link("~%s" % author, author)|safe }}</i> - <div class="comment">{{ comment }}</div> + <i>{{ page.wiki_link('~' + author, author)|safe }}</i> + <div class="hatta-comment">{{ comment }}</div> </li> {% endfor %} </ul>
--- a/hatta/templates/edit_file.html Sun Oct 14 22:12:20 2012 +0200 +++ b/hatta/templates/edit_file.html Sun Oct 14 22:32:45 2012 +0200 @@ -7,14 +7,14 @@ {% block content %} <p>{{ _("This is a binary file, it can't be edited on a wiki. " "Please upload a new version instead.") }}</p> - <form action="" method="POST" class="editor" + <form action="" method="POST" id="hatta-editor" enctype="multipart/form-data"><div> <div class="upload"><input type="file" name="data"></div> - <label class="comment">{{ _("Comment") }} <input + <label id="hatta-comment">{{ _("Comment") }} <input name="comment" value="{{ comment }}"></label> - <label class="comment">{{ _("Author") }} <input + <label id="hatta-author">{{ _("Author") }} <input name="author" value="{{ author }}"></label> - <div class="buttons"> + <div id="hatta-buttons"> <input type="submit" name="save" value="{{ _("Save") }}"> <input type="submit" name="cancel" value="{{ _("Cancel") }}"> </div>
--- a/hatta/templates/edit_text.html Sun Oct 14 22:12:20 2012 +0200 +++ b/hatta/templates/edit_text.html Sun Oct 14 22:32:45 2012 +0200 @@ -4,22 +4,22 @@ {% block title %}{{ _("Editing \"%(title)s\"", title=title) }}{% endblock %} {% block content %} - <form action="" method="POST" class="editor"><div> - <textarea name="text" cols="80" rows="20" id="editortext" + <form action="" method="POST" id="hatta-editor"><div> + <textarea name="text" cols="80" rows="20" id="hatta-editortext" >{% for line in lines %}{{ line }}{% endfor %}</textarea> <input type="hidden" name="parent" value="{{ parent }}"> - <label class="comment">{{ _("Comment") }} <input + <label id="hatta-comment">{{ _("Comment") }} <input name="comment" value="{{ comment }}"></label> - <label class="comment">{{ _("Author") }} <input + <label id="hatta-author">{{ _("Author") }} <input name="author" value="{{ author }}"></label> - <div class="buttons"> + <div id="hatta-buttons"> <input type="submit" name="save" value="{{ _("Save") }}"> <input type="submit" name="preview" value="{{ _("Preview") }}"> <input type="submit" name="cancel" value="{{ _("Cancel") }}"> </div> </div></form> {% if preview %} - <h1 class="preview">{{ _("Preview, not saved") }}</h1> + <h1 id="hatta-preview-title">{{ _("Preview, not saved") }}</h1> <div id="hatta-preview"> {% for part in page.view_content(preview) %}{{ part|safe }}{% endfor %} </div>
--- a/hatta/templates/history.html Sun Oct 14 22:12:20 2012 +0200 +++ b/hatta/templates/history.html Sun Oct 14 22:32:45 2012 +0200 @@ -15,7 +15,8 @@ <li><a href="{{ date_url }}" >{{ date_html(date)|safe }}</a> {% if edit_url %} - <input type="submit" name="{{ rev }}" value="{{ _('Undo') }}"> + <input class="button" + type="submit" name="{{ rev }}" value="{{ _('Undo') }}"> {% endif %} . . . . <i>{{ page.wiki_link('~%s' % author, author)|safe }}</i>
--- a/hatta/wiki.py Sun Oct 14 22:12:20 2012 +0200 +++ b/hatta/wiki.py Sun Oct 14 22:32:45 2012 +0200 @@ -807,11 +807,11 @@ result = sorted(self.index.find(words), key=lambda x: -x[0]) yield werkzeug.html.p(h(_(u'%d page(s) containing all words:') % len(result))) - yield u'<ol class="search">' + yield u'<ol id="hatta-search-results">' for number, (score, title) in enumerate(result): yield h.li(h.b(page.wiki_link(title)), u' ', h.i(str(score)), h.div(search_snippet(title, words), - _class="snippet"), + class_="hatta-snippet"), id_="search-%d" % (number + 1)) yield u'</ol>'
