Branch: refs/heads/master Author: Enrico Tröger enrico.troeger@uvena.de Committer: Enrico Tröger enrico.troeger@uvena.de Date: Tue, 28 Jul 2015 19:49:10 UTC Commit: b26b6e88dfd3cc5711f90009b6cd6ab8897413ea https://github.com/geany/www.geany.org/commit/b26b6e88dfd3cc5711f90009b6cd6a...
Log Message: ----------- Update to Django 1.8 / Mezzanine 4.0 / Bootstrap 3
Modified Paths: -------------- README.dev.md __init__.py geany/__init__.py geany/apps.py geany/settings.py geany/sitemaps.py geany/static/css/bootstrap-responsive.css geany/static/css/bootstrap.css geany/static/css/main.css geany/static/js/bootstrap.js geany/static/js/tinymce_setup.js geany/templates/base.html geany/templates/blog/blog_post_list.html geany/templates/errors/error_base.html geany/templates/home.html geany/templates/pages/menus/dropdown.html geany/templates/pages/support/irc.html geany/templates/skel.html geany/templates/twitter/tweets.html geany/templatetags/geany_tags.py geany/urls.py geany/wsgi.py manage.py nightlybuilds/templates/nightlybuilds.html pastebin/highlight.py pastebin/static/css/pastebin.css pastebin/templates/pastebin/api.html pastebin/templates/pastebin/base.html pastebin/templates/pastebin/help.html pastebin/templates/pastebin/snippet_details.html pastebin/templates/pastebin/snippet_form.html pastebin/templates/pastebin/snippet_list.html pastebin/templates/pastebin/snippet_list_embedded.html pastebin/templates/pastebin/snippet_new.html requirements.txt static_docs/templates/pages/documentation/releasenotes.html
Modified: README.dev.md 4 lines changed, 4 insertions(+), 0 deletions(-) =================================================================== @@ -107,6 +107,10 @@ the settings to your needs: }
NIGHTLYBUILDS_BASE_DIR = '/path/to/nightlybuilds/or/just/empty/' + # disable security on 127.0.0.1 without HTTPS + CSRF_COOKIE_SECURE = False + SESSION_COOKIE_SECURE = False + SSL_FORCE_URL_PREFIXES = ()
### Database settings ###
Modified: __init__.py 0 lines changed, 0 insertions(+), 0 deletions(-) =================================================================== No diff available, check online
Modified: geany/__init__.py 2 lines changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,2 @@ + +default_app_config = 'geany.apps.GeanyAppConfig'
Modified: geany/apps.py 21 lines changed, 21 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,21 @@ +# coding: utf-8 +# LICENCE: This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. + +from django.apps import AppConfig + + +######################################################################## +class GeanyAppConfig(AppConfig): + name = 'geany' + verbose_name = "Geany"
Modified: geany/settings.py 305 lines changed, 153 insertions(+), 152 deletions(-) =================================================================== @@ -12,21 +12,27 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see http://www.gnu.org/licenses/.
+from __future__ import absolute_import, unicode_literals +import os from django.utils.translation import ugettext_lazy as _
+ ###################### # MEZZANINE SETTINGS # ######################
-# The following settings are already defined in mezzanine.conf.defaults -# with default values, but are common enough to be put here, commented -# out, for convenient overriding. +# The following settings are already defined with default values in +# the ``defaults.py`` module within each of Mezzanine's apps, but are +# common enough to be put here, commented out, for conveniently +# overriding. Please consult the settings documentation for a full list +# of settings Mezzanine implements: +# http://mezzanine.jupo.org/docs/configuration.html#default-settings
# Controls the ordering and grouping of the admin menu. # # ADMIN_MENU_ORDER = ( # ("Content", ("pages.Page", "blog.BlogPost", -# "generic.ThreadedComment", ("Media Library", "fb_browse"),)), +# "generic.ThreadedComment", (_("Media Library"), "fb_browse"),)), # ("Site", ("sites.Site", "redirects.Redirect", "conf.Setting")), # ("Users", ("auth.User", "auth.Group",)), # ) @@ -40,6 +46,19 @@ # ("mezzanine_tags.recent_actions",), # )
+# A sequence of templates used by the ``page_menu`` template tag. Each +# item in the sequence is a three item sequence, containing a unique ID +# for the template, a label for the template, and the template path. +# These templates are then available for selection when editing which +# menus a page should appear in. Note that if a menu template is used +# that doesn't appear in this setting, all pages will appear in it. + +# PAGE_MENU_TEMPLATES = ( +# (1, _("Top navigation bar"), "pages/menus/dropdown.html"), +# (2, _("Left-hand tree"), "pages/menus/tree.html"), +# (3, _("Footer"), "pages/menus/footer.html"), +# ) + # A sequence of fields that will be injected into Mezzanine's (or any # library's) models. Each item in the sequence is a four item sequence. # The first two items are the dotted path to the model and its field @@ -56,7 +75,7 @@ # # Dotted path to field class. # "somelib.fields.ImageField", # # Positional args for field class. -# ("Image",), +# (_("Image"),), # # Keyword args for field class. # {"blank": True, "upload_to": "blog"}, # ), @@ -64,7 +83,7 @@ # ( # "mezzanine.pages.models.Page.another_field", # "IntegerField", # 'django.db.models.' is implied if path is omitted. -# ("Another name",), +# (_("Another name"),), # {"blank": True, "default": 1}, # ), # ) @@ -76,7 +95,7 @@ # If ``True``, users will be automatically redirected to HTTPS # for the URLs specified by the ``SSL_FORCE_URL_PREFIXES`` setting. # -# SSL_ENABLED = True +SSL_ENABLED = True
# Host name that the site should always be accessed via that matches # the SSL certificate. @@ -88,26 +107,37 @@ # ('/admin', '/example') would force all URLs beginning with # /admin or /example to run over SSL. Defaults to: # -# SSL_FORCE_URL_PREFIXES = ("/admin", "/account") +SSL_FORCE_URL_PREFIXES = ("/admin", "/account") + +# Django security settings +SECURE_CONTENT_TYPE_NOSNIFF = True +SECURE_BROWSER_XSS_FILTER = True + +CSRF_COOKIE_HTTPONLY = True +CSRF_COOKIE_SECURE = True
-# If True, the south application will be automatically added to the -# INSTALLED_APPS setting. This setting is not defined in -# mezzanine.conf.defaults as is the case with the above settings. -USE_SOUTH = True +X_FRAME_OPTIONS = 'DENY' + +# If True, the django-modeltranslation will be added to the +# INSTALLED_APPS setting. +USE_MODELTRANSLATION = False + +USE_X_FORWARDED_HOST = True
######################## # MAIN DJANGO SETTINGS # ########################
-# People who get code error notifications. -# In the format (('Full Name', 'email@example.com'), -# ('Full Name', 'anotheremail@example.com')) -ADMINS = ( - ('Enrico Tröger', 'enrico@geany.org'), -) -MANAGERS = ADMINS -COMMENTS_NOTIFICATION_EMAILS = 'enrico@geany.org' +# Hosts/domain names that are valid for this site; required if DEBUG is False +# See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts +ALLOWED_HOSTS = ('127.0.0.1', + 'geany.org', + 'www.geany.org', + 'pastebin.geany.org', + 'geany.nightlybuilds.org', + 'nightly.geany.org') +
# Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name @@ -125,53 +155,34 @@ # http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = "en"
+# Supported languages +LANGUAGES = ( + ('en', _('English')), +) + # A boolean that turns on/off debug mode. When set to ``True``, stack traces # are displayed for error pages. Should always be set to ``False`` in # production. Best set to ``True`` in local_settings.py DEBUG = False
+# Whether a user's session cookie expires when the Web browser is closed. +SESSION_EXPIRE_AT_BROWSER_CLOSE = True
SITE_ID = 1
-ALLOWED_HOSTS = ('127.0.0.1', - 'geany.org', - 'www.geany.org', - 'pastebin.geany.org', - 'geany.nightlybuilds.org', - 'nightly.geany.org') - # If you set this to False, Django will make some optimizations so as not # to load the internationalization machinery. -USE_I18N = True - -# Make this unique, and don't share it with anybody. -SECRET_KEY = "to-be-configured-in-local-settings" -NEVERCACHE_KEY = "to-be-configured-in-local-settings" - -# Tuple of IP addresses, as strings, that: -# * See debug comments, when DEBUG is true -# * Receive x-headers -INTERNAL_IPS = ("127.0.0.1", "176.9.184.2", "2a01:4f8:151:51a3:176:9:184:2") - -DEFAULT_FROM_EMAIL = 'no-reply@geany.org' - -# List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - "django.template.loaders.filesystem.Loader", - "django.template.loaders.app_directories.Loader", -) +USE_I18N = False
AUTHENTICATION_BACKENDS = ("mezzanine.core.auth_backends.MezzanineBackend",)
-# List of finder classes that know how to find static files in -# various locations. -STATICFILES_FINDERS = ( - "django.contrib.staticfiles.finders.FileSystemFinder", - "django.contrib.staticfiles.finders.AppDirectoriesFinder", -# 'django.contrib.staticfiles.finders.DefaultStorageFinder', - 'compressor.finders.CompressorFinder', -) +# The numeric mode to set newly-uploaded files to. The value should be +# a mode you'd pass directly to os.chmod. +FILE_UPLOAD_PERMISSIONS = 0o644 +
+ADMINS = (('Enrico Tröger', 'enrico.troeger@uvena.de'),) +MANAGERS = ADMINS
############# # DATABASES # @@ -179,7 +190,6 @@
DATABASES = { "default": { - # Add "postgresql_psycopg2", "mysql", "sqlite3" or "oracle". "ENGINE": "django.db.backends.mysql", "NAME": "dbname", "USER": "", @@ -194,26 +204,22 @@ "HOST": "127.0.0.1", } } - DATABASE_ROUTERS = ['nightlybuilds.database_routers.NightlyBuildsRouter']
+ ######### # PATHS # #########
-import re -import os - # Full filesystem path to the project. -PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) - -# Name of the directory for the project. -PROJECT_DIRNAME = PROJECT_ROOT.split(os.sep)[-1] +PROJECT_APP_PATH = os.path.dirname(os.path.abspath(__file__)) +PROJECT_APP = os.path.basename(PROJECT_APP_PATH) +PROJECT_ROOT = BASE_DIR = os.path.dirname(PROJECT_APP_PATH)
# Every cache key will get prefixed with this value - here we set it to # the name of the directory the project is in to try and use something # project specific. -CACHE_MIDDLEWARE_KEY_PREFIX = PROJECT_DIRNAME +CACHE_MIDDLEWARE_KEY_PREFIX = PROJECT_APP CACHE_MIDDLEWARE_SECONDS = 300 CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True CACHE_MIDDLEWARE_ALIAS = 'default' @@ -237,23 +243,42 @@ # Example: "/home/media/media.lawrence.com/media/" MEDIA_ROOT = os.path.join(PROJECT_ROOT, *MEDIA_URL.strip("/").split("/"))
-# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a -# trailing slash. -# Examples: "http://foo.com/media/", "/media/". -ADMIN_MEDIA_PREFIX = STATIC_URL + "grappelli/" - # Package/module name to import the root urlpatterns from for the project. -ROOT_URLCONF = "%s.urls" % PROJECT_DIRNAME - -# Put strings here, like "/home/html/django_templates" -# or "C:/www/django/templates". -# Always use forward slashes, even on Windows. -# Don't forget to use absolute paths, not relative paths. -TEMPLATE_DIRS = ( - os.path.join(PROJECT_ROOT, "templates"), -) +ROOT_URLCONF = "%s.urls" % PROJECT_APP + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'APP_DIRS': True, + 'DIRS': [ + os.path.join(PROJECT_APP_PATH, "templates"), + ], + 'OPTIONS': { + 'context_processors': [ + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + 'django.template.context_processors.debug', + 'django.template.context_processors.i18n', + 'django.template.context_processors.static', + 'django.template.context_processors.media', + 'django.template.context_processors.request', + 'django.template.context_processors.tz', + 'mezzanine.conf.context_processors.settings', + 'latest_version.context_processors.latest_version', + 'mezzanine.pages.context_processors.page', + ], + }, + }, +] +TEMPLATE_CONTEXT_PROCESSORS = TEMPLATES[0]['OPTIONS']['context_processors']
-TINYMCE_SETUP_JS = '/static/js/tinymce_setup.js' +# List of finder classes that know how to find static files in +# various locations. +STATICFILES_FINDERS = ( + "django.contrib.staticfiles.finders.FileSystemFinder", + "django.contrib.staticfiles.finders.AppDirectoriesFinder", + 'compressor.finders.CompressorFinder', +)
################ @@ -273,12 +298,12 @@ "mezzanine.conf", "mezzanine.core", "mezzanine.generic", + "mezzanine.pages", "mezzanine.blog", "mezzanine.forms", - "mezzanine.pages", - #~ "mezzanine.mobile", "mezzanine.galleries", "mezzanine.twitter", + "mezzanine.accounts",
# we "geany", @@ -290,21 +315,7 @@ # 3rd party "honeypot", # for pastebin "django_hosts", -) - -# List of processors used by RequestContext to populate the context. -# Each one should be a callable that takes the request object as its -# only parameter and returns a dictionary to add to the context. -TEMPLATE_CONTEXT_PROCESSORS = ( - "django.contrib.auth.context_processors.auth", - "django.contrib.messages.context_processors.messages", - "django.core.context_processors.debug", - "django.core.context_processors.i18n", - "django.core.context_processors.static", - "django.core.context_processors.media", - "django.core.context_processors.request", - "mezzanine.conf.context_processors.settings", - "latest_version.context_processors.latest_version", + "gunicorn", )
# List of middleware classes to use. Order is important; in the request phase, @@ -312,24 +323,29 @@ # response phase the middleware will be applied in reverse order. MIDDLEWARE_CLASSES = ( "mezzanine.core.middleware.UpdateCacheMiddleware", + + "django.middleware.security.SecurityMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", - "django.contrib.auth.middleware.AuthenticationMiddleware", - #"django_log_failed_auth.middleware.FailedAuthenticationMiddleware", - "django.contrib.redirects.middleware.RedirectFallbackMiddleware", + # Uncomment if using internationalisation or localisation + # "django.middleware.locale.LocaleMiddleware", "django.middleware.common.CommonMiddleware", + "django.middleware.common.BrokenLinkEmailsMiddleware", "django.middleware.csrf.CsrfViewMiddleware", + "django.contrib.auth.middleware.AuthenticationMiddleware", + "django.contrib.auth.middleware.SessionAuthenticationMiddleware", "django.contrib.messages.middleware.MessageMiddleware", + "django.middleware.clickjacking.XFrameOptionsMiddleware", + "mezzanine.core.request.CurrentRequestMiddleware", - "mezzanine.core.middleware.TemplateForDeviceMiddleware", - #~ "mezzanine.core.middleware.TemplateForHostMiddleware", + "mezzanine.core.middleware.RedirectFallbackMiddleware", + #"mezzanine.core.middleware.TemplateForDeviceMiddleware", + #"mezzanine.core.middleware.TemplateForHostMiddleware", "mezzanine.core.middleware.AdminLoginInterfaceSelectorMiddleware", "mezzanine.core.middleware.SitePermissionMiddleware", # Uncomment the following if using any of the SSL settings: # "mezzanine.core.middleware.SSLRedirectMiddleware", - "django.middleware.transaction.TransactionMiddleware", "mezzanine.pages.middleware.PageMiddleware", "django_hosts.middleware.HostsMiddleware", - "debug_toolbar.middleware.DebugToolbarMiddleware", "mezzanine.core.middleware.FetchFromCacheMiddleware", )
@@ -338,9 +354,6 @@ PACKAGE_NAME_FILEBROWSER = "filebrowser_safe" PACKAGE_NAME_GRAPPELLI = "grappelli_safe"
-BLOG_SLUG = 'news' - - ######################### # OPTIONAL APPLICATIONS # ######################### @@ -349,24 +362,22 @@ OPTIONAL_APPS = ( "debug_toolbar", "django_extensions", - "compressor", - "piwik_stats", "memcache_status", + "compressor", PACKAGE_NAME_FILEBROWSER, PACKAGE_NAME_GRAPPELLI, )
-DEBUG_TOOLBAR_CONFIG = {"INTERCEPT_REDIRECTS": False} - - ######################### -# MISCELLANEOUS # +# GEANY SETINGS # #########################
-# caching & sessions -SESSION_ENGINE = "django.contrib.sessions.backends.cached_db" -SESSION_EXPIRE_AT_BROWSER_CLOSE = False +# some more Mezzanine settings +BLOG_SLUG = 'news' +FORMS_USE_HTML5 = True +INLINE_EDITING_ENABLED = False
+# dashboard DASHBOARD_TAGS = ( ("mezzanine_tags.app_list",), ("comment_tags.recent_comments",), @@ -379,10 +390,15 @@ (_("Site"), ("sites.Site", "redirects.Redirect", "conf.Setting", "latest_version.LatestVersion", (_("Manage latest version"), "mezzanine_spam_stats.SpamStat"))), (_("Users"), ("auth.User", "auth.Group",)))
-FORMS_USE_HTML5 = True +# django-debug-toolbar +DEBUG_TOOLBAR_CONFIG = {"INTERCEPT_REDIRECTS": False}
-INLINE_EDITING_ENABLED = False +# caching & sessions +SESSION_ENGINE = "django.contrib.sessions.backends.cached_db" +SESSION_EXPIRE_AT_BROWSER_CLOSE = True +SESSION_COOKIE_SECURE = True
+# django compressor COMPRESS_CSS_FILTERS = ['compressor.filters.cssmin.CSSMinFilter']
# django-hosts @@ -392,16 +408,14 @@ # django-honeypot HONEYPOT_FIELD_NAME = 'website'
-# the URL should end with a slash or 'index.php' -PIWIK_STATS_URL = 'http://demo.piwik.org' -PIWIK_STATS_TOKEN = 'anonymous' -PIWIK_STATS_SITE_ID = 1 - NIGHTLYBUILDS_BASE_DIR = '/path/to/nightly/builds'
IRC_USER_LIST_FILE = '/var/tmp/irc_userlist'
+######################### +# LOGGING # +######################### LOGGING = { 'version': 1, 'disable_existing_loggers': True, @@ -428,7 +442,7 @@ } }, 'loggers': { - '': { + 'root': { 'handlers':['console'], 'level':'DEBUG', }, @@ -445,29 +459,6 @@ } }
-################### -# DEPLOY SETTINGS # -################### - -# These settings are used by the default fabfile.py provided. -# Check fabfile.py for defaults. - -# FABRIC = { -# "SSH_USER": "", # SSH username -# "SSH_PASS": "", # SSH password (consider key-based authentication) -# "SSH_KEY_PATH": "", # Local path to SSH key file, for key-based auth -# "HOSTS": [], # List of hosts to deploy to -# "VIRTUALENV_HOME": "", # Absolute remote path for virtualenvs -# "PROJECT_NAME": "", # Unique identifier for project -# "REQUIREMENTS_PATH": "", # Path to pip requirements, relative to project -# "GUNICORN_PORT": 8000, # Port gunicorn will listen on -# "LOCALE": "en_US.UTF-8", # Should end with ".UTF-8" -# "LIVE_HOSTNAME": "www.example.com", # Host for public site. -# "REPO_URL": "", # Git or Mercurial remote repo URL for the project -# "DB_PASS": "", # Live database password -# "ADMIN_PASS": "", # Live admin user password -# } -
################## # LOCAL SETTINGS # @@ -476,10 +467,13 @@ # Allow any settings to be defined in local_settings.py which should be # ignored in your version control system allowing for settings to be # defined per machine. -try: - from local_settings import * -except ImportError: - pass + +# Instead of doing "from .local_settings import *", we use exec so that +# local_settings has full access to everything defined in this module. + +f = os.path.join(os.path.dirname(os.path.abspath(__file__)), "local_settings.py") +if os.path.exists(f): + exec(open(f, "rb").read())
#################### @@ -488,6 +482,13 @@
# set_dynamic_settings() will rewrite globals based on what has been # defined so far, in order to provide some better defaults where -# applicable. -from mezzanine.utils.conf import set_dynamic_settings -set_dynamic_settings(globals()) +# applicable. We also allow this settings module to be imported +# without Mezzanine installed, as the case may be when using the +# fabfile, where setting the dynamic settings below isn't strictly +# required. +try: + from mezzanine.utils.conf import set_dynamic_settings +except ImportError: + pass +else: + set_dynamic_settings(globals())
Modified: geany/sitemaps.py 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -15,7 +15,7 @@ from django.contrib import sitemaps from django.contrib.sites.models import Site from django.core import urlresolvers -from django_hosts.reverse import get_host +from django_hosts.resolvers import get_host from mezzanine.blog.models import BlogPost from mezzanine.core.sitemaps import DisplayableSitemap
Modified: geany/static/css/bootstrap-responsive.css 1109 lines changed, 0 insertions(+), 1109 deletions(-) =================================================================== @@ -1,1109 +0,0 @@ -/*! - * Bootstrap Responsive v2.3.2 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ - -.clearfix { - *zoom: 1; -} - -.clearfix:before, -.clearfix:after { - display: table; - line-height: 0; - content: ""; -} - -.clearfix:after { - clear: both; -} - -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} - -.input-block-level { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -@-ms-viewport { - width: device-width; -} - -.hidden { - display: none; - visibility: hidden; -} - -.visible-phone { - display: none !important; -} - -.visible-tablet { - display: none !important; -} - -.hidden-desktop { - display: none !important; -} - -.visible-desktop { - display: inherit !important; -} - -@media (min-width: 768px) and (max-width: 979px) { - .hidden-desktop { - display: inherit !important; - } - .visible-desktop { - display: none !important ; - } - .visible-tablet { - display: inherit !important; - } - .hidden-tablet { - display: none !important; - } -} - -@media (max-width: 767px) { - .hidden-desktop { - display: inherit !important; - } - .visible-desktop { - display: none !important; - } - .visible-phone { - display: inherit !important; - } - .hidden-phone { - display: none !important; - } -} - -.visible-print { - display: none !important; -} - -@media print { - .visible-print { - display: inherit !important; - } - .hidden-print { - display: none !important; - } -} - -@media (min-width: 1200px) { - .row { - margin-left: -30px; - *zoom: 1; - } - .row:before, - .row:after { - display: table; - line-height: 0; - content: ""; - } - .row:after { - clear: both; - } - [class*="span"] { - float: left; - min-height: 1px; - margin-left: 30px; - } - .container, - .navbar-static-top .container, - .navbar-fixed-top .container, - .navbar-fixed-bottom .container { - width: 1170px; - } - .span12 { - width: 1170px; - } - .span11 { - width: 1070px; - } - .span10 { - width: 970px; - } - .span9 { - width: 870px; - } - .span8 { - width: 770px; - } - .span7 { - width: 670px; - } - .span6 { - width: 570px; - } - .span5 { - width: 470px; - } - .span4 { - width: 370px; - } - .span3 { - width: 270px; - } - .span2 { - width: 170px; - } - .span1 { - width: 70px; - } - .offset12 { - margin-left: 1230px; - } - .offset11 { - margin-left: 1130px; - } - .offset10 { - margin-left: 1030px; - } - .offset9 { - margin-left: 930px; - } - .offset8 { - margin-left: 830px; - } - .offset7 { - margin-left: 730px; - } - .offset6 { - margin-left: 630px; - } - .offset5 { - margin-left: 530px; - } - .offset4 { - margin-left: 430px; - } - .offset3 { - margin-left: 330px; - } - .offset2 { - margin-left: 230px; - } - .offset1 { - margin-left: 130px; - } - .row-fluid { - width: 100%; - *zoom: 1; - } - .row-fluid:before, - .row-fluid:after { - display: table; - line-height: 0; - content: ""; - } - .row-fluid:after { - clear: both; - } - .row-fluid [class*="span"] { - display: block; - float: left; - width: 100%; - min-height: 30px; - margin-left: 2.564102564102564%; - *margin-left: 2.5109110747408616%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - .row-fluid [class*="span"]:first-child { - margin-left: 0; - } - .row-fluid .controls-row [class*="span"] + [class*="span"] { - margin-left: 2.564102564102564%; - } - .row-fluid .span12 { - width: 100%; - *width: 99.94680851063829%; - } - .row-fluid .span11 { - width: 91.45299145299145%; - *width: 91.39979996362975%; - } - .row-fluid .span10 { - width: 82.90598290598291%; - *width: 82.8527914166212%; - } - .row-fluid .span9 { - width: 74.35897435897436%; - *width: 74.30578286961266%; - } - .row-fluid .span8 { - width: 65.81196581196582%; - *width: 65.75877432260411%; - } - .row-fluid .span7 { - width: 57.26495726495726%; - *width: 57.21176577559556%; - } - .row-fluid .span6 { - width: 48.717948717948715%; - *width: 48.664757228587014%; - } - .row-fluid .span5 { - width: 40.17094017094017%; - *width: 40.11774868157847%; - } - .row-fluid .span4 { - width: 31.623931623931625%; - *width: 31.570740134569924%; - } - .row-fluid .span3 { - width: 23.076923076923077%; - *width: 23.023731587561375%; - } - .row-fluid .span2 { - width: 14.52991452991453%; - *width: 14.476723040552828%; - } - .row-fluid .span1 { - width: 5.982905982905983%; - *width: 5.929714493544281%; - } - .row-fluid .offset12 { - margin-left: 105.12820512820512%; - *margin-left: 105.02182214948171%; - } - .row-fluid .offset12:first-child { - margin-left: 102.56410256410257%; - *margin-left: 102.45771958537915%; - } - .row-fluid .offset11 { - margin-left: 96.58119658119658%; - *margin-left: 96.47481360247316%; - } - .row-fluid .offset11:first-child { - margin-left: 94.01709401709402%; - *margin-left: 93.91071103837061%; - } - .row-fluid .offset10 { - margin-left: 88.03418803418803%; - *margin-left: 87.92780505546462%; - } - .row-fluid .offset10:first-child { - margin-left: 85.47008547008548%; - *margin-left: 85.36370249136206%; - } - .row-fluid .offset9 { - margin-left: 79.48717948717949%; - *margin-left: 79.38079650845607%; - } - .row-fluid .offset9:first-child { - margin-left: 76.92307692307693%; - *margin-left: 76.81669394435352%; - } - .row-fluid .offset8 { - margin-left: 70.94017094017094%; - *margin-left: 70.83378796144753%; - } - .row-fluid .offset8:first-child { - margin-left: 68.37606837606839%; - *margin-left: 68.26968539734497%; - } - .row-fluid .offset7 { - margin-left: 62.393162393162385%; - *margin-left: 62.28677941443899%; - } - .row-fluid .offset7:first-child { - margin-left: 59.82905982905982%; - *margin-left: 59.72267685033642%; - } - .row-fluid .offset6 { - margin-left: 53.84615384615384%; - *margin-left: 53.739770867430444%; - } - .row-fluid .offset6:first-child { - margin-left: 51.28205128205128%; - *margin-left: 51.175668303327875%; - } - .row-fluid .offset5 { - margin-left: 45.299145299145295%; - *margin-left: 45.1927623204219%; - } - .row-fluid .offset5:first-child { - margin-left: 42.73504273504273%; - *margin-left: 42.62865975631933%; - } - .row-fluid .offset4 { - margin-left: 36.75213675213675%; - *margin-left: 36.645753773413354%; - } - .row-fluid .offset4:first-child { - margin-left: 34.18803418803419%; - *margin-left: 34.081651209310785%; - } - .row-fluid .offset3 { - margin-left: 28.205128205128204%; - *margin-left: 28.0987452264048%; - } - .row-fluid .offset3:first-child { - margin-left: 25.641025641025642%; - *margin-left: 25.53464266230224%; - } - .row-fluid .offset2 { - margin-left: 19.65811965811966%; - *margin-left: 19.551736679396257%; - } - .row-fluid .offset2:first-child { - margin-left: 17.094017094017094%; - *margin-left: 16.98763411529369%; - } - .row-fluid .offset1 { - margin-left: 11.11111111111111%; - *margin-left: 11.004728132387708%; - } - .row-fluid .offset1:first-child { - margin-left: 8.547008547008547%; - *margin-left: 8.440625568285142%; - } - input, - textarea, - .uneditable-input { - margin-left: 0; - } - .controls-row [class*="span"] + [class*="span"] { - margin-left: 30px; - } - input.span12, - textarea.span12, - .uneditable-input.span12 { - width: 1156px; - } - input.span11, - textarea.span11, - .uneditable-input.span11 { - width: 1056px; - } - input.span10, - textarea.span10, - .uneditable-input.span10 { - width: 956px; - } - input.span9, - textarea.span9, - .uneditable-input.span9 { - width: 856px; - } - input.span8, - textarea.span8, - .uneditable-input.span8 { - width: 756px; - } - input.span7, - textarea.span7, - .uneditable-input.span7 { - width: 656px; - } - input.span6, - textarea.span6, - .uneditable-input.span6 { - width: 556px; - } - input.span5, - textarea.span5, - .uneditable-input.span5 { - width: 456px; - } - input.span4, - textarea.span4, - .uneditable-input.span4 { - width: 356px; - } - input.span3, - textarea.span3, - .uneditable-input.span3 { - width: 256px; - } - input.span2, - textarea.span2, - .uneditable-input.span2 { - width: 156px; - } - input.span1, - textarea.span1, - .uneditable-input.span1 { - width: 56px; - } - .thumbnails { - margin-left: -30px; - } - .thumbnails > li { - margin-left: 30px; - } - .row-fluid .thumbnails { - margin-left: 0; - } -} - -@media (min-width: 768px) and (max-width: 979px) { - .row { - margin-left: -20px; - *zoom: 1; - } - .row:before, - .row:after { - display: table; - line-height: 0; - content: ""; - } - .row:after { - clear: both; - } - [class*="span"] { - float: left; - min-height: 1px; - margin-left: 20px; - } - .container, - .navbar-static-top .container, - .navbar-fixed-top .container, - .navbar-fixed-bottom .container { - width: 724px; - } - .span12 { - width: 724px; - } - .span11 { - width: 662px; - } - .span10 { - width: 600px; - } - .span9 { - width: 538px; - } - .span8 { - width: 476px; - } - .span7 { - width: 414px; - } - .span6 { - width: 352px; - } - .span5 { - width: 290px; - } - .span4 { - width: 228px; - } - .span3 { - width: 166px; - } - .span2 { - width: 104px; - } - .span1 { - width: 42px; - } - .offset12 { - margin-left: 764px; - } - .offset11 { - margin-left: 702px; - } - .offset10 { - margin-left: 640px; - } - .offset9 { - margin-left: 578px; - } - .offset8 { - margin-left: 516px; - } - .offset7 { - margin-left: 454px; - } - .offset6 { - margin-left: 392px; - } - .offset5 { - margin-left: 330px; - } - .offset4 { - margin-left: 268px; - } - .offset3 { - margin-left: 206px; - } - .offset2 { - margin-left: 144px; - } - .offset1 { - margin-left: 82px; - } - .row-fluid { - width: 100%; - *zoom: 1; - } - .row-fluid:before, - .row-fluid:after { - display: table; - line-height: 0; - content: ""; - } - .row-fluid:after { - clear: both; - } - .row-fluid [class*="span"] { - display: block; - float: left; - width: 100%; - min-height: 30px; - margin-left: 2.7624309392265194%; - *margin-left: 2.709239449864817%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - .row-fluid [class*="span"]:first-child { - margin-left: 0; - } - .row-fluid .controls-row [class*="span"] + [class*="span"] { - margin-left: 2.7624309392265194%; - } - .row-fluid .span12 { - width: 100%; - *width: 99.94680851063829%; - } - .row-fluid .span11 { - width: 91.43646408839778%; - *width: 91.38327259903608%; - } - .row-fluid .span10 { - width: 82.87292817679558%; - *width: 82.81973668743387%; - } - .row-fluid .span9 { - width: 74.30939226519337%; - *width: 74.25620077583166%; - } - .row-fluid .span8 { - width: 65.74585635359117%; - *width: 65.69266486422946%; - } - .row-fluid .span7 { - width: 57.18232044198895%; - *width: 57.12912895262725%; - } - .row-fluid .span6 { - width: 48.61878453038674%; - *width: 48.56559304102504%; - } - .row-fluid .span5 { - width: 40.05524861878453%; - *width: 40.00205712942283%; - } - .row-fluid .span4 { - width: 31.491712707182323%; - *width: 31.43852121782062%; - } - .row-fluid .span3 { - width: 22.92817679558011%; - *width: 22.87498530621841%; - } - .row-fluid .span2 { - width: 14.3646408839779%; - *width: 14.311449394616199%; - } - .row-fluid .span1 { - width: 5.801104972375691%; - *width: 5.747913483013988%; - } - .row-fluid .offset12 { - margin-left: 105.52486187845304%; - *margin-left: 105.41847889972962%; - } - .row-fluid .offset12:first-child { - margin-left: 102.76243093922652%; - *margin-left: 102.6560479605031%; - } - .row-fluid .offset11 { - margin-left: 96.96132596685082%; - *margin-left: 96.8549429881274%; - } - .row-fluid .offset11:first-child { - margin-left: 94.1988950276243%; - *margin-left: 94.09251204890089%; - } - .row-fluid .offset10 { - margin-left: 88.39779005524862%; - *margin-left: 88.2914070765252%; - } - .row-fluid .offset10:first-child { - margin-left: 85.6353591160221%; - *margin-left: 85.52897613729868%; - } - .row-fluid .offset9 { - margin-left: 79.8342541436464%; - *margin-left: 79.72787116492299%; - } - .row-fluid .offset9:first-child { - margin-left: 77.07182320441989%; - *margin-left: 76.96544022569647%; - } - .row-fluid .offset8 { - margin-left: 71.2707182320442%; - *margin-left: 71.16433525332079%; - } - .row-fluid .offset8:first-child { - margin-left: 68.50828729281768%; - *margin-left: 68.40190431409427%; - } - .row-fluid .offset7 { - margin-left: 62.70718232044199%; - *margin-left: 62.600799341718584%; - } - .row-fluid .offset7:first-child { - margin-left: 59.94475138121547%; - *margin-left: 59.838368402492065%; - } - .row-fluid .offset6 { - margin-left: 54.14364640883978%; - *margin-left: 54.037263430116376%; - } - .row-fluid .offset6:first-child { - margin-left: 51.38121546961326%; - *margin-left: 51.27483249088986%; - } - .row-fluid .offset5 { - margin-left: 45.58011049723757%; - *margin-left: 45.47372751851417%; - } - .row-fluid .offset5:first-child { - margin-left: 42.81767955801105%; - *margin-left: 42.71129657928765%; - } - .row-fluid .offset4 { - margin-left: 37.01657458563536%; - *margin-left: 36.91019160691196%; - } - .row-fluid .offset4:first-child { - margin-left: 34.25414364640884%; - *margin-left: 34.14776066768544%; - } - .row-fluid .offset3 { - margin-left: 28.45303867403315%; - *margin-left: 28.346655695309746%; - } - .row-fluid .offset3:first-child { - margin-left: 25.69060773480663%; - *margin-left: 25.584224756083227%; - } - .row-fluid .offset2 { - margin-left: 19.88950276243094%; - *margin-left: 19.783119783707537%; - } - .row-fluid .offset2:first-child { - margin-left: 17.12707182320442%; - *margin-left: 17.02068884448102%; - } - .row-fluid .offset1 { - margin-left: 11.32596685082873%; - *margin-left: 11.219583872105325%; - } - .row-fluid .offset1:first-child { - margin-left: 8.56353591160221%; - *margin-left: 8.457152932878806%; - } - input, - textarea, - .uneditable-input { - margin-left: 0; - } - .controls-row [class*="span"] + [class*="span"] { - margin-left: 20px; - } - input.span12, - textarea.span12, - .uneditable-input.span12 { - width: 710px; - } - input.span11, - textarea.span11, - .uneditable-input.span11 { - width: 648px; - } - input.span10, - textarea.span10, - .uneditable-input.span10 { - width: 586px; - } - input.span9, - textarea.span9, - .uneditable-input.span9 { - width: 524px; - } - input.span8, - textarea.span8, - .uneditable-input.span8 { - width: 462px; - } - input.span7, - textarea.span7, - .uneditable-input.span7 { - width: 400px; - } - input.span6, - textarea.span6, - .uneditable-input.span6 { - width: 338px; - } - input.span5, - textarea.span5, - .uneditable-input.span5 { - width: 276px; - } - input.span4, - textarea.span4, - .uneditable-input.span4 { - width: 214px; - } - input.span3, - textarea.span3, - .uneditable-input.span3 { - width: 152px; - } - input.span2, - textarea.span2, - .uneditable-input.span2 { - width: 90px; - } - input.span1, - textarea.span1, - .uneditable-input.span1 { - width: 28px; - } -} - -@media (max-width: 767px) { - body { - padding-right: 20px; - padding-left: 20px; - } - .navbar-fixed-top, - .navbar-fixed-bottom, - .navbar-static-top { - margin-right: -20px; - margin-left: -20px; - } - .container-fluid { - padding: 0; - } - .dl-horizontal dt { - float: none; - width: auto; - clear: none; - text-align: left; - } - .dl-horizontal dd { - margin-left: 0; - } - .container { - width: auto; - } - .row-fluid { - width: 100%; - } - .row, - .thumbnails { - margin-left: 0; - } - .thumbnails > li { - float: none; - margin-left: 0; - } - [class*="span"], - .uneditable-input[class*="span"], - .row-fluid [class*="span"] { - display: block; - float: none; - width: 100%; - margin-left: 0; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - .span12, - .row-fluid .span12 { - width: 100%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - .row-fluid [class*="offset"]:first-child { - margin-left: 0; - } - .input-large, - .input-xlarge, - .input-xxlarge, - input[class*="span"], - select[class*="span"], - textarea[class*="span"], - .uneditable-input { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - .input-prepend input, - .input-append input, - .input-prepend input[class*="span"], - .input-append input[class*="span"] { - display: inline-block; - width: auto; - } - .controls-row [class*="span"] + [class*="span"] { - margin-left: 0; - } - .modal { - position: fixed; - top: 20px; - right: 20px; - left: 20px; - width: auto; - margin: 0; - } - .modal.fade { - top: -100px; - } - .modal.fade.in { - top: 20px; - } -} - -@media (max-width: 480px) { - .nav-collapse { - -webkit-transform: translate3d(0, 0, 0); - } - .page-header h1 small { - display: block; - line-height: 20px; - } - input[type="checkbox"], - input[type="radio"] { - border: 1px solid #ccc; - } - .form-horizontal .control-label { - float: none; - width: auto; - padding-top: 0; - text-align: left; - } - .form-horizontal .controls { - margin-left: 0; - } - .form-horizontal .control-list { - padding-top: 0; - } - .form-horizontal .form-actions { - padding-right: 10px; - padding-left: 10px; - } - .media .pull-left, - .media .pull-right { - display: block; - float: none; - margin-bottom: 10px; - } - .media-object { - margin-right: 0; - margin-left: 0; - } - .modal { - top: 10px; - right: 10px; - left: 10px; - } - .modal-header .close { - padding: 10px; - margin: -10px; - } - .carousel-caption { - position: static; - } -} - -@media (max-width: 979px) { - body { - padding-top: 0; - } - .navbar-fixed-top, - .navbar-fixed-bottom { - position: static; - } - .navbar-fixed-top { - margin-bottom: 20px; - } - .navbar-fixed-bottom { - margin-top: 20px; - } - .navbar-fixed-top .navbar-inner, - .navbar-fixed-bottom .navbar-inner { - padding: 5px; - } - .navbar .container { - width: auto; - padding: 0; - } - .navbar .brand { - padding-right: 10px; - padding-left: 10px; - margin: 0 0 0 -5px; - } - .nav-collapse { - clear: both; - } - .nav-collapse .nav { - float: none; - margin: 0 0 10px; - } - .nav-collapse .nav > li { - float: none; - } - .nav-collapse .nav > li > a { - margin-bottom: 2px; - } - .nav-collapse .nav > .divider-vertical { - display: none; - } - .nav-collapse .nav .nav-header { - color: #777777; - text-shadow: none; - } - .nav-collapse .nav > li > a, - .nav-collapse .dropdown-menu a { - padding: 9px 15px; - font-weight: bold; - color: #777777; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - } - .nav-collapse .btn { - padding: 4px 10px 4px; - font-weight: normal; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - } - .nav-collapse .dropdown-menu li + li a { - margin-bottom: 2px; - } - .nav-collapse .nav > li > a:hover, - .nav-collapse .nav > li > a:focus, - .nav-collapse .dropdown-menu a:hover, - .nav-collapse .dropdown-menu a:focus { - background-color: #f2f2f2; - } - .navbar-inverse .nav-collapse .nav > li > a, - .navbar-inverse .nav-collapse .dropdown-menu a { - color: #999999; - } - .navbar-inverse .nav-collapse .nav > li > a:hover, - .navbar-inverse .nav-collapse .nav > li > a:focus, - .navbar-inverse .nav-collapse .dropdown-menu a:hover, - .navbar-inverse .nav-collapse .dropdown-menu a:focus { - background-color: #111111; - } - .nav-collapse.in .btn-group { - padding: 0; - margin-top: 5px; - } - .nav-collapse .dropdown-menu { - position: static; - top: auto; - left: auto; - display: none; - float: none; - max-width: none; - padding: 0; - margin: 0 15px; - background-color: transparent; - border: none; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - } - .nav-collapse .open > .dropdown-menu { - display: block; - } - .nav-collapse .dropdown-menu:before, - .nav-collapse .dropdown-menu:after { - display: none; - } - .nav-collapse .dropdown-menu .divider { - display: none; - } - .nav-collapse .nav > li > .dropdown-menu:before, - .nav-collapse .nav > li > .dropdown-menu:after { - display: none; - } - .nav-collapse .navbar-form, - .nav-collapse .navbar-search { - float: none; - padding: 10px 15px; - margin: 10px 0; - border-top: 1px solid #f2f2f2; - border-bottom: 1px solid #f2f2f2; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - } - .navbar-inverse .nav-collapse .navbar-form, - .navbar-inverse .nav-collapse .navbar-search { - border-top-color: #111111; - border-bottom-color: #111111; - } - .navbar .nav-collapse .nav.pull-right { - float: none; - margin-left: 0; - } - .nav-collapse, - .nav-collapse.collapse { - height: 0; - overflow: hidden; - } - .navbar .btn-navbar { - display: block; - } - .navbar-static .navbar-inner { - padding-right: 10px; - padding-left: 10px; - } -} - -@media (min-width: 980px) { - .nav-collapse.collapse { - height: auto !important; - overflow: visible !important; - } -}
Modified: geany/static/css/bootstrap.css 8949 lines changed, 4950 insertions(+), 3999 deletions(-) =================================================================== No diff available, check online
Modified: geany/static/css/main.css 36 lines changed, 30 insertions(+), 6 deletions(-) =================================================================== @@ -6,22 +6,27 @@ border: 0; }
-.hero-unit { +h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { + font-weight: bold; +} + +.jumbotron { padding-top: 20px; }
-.hero-unit h1 { +.jumbotron h1 { padding-bottom: 20px; font-size: 32px; }
-.hero-unit { +.jumbotron { font-size: 16px; font-weight: 200; line-height: 20px; + padding-bottom: 58px; }
-.hero-unit .btn { +.jumbotron .btn { padding: 8px 12px; margin: 20px; float: right; @@ -29,12 +34,23 @@ font-size: 16px; }
-.navbar img.brand { - padding: 0px 5px; +.navbar img.navbar-brand { + padding: 5px 5px; +} + +.navbar { + min-height: 40px; +} + +.carousel { + margin-bottom: 10px; }
.carousel-indicators { top: -35px; + left: auto; + right: 15px; + width: auto; }
.carousel-indicators li { @@ -47,6 +63,14 @@ background-color: rgba(190, 190, 190, 0.5); }
+#content-main .well { + padding-top: 3px; +} + +#content-main .well h1 { + padding-bottom: 10px; +} + #footer .well { padding: 10px; }
Modified: geany/static/js/bootstrap.js 2622 lines changed, 1174 insertions(+), 1448 deletions(-) =================================================================== No diff available, check online
Modified: geany/static/js/tinymce_setup.js 202 lines changed, 74 insertions(+), 128 deletions(-) =================================================================== @@ -1,141 +1,87 @@
-function CustomFileBrowser(field_name, url, type, win) { +// Map Django language codes to valid TinyMCE language codes. +// There's an entry for every TinyMCE language that exists, +// so if a Django language code isn't here, we can default to en. + +var language_codes = { + 'ar': 'ar', + 'ca': 'ca', + 'cs': 'cs', + 'da': 'da', + 'de': 'de', + 'es': 'es', + 'et': 'et', + 'fa': 'fa', + 'fa_IR': 'fa_IR', + 'fi': 'fi', + 'fr': 'fr_FR', + 'hr_HR': 'hr', + 'hu': 'hu_HU', + 'id_ID': 'id', + 'is_IS': 'is_IS', + 'it': 'it', + 'ja': 'ja', + 'ko': 'ko_KR', + 'lv': 'lv', + 'nb': 'nb_NO', + 'nl': 'nl', + 'pl': 'pl', + 'pt_BR': 'pt_BR', + 'pt_PT': 'pt_PT', + 'ru': 'ru', + 'sk': 'sk', + 'sr': 'sr_Latn', + 'sv': 'sv_SE', + 'tr': 'tr', + 'uk': 'uk_UA', + 'vi': 'vi', + 'zh_CN': 'zh_CN', + 'zh_TW': 'zh_TW' +}; + +function custom_file_browser(field_name, url, type, win) { tinyMCE.activeEditor.windowManager.open({ - file: window.__filebrowser_url + '?pop=2&type=' + type, - width: 820, // Your dimensions may differ - toy around with them! + title: 'Select ' + type + ' to insert', + file: window.__filebrowser_url + '?pop=5&type=' + type, + width: 800, height: 500, - resizable: "yes", - scrollbars: "yes", - inline: "yes", // This parameter only has an effect if you use the inlinepopups plugin! - close_previous: "no" + resizable: 'yes', + scrollbars: 'yes', + inline: 'yes', + close_previous: 'no' }, { window: win, - input: field_name, - editor_id: tinyMCE.selectedInstance.editorId + input: field_name }); return false; }
-if (typeof tinyMCE != 'undefined') { - - tinyMCE.init({ - - // main settings - mode : "specific_textareas", - editor_selector : "mceEditor", - theme: "advanced", - language: "en", - dialog_type: "window", - editor_deselector : "mceNoEditor", - - // general settings - width: '700', - height: '350', - indentation : '10px', - fix_list_elements : true, - relative_urls: false, - remove_script_host : true, - accessibility_warnings : false, - object_resizing: false, - //cleanup: false, // SETTING THIS TO FALSE WILL BREAK EMBEDDING YOUTUBE VIDEOS - forced_root_block: "p", - remove_trailing_nbsp: true, +jQuery(function($) {
- // callbackss - file_browser_callback: "CustomFileBrowser", + if (typeof tinyMCE != 'undefined') {
- // theme_advanced - theme_advanced_toolbar_location: "top", - theme_advanced_toolbar_align: "left", - theme_advanced_statusbar_location: "", - theme_advanced_buttons1: "bold,italic,underline,|,link,unlink,|,image,|,media,charmap,|,code,|,table,|,hr,|,bullist,numlist,blockquote,|,undo,redo,|,formatselect,|,search,replace,|,forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,", - theme_advanced_buttons2: "", - theme_advanced_buttons3: "", - theme_advanced_path: false, - theme_advanced_blockformats: "p,h1,h2,h3,h4,pre", - theme_advanced_styles: "[all] clearfix=clearfix;[p] small=small;[img] Image left-aligned=img_left;[img] Image left-aligned (nospace)=img_left_nospacetop;[img] Image right-aligned=img_right;[img] Image right-aligned (nospace)=img_right_nospacetop;[img] Image Block=img_block;[img] Image Block (nospace)=img_block_nospacetop;[div] column span-2=column span-2;[div] column span-4=column span-4;[div] column span-8=column span-8", - theme_advanced_resizing : true, - theme_advanced_resize_horizontal : false, - theme_advanced_resizing_use_cookie : true, - theme_advanced_styles: "Image left-aligned=img_left;Image left-aligned (nospace)=img_left_nospacetop;Image right-aligned=img_right;Image right-aligned (nospace)=img_right_nospacetop;Image Block=img_block", - advlink_styles: "intern=internal;extern=external", + tinyMCE.init({ + selector: "textarea.mceEditor", + height: '500px', + language: language_codes[window.__language_code] || 'en', + plugins: [ + "advlist autolink lists link image charmap print preview anchor", + "searchreplace visualblocks code fullscreen", + "insertdatetime media table contextmenu paste" + ], + link_list: '/displayable_links.js', + relative_urls: false, + convert_urls: false, + menubar: false, + statusbar: false, + toolbar: ("insertfile undo redo | styleselect | bold italic | " + + "alignleft aligncenter alignright alignjustify | " + + "bullist numlist outdent indent | link image table | " + + "code fullscreen"), + file_browser_callback: custom_file_browser, + content_css: window.__tinymce_css + });
- // plugins - plugins: "inlinepopups,contextmenu,tabfocus,searchreplace,fullscreen,advimage,advlink,paste,media,table", - advimage_update_dimensions_onchange: true, + }
- // remove MS Word's inline styles when copying and pasting. - paste_remove_spans: true, - paste_auto_cleanup_on_paste : true, - paste_remove_styles: true, - paste_remove_styles_if_webkit: true, - paste_strip_class_attributes: true, - - // allow inline styles - inline_styles : true, - - - // elements - valid_elements : "" - + "span[style]," - + "-p," - + "a[href|target=_blank|class]," - + "-strong/-b," - + "-strike/-s,-u," - + "-em/-i," - + "-u," - + "-ol," - + "-ul," - + "-li," - + "-dl," - + "-dd," - + "-dt," - + "br," - + "img[class|src|alt=|width|height]," - + "-h1,-h2,-h3,-h4," - + "-pre," - + "-blockquote," - + "-cite," - + "-code," - + "-iframe," - + "-table[border=0|cellspacing|cellpadding|width|frame|style|class|rules|height|" - + "align|summary|bgcolor|background|bordercolor]," - + "-tr[rowspan|width|height|align|valign|bgcolor|" - + "background|bordercolor]," - + "tbody," - + "thead," - + "tfoot," - + "#td[colspan|rowspan|width|height|align|valign|style|bgcolor|background|" - + "bordercolor|scope]," - + "#th[colspan|rowspan|width|height|align|valign|style|scope]," - + "-div," - + "abbr," - + "sup," - + "", - extended_valid_elements: "pre[style]," - + "a[name|class|href|target|title|onclick|rel]," - + "img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style]," - + "iframe[src|title|byline|portrait|frameborder|width|height]," - + "br[clearfix]," - + "h2[class<clearfix],h3[class<clearfix],h4[class<clearfix]," - + "ul[id|class<clearfix],ol[class<clearfix]," - + "p[class]," - + "div[class]," - + "span[class]," - + "td[style]," - + "object[align<bottom?left?middle?right?top|archive|border|class|classid" - + "|codebase|codetype|data|declare|dir<ltr?rtl|height|hspace|id|lang|name" - + "|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" - + "|onmouseout|onmouseover|onmouseup|standby|style|tabindex|title|type|usemap" - + "|vspace|width]," - + "embed[name|src|type|allowscriptaccess|allowfullscreen|width|height]," - +"param[id|name|type|value|valuetype<DATA?OBJECT?REF],", - valid_children : "" - + "h1/h2/h3/h4/h5/h6/a[%itrans_na]," - + "table[thead|tbody|tfoot|tr|td]," - + "strong/b/strike/s/u/p/div/em/i/td[%itrans|#text]," - //+ "body[%btrans|#text]" - + "", - }); - -} +});
Modified: geany/templates/base.html 12 lines changed, 5 insertions(+), 7 deletions(-) =================================================================== @@ -3,13 +3,11 @@
{% block top_menu %} <div class="navbar navbar-inverse navbar-fixed-top"> - <div class="navbar-inner"> - <div class="container"> - <img src="{{ STATIC_URL }}img/geany-36x36.png" class="brand"> - <a class="brand" href="{% url "home" %}">Geany</a> - <div class="nav-collapse collapse"> - {% page_menu "pages/menus/dropdown.html" %} - </div> + <div class="container"> + <img src="{{ STATIC_URL }}img/geany-36x36.png" class="navbar-brand"> + <a class="navbar-brand" href="{% url "home" %}">Geany</a> + <div class="navbar-collapse collapse"> + {% page_menu "pages/menus/dropdown.html" %} </div> </div> </div>
Modified: geany/templates/blog/blog_post_list.html 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -40,10 +40,10 @@
<div class="well"> <div class="row"> - <div class="span3"> + <div class="col-md-3"> {% include "donate.html" %} </div> - <div class="offset2 span6"> + <div class="col-md-offset-2 col-md-6"> {% include "twitter/tweets.html" %} </div> </div>
Modified: geany/templates/errors/error_base.html 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -15,7 +15,7 @@ {% block main %} <div class="well"> <h3>Error:</h3> - <p class="alert alert-error"> + <p class="alert alert-danger"> {% block error_message %} {% endblock %} </p>
Modified: geany/templates/home.html 21 lines changed, 10 insertions(+), 11 deletions(-) =================================================================== @@ -11,11 +11,10 @@
{% block bodyblock %}
- <!-- Main hero unit for a primary marketing message or call to action --> - <div class="hero-unit"> + <div class="jumbotron"> <h1>The Flyweight IDE</h1>
- <div id="GeanyScreenshots" class="carousel slide"> + <div id="GeanyScreenshots" class="carousel slide" data-ride="carousel"> <ol class="carousel-indicators"> <li data-target="#GeanyScreenshots" data-slide-to="0" class="active"></li> <li data-target="#GeanyScreenshots" data-slide-to="1"></li> @@ -57,11 +56,11 @@ workflow. It runs on Windows, MacOS and Linux, is translated into over 40 languages, and has built-in support for more than 50 programming languages. - <a href="{% url 'page' 'download/releases' %}" class="btn btn-primary">Download Geany {{ geany_latest_version.version }} »</a></p> + <a href="{% url 'page' 'download/releases' %}" class="btn btn-default btn-primary">Download Geany {{ geany_latest_version.version }} »</a></p> </div>
<div class="row"> - <div class="span4"> + <div class="col-md-4"> <h2>Fast & Small</h2> <p>One the primary reasons for Geany's existence is that there is a need for a decent, GUI, lightweight, cross-platform, flexible @@ -69,9 +68,9 @@ requirements but fall short on others. </p> <p>Geany attempts to hit the sweet spot.</p> - <p><a class="btn" href="{% url "page" "about/geany" %}">More Features »</a></p> + <p><a class="btn btn-default" href="{% url "page" "about/geany" %}">More Features »</a></p> </div> - <div class="span4"> + <div class="col-md-4"> <h2>Great Community</h2> <p>Geany is Good Ol' Fashioned <a href="https://en.wikipedia.org/wiki/Free_software">Free Software</a>. @@ -86,10 +85,10 @@ <a href="https://github.com/geany">Github</a>, <a href="http://sourceforge.net/projects/geany/">SourceForge</a>, and <a href="#">Google+</a>.</p> - <p><a class="btn" href="{% url "page" "community/contribute" %}">Get Involved »</a></p> - <p><a class="btn" href="{% url "page" "about/donate" %}">Donate »</a></p> + <p><a class="btn btn-default" href="{% url "page" "community/contribute" %}">Get Involved »</a></p> + <p><a class="btn btn-default" href="{% url "page" "about/donate" %}">Donate »</a></p> </div> - <div class="span4"> + <div class="col-md-4"> <h2>RTFM</h2> <p>Geany not only has an extensive <a href="{% url "page" "documentation/manual" %}">User Manual</a> but also has a crowd-sourced <a href="http://wiki.geany.org/">Wiki</a> and full @@ -97,7 +96,7 @@ <p>Hit us up on <a href="{% url "page" "community/mailing-lists" %}">The Mailing Lists</a> or <a href="{% url "page" "community/irc" %}">IRC</a> and we'll get you on track.</p> - <p><a class="btn" href="{% url "page" "documentation/manual" %}">To The Docs! »</a></p> + <p><a class="btn btn-default" href="{% url "page" "documentation/manual" %}">To The Docs! »</a></p> </div> </div>
Modified: geany/templates/pages/menus/dropdown.html 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -3,7 +3,7 @@ {% if page_branch_in_menu %}
{% if branch_level == 0 %} -<ul class="nav"> +<ul class="nav navbar-nav"> {% for page in page_branch %} {% if page.in_menu %} <li class="dropdown{% if page.is_current_or_ascendant %} active{% endif %}">
Modified: geany/templates/pages/support/irc.html 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -12,7 +12,7 @@
<div class="row"> {% for username in irc_userlist %} - <div class="span2">{{ username }}</div> + <div class="col-md-2">{{ username }}</div>
{% if forloop.counter|divisibleby:4 %} </div>
Modified: geany/templates/skel.html 3 lines changed, 1 insertions(+), 2 deletions(-) =================================================================== @@ -9,7 +9,7 @@
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> <meta name="generator" content="Geany / Django / Mezzanine"> -<meta name="viewport" content="width=device-width"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="keywords" content="{% block meta_keywords %}{% endblock %}"> <meta name="description" content="{% block meta_description %}{% endblock %}"> <meta name="author" content="Geany development team"/> @@ -24,7 +24,6 @@ padding-bottom: 40px; } </style> -<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap-responsive.css"> <link rel="stylesheet" href="{{ STATIC_URL }}css/main.css"> {% block extra_css %}{% endblock %} {% endcompress %}
Modified: geany/templates/twitter/tweets.html 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -5,7 +5,7 @@
{% if tweets %} <h3>{% trans "Recent Tweets" %}</h3> -<ul class="unstyled tweets"> +<ul class="list-unstyled tweets"> {% for tweet in tweets %} <li> <img src="{{ tweet.profile_image_url }}" alt="">
Modified: geany/templatetags/geany_tags.py 11 lines changed, 11 insertions(+), 0 deletions(-) =================================================================== @@ -70,3 +70,14 @@ def get_irc_userlist(): # remove newline characters user_list = [username.strip() for username in user_list] return sorted(user_list) + + +#---------------------------------------------------------------------- +@register.filter(name='add_css') +def add_css(field, css): + # read existing CSS classes + css_classes = field.field.widget.attrs.get('class', u'') + # add new ones + css_classes = u'%s %s' % (css_classes, css) + # render the widget + return field.as_widget(attrs={'class': css_classes})
Modified: geany/urls.py 17 lines changed, 13 insertions(+), 4 deletions(-) =================================================================== @@ -13,11 +13,11 @@ # along with this program. If not, see http://www.gnu.org/licenses/.
from django.conf.urls import patterns, include, url +from django.conf.urls.i18n import i18n_patterns from django.contrib import admin from django.views.generic.base import TemplateView - -from mezzanine.conf import settings from geany.sitemaps import GeanyDisplayableSitemap +from mezzanine.conf import settings from nightlybuilds.views import NightlyBuildsView
@@ -26,10 +26,19 @@
admin.autodiscover()
+urlpatterns = i18n_patterns("", + # Change the admin prefix here to use an alternate URL for the + # admin interface, which would be marginally more secure. + ("^admin/", include(admin.site.urls)), +)
-urlpatterns = patterns("", - url(r"^admin/", include(admin.site.urls)), +if settings.USE_MODELTRANSLATION: + urlpatterns += patterns('', + url('^i18n/$', 'django.views.i18n.set_language', name='set_language'), + )
+# Geany patterns +urlpatterns += patterns("", # use our custom sitemap implementation url(r"^sitemap.xml$", 'django.contrib.sitemaps.views.sitemap', sitemaps),
Modified: geany/wsgi.py 18 lines changed, 18 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,18 @@ +""" +WSGI config for mez4proj project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application +from mezzanine.utils.conf import real_project_name + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", + "%s.settings" % real_project_name("geany")) + +application = get_wsgi_application()
Modified: manage.py 22 lines changed, 7 insertions(+), 15 deletions(-) =================================================================== @@ -1,21 +1,13 @@ #!/usr/bin/env python -# LICENCE: This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. - -import os, sys +import os +import sys
if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "geany.settings") + + from mezzanine.utils.conf import real_project_name + + settings_module = "%s.settings" % real_project_name("geany") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings_module)
from django.core.management import execute_from_command_line
Modified: nightlybuilds/templates/nightlybuilds.html 20 lines changed, 8 insertions(+), 12 deletions(-) =================================================================== @@ -14,22 +14,18 @@ {% else %} {# empty menu for nightly.geany.org #} <div class="navbar navbar-inverse navbar-fixed-top"> - <div class="navbar-inner"> - <div class="container"> - <img src="{{ STATIC_URL }}img/geany-36x36.png" class="brand"> - <a class="brand" href="http://www.geany.org/">Geany</a> + <div class="container"> + <img src="{{ STATIC_URL }}img/geany-36x36.png" class="navbar-brand"> + <a class="navbar-brand" href="http://www.geany.org/">Geany</a>
- <ul class="nav"> - <li><a href="/">Refresh</a></li> - </ul> - </div> + <ul class="nav navbar-nav"> + <li><a href="/">Refresh</a></li> + </ul> </div> </div> {% endif %} {% endblock %}
-{% block top_search %}{% endblock %} - {% block main %} <div class="well">
@@ -41,7 +37,7 @@ against GTK 2.16 to check for compatibility. The results, build logs and the corresponding binary packages can be found below.</p>
-<table class="table table-striped table-bordered nightlybuilds"> +<table class="table table-bordered nightlybuilds"> <thead> <tr> <th></th> @@ -58,7 +54,7 @@ </thead> <tbody> {% for build in nightlybuilds %} - <tr class="{% if build.get_status %}success{% else %}error{% endif %}"> + <tr class="{% if build.get_status %}success{% else %}danger{% endif %}"> <td class="centered_column">{% if build.get_status %} <img src="{{ STATIC_URL }}img/icon-yes.gif" alt="{{ build.get_status_text }}" title="{{ build.get_status_text }}" /> {% else %}
Modified: pastebin/highlight.py 13 lines changed, 10 insertions(+), 3 deletions(-) =================================================================== @@ -24,23 +24,30 @@
LEXER_LIST_ALL = sorted([(i[1][0], i[0]) for i in get_all_lexers()]) LEXER_LIST = ( + ('nasm', 'Assembler'), ('bash', 'Bash'), ('c', 'C'), + ('cpp', 'C++'), ('css', 'CSS'), ('diff', 'Diff'), ('django', 'Django/Jinja'), + ('po', 'Gettext/Po'), ('html', 'HTML'), + ('ini', 'INI config file'), ('irc', 'IRC logs'), + ('java', 'Java'), ('js', 'JavaScript'), + ('json', 'JSON'), + ('lua', 'Lua'), ('perl', 'Perl'), ('php', 'PHP'), - ('pycon', 'Python console session'), - ('pytb', 'Python Traceback'), ('python', 'Python'), - ('python3', 'Python 3'), ('rst', 'Restructured Text'), + ('ruby', 'Ruby'), ('sql', 'SQL'), ('text', 'Text only'), + ('vala', 'Vala'), + ('xml', 'XML'), ) LEXER_DEFAULT = 'text'
Modified: pastebin/static/css/pastebin.css 97 lines changed, 34 insertions(+), 63 deletions(-) =================================================================== @@ -1,6 +1,12 @@ +.badge { + font-weight: 200; +} + + /* * Tabs */ + .nav-tabs > li > a { /* inactive tab */ background-color: rgb(220, 220, 220); @@ -14,78 +20,44 @@ */
-.new-snippet-form textarea { - font-family: monospace; - width: 100%; +/* + * Snippet form + */ +form.new-snippet-form { + margin-bottom: 30px; }
-.new-snippet-form .label { - margin-top: 7px; - margin-bottom: 7px; - display: block; +.new-snippet-form label { + font-weight: 200; }
-.new-snippet-form .control-group ul { +.new-snippet-form ul#id_expire_options { margin-left: 5px; margin-bottom: 0px; -} - -.new-snippet-form .control-group ul li { - list-style: none; -} - -.new-snippet-form .control-group ul li label { width: auto; - padding-right: 15px; }
-.new-snippet-form .control-group ul li input[type="radio"], -.new-snippet-form .control-group ul li input[type="checkbox"] { - margin: 0px; -} - -.new-snippet-form select, input[type="file"] { - height: inherit; +.new-snippet-form ul#id_expire_options li { + list-style: none; }
-.new-snippet-form input, .uneditable-input { - width: 300px; +.new-snippet-form ul#id_expire_options li input{ + display: inline; }
-input[type="file"], -input[type="image"], -input[type="submit"], -input[type="reset"], -input[type="button"], -input[type="radio"], -input[type="checkbox"] { +.new-snippet-form ul#id_expire_options li label { + float: left; + margin-right: 10px; + padding-right: 15px; width: auto; }
-.form-horizontal .control-label { - padding-top: 1px; -} - -select, -textarea, -input[type="text"], -input[type="password"], -input[type="datetime"], -input[type="datetime-local"], -input[type="date"], -input[type="month"], -input[type="time"], -input[type="week"], -input[type="number"], -input[type="email"], -input[type="url"], -input[type="search"], -input[type="tel"], -input[type="color"], -.uneditable-input { - padding-top: 1px; - padding-bottom: 1px; +.new-snippet-form ul#id_expire_options li input[type="radio"] { + margin: 0px; } +/* + * Snippet form + */
/* @@ -111,7 +83,7 @@ div.snippet table { font-family: monospace; font-size: 12px; height: 300px; - width: 90%; + width: 100%; } /* * Snippet @@ -121,7 +93,6 @@ div.snippet table { /* * Embedded snippet list */ - div #snippet_list { margin-top: 25px; } @@ -136,16 +107,12 @@ div #snippet_list li { list-style: none; white-space: nowrap; padding: 3px; -} - -div #snippet_list span.badge { - padding-top: 5px; - padding-bottom: 5px; + width: 31%; }
div #snippet_list a { - color: #ffffff; text-decoration: none; + width: 100%; } /* * Embedded snippet list @@ -155,6 +122,10 @@ div #snippet_list a { /* * Code */ +div.snippet { + margin-left: 25px; +} + div.snippet ol { padding: 1px; border: 1px solid rgb(220, 220, 220);
Modified: pastebin/templates/pastebin/api.html 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -8,7 +8,7 @@ {% block main %} <div class="well">
-<h2>API</h2> +<h1>API</h1>
<p>The following Python code can be used as a simple command line client for this Pastebin service:</p> @@ -38,7 +38,7 @@ <p>Save this script in <code>/usr/local/bin/gpaste</code> and <code>chmod +x /usr/local/bin/gpaste/</code>.</p> <p>Usage: <code>cat foo.txt | gpaste</code></p>
-<h3>Supported fields</h3> +<h2>Supported fields</h2> <p>The only mandatory field is <strong>content</strong> which should contain the text to be pasted.</p> <p>Other accepted, optional fields are: <table class="table table-striped table-bordered">
Modified: pastebin/templates/pastebin/base.html 36 lines changed, 17 insertions(+), 19 deletions(-) =================================================================== @@ -14,26 +14,24 @@ {% url 'snippet_list' as url_snippet_list %}
<div class="navbar navbar-inverse navbar-fixed-top"> - <div class="navbar-inner"> - <div class="container"> - <img src="{{ STATIC_URL }}img/geany-36x36.png" class="brand"> - <a class="brand" href="http://www.geany.org/">Geany</a> + <div class="container"> + <img src="{{ STATIC_URL }}img/geany-36x36.png" class="navbar-brand"> + <a class="navbar-brand" href="http://www.geany.org/">Geany</a>
- <ul class="nav"> - <li class="{% if request.path = url_home %} active{% endif %}"> - <a href="{{ url_home }}">New snippet</a> - </li> - <li class="{% if request.path = url_help %} active{% endif %}"> - <a href="{{ url_help }}">Help</a> - </li> - <li class="{% if request.path = url_api %} active{% endif %}"> - <a href="{{ url_api }}">API</a> - </li> - <li class="{% if request.path = url_snippet_list %} active{% endif %}"> - <a href="{{ url_snippet_list }}">Recent snippets</a> - </li> - </ul> - </div> + <ul class="nav navbar-nav"> + <li class="{% if request.path = url_home %} active{% endif %}"> + <a href="{{ url_home }}">New snippet</a> + </li> + <li class="{% if request.path = url_help %} active{% endif %}"> + <a href="{{ url_help }}">Help</a> + </li> + <li class="{% if request.path = url_api %} active{% endif %}"> + <a href="{{ url_api }}">API</a> + </li> + <li class="{% if request.path = url_snippet_list %} active{% endif %}"> + <a href="{{ url_snippet_list }}">Recent snippets</a> + </li> + </ul> </div> </div>
Modified: pastebin/templates/pastebin/help.html 5 lines changed, 3 insertions(+), 2 deletions(-) =================================================================== @@ -6,8 +6,9 @@
{% block main %} <div class="well"> +<h1>Frequently Asked Questions</h1>
-<h3>What is pastebin?</h3> +<h2>What is pastebin?</h2> <p>This pastebin is here to help you collaborate on debugging code snippets. If you're not familiar with the idea, most people use it like this:</p> <ul> @@ -17,7 +18,7 @@ <li>someone responds by reading and perhaps submitting a modification of your code</li> </ul>
-<h3>How can I delete a post?</h3> +<h2>How can I delete a post?</h2> <p>Your posted snippets are remembered in your session, you will be able to delete the snippet from the same browser you posted from - simply view the post and click the "delete" link.</p> <p>In other cases, contact us and we will delete it for you.</p>
Modified: pastebin/templates/pastebin/snippet_details.html 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -9,9 +9,9 @@ {% block main %} <div class="well">
-<h2> +<h1> Snippet #{{ snippet.pk }} -</h2> +</h1>
<div class="snippet-options"> <abbr title="Time to life">TTL:</abbr> {{ snippet.expires|timeuntil_or_forever }}
Modified: pastebin/templates/pastebin/snippet_form.html 41 lines changed, 26 insertions(+), 15 deletions(-) =================================================================== @@ -1,34 +1,45 @@ -{% load honeypot %} +{% load geany_tags honeypot i18n mezzanine_tags %} +{% load %}
-<form method="post" action="{% url 'home' %}" class="form-horizontal new-snippet-form"> -{% if snippet_form.non_field_errors %} - <div class="alert alert-block alert-error"> + +{% if snippet_form.non_field_errors or snippet_form.errors %} +<div class="form-errors"> {% for error in snippet_form.non_field_errors %} - <p>{{ error }}</p> - {% endfor %} - </div> + <div class="alert alert-danger non-field-error">{{ error }}</div> + {% empty %} + <div class="alert alert-danger field-error">{% trans "Please correct the errors below." %}</div> + {% endfor %} +</div> {% endif %}
+<form method="post" action="{% url 'home' %}" class="form-horizontal new-snippet-form" role="form"> +{% nevercache %} {% csrf_token %} +{% endnevercache %} {% render_honeypot_field %} {% for field in snippet_form %} <div> - <div class="control-group"> - {{ field.label_tag }} - <div class="controls"> + <div class="form-group input_{{ field.id_for_label }} {{ field.field.type }} + {% if field.errors %} has-error{% endif %}"> + <label class="control-label col-sm-2" for="{{ field.auto_id }}">{{ field.label }}</label> + <div class="col-sm-10"> + {{ field|add_css:"form-control input-sm" }} {% if field.errors %} - {% for error in field.errors %} - <span class="label label-warning help-block">{{ error }}</span> + <p class="help-block"> + {% for e in field.errors %} + {% if not forloop.first %} / {% endif %}{{ e }} {% endfor %} + </p> {% endif %} - {{ field }} </div> </div> </div> {% endfor %} -<div class="control-group"> +<div class="form-group"> <div class="controls"> - <input type="submit" value="Paste it" class="btn btn-primary"/> + <div class="col-sm-offset-2 col-sm-10"> + <button type="submit" class="btn btn-primary">{% trans "Paste it" %}</button> + </div> </div> </div> </form>
Modified: pastebin/templates/pastebin/snippet_list.html 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -7,7 +7,7 @@
{% block main %} <div class="well"> - <h2>Latest {{ snippets_max }} snippets</h2> + <h1>Latest {{ snippets_max }} snippets</h1>
{% if snippet_list %} {% for snippet in snippet_list %}
Modified: pastebin/templates/pastebin/snippet_list_embedded.html 15 lines changed, 14 insertions(+), 1 deletions(-) =================================================================== @@ -1,9 +1,22 @@ +{% load i18n %} + +<h2>{% trans "Recent Snippets" %}</h2>
{% if snippet_list %} <div id="snippet_list"> <ul> {% for snippet in snippet_list %} - <li><span class="badge"><a href="{{ snippet.get_absolute_url }}">#{{ snippet.pk }} by {% if snippet.author %}{{ snippet.author }}{% else %}Anonymous{% endif %} ({{ snippet.age }})</a></span></li> + <li> + <span > + <a href="{{ snippet.get_absolute_url }}" class="btn btn-default btn-xs active" role="button"> + #{{ snippet.pk }} by {% if snippet.author %}{{ snippet.author }}{% else %}Anonymous{% endif %} ({{ snippet.age }}) + </a> + </span> + </li> + {% if forloop.counter|divisibleby:3 %} + </ul> + <ul> + {% endif %} {% endfor %} </ul> </div>
Modified: pastebin/templates/pastebin/snippet_new.html 9 lines changed, 8 insertions(+), 1 deletions(-) =================================================================== @@ -1,5 +1,12 @@ {% extends "pastebin/base.html" %}
+{% block extra_js %} +{{ block.super }} +<script> +$(function() {$('.mezzanine-form :input:visible:enabled:first').focus();}); +</script> +{% endblock %} +
{% block meta_title %} New snippet | {{ block.super }} @@ -8,7 +15,7 @@
{% block main %} <div class="well"> - <h2>Paste a new snippet</h2> + <h1>Paste a new snippet</h1> {% include "pastebin/snippet_form.html" %}
{% include "pastebin/snippet_list_embedded.html" %}
Modified: requirements.txt 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -1,6 +1,5 @@ Mezzanine MySQL-python -South django-compressor django-extensions django-honeypot @@ -12,5 +11,6 @@ pylibmc pytz setproctitle
+ # for development django-debug-toolbar
Modified: static_docs/templates/pages/documentation/releasenotes.html 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -13,7 +13,7 @@ <h3>Older Releases</h3> <div class="row"> {% for release in releases %} - <div class="span2"> + <div class="col-md-2"> <a href="{% url 'releasenotes_for_release' release.version %}">Geany {{ release.version }}</a> </div>
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).