From 44a9b59f4965d91ebb038ade779377accc1eda85 Mon Sep 17 00:00:00 2001 From: Kouhei Maeda Date: Thu, 12 Jun 2014 08:01:16 +0900 Subject: [PATCH 01/15] Fixed violation of jslint. Signed-off-by: Kouhei Maeda --- shiori/static/js/main.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/shiori/static/js/main.js b/shiori/static/js/main.js index 905a803..0e5eaf0 100644 --- a/shiori/static/js/main.js +++ b/shiori/static/js/main.js @@ -21,10 +21,11 @@ $(function() { } function get_page(url) { + var s; if (url) { - var s = url.split('?')[1]; + s = url.split('?')[1]; } else { - var s = location.search.substring(1); + s = location.search.substring(1); } var page; if (s) { @@ -118,6 +119,7 @@ $(function() { if (!attrs.category) { return 'required category.'; } + return true; } }); @@ -387,6 +389,7 @@ $(function() { validate: function(attrs) { if (!attrs.url) return 'required url.'; if (!attrs.category) return 'required category.'; + return true; } }); @@ -568,10 +571,11 @@ $(function() { var description = html_sanitize( this.$('textarea#description').val(), urlX, idX); + var is_hide; if (this.$('input#is_hide').prop('checked')) { - var is_hide = true; + is_hide = true; } else { - var is_hide = false; + is_hide = false; } this.bookmarks.create({ @@ -667,6 +671,7 @@ $(function() { validate: function(attrs) { if (!attrs.url) return 'required url.'; if (!attrs.default_category) return 'required category.'; + return true; } }); From 1aec221082f8ffc246c19b1eaf41d7d63620c57f Mon Sep 17 00:00:00 2001 From: Kouhei Maeda Date: Sat, 14 Jun 2014 07:28:57 +0900 Subject: [PATCH 02/15] Fixed fail to model.save(). Signed-off-by: Kouhei Maeda --- shiori/static/js/main.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/shiori/static/js/main.js b/shiori/static/js/main.js index 0e5eaf0..47ceb77 100644 --- a/shiori/static/js/main.js +++ b/shiori/static/js/main.js @@ -119,7 +119,6 @@ $(function() { if (!attrs.category) { return 'required category.'; } - return true; } }); @@ -389,7 +388,6 @@ $(function() { validate: function(attrs) { if (!attrs.url) return 'required url.'; if (!attrs.category) return 'required category.'; - return true; } }); @@ -671,7 +669,6 @@ $(function() { validate: function(attrs) { if (!attrs.url) return 'required url.'; if (!attrs.default_category) return 'required category.'; - return true; } }); From 6467ca86a0a0e539e5212d8c0297b51657bceba4 Mon Sep 17 00:00:00 2001 From: Kouhei Maeda Date: Mon, 16 Jun 2014 13:16:05 +0900 Subject: [PATCH 03/15] Changed layout list of bookmarks. Signed-off-by: Kouhei Maeda --- shiori/static/css/main.css | 3 ++- shiori/static/js/main.js | 23 ++++++++++++----------- shiori/templates/bookmark/category.html | 1 + shiori/templates/bookmark/index.html | 1 + shiori/templates/bookmark/tag.html | 2 +- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/shiori/static/css/main.css b/shiori/static/css/main.css index 2273996..15e2371 100644 --- a/shiori/static/css/main.css +++ b/shiori/static/css/main.css @@ -1,4 +1,5 @@ div.row { margin-top: 3em; } span.help { color: #757575; } div.footer { position: absolute; bottom: 0; color: #555;} -div.footer a { color: #f66; } \ No newline at end of file +div.footer a { color: #f66; } +ul {list-style-type: none} \ No newline at end of file diff --git a/shiori/static/js/main.js b/shiori/static/js/main.js index 47ceb77..5e30a39 100644 --- a/shiori/static/js/main.js +++ b/shiori/static/js/main.js @@ -182,11 +182,12 @@ $(function() { if (item.get('meta')) { this.pagination(item.get('meta')); } else { - $(this.el) - .append('' + html_sanitize(item.get('title'), urlX, idX) + - ' '); + ''); } }, loadBookmark: function(item) { @@ -320,8 +321,6 @@ $(function() { }, render: function() { var that = this; - $(this.el).append('

'); - $(this.el).append('
'); var tag = this.model.get('tag'); var tag_id = this.model.get('id'); $('h4', this.el).append(tag); @@ -334,11 +333,12 @@ $(function() { if (item.get('meta')) { this.pagination(item.get('meta')); } else { - $('div', this.el) - .append('' + html_sanitize(item.get('title'), urlX, idX) + - ' '); + ''); } }, pagination: function(meta) { @@ -418,11 +418,12 @@ $(function() { if (item.get('meta')) { this.pagination(item.get('meta')); } else { - $(this.el) - .append('' + html_sanitize(item.get('title'), urlX, idX) + - ' '); + ''); } }, pagination: function(meta) { diff --git a/shiori/templates/bookmark/category.html b/shiori/templates/bookmark/category.html index 224b0df..2795047 100644 --- a/shiori/templates/bookmark/category.html +++ b/shiori/templates/bookmark/category.html @@ -3,6 +3,7 @@

+

      diff --git a/shiori/templates/bookmark/index.html b/shiori/templates/bookmark/index.html index 757ce01..feaa173 100644 --- a/shiori/templates/bookmark/index.html +++ b/shiori/templates/bookmark/index.html @@ -3,6 +3,7 @@
      +

          diff --git a/shiori/templates/bookmark/tag.html b/shiori/templates/bookmark/tag.html index 4599cd9..f42b1bd 100644 --- a/shiori/templates/bookmark/tag.html +++ b/shiori/templates/bookmark/tag.html @@ -1,7 +1,7 @@ {% extends "layout.html" %} {% block content %}
          -
          +


              From 511300b5364df1678b80d4a2387939d904c0cdf3 Mon Sep 17 00:00:00 2001 From: Kouhei Maeda Date: Tue, 17 Jun 2014 08:52:36 +0900 Subject: [PATCH 04/15] Retrieving title when not specified in form. Signed-off-by: Kouhei Maeda --- setup.py | 1 + shiori/api/serializers.py | 2 +- shiori/bookmark/models.py | 19 +++++++++++++++++++ shiori/static/js/main.js | 10 +++++++++- shiori_tests/tests/test_api.py | 14 +++++++++++--- shiori_tests/tests/vars.py | 1 + tox.ini | 1 + 7 files changed, 43 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index b20a498..173320d 100755 --- a/setup.py +++ b/setup.py @@ -64,6 +64,7 @@ def run_tests(self): 'lxml', 'defusedxml', 'requests', + 'pyquery', 'netaddr'] setup(name='shiori', diff --git a/shiori/api/serializers.py b/shiori/api/serializers.py index 4aca2d8..bc62550 100644 --- a/shiori/api/serializers.py +++ b/shiori/api/serializers.py @@ -28,7 +28,7 @@ class Meta(object): class BookmarkSerializer(serializers.ModelSerializer): """ Serializer for shiori.bookmark.models.Bookmark """ - + title = serializers.Field(source='title') category = serializers.SlugRelatedField(many=False, slug_field='category') category_id = serializers.Field(source='category.id') tags = serializers.SlugRelatedField(many=True, slug_field='tag', diff --git a/shiori/bookmark/models.py b/shiori/bookmark/models.py index 1394221..dba87fb 100644 --- a/shiori/bookmark/models.py +++ b/shiori/bookmark/models.py @@ -5,6 +5,7 @@ from django.contrib.auth.models import User from shortuuidfield import ShortUUIDField import jsonfield +from pyquery import PyQuery from shiori.bookmark.agents.feed_parser import FeedParser from shiori.bookmark import validators @@ -67,6 +68,24 @@ def get_absolute_url(self): return "/shiori/b/%s" % self.id +def retrieve_title(sender, instance, **kwargs): + """ Retreive title of specified url. + + Arguments: + sender: :model (Bookmark) + instance: Bookmark instance + **kwargs: not use + """ + if instance.title: + return instance.title + else: + if validators.validate_url(instance.url): + data = PyQuery(instance.url) + instance.title = data('head title').text() + +pre_save.connect(retrieve_title, sender=Bookmark) + + class BookmarkTag(models.Model): """ BookmarkTag model """ id = models.AutoField(primary_key=True) diff --git a/shiori/static/js/main.js b/shiori/static/js/main.js index 5e30a39..9716fdb 100644 --- a/shiori/static/js/main.js +++ b/shiori/static/js/main.js @@ -597,7 +597,15 @@ $(function() { }, error: function(_coll, xhr, options) { console.log(xhr.responseText); - display_message(this.el, xhr.responseText, 'alert-error'); + if (xhr.responseText.search('IntegrityError') == 0) { + display_message(this.el, + 'Input title why cannot get title.', + 'alert-error'); + } else { + display_message(this.el, + xhr.responseText, + 'alert-error'); + } } }); }, diff --git a/shiori_tests/tests/test_api.py b/shiori_tests/tests/test_api.py index 5e63c28..81eb8ee 100644 --- a/shiori_tests/tests/test_api.py +++ b/shiori_tests/tests/test_api.py @@ -4,7 +4,7 @@ from django.contrib.auth.models import User import unittest import json - +from httpretty import HTTPretty, httprettified from shiori.api.views import CategoryViewSet import shiori_tests.tests.vars as v @@ -323,16 +323,24 @@ def test_post_bookmark_without_url(self): data=json.dumps(payload)) self.assertEqual(response.status_code, 400) + @httprettified def test_post_bookmark_without_title(self): - payload = {'url': v.url2, + payload = {'url': v.url, 'title': '', 'category': v.category0, 'description': v.description2, 'is_hide': False} + HTTPretty.register_uri( + HTTPretty.GET, + v.url, + body='%s' % v.title2) response = self.client.post('/api/bookmarks', content_type='application/json', data=json.dumps(payload)) - self.assertEqual(response.status_code, 400) + self.assertEqual(response.status_code, 201) + self.assertEqual( + json.loads(response.content).get('title').encode('utf-8'), + v.title2) def test_post_bookmark_without_description(self): payload = {'url': v.url2, diff --git a/shiori_tests/tests/vars.py b/shiori_tests/tests/vars.py index 051ce14..fd30500 100644 --- a/shiori_tests/tests/vars.py +++ b/shiori_tests/tests/vars.py @@ -8,6 +8,7 @@ username2 = 'admin0' email2 = 'admin0@example.org' password2 = 'passw2rd' +url = 'http://example.org' url0 = 'http://dummy.example.org' title0 = 'dummy タイトル' description0 = 'This description is dummy sentense.' diff --git a/tox.ini b/tox.ini index 54decea..7f78549 100644 --- a/tox.ini +++ b/tox.ini @@ -25,6 +25,7 @@ deps= lxml defusedxml requests + pyquery netaddr bzr+http://bazaar.launchpad.net/~andrewsomething/django-openid-auth/1252445#egg=django-openid-auth httpretty From d41cff9ea4f48efafc06a8c8d287d0c4da6b01ca Mon Sep 17 00:00:00 2001 From: Kouhei Maeda Date: Tue, 17 Jun 2014 12:47:44 +0900 Subject: [PATCH 05/15] Revert "Changed layout list of bookmarks." This reverts commit 6467ca86a0a0e539e5212d8c0297b51657bceba4. --- shiori/static/css/main.css | 3 +-- shiori/static/js/main.js | 23 +++++++++++------------ shiori/templates/bookmark/category.html | 1 - shiori/templates/bookmark/index.html | 1 - shiori/templates/bookmark/tag.html | 2 +- 5 files changed, 13 insertions(+), 17 deletions(-) diff --git a/shiori/static/css/main.css b/shiori/static/css/main.css index 15e2371..2273996 100644 --- a/shiori/static/css/main.css +++ b/shiori/static/css/main.css @@ -1,5 +1,4 @@ div.row { margin-top: 3em; } span.help { color: #757575; } div.footer { position: absolute; bottom: 0; color: #555;} -div.footer a { color: #f66; } -ul {list-style-type: none} \ No newline at end of file +div.footer a { color: #f66; } \ No newline at end of file diff --git a/shiori/static/js/main.js b/shiori/static/js/main.js index 9716fdb..921a298 100644 --- a/shiori/static/js/main.js +++ b/shiori/static/js/main.js @@ -182,12 +182,11 @@ $(function() { if (item.get('meta')) { this.pagination(item.get('meta')); } else { - $('ul', this.el) - .append('
            • ' + - '' + html_sanitize(item.get('title'), urlX, idX) + - '
            • '); + ' '); } }, loadBookmark: function(item) { @@ -321,6 +320,8 @@ $(function() { }, render: function() { var that = this; + $(this.el).append('

              '); + $(this.el).append('
              '); var tag = this.model.get('tag'); var tag_id = this.model.get('id'); $('h4', this.el).append(tag); @@ -333,12 +334,11 @@ $(function() { if (item.get('meta')) { this.pagination(item.get('meta')); } else { - $('ul', this.el) - .append('
            • ' + - '' + html_sanitize(item.get('title'), urlX, idX) + - '
            • '); + ' '); } }, pagination: function(meta) { @@ -418,12 +418,11 @@ $(function() { if (item.get('meta')) { this.pagination(item.get('meta')); } else { - $('ul', this.el) - .append('
            • ' + - '' + html_sanitize(item.get('title'), urlX, idX) + - '
            • '); + ' '); } }, pagination: function(meta) { diff --git a/shiori/templates/bookmark/category.html b/shiori/templates/bookmark/category.html index 2795047..224b0df 100644 --- a/shiori/templates/bookmark/category.html +++ b/shiori/templates/bookmark/category.html @@ -3,7 +3,6 @@

              -

                  diff --git a/shiori/templates/bookmark/index.html b/shiori/templates/bookmark/index.html index feaa173..757ce01 100644 --- a/shiori/templates/bookmark/index.html +++ b/shiori/templates/bookmark/index.html @@ -3,7 +3,6 @@
                  -

                      diff --git a/shiori/templates/bookmark/tag.html b/shiori/templates/bookmark/tag.html index f42b1bd..4599cd9 100644 --- a/shiori/templates/bookmark/tag.html +++ b/shiori/templates/bookmark/tag.html @@ -1,7 +1,7 @@ {% extends "layout.html" %} {% block content %}
                      -

                        +

                          From cf45d2cad5da0912e41c46a8f75ef5898981c1d5 Mon Sep 17 00:00:00 2001 From: Kouhei Maeda Date: Tue, 17 Jun 2014 12:48:47 +0900 Subject: [PATCH 06/15] Improved loading bookmark. Signed-off-by: Kouhei Maeda --- shiori/static/js/main.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/shiori/static/js/main.js b/shiori/static/js/main.js index 921a298..d508cca 100644 --- a/shiori/static/js/main.js +++ b/shiori/static/js/main.js @@ -168,7 +168,7 @@ $(function() { this.model.fetch(); }, events: { - 'mouseover a.btn': 'loadBookmark' + 'click a.btn': 'loadBookmark' }, render: function() { var category = this.model.get('category'); @@ -212,9 +212,8 @@ $(function() { elem(item.get('tags'), 'icon-tags'), trigger: 'manual', delay: {show: 100, hide: 100} - }).click(function(e) { - $(this).popover('toggle'); }); + $('a#' + item.id, this.el).popover('toggle'); }, pagination: function(meta) { $('ul.pager').append(render_pagination(meta)); @@ -316,7 +315,7 @@ $(function() { this.model.fetch(); }, events: { - 'mouseover a.btn': 'loadBookmark' + 'click a.btn': 'loadBookmark' }, render: function() { var that = this; @@ -368,10 +367,8 @@ $(function() { elem(html_sanitize(item.get('category'), urlX, idX), 'icon-book'), trigger: 'manual', - delay: {show: 100, hide: 100} - }).click(function(e) { - $(this).popover('toggle'); - }); + delay: {show: 100, hide: 100}}); + $('a#' + item.id, this.el).popover('toggle'); } }); @@ -412,7 +409,7 @@ $(function() { 'search': search_word()}}); }, events: { - 'mouseover a.btn': 'loadBookmark' + 'click a.btn': 'loadBookmark' }, appendItem: function(item) { if (item.get('meta')) { @@ -459,9 +456,8 @@ $(function() { 'icon-tags'), trigger: 'manual', delay: {show: 100, hide: 100} - }).click(function(e) { - $(this).popover('toggle'); }); + $('a#' + item.id, this.el).popover('toggle'); } }); From 5e13cf70da0c29b130355c36493e43af5091b1a6 Mon Sep 17 00:00:00 2001 From: Kouhei Maeda Date: Tue, 17 Jun 2014 23:38:32 +0900 Subject: [PATCH 07/15] Fixed dependencies. Signed-off-by: Kouhei Maeda --- requirements.txt | 5 +++-- setup.py | 2 ++ tox.ini | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index bb3a0fb..3607b47 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ pep8>=1.3 pytest -django >= 1.6 +Django >= 1.6 djangorestframework shortuuid == 0.3.2 -django-shortuuidfield +django_shortuuidfield django-jsonfield python-openid south @@ -11,6 +11,7 @@ celery lxml defusedxml requests +pyquery netaddr -e bzr+http://bazaar.launchpad.net/~andrewsomething/django-openid-auth/1252445#egg=django-openid-auth closure-linter diff --git a/setup.py b/setup.py index 173320d..61fcaaa 100755 --- a/setup.py +++ b/setup.py @@ -59,6 +59,8 @@ def run_tests(self): 'shortuuid == 0.3.2', 'django_shortuuidfield', 'django-jsonfield', + 'south', + 'celery', 'python-openid', 'django-openid-auth', 'lxml', diff --git a/tox.ini b/tox.ini index 7f78549..0baf25b 100644 --- a/tox.ini +++ b/tox.ini @@ -25,10 +25,10 @@ deps= lxml defusedxml requests - pyquery + pyquery netaddr bzr+http://bazaar.launchpad.net/~andrewsomething/django-openid-auth/1252445#egg=django-openid-auth - httpretty + httpretty closure-linter [testenv:py27] From b1c9d5d3988f01e7ad3cb7082725692cd9f18ffa Mon Sep 17 00:00:00 2001 From: Kouhei Maeda Date: Tue, 17 Jun 2014 23:39:57 +0900 Subject: [PATCH 08/15] Fixed unit test without network. Signed-off-by: Kouhei Maeda --- shiori/bookmark/validators.py | 12 +++++++----- shiori_tests/tests/test_api.py | 4 +++- shiori_tests/tests/test_validators.py | 21 +++++++++++++++++++-- tox.ini | 3 ++- 4 files changed, 31 insertions(+), 9 deletions(-) diff --git a/shiori/bookmark/validators.py b/shiori/bookmark/validators.py index b19fa23..f0b90be 100644 --- a/shiori/bookmark/validators.py +++ b/shiori/bookmark/validators.py @@ -7,7 +7,7 @@ else: from urlparse import urlparse from netaddr import IPAddress, AddrFormatError -from socket import gaierror, gethostbyname, getaddrinfo, AF_INET6 +import socket from shiori.core.settings import FEED_EXCLUDE_FQDN @@ -46,15 +46,17 @@ def getaddr(hostname): """ addresses = [] try: - addresses.append(gethostbyname(hostname)) + addresses.append(socket.gethostbyname(hostname)) except TypeError as error: print(error) - except gaierror as error: + except socket.gaierror as error: print(error) try: - addresses.append(getaddrinfo(hostname, None, AF_INET6)[0][4][0]) + addresses.append(socket.getaddrinfo(hostname, + None, + socket.AF_INET6)[0][4][0]) except TypeError as error: print(error) - except gaierror as error: + except socket.gaierror as error: print(error) return addresses diff --git a/shiori_tests/tests/test_api.py b/shiori_tests/tests/test_api.py index 81eb8ee..6365c15 100644 --- a/shiori_tests/tests/test_api.py +++ b/shiori_tests/tests/test_api.py @@ -5,6 +5,7 @@ import unittest import json from httpretty import HTTPretty, httprettified +from mock import patch from shiori.api.views import CategoryViewSet import shiori_tests.tests.vars as v @@ -324,7 +325,8 @@ def test_post_bookmark_without_url(self): self.assertEqual(response.status_code, 400) @httprettified - def test_post_bookmark_without_title(self): + @patch('shiori.bookmark.validators.validate_url', return_vaule=True) + def test_post_bookmark_without_title(self, _mock): payload = {'url': v.url, 'title': '', 'category': v.category0, diff --git a/shiori_tests/tests/test_validators.py b/shiori_tests/tests/test_validators.py index 01fc46a..6184e91 100644 --- a/shiori_tests/tests/test_validators.py +++ b/shiori_tests/tests/test_validators.py @@ -1,11 +1,20 @@ # -*- coding: utf-8 -*- import unittest +from mock import patch from django.core.exceptions import ValidationError from shiori.bookmark import validators class ValidatorsTests(unittest.TestCase): - def test_validate_url(self): + @patch('socket.gethostbyname', return_value='93.184.216.119') + @patch('socket.getaddrinfo', + return_value=[(10, 1, 6, '', + ('2606:2800:220:6d:26bf:1447:1097:aa7', 0, 0, 0)), + (10, 2, 17, '', + ('2606:2800:220:6d:26bf:1447:1097:aa7', 0, 0, 0)), + (10, 3, 0, '', + ('2606:2800:220:6d:26bf:1447:1097:aa7', 0, 0, 0))]) + def test_validate_url(self, _mock0, _mock1): self.assertTrue(validators.validate_url('http://example.org')) def test_validate_url_of_localhost(self): @@ -23,7 +32,15 @@ def test_validate_url_of_loopback_addr(self): validators.validate_url, 'http://127.0.0.1') - def test_get_addr(self): + @patch('socket.gethostbyname', return_value='93.184.216.119') + @patch('socket.getaddrinfo', + return_value=[(10, 1, 6, '', + ('2606:2800:220:6d:26bf:1447:1097:aa7', 0, 0, 0)), + (10, 2, 17, '', + ('2606:2800:220:6d:26bf:1447:1097:aa7', 0, 0, 0)), + (10, 3, 0, '', + ('2606:2800:220:6d:26bf:1447:1097:aa7', 0, 0, 0))]) + def test_get_addr(self, _mock0, _mock1): self.assertListEqual(['93.184.216.119', '2606:2800:220:6d:26bf:1447:1097:aa7'], validators.getaddr('example.org')) diff --git a/tox.ini b/tox.ini index 0baf25b..fea1d37 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,8 @@ deps= lxml defusedxml requests - pyquery + pyquery + mock netaddr bzr+http://bazaar.launchpad.net/~andrewsomething/django-openid-auth/1252445#egg=django-openid-auth httpretty From 55a02e7e897160ba74f2fc04036c8dc0b4fe49e2 Mon Sep 17 00:00:00 2001 From: Kouhei Maeda Date: Wed, 2 Jul 2014 06:19:46 +0900 Subject: [PATCH 09/15] Fixed btn layout. Signed-off-by: Kouhei Maeda --- shiori/static/css/main.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shiori/static/css/main.css b/shiori/static/css/main.css index 2273996..a0c6c41 100644 --- a/shiori/static/css/main.css +++ b/shiori/static/css/main.css @@ -1,4 +1,5 @@ div.row { margin-top: 3em; } span.help { color: #757575; } div.footer { position: absolute; bottom: 0; color: #555;} -div.footer a { color: #f66; } \ No newline at end of file +div.footer a { color: #f66; } +a.btn { margin-bottom: 3px } \ No newline at end of file From a774e141096bfaec51190b06a228c44958383a46 Mon Sep 17 00:00:00 2001 From: Kouhei Maeda Date: Wed, 2 Jul 2014 07:42:18 +0900 Subject: [PATCH 10/15] Applied twitter bootstrap 3. Signed-off-by: Kouhei Maeda --- shiori/static/js/main.js | 7 +++-- shiori/templates/bookmark/edit.html | 48 ++++++++++------------------ shiori/templates/layout.html | 49 ++++++++++++++++------------- 3 files changed, 48 insertions(+), 56 deletions(-) diff --git a/shiori/static/js/main.js b/shiori/static/js/main.js index d508cca..8fb330f 100644 --- a/shiori/static/js/main.js +++ b/shiori/static/js/main.js @@ -908,9 +908,10 @@ $(function() { return false; }, render: function() { - $('div#submenu', this.el) - .append('Categories') - .append('Tags'); + $('div#submenu ul', this.el) + .append('
                        • ' + + 'Categories
                        • ') + .append('
                        • Tags
                        • '); if (is_all() == 'true') { $('input#is_all').attr('checked', true); } else { diff --git a/shiori/templates/bookmark/edit.html b/shiori/templates/bookmark/edit.html index 235a4a3..1907cb8 100644 --- a/shiori/templates/bookmark/edit.html +++ b/shiori/templates/bookmark/edit.html @@ -7,38 +7,24 @@
                          {% csrf_token %}
                          -
                          - -
                          - - required -
                          - -
                          - - required -
                          - -
                          - - retrieve web page title automatically in default. -
                          - -
                          - - add a new tag when keydown "Enter" key. -
                          - -
                          - -
                          - -
                          - - public mode when not check in default. -
                          +
                          + + + + + + + + + + +
                          +
                          -
                          +
                          +
                          diff --git a/shiori/templates/layout.html b/shiori/templates/layout.html index 1bbfc16..ec21a84 100644 --- a/shiori/templates/layout.html +++ b/shiori/templates/layout.html @@ -2,9 +2,14 @@ - - - + + + + + + + + @@ -20,19 +25,19 @@
                          -
                          diff --git a/shiori/templates/bookmark/feed_subscription.html b/shiori/templates/bookmark/feed_subscription.html index 1ded67d..bc03060 100644 --- a/shiori/templates/bookmark/feed_subscription.html +++ b/shiori/templates/bookmark/feed_subscription.html @@ -16,42 +16,44 @@ - diff --git a/shiori/templates/layout.html b/shiori/templates/layout.html index ec21a84..cd3fcfd 100644 --- a/shiori/templates/layout.html +++ b/shiori/templates/layout.html @@ -25,42 +25,36 @@
                          -