Show More
@@ -1,91 +1,152 b'' | |||
|
1 | 1 | html { |
|
2 | 2 | background: #555; |
|
3 | 3 | color: #ffffff; |
|
4 | 4 | } |
|
5 | 5 | |
|
6 | 6 | #admin_panel { |
|
7 | 7 | background: #FF0000; |
|
8 | 8 | color: #00FF00 |
|
9 | 9 | } |
|
10 | 10 | |
|
11 | 11 | .title { |
|
12 | 12 | font-weight: bold; |
|
13 | 13 | color: #ffcc00; |
|
14 | 14 | } |
|
15 | 15 | |
|
16 | .post-form { | |
|
17 | text-align: left; | |
|
18 | display: table; | |
|
19 | border-radius: 5px; | |
|
20 | padding: 5px; | |
|
21 | margin: 5px; | |
|
22 | background: #334; | |
|
23 | } | |
|
24 | ||
|
25 | .form-row { | |
|
26 | display: table-row; | |
|
27 | } | |
|
28 | ||
|
29 | .form-input { | |
|
30 | display: table-cell; | |
|
31 | } | |
|
32 | ||
|
33 | .link { | |
|
16 | .link, a { | |
|
34 | 17 | color: #afdcec; |
|
35 | 18 | } |
|
36 | 19 | |
|
37 | 20 | .link:hover { |
|
38 | 21 | color: #fff380; |
|
39 | 22 | } |
|
40 | 23 | |
|
41 | 24 | .post_id { |
|
42 | 25 | color: #ffffff; |
|
43 | 26 | } |
|
44 | 27 | |
|
45 | 28 | .block { |
|
46 | 29 | display: inline-block; |
|
47 | 30 | vertical-align: top; |
|
48 | 31 | } |
|
49 | 32 | |
|
50 | 33 | .tag { |
|
51 | 34 | color: #b4cfec; |
|
52 | 35 | } |
|
53 | 36 | |
|
54 | 37 | .tag:hover { |
|
55 | 38 | color: #d0edb4; |
|
56 | 39 | } |
|
57 | 40 | |
|
58 | 41 | .post_id { |
|
59 | 42 | color: #fff380; |
|
60 | 43 | } |
|
61 | 44 | |
|
62 | 45 | .post { |
|
63 | 46 | background: #333; |
|
64 | 47 | margin: 5px; |
|
65 | 48 | padding: 10px; |
|
66 | 49 | border-radius: 5px; |
|
67 | 50 | } |
|
68 | 51 | |
|
69 | .form-title { | |
|
70 | font-weight: bolder; | |
|
71 | } | |
|
72 | ||
|
73 | 52 | .metadata { |
|
74 | 53 | padding: 2px; |
|
75 | 54 | margin-top: 10px; |
|
76 | 55 | border: solid 1px #666; |
|
77 | 56 | font-size: 0.9em; |
|
78 | 57 | color: #ddd |
|
79 | 58 | } |
|
80 | 59 | |
|
81 | 60 | #navigation_panel { |
|
82 | 61 | background: #444; |
|
83 | 62 | margin: 5px; |
|
84 | 63 | padding: 10px; |
|
85 | 64 | border-radius: 5px; |
|
86 | 65 | color: #eee; |
|
87 | 66 | } |
|
88 | 67 | |
|
68 | #navigation_panel .link { | |
|
69 | border-right: 1px solid #fff; | |
|
70 | font-weight: bold; | |
|
71 | margin-right: 1ex; | |
|
72 | padding-right: 1ex; | |
|
73 | } | |
|
89 | 74 | #navigation_panel .link:last-child { |
|
75 | border-left: 1px solid #fff; | |
|
76 | border-right: none; | |
|
90 | 77 | float: right; |
|
78 | margin-left: 1ex; | |
|
79 | margin-right: 0; | |
|
80 | padding-left: 1ex; | |
|
81 | padding-right: 0; | |
|
82 | } | |
|
83 | ||
|
84 | #navigation_panel::after { | |
|
85 | clear: both; | |
|
86 | content: "."; | |
|
87 | display: block; | |
|
88 | height: 0; | |
|
89 | line-height: 0; | |
|
90 | visibility: hidden; | |
|
91 | } | |
|
92 | ||
|
93 | p { | |
|
94 | margin-top: .5em; | |
|
95 | margin-bottom: .5em; | |
|
96 | } | |
|
97 | ||
|
98 | .post-form-w { | |
|
99 | display: table; | |
|
100 | background: #333344; | |
|
101 | border-radius: 5px; | |
|
102 | color: #fff; | |
|
103 | padding: 10px; | |
|
104 | margin: 5px | |
|
105 | } | |
|
106 | ||
|
107 | .form-row { | |
|
108 | display: table-row; | |
|
109 | } | |
|
110 | ||
|
111 | .form-label, .form-input { | |
|
112 | display: table-cell; | |
|
113 | } | |
|
114 | ||
|
115 | .form-label { | |
|
116 | padding: .25em 1ex .25em 0; | |
|
117 | } | |
|
118 | ||
|
119 | .form-input { | |
|
120 | padding: .25em 0; | |
|
121 | } | |
|
122 | ||
|
123 | .post-form input, .post-form textarea { | |
|
124 | background: #333; | |
|
125 | color: #fff; | |
|
126 | border: solid 1px; | |
|
127 | padding: 0; | |
|
128 | width: 100%; | |
|
129 | } | |
|
130 | ||
|
131 | .form-submit { | |
|
132 | border-bottom: 2px solid #ddd; | |
|
133 | margin-bottom: .5em; | |
|
134 | padding-bottom: .5em; | |
|
135 | } | |
|
136 | ||
|
137 | .form-title { | |
|
138 | font-weight: bold; | |
|
139 | } | |
|
140 | ||
|
141 | input[type="submit"] { | |
|
142 | background: #222; | |
|
143 | border: solid 1px #fff; | |
|
144 | color: #fff; | |
|
145 | } | |
|
146 | ||
|
147 | blockquote { | |
|
148 | border-left: solid 2px; | |
|
149 | padding-left: 5px; | |
|
150 | color: #B1FB17; | |
|
151 | margin: 0; | |
|
91 | 152 | } No newline at end of file |
@@ -1,129 +1,163 b'' | |||
|
1 | 1 | * { |
|
2 | 2 | font-size: inherit; |
|
3 | 3 | margin: 0; |
|
4 | 4 | padding: 0; |
|
5 | 5 | } |
|
6 | 6 | html { |
|
7 | 7 | background: #fff; |
|
8 | 8 | color: #000; |
|
9 | 9 | font: medium sans-serif; |
|
10 | 10 | } |
|
11 | 11 | a { |
|
12 | 12 | color: inherit; |
|
13 | 13 | text-decoration: underline; |
|
14 | 14 | } |
|
15 | 15 | |
|
16 | 16 | #admin_panel { |
|
17 | 17 | background: #182F6F; |
|
18 | 18 | color: #fff; |
|
19 | 19 | padding: .5ex 1ex .5ex 1ex; |
|
20 | 20 | } |
|
21 | 21 | |
|
22 | 22 | #navigation_panel { |
|
23 | 23 | background: #182F6F; |
|
24 | 24 | color: #B4CFEC; |
|
25 | 25 | margin-bottom: 1em; |
|
26 | 26 | padding: .5ex 1ex 1ex 1ex; |
|
27 | 27 | } |
|
28 | 28 | #navigation_panel::after { |
|
29 | 29 | clear: both; |
|
30 | 30 | content: "."; |
|
31 | 31 | display: block; |
|
32 | 32 | height: 0; |
|
33 | 33 | line-height: 0; |
|
34 | 34 | visibility: hidden; |
|
35 | 35 | } |
|
36 | 36 | |
|
37 | 37 | #navigation_panel a:link, #navigation_panel a:visited, #navigation_panel a:hover { |
|
38 | 38 | text-decoration: none; |
|
39 | 39 | } |
|
40 | 40 | |
|
41 | 41 | #navigation_panel .link { |
|
42 | 42 | border-right: 1px solid #fff; |
|
43 | 43 | color: #fff; |
|
44 | 44 | font-weight: bold; |
|
45 | 45 | margin-right: 1ex; |
|
46 | 46 | padding-right: 1ex; |
|
47 | 47 | } |
|
48 | 48 | #navigation_panel .link:last-child { |
|
49 | 49 | border-left: 1px solid #fff; |
|
50 | 50 | border-right: none; |
|
51 | 51 | float: right; |
|
52 | 52 | margin-left: 1ex; |
|
53 | 53 | margin-right: 0; |
|
54 | 54 | padding-left: 1ex; |
|
55 | 55 | padding-right: 0; |
|
56 | 56 | } |
|
57 | 57 | |
|
58 | 58 | #navigation_panel .tag { |
|
59 | 59 | color: #fff; |
|
60 | 60 | } |
|
61 | 61 | |
|
62 | 62 | .title { |
|
63 | 63 | color: #182F6F; |
|
64 | 64 | font-weight: bold; |
|
65 | 65 | } |
|
66 | 66 | |
|
67 | .post-form { | |
|
67 | .post-form-w { | |
|
68 | 68 | background: #182F6F; |
|
69 | 69 | border-radius: 1ex; |
|
70 | 70 | color: #fff; |
|
71 | display: table; | |
|
72 | 71 | margin: 1em 1ex; |
|
73 | 72 | padding: 1ex; |
|
74 | text-align: left; | |
|
75 | 73 | } |
|
74 | .post-form { | |
|
75 | display: table; | |
|
76 | border-collapse: collapse; | |
|
77 | width: 100%; | |
|
76 | 78 | |
|
77 | .post-form .form-row { | |
|
79 | } | |
|
80 | .form-row { | |
|
78 | 81 | display: table-row; |
|
79 | 82 | } |
|
80 | ||
|
81 | .post-form .form-input { | |
|
83 | .form-label, .form-input { | |
|
82 | 84 | display: table-cell; |
|
85 | vertical-align: top; | |
|
86 | } | |
|
87 | .form-label { | |
|
88 | padding: .25em 1ex .25em 0; | |
|
89 | } | |
|
90 | .form-input { | |
|
83 | 91 | padding: .25em 0; |
|
84 | 92 | } |
|
85 | ||
|
86 | .post-form input[type="submit"] { | |
|
93 | .form-input > * { | |
|
94 | background: #fff; | |
|
95 | color: #000; | |
|
96 | border: none; | |
|
97 | padding: 0; | |
|
98 | resize: vertical; | |
|
99 | width: 100%; | |
|
100 | } | |
|
101 | .form-submit { | |
|
102 | border-bottom: 1px solid #666; | |
|
103 | margin-bottom: .5em; | |
|
104 | padding-bottom: .5em; | |
|
105 | } | |
|
106 | .form-title { | |
|
107 | font-weight: bold; | |
|
108 | margin-bottom: .5em; | |
|
109 | } | |
|
110 | .post-form .settings_item { | |
|
111 | margin: .5em 0; | |
|
112 | } | |
|
113 | .form-submit input { | |
|
114 | margin-top: .5em; | |
|
87 | 115 | padding: .2em 1ex; |
|
88 | 116 | } |
|
89 | ||
|
90 | .post-form .form-row input, .post-form .form-row textarea { | |
|
91 | background: #fff; | |
|
92 | border: none; | |
|
93 | color: #000; | |
|
94 | width: 100%; | |
|
95 | } | |
|
96 | ||
|
97 | .post-form hr { | |
|
98 | margin: 1em 0; | |
|
117 | .form-label { | |
|
118 | text-align: right; | |
|
99 | 119 | } |
|
100 | 120 | |
|
101 | 121 | .block { |
|
102 | 122 | display: inline-block; |
|
103 | 123 | vertical-align: top; |
|
104 | 124 | } |
|
105 | 125 | |
|
106 | 126 | .post_id { |
|
107 | 127 | color: #a00; |
|
108 | 128 | } |
|
109 | 129 | |
|
110 | 130 | .post { |
|
111 | 131 | background: #FFF; |
|
112 | 132 | border-bottom: 1px solid #182F6F; |
|
113 | 133 | margin: 0 1ex 1em 1ex; |
|
114 | 134 | overflow-x: auto; |
|
115 | 135 | padding-bottom: 1em; |
|
116 | 136 | } |
|
117 | 137 | |
|
118 | .form-title { | |
|
119 | font-weight: bolder; | |
|
120 | } | |
|
121 | ||
|
122 | 138 | .metadata { |
|
123 | 139 | background: #C0E4E8; |
|
124 | 140 | border: 1px solid #7F9699; |
|
125 | 141 | border-radius: .4ex; |
|
126 | 142 | display: table; |
|
127 | 143 | margin-top: .5em; |
|
128 | 144 | padding: .4em; |
|
145 | } | |
|
146 | ||
|
147 | .post ul, .post ol { | |
|
148 | margin: .5em 0 .5em 3ex; | |
|
149 | } | |
|
150 | .post li { | |
|
151 | margin: .2em 0; | |
|
152 | } | |
|
153 | .post p { | |
|
154 | margin: .5em 0; | |
|
155 | } | |
|
156 | .post blockquote { | |
|
157 | border-left: 3px solid #182F6F; | |
|
158 | margin: .5em 0 .5em 3ex; | |
|
159 | padding-left: 1ex; | |
|
160 | } | |
|
161 | .post blockquote > blockquote { | |
|
162 | padding-top: .1em; | |
|
129 | 163 | } No newline at end of file |
@@ -1,176 +1,177 b'' | |||
|
1 | 1 | # Django settings for neboard project. |
|
2 | 2 | import os |
|
3 | 3 | |
|
4 | 4 | DEBUG = True |
|
5 | 5 | TEMPLATE_DEBUG = DEBUG |
|
6 | 6 | |
|
7 | 7 | ADMINS = ( |
|
8 | 8 | # ('Your Name', 'your_email@example.com'), |
|
9 | 9 | ('admin', 'admin@example.com') |
|
10 | 10 | ) |
|
11 | 11 | |
|
12 | 12 | MANAGERS = ADMINS |
|
13 | 13 | |
|
14 | 14 | DATABASES = { |
|
15 | 15 | 'default': { |
|
16 | 16 | 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. |
|
17 | 17 | 'NAME': 'database.db', # Or path to database file if using sqlite3. |
|
18 | 18 | 'USER': '', # Not used with sqlite3. |
|
19 | 19 | 'PASSWORD': '', # Not used with sqlite3. |
|
20 | 20 | 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
|
21 | 21 | 'PORT': '', # Set to empty string for default. Not used with sqlite3. |
|
22 | 22 | } |
|
23 | 23 | } |
|
24 | 24 | |
|
25 | 25 | # Local time zone for this installation. Choices can be found here: |
|
26 | 26 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
|
27 | 27 | # although not all choices may be available on all operating systems. |
|
28 | 28 | # In a Windows environment this must be set to your system time zone. |
|
29 | 29 | TIME_ZONE = 'Europe/Kiev' |
|
30 | 30 | |
|
31 | 31 | # Language code for this installation. All choices can be found here: |
|
32 | 32 | # http://www.i18nguy.com/unicode/language-identifiers.html |
|
33 | 33 | LANGUAGE_CODE = 'ru' |
|
34 | 34 | |
|
35 | 35 | SITE_ID = 1 |
|
36 | 36 | |
|
37 | 37 | # If you set this to False, Django will make some optimizations so as not |
|
38 | 38 | # to load the internationalization machinery. |
|
39 | 39 | USE_I18N = True |
|
40 | 40 | |
|
41 | 41 | # If you set this to False, Django will not format dates, numbers and |
|
42 | 42 | # calendars according to the current locale. |
|
43 | 43 | USE_L10N = True |
|
44 | 44 | |
|
45 | 45 | # If you set this to False, Django will not use timezone-aware datetimes. |
|
46 | 46 | USE_TZ = True |
|
47 | 47 | |
|
48 | 48 | # Absolute filesystem path to the directory that will hold user-uploaded files. |
|
49 | 49 | # Example: "/home/media/media.lawrence.com/media/" |
|
50 | 50 | MEDIA_ROOT = '' |
|
51 | 51 | |
|
52 | 52 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
53 | 53 | # trailing slash. |
|
54 | 54 | # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" |
|
55 | 55 | MEDIA_URL = '' |
|
56 | 56 | |
|
57 | 57 | # Absolute path to the directory static files should be collected to. |
|
58 | 58 | # Don't put anything in this directory yourself; store your static files |
|
59 | 59 | # in apps' "static/" subdirectories and in STATICFILES_DIRS. |
|
60 | 60 | # Example: "/home/media/media.lawrence.com/static/" |
|
61 | 61 | STATIC_ROOT = '' |
|
62 | 62 | |
|
63 | 63 | # URL prefix for static files. |
|
64 | 64 | # Example: "http://media.lawrence.com/static/" |
|
65 | 65 | STATIC_URL = '/static/' |
|
66 | 66 | |
|
67 | 67 | # Additional locations of static files |
|
68 | 68 | # It is really a hack, put real paths, not related |
|
69 | 69 | STATICFILES_DIRS = ( |
|
70 | 70 | os.path.dirname(__file__) + '/boards/static', |
|
71 | 71 | |
|
72 | 72 | # '/d/work/python/django/neboard/neboard/boards/static', |
|
73 | 73 | # Put strings here, like "/home/html/static" or "C:/www/django/static". |
|
74 | 74 | # Always use forward slashes, even on Windows. |
|
75 | 75 | # Don't forget to use absolute paths, not relative paths. |
|
76 | 76 | ) |
|
77 | 77 | |
|
78 | 78 | # List of finder classes that know how to find static files in |
|
79 | 79 | # various locations. |
|
80 | 80 | STATICFILES_FINDERS = ( |
|
81 | 81 | 'django.contrib.staticfiles.finders.FileSystemFinder', |
|
82 | 82 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|
83 | 83 | # 'django.contrib.staticfiles.finders.DefaultStorageFinder', |
|
84 | 84 | ) |
|
85 | 85 | |
|
86 | 86 | # Make this unique, and don't share it with anybody. |
|
87 | 87 | SECRET_KEY = '@1rc$o(7=tt#kd+4s$u6wchm**z^)4x90)7f6z(i&55@o11*8o' |
|
88 | 88 | |
|
89 | 89 | # List of callables that know how to import templates from various sources. |
|
90 | 90 | TEMPLATE_LOADERS = ( |
|
91 | 91 | 'django.template.loaders.filesystem.Loader', |
|
92 | 92 | 'django.template.loaders.app_directories.Loader', |
|
93 | 93 | # 'django.template.loaders.eggs.Loader', |
|
94 | 94 | ) |
|
95 | 95 | |
|
96 | 96 | TEMPLATE_CONTEXT_PROCESSORS = ( |
|
97 | 97 | 'django.core.context_processors.media', |
|
98 | 98 | 'django.core.context_processors.static', |
|
99 | 99 | 'django.core.context_processors.request', |
|
100 | 100 | 'django.contrib.auth.context_processors.auth', |
|
101 | 101 | ) |
|
102 | 102 | |
|
103 | 103 | MIDDLEWARE_CLASSES = ( |
|
104 | 104 | 'django.middleware.common.CommonMiddleware', |
|
105 | 105 | 'django.contrib.sessions.middleware.SessionMiddleware', |
|
106 | 106 | # 'django.middleware.csrf.CsrfViewMiddleware', |
|
107 | 107 | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
108 | 108 | 'django.contrib.messages.middleware.MessageMiddleware', |
|
109 | 109 | # Uncomment the next line for simple clickjacking protection: |
|
110 | 110 | # 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
|
111 | 111 | ) |
|
112 | 112 | |
|
113 | 113 | ROOT_URLCONF = 'neboard.urls' |
|
114 | 114 | |
|
115 | 115 | # Python dotted path to the WSGI application used by Django's runserver. |
|
116 | 116 | WSGI_APPLICATION = 'neboard.wsgi.application' |
|
117 | 117 | |
|
118 | 118 | TEMPLATE_DIRS = ( |
|
119 | 119 | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
|
120 | 120 | # Always use forward slashes, even on Windows. |
|
121 | 121 | # Don't forget to use absolute paths, not relative paths. |
|
122 | 122 | 'templates', |
|
123 | 123 | ) |
|
124 | 124 | |
|
125 | 125 | INSTALLED_APPS = ( |
|
126 | 126 | 'django.contrib.auth', |
|
127 | 127 | 'django.contrib.contenttypes', |
|
128 | 128 | 'django.contrib.sessions', |
|
129 | 129 | 'django.contrib.sites', |
|
130 | 130 | 'django.contrib.messages', |
|
131 | 131 | 'django.contrib.staticfiles', |
|
132 | 132 | # Uncomment the next line to enable the admin: |
|
133 | 133 | 'django.contrib.admin', |
|
134 | 134 | # Uncomment the next line to enable admin documentation: |
|
135 | 135 | # 'django.contrib.admindocs', |
|
136 | 'django.contrib.markup', | |
|
136 | 137 | 'boards', |
|
137 | 138 | ) |
|
138 | 139 | |
|
139 | 140 | # A sample logging configuration. The only tangible logging |
|
140 | 141 | # performed by this configuration is to send an email to |
|
141 | 142 | # the site admins on every HTTP 500 error when DEBUG=False. |
|
142 | 143 | # See http://docs.djangoproject.com/en/dev/topics/logging for |
|
143 | 144 | # more details on how to customize your logging configuration. |
|
144 | 145 | LOGGING = { |
|
145 | 146 | 'version': 1, |
|
146 | 147 | 'disable_existing_loggers': False, |
|
147 | 148 | 'filters': { |
|
148 | 149 | 'require_debug_false': { |
|
149 | 150 | '()': 'django.utils.log.RequireDebugFalse' |
|
150 | 151 | } |
|
151 | 152 | }, |
|
152 | 153 | 'handlers': { |
|
153 | 154 | 'mail_admins': { |
|
154 | 155 | 'level': 'ERROR', |
|
155 | 156 | 'filters': ['require_debug_false'], |
|
156 | 157 | 'class': 'django.utils.log.AdminEmailHandler' |
|
157 | 158 | } |
|
158 | 159 | }, |
|
159 | 160 | 'loggers': { |
|
160 | 161 | 'django.request': { |
|
161 | 162 | 'handlers': ['mail_admins'], |
|
162 | 163 | 'level': 'ERROR', |
|
163 | 164 | 'propagate': True, |
|
164 | 165 | }, |
|
165 | 166 | } |
|
166 | 167 | } |
|
167 | 168 | |
|
168 | 169 | # Custom imageboard settings |
|
169 | 170 | MAX_POSTS_PER_THREAD = 100 |
|
170 | 171 | MAX_THREAD_COUNT = 20 |
|
171 | 172 | SITE_NAME = 'Neboard' |
|
172 | 173 | |
|
173 | 174 | THEMES = [ |
|
174 | 175 | ('md', 'Mystic Dark'), |
|
175 | 176 | ('sw', 'Snow White') ] |
|
176 | 177 | DEFAULT_THEME = 'md' No newline at end of file |
@@ -1,32 +1,33 b'' | |||
|
1 | 1 | {% load staticfiles %} |
|
2 | 2 | {% load i18n %} |
|
3 | 3 | |
|
4 | 4 | <!DOCTYPE html> |
|
5 | 5 | <html> |
|
6 | 6 | <head> |
|
7 | 7 | <link rel="stylesheet" type="text/css" |
|
8 |
href="{{ STATIC_URL }} |
|
|
8 | href="{{ STATIC_URL }}css/{{ theme }}/base_page.css" media="all"/> | |
|
9 | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/> | |
|
9 | 10 | {% block head %}{% endblock %} |
|
10 | 11 | </head> |
|
11 | 12 | <body> |
|
12 | 13 | <div id="admin_panel"> |
|
13 | 14 | |
|
14 | 15 | {% if request.session.admin == True %} |
|
15 | 16 | Admin panel TODO: Need to implement <BR /> |
|
16 | 17 | {% endif %} |
|
17 | 18 | |
|
18 | 19 | </div> |
|
19 | 20 | |
|
20 | 21 | <div id="navigation_panel"> |
|
21 | 22 | <a class="link" href="{% url 'index' %}">{% trans "All threads" %}</a> |
|
22 | 23 | {% for tag in tags %} |
|
23 | 24 | <a class="tag" href=" {% url 'tag' tag_name=tag.name %}"> |
|
24 | 25 | {{ tag.name }}</a>({{ tag.get_post_count }}) |
|
25 | 26 | {% endfor %} |
|
26 | 27 | <a class="link" href="{% url 'settings' %}">{% trans 'Settings' %}</a> |
|
27 | 28 | </div> |
|
28 | 29 | |
|
29 | 30 | {% block content %}{% endblock %} |
|
30 | 31 | |
|
31 | 32 | </body> |
|
32 | 33 | </html> No newline at end of file |
@@ -1,76 +1,82 b'' | |||
|
1 | 1 | {% extends "base.html" %} |
|
2 | 2 | |
|
3 | 3 | {% load i18n %} |
|
4 | {% load markup %} | |
|
4 | 5 | |
|
5 | 6 | {% block head %} |
|
6 | 7 | <title>Neboard</title> |
|
7 | 8 | {% endblock %} |
|
8 | 9 | |
|
9 | 10 | {% block content %} |
|
10 | 11 | |
|
11 | 12 | {% if threads %} |
|
12 | 13 | {% for thread in threads %} |
|
13 | 14 | <div class="post"> |
|
14 | 15 | {% if thread.image %} |
|
15 | 16 | <div class="block"> |
|
16 | 17 | <a href="{{ thread.image.url }}"><img |
|
17 | 18 | src="{{ thread.image.url_200x150 }}" /> |
|
18 | 19 | </a> |
|
19 | 20 | </div> |
|
20 | 21 | {% endif %} |
|
21 | 22 | <div class="block"> |
|
22 | 23 | <span class="title">{{ thread.title }}</span> |
|
23 | 24 | <span class="post_id">(#{{ thread.id }})</span> |
|
24 | 25 | [{{ thread.pub_time }}] |
|
25 | 26 | [<a class="link" href="{% url 'thread' thread.id %}" |
|
26 |
>{% trans "View" %}</a>] |
|
|
27 |
{{ thread.get_parsed_text| |
|
|
28 | /> | |
|
27 | >{% trans "View" %}</a>] | |
|
28 | {{ thread.get_parsed_text|markdown|truncatechars:300 }} | |
|
29 | 29 | </div> |
|
30 | 30 | <div class="metadata"> |
|
31 | 31 | {{ thread.get_reply_count }} {% trans 'replies' %}, |
|
32 | 32 | {{ thread.get_images_count }} {% trans 'images' %}, |
|
33 | 33 | {{ thread.get_gets_count }} {% trans 'gets' %}. |
|
34 | 34 | {% if thread.tags.all %} |
|
35 | 35 | <span class="tags">{% trans 'Tags' %}: |
|
36 | 36 | {% for tag in thread.tags.all %} |
|
37 | 37 | <a class="tag" href=" |
|
38 | 38 | {% url 'tag' tag_name=tag.name %}"> |
|
39 | 39 | {{ tag.name }}</a> |
|
40 | 40 | {% endfor %} |
|
41 | 41 | </span> |
|
42 | 42 | {% endif %} |
|
43 | 43 | </div> |
|
44 | 44 | </div> |
|
45 | 45 | {% endfor %} |
|
46 | 46 | {% else %} |
|
47 | 47 | No threads found. |
|
48 | 48 | <hr /> |
|
49 | 49 | {% endif %} |
|
50 | 50 | |
|
51 | <div class="post-form"> | |
|
52 | <span class="form-title">{% trans "Create new thread" %}</span> | |
|
53 | <form enctype="multipart/form-data" method="post">{% csrf_token %} | |
|
54 |
|
|
|
55 | <div class="form-input">{% trans 'Title' %}</div> | |
|
56 |
|
|
|
57 | </div> | |
|
58 | <div class="form-row"> | |
|
59 | <div class="form-input">{% trans 'Text' %}</div> | |
|
60 |
|
|
|
51 | <form enctype="multipart/form-data" method="post">{% csrf_token %} | |
|
52 | <div class="post-form-w"> | |
|
53 | <div class="form-title">{% trans "Create new thread" %}</div> | |
|
54 | <div class="post-form"> | |
|
55 | <div class="form-row"> | |
|
56 | <div class="form-label">{% trans 'Title' %}</div> | |
|
57 | <div class="form-input">{{ form.title }}</div> | |
|
58 | </div> | |
|
59 | <div class="form-row"> | |
|
60 | <div class="form-label">{% trans 'Text' %}</div> | |
|
61 | <div class="form-input">{{ form.text }}</div> | |
|
62 | </div> | |
|
63 | <div class="form-row"> | |
|
64 | <div class="form-label">{% trans 'Image' %}</div> | |
|
65 | <div class="form-input">{{ form.image }}</div> | |
|
66 | </div> | |
|
67 | <div class="form-row"> | |
|
68 | <div class="form-label">{% trans 'Tags' %}</div> | |
|
69 | <div class="form-input">{{ form.tags }}</div> | |
|
70 | </div> | |
|
71 | </div> | |
|
72 | <div class="form-submit"><input type="submit" | |
|
73 | value="{% trans "Post" %}"/></div> | |
|
74 | <div>Tags must be delimited by spaces. Text or image is required | |
|
61 | 75 | </div> |
|
62 | <div class="form-row"> | |
|
63 | <div class="form-input">{% trans 'Image' %}</div> | |
|
64 | <div class="form-input">{{ form.image }}</div> | |
|
65 | </div> | |
|
66 | <div class="form-row"> | |
|
67 | <div class="form-input">{% trans 'Tags' %}</div> | |
|
68 | <div class="form-input">{{ form.tags }}</div> | |
|
69 | </div> | |
|
70 | <input type="submit" value="{% trans 'Post' %}" /> | |
|
71 | <hr /> | |
|
72 | {% trans "Tags must be delimited by spaces. Text or image is required." %} | |
|
73 | </form> | |
|
76 | <div>Use <a | |
|
77 | href="http://daringfireball.net/projects/markdown/basics"> | |
|
78 | markdown</a> syntax for posting.</div> | |
|
74 | 79 | </div> |
|
80 | </form> | |
|
75 | 81 | |
|
76 | 82 | {% endblock %} No newline at end of file |
@@ -1,29 +1,34 b'' | |||
|
1 | 1 | {% extends "base.html" %} |
|
2 | 2 | |
|
3 | 3 | {% load i18n %} |
|
4 | 4 | |
|
5 | 5 | {% block head %} |
|
6 | 6 | <title>Neboard settings</title> |
|
7 | 7 | {% endblock %} |
|
8 | 8 | |
|
9 | 9 | {% block content %} |
|
10 | 10 | |
|
11 | <div class="post-form-w"> | |
|
11 | 12 | <div class="post-form"> |
|
12 | 13 | <span class="form-title">{% trans "Theme" %}</span> |
|
13 | 14 | <form method="post">{% csrf_token %} |
|
14 | 15 | {% for choice in form.fields.theme.choices %} |
|
15 | <input type="radio" name="theme" | |
|
16 |
|
|
|
17 | value="{{ choice.0 }}" | |
|
18 |
|
|
|
19 |
|
|
|
20 |
{% |
|
|
21 |
|
|
|
22 | <label for="{{ choice.0 }}">{{ choice.1 }} | |
|
23 |
|
|
|
16 | <div class="settings_item"> | |
|
17 | <label for="{{ choice.0 }}"> | |
|
18 | <input type="radio" name="theme" | |
|
19 | id="{{ choice.0 }}" | |
|
20 | value="{{ choice.0 }}" | |
|
21 | {% ifequal form.initial.theme choice.0 %} | |
|
22 | checked | |
|
23 | {% endifequal %} | |
|
24 | /> | |
|
25 | {{ choice.1 }} | |
|
26 | </label> | |
|
27 | </div> | |
|
24 | 28 | {% endfor %} |
|
25 | 29 | <input type="submit" value="{% trans "Save" %}" /> |
|
26 | 30 | </form> |
|
27 | 31 | </div> |
|
32 | </div> | |
|
28 | 33 | |
|
29 | 34 | {% endblock %} No newline at end of file |
@@ -1,65 +1,74 b'' | |||
|
1 | 1 | {% extends "base.html" %} |
|
2 | 2 | |
|
3 | 3 | {% load i18n %} |
|
4 | {% load markup %} | |
|
4 | 5 | |
|
5 | 6 | {% block head %} |
|
6 | 7 | <title>Neboard</title> |
|
7 | 8 | {% endblock %} |
|
8 | 9 | |
|
9 | 10 | {% block content %} |
|
10 | 11 | |
|
11 | 12 | {% if posts %} |
|
12 | 13 | {% for post in posts %} |
|
13 | 14 | <a name="{{ post.id }}"></a> |
|
14 | 15 | <div class="post"> |
|
15 | 16 | {% if post.image %} |
|
16 | 17 | <div class="block"> |
|
17 | 18 | <a href="{{ post.image.url }}"><img |
|
18 | 19 | src="{{ post.image.url_200x150 }}" /> |
|
19 | 20 | </a> |
|
20 | 21 | </div> |
|
21 | 22 | {% endif %} |
|
22 | 23 | <div class="block"> |
|
23 | 24 | <span class="title">{{ post.title }}</span> |
|
24 | 25 | <a class="post_id" href="#{{ post.id }}"> |
|
25 | 26 | (#{{ post.id }})</a> |
|
26 |
[{{ post.pub_time }}] |
|
|
27 |
{{ post.get_parsed_text| |
|
|
27 | [{{ post.pub_time }}] | |
|
28 | {{ post.get_parsed_text|markdown:"safe" }} | |
|
28 | 29 | </div> |
|
29 | 30 | {% if post.tags.all %} |
|
30 | 31 | <div class="metadata"> |
|
31 | 32 | <span class="tags">{% trans 'Tags' %}: |
|
32 | 33 | {% for tag in post.tags.all %} |
|
33 | 34 | <a class="tag" href="{% url 'tag' tag.name %}"> |
|
34 | 35 | {{ tag.name }}</a> |
|
35 | 36 | {% endfor %} |
|
36 | 37 | </span> |
|
37 | 38 | </div> |
|
38 | 39 | {% endif %} |
|
39 | 40 | </div> |
|
40 | 41 | {% endfor %} |
|
41 | 42 | {% else %} |
|
42 | 43 | No threads found. |
|
43 | 44 | <hr /> |
|
44 | 45 | {% endif %} |
|
45 | 46 | |
|
46 | <div class="post-form"> | |
|
47 | <span class="form-title">{% trans "Reply to the thread" %}</span> | |
|
48 | <form enctype="multipart/form-data" method="post">{% csrf_token %} | |
|
49 |
<div class="form |
|
|
50 |
<div class="form- |
|
|
51 |
<div class="form- |
|
|
47 | <form enctype="multipart/form-data" method="post">{% csrf_token %} | |
|
48 | <div class="post-form-w"> | |
|
49 | <div class="form-title">{% trans "Create new thread" %}</div> | |
|
50 | <div class="post-form"> | |
|
51 | <div class="form-row"> | |
|
52 | <div class="form-label">{% trans 'Title' %}</div> | |
|
53 | <div class="form-input">{{ form.title }}</div> | |
|
54 | </div> | |
|
55 | <div class="form-row"> | |
|
56 | <div class="form-label">{% trans 'Text' %}</div> | |
|
57 | <div class="form-input">{{ form.text }}</div> | |
|
58 | </div> | |
|
59 | <div class="form-row"> | |
|
60 | <div class="form-label">{% trans 'Image' %}</div> | |
|
61 | <div class="form-input">{{ form.image }}</div> | |
|
62 | </div> | |
|
52 | 63 | </div> |
|
53 |
<div class="form- |
|
|
54 | <div class="form-input">{% trans 'Text' %}</div> | |
|
55 | <div class="form-input">{{ form.text }}</div> | |
|
56 | </div> | |
|
57 | <div class="form-row"> | |
|
58 | <div class="form-input">{% trans 'Image' %}</div> | |
|
59 | <div class="form-input">{{ form.image }}</div> | |
|
60 |
|
|
|
61 | <input type="submit" value="{% trans 'Post' %}" /> | |
|
62 | </form> | |
|
63 | </div> | |
|
64 | <div class="form-submit"><input type="submit" | |
|
65 | value="{% trans "Post" %}"/></div> | |
|
66 | <div>Use <a | |
|
67 | href="http://daringfireball.net/projects/markdown/basics"> | |
|
68 | markdown</a> syntax for posting.</div> | |
|
69 | <div>Example: *<i>italic</i>*, **<b>bold</b>**</div> | |
|
70 | <div>Insert quotes with ">"</div> | |
|
71 | </div> | |
|
72 | </form> | |
|
64 | 73 | |
|
65 | 74 | {% endblock %} No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now