[geany/www.geany.org] 9ac049: Integrate News app into main site

Enrico Tröger git-noreply at xxxxx
Sun Aug 9 11:22:01 UTC 2015


Branch:      refs/heads/master
Author:      Enrico Tröger <enrico.troeger at uvena.de>
Committer:   Enrico Tröger <enrico.troeger at uvena.de>
Date:        Sun, 09 Aug 2015 11:22:01 UTC
Commit:      9ac04948e7ac1e8f01b8db6728a481503bd11785
             https://github.com/geany/www.geany.org/commit/9ac04948e7ac1e8f01b8db6728a481503bd11785

Log Message:
-----------
Integrate News app into main site

Also add some fancy Glyphicons to the homepage.


Modified Paths:
--------------
    geany/settings.py
    geany/static/css/main.css
    geany/templates/home.html
    geany/urls.py

Modified: geany/settings.py
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -307,6 +307,7 @@
 
     # we
     "geany",
+    "news",
     "latest_version",
     "static_docs",
     "pastebin",         # pastebin.geany.org
@@ -373,7 +374,6 @@
 #########################
 
 # some more Mezzanine settings
-BLOG_SLUG = 'news'
 FORMS_USE_HTML5 = True
 INLINE_EDITING_ENABLED = False
 
@@ -385,7 +385,7 @@
 )
 
 ADMIN_MENU_ORDER = (
-    (_("Content"), ("pages.Page", "blog.BlogPost",
+    (_("Content"), ("pages.Page", "blog.BlogPost", "news.NewsPost",
        "generic.ThreadedComment", "mezzanine_blocks.Block", "mezzanine_blocks.RichBlock", (_("Media Library"), "fb_browse"),)),
     (_("Site"), ("sites.Site", "redirects.Redirect", "conf.Setting", "latest_version.LatestVersion", (_("Manage latest version"), "mezzanine_spam_stats.SpamStat"))),
     (_("Users"), ("auth.User", "auth.Group",)))


Modified: geany/static/css/main.css
23 lines changed, 23 insertions(+), 0 deletions(-)
===================================================================
@@ -83,3 +83,26 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
 pre {
     padding: 0px;
 }
+
+div.feature-icon {
+    text-align: center;
+}
+
+.feature-icon span {
+    background: rgb(50, 118, 177) none repeat scroll 0% 0%;
+    color: rgb(255, 255, 255);
+    font-size: 3.0em;
+    border-radius: 200px;
+    -moz-border-radius: 200px;
+    -webkit-border-radius: 200px;
+    padding: 13px;
+    display: inline-block;
+}
+
+.feature-icon .glyphicon:empty {
+    width: inherit;
+}
+
+.news-list li {
+    margin-bottom: 10px;
+}


Modified: geany/templates/home.html
54 lines changed, 50 insertions(+), 4 deletions(-)
===================================================================
@@ -1,5 +1,10 @@
 {% extends "base.html" %}
-{% load mezzanine_tags %}
+{% load mezzanine_tags news_tags %}
+
+{% block extra_head %}
+{{ block.super }}
+<link rel="alternate" type="application/rss+xml" title="RSS" href="{% url "news_feed" %}">
+{% endblock %}
 
 {% block meta_title %}
 Home
@@ -56,11 +61,20 @@
 		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-default btn-primary">Download Geany {{ geany_latest_version.version }} »</a></p>
+		<a href="{% url 'page' 'download/releases' %}" class="btn btn-default btn-primary">
+				<span class="glyphicon glyphicon-save" aria-hidden="true"></span>
+				Download Geany {{ geany_latest_version.version }} »
+		</a></p>
 	</div>
 
 	<div class="row">
+		<div class="col-md-4 news-list2">
+			<div class="feature-icon"><span class="glyphicon glyphicon-calendar" aria-hidden="true"></span></div>
+			<h2>News</h2>
+			{% get_recent_news %}
+		</div>
 		<div class="col-md-4">
+			<div class="feature-icon"><span class="glyphicon glyphicon-flash" aria-hidden="true"></span></div>
 			<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
@@ -71,6 +85,7 @@
 			<p><a class="btn btn-default" href="{% url "page" "about/geany" %}">More Features »</a></p>
 		</div>
 		<div class="col-md-4">
+			<div class="feature-icon"><span class="glyphicon glyphicon-comment" aria-hidden="true"></span></div>
 			<h2>Great Community</h2>
 			<p>Geany is Good Ol' Fashioned
 			<a href="https://en.wikipedia.org/wiki/Free_software">Free Software</a>.
@@ -85,10 +100,41 @@
 			<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 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>
+			<p><a class="btn btn-default" href="{% url "page" "community/contribute" %}">Get Involved »</a>
+			   <a class="btn btn-default" href="{% url "page" "about/donate" %}">Donate »</a></p>
+	   </div>
+	</div>
+
+	<div class="row">
+		<div class="col-md-4">
+			<div class="feature-icon"><span class="glyphicon glyphicon-random" aria-hidden="true"></span></div>
+			<h2>Easily Customizable</h2>
+			<p>
+				Many parts of Geany are heavily customizable like color themes
+				(<a href="https://github.com/geany/geany-themes">Geany Themes project</a>) or
+				adding new filetypes.
+			</p>
+			<p>
+				Furthermore, Geany provides many settings to let you adjust it
+				to your needs and preferences.
+			</p>
+		</div>
+		<div class="col-md-4">
+			<div class="feature-icon"><span class="glyphicon glyphicon-file" aria-hidden="true"></span></div>
+			<h2>Many filetypes</h2>
+			<p>
+				Many supported filetypes including popular programming languages like
+				C, Java, PHP, HTML, JavaScript, Python or Perl.
+			</p>
+			<p>
+				But Geany also includes support
+				for other useful filetypes like ini-style config files,
+				Diff output, SQL files and many more
+				(<a href="/about/filetypes/">get the full list</a>)
+			</p>
 	   </div>
 		<div class="col-md-4">
+			<div class="feature-icon"><span class="glyphicon glyphicon-book" aria-hidden="true"></span></div>
 			<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


Modified: geany/urls.py
10 lines changed, 5 insertions(+), 5 deletions(-)
===================================================================
@@ -16,12 +16,12 @@
 from django.conf.urls.i18n import i18n_patterns
 from django.contrib import admin
 from django.views.generic.base import TemplateView
-from geany.sitemaps import GeanyDisplayableSitemap
+from geany.sitemaps import GeanyMainSitemap
 from mezzanine.conf import settings
 from nightlybuilds.views import NightlyBuildsView
 
 
-sitemaps = {"sitemaps": {"all": GeanyDisplayableSitemap}}
+sitemaps = {"sitemaps": {"all": GeanyMainSitemap}}
 
 
 admin.autodiscover()
@@ -42,9 +42,6 @@
     # use our custom sitemap implementation
     url(r"^sitemap\.xml$", 'django.contrib.sitemaps.views.sitemap', sitemaps),
 
-    # news (for now implemented using the Mezzanine blog app)
-    url("^news/$", "mezzanine.blog.views.blog_post_list", name="news"),
-
     # TODO, NEWS, etc.
     url(r"^", include("static_docs.urls")),
 
@@ -54,6 +51,9 @@
     # /service/version.php (for the UpdateChecker plugin)
     url(r"^", include("latest_version.urls")),
 
+    # /news/ News
+    url(r"^news/", include("news.urls")),
+
     # home page
     url(r"^$", TemplateView.as_view(template_name='home.html'), name='home'),
 



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list