[gimp-web/testing] Clean up inline style and script tags for CSP compliance



commit 9213210799076c145618876426150bda2fe31567
Author: Pat David <patdavid gmail com>
Date:   Fri Oct 7 10:03:25 2016 -0500

    Clean up inline style and script tags for CSP compliance
    
    This is a first pass at cleaning up all of the inline <script>,
    <style>, and <... style=...> markup across the site.
    
    Test at https://observatory.mozilla.org/analyze.html

 content/js/platform-display.js                     |   67 ++++++++
 content/js/search-embed.js                         |   17 ++
 content/js/search-ready.js                         |   14 ++
 themes/newgimp/static/css/downloads.css            |   65 ++++++++
 themes/newgimp/static/css/gimp.css                 |   14 ++
 themes/newgimp/static/css/news-index.css           |    4 +
 themes/newgimp/static/css/page.css                 |    5 +
 .../newgimp/static/css/tipuesearch/tipuesearch.css |    4 +
 themes/newgimp/templates/base.html                 |   25 +--
 themes/newgimp/templates/downloads.html            |  131 +---------------
 themes/newgimp/templates/home.html                 |   69 +---------
 themes/newgimp/templates/index.html                |   68 +--------
 themes/newgimp/templates/index.html.bak            |  160 --------------------
 themes/newgimp/templates/page.html                 |    4 +-
 themes/newgimp/templates/page_author.html          |    4 +-
 themes/newgimp/templates/search.html               |   24 +---
 themes/newgimp/templates/tutorial-list.html        |    2 +-
 17 files changed, 216 insertions(+), 461 deletions(-)
---
diff --git a/content/js/platform-display.js b/content/js/platform-display.js
new file mode 100644
index 0000000..735253a
--- /dev/null
+++ b/content/js/platform-display.js
@@ -0,0 +1,67 @@
+/*
+ * platform-display.js
+ *
+ * Used on /downloads/ to change download display blocks
+ * based on detected platform.
+ *
+ * Pat David, 2016
+ */
+
+    if ( platform.os.family.indexOf('Win') !== -1 && platform.os.family.indexOf('Phone') == -1 ){
+        // Windows, _not_ Phone
+        document.getElementById('win').style.display = 'block';
+        document.getElementById('mac').style.display = 'none';
+        document.getElementById('linux').style.display = 'none';
+        document.getElementById('pOSTEST').innerHTML = 'Microsoft Windows.';
+    }else if ( platform.os.family.indexOf('OS X') !== -1 ){
+        // OS X
+        document.getElementById('win').style.display = 'none';
+        document.getElementById('mac').style.display = 'block';
+        document.getElementById('linux').style.display = 'none';
+        document.getElementById('pOSTEST').innerHTML = 'OS X.';
+    }else if ( platform.os.family.indexOf('iOS') !== -1 || platform.os.family.indexOf('Android') !== -1 ){
+        // iOS or Android
+        document.getElementById('pOSTEST').innerHTML = platform.os.family + '.';
+        var nope = "<br/><strong>This platform is not currently supported.</strong>";
+        document.getElementById('pOSTEST').innerHTML += nope;
+        document.getElementById('win').style.display = 'none';
+        document.getElementById('mac').style.display = 'none';
+        document.getElementById('linux').style.display = 'none';
+    }else {
+        // Everything else (assuming *nix-type)
+        document.getElementById('pOSTEST').innerHTML = platform.os.family + '.';
+        document.getElementById('win').style.display = 'none';
+        document.getElementById('mac').style.display = 'none';
+        document.getElementById('linux').style.display = 'block';
+    }
+
+    function render( os ){
+        switch( this.id ) {
+            case 'os_linux':
+                document.getElementById('linux').style.display = 'block';
+                document.getElementById('win').style.display = 'none';
+                document.getElementById('mac').style.display = 'none';
+                break;
+            case 'os_win':
+                document.getElementById('linux').style.display = 'none';
+                document.getElementById('win').style.display = 'block';
+                document.getElementById('mac').style.display = 'none';
+                break;
+            case 'os_mac':
+                document.getElementById('linux').style.display = 'none';
+                document.getElementById('win').style.display = 'none';
+                document.getElementById('mac').style.display = 'block';
+                break;
+            default:
+                document.getElementById('linux').style.display = 'block';
+                document.getElementById('win').style.display = 'block';
+                document.getElementById('mac').style.display = 'block';
+                break;
+        }
+        return false;
+    }
+
+    document.getElementById('os_all').addEventListener("click", render );
+    document.getElementById('os_linux').addEventListener("click", render );
+    document.getElementById('os_win').addEventListener("click", render );
+    document.getElementById('os_mac').addEventListener("click", render );
diff --git a/content/js/search-embed.js b/content/js/search-embed.js
new file mode 100644
index 0000000..03a0977
--- /dev/null
+++ b/content/js/search-embed.js
@@ -0,0 +1,17 @@
+/*
+ * search-embed.js
+ *
+ * This should be included at the end of every page
+ * that we want to include search functionality on.
+ *
+ * Pat David, 2016
+ */
+
+var searchForm = document.getElementById('search-form');
+var tipue_input = document.getElementById('tipue_search_input');
+while( searchForm.firstChild ){
+    searchForm.removeChild( searchForm.firstChild );
+}
+tipue_input.placeholder = "Search GIMP.org";
+searchForm.appendChild( tipue_input );
+searchForm.action = "/search.html";
diff --git a/content/js/search-ready.js b/content/js/search-ready.js
new file mode 100644
index 0000000..34ded84
--- /dev/null
+++ b/content/js/search-ready.js
@@ -0,0 +1,14 @@
+/*
+ * search-ready.js
+ *
+ * This is to be included on the search
+ * results page.
+ * 
+ * Pat David, 2016
+ */
+
+$(document).ready(function() {
+    $('#tipue_search_input').tipuesearch({
+        'descriptiveWords': 50
+            });
+});
diff --git a/themes/newgimp/static/css/downloads.css b/themes/newgimp/static/css/downloads.css
new file mode 100644
index 0000000..1cff4ef
--- /dev/null
+++ b/themes/newgimp/static/css/downloads.css
@@ -0,0 +1,65 @@
+/*
+ * downloads.css
+ *
+ * Styling specifically for the /downloads/ page
+ *
+ */
+
+    table {
+        max-width: 35rem;
+        margin: 1rem auto;
+    }
+    td, th {
+        padding: 0 1rem;
+    }
+
+    .download-mirrors{
+        word-wrap: break-word;
+    }
+
+    @media ( max-width: 40rem ){
+        .download-mirrors dd {
+            margin-left: 0.5rem;
+        }
+    }
+
+    .os {
+        display: block;
+    }
+
+    #pOSTEST {
+        font-style: italic;
+    }
+
+    .show_links {
+        color: #497bad;
+        cursor: pointer;
+    }
+
+    .win-button {
+        display: inline-block;
+        border: solid 1px #666;
+        background-color: #f57900;
+        margin: 0.5rem 0;
+        border-radius: 10px;
+        box-shadow: 1px 1px 2px;
+        text-align: center;
+        font-family: Questrial;
+        font-weight: 400;
+        width: 49%;
+    }
+
+    #win-torrent, #osx-torrent {
+        background-color: #008080;
+    }
+
+    .win-button a {
+        color: white;
+        font-weight: bold;
+        display: inline-block;
+        padding: 1rem;
+    }
+
+    .mirrors {
+        display: none;
+    }
diff --git a/themes/newgimp/static/css/gimp.css b/themes/newgimp/static/css/gimp.css
index 9f2735a..7e60242 100644
--- a/themes/newgimp/static/css/gimp.css
+++ b/themes/newgimp/static/css/gimp.css
@@ -254,6 +254,11 @@ figure {
     vertical-align: text-top;
 }
 
+#gimp-home #menuWilber {
+    width: 25px;
+    height: 20px;
+    }
+
 .codehilitetable {
     margin: 1rem auto;
     font-size: 0.8rem;
@@ -727,3 +732,12 @@ form {
     max-width: 34rem;
     margin: 1rem auto;
 }
+
+#wilber-tiny {
+    width: 25px;
+    height: 20px;
+}
+
+a.donate-orange {
+    color:#f57900 !important;
+}
diff --git a/themes/newgimp/static/css/news-index.css b/themes/newgimp/static/css/news-index.css
index 2b6c906..e77dc93 100644
--- a/themes/newgimp/static/css/news-index.css
+++ b/themes/newgimp/static/css/news-index.css
@@ -49,3 +49,7 @@ abbr[title] {
     border: none;
     color: #888;
 }
+
+.feed-text {
+    font-size: 0.85rem;
+}
diff --git a/themes/newgimp/static/css/page.css b/themes/newgimp/static/css/page.css
index e0b9a53..23a07fc 100644
--- a/themes/newgimp/static/css/page.css
+++ b/themes/newgimp/static/css/page.css
@@ -136,3 +136,8 @@ figure figcaption {
 address.vcard.author {
     display: inline;
 }
+
+.debug {
+    border: dotted 1px #ccc;
+    font-size: 80%;
+}
diff --git a/themes/newgimp/static/css/tipuesearch/tipuesearch.css 
b/themes/newgimp/static/css/tipuesearch/tipuesearch.css
index e183fd9..7ab43b2 100644
--- a/themes/newgimp/static/css/tipuesearch/tipuesearch.css
+++ b/themes/newgimp/static/css/tipuesearch/tipuesearch.css
@@ -212,6 +212,10 @@ http://www.tipue.com/search
     width: 300px;
 }
 
+#tipue_search_input.on_search_page {
+    width: 100%;
+}
+
 .tipue_search_content_title {
     font-family: Questrial;
     line-height: 1.5rem;
diff --git a/themes/newgimp/templates/base.html b/themes/newgimp/templates/base.html
index f4ee54a..65cca0c 100644
--- a/themes/newgimp/templates/base.html
+++ b/themes/newgimp/templates/base.html
@@ -52,10 +52,9 @@
 <body id="index" class="home">
 
 
-        {# <nav id="menu" style='display: none;'> #}
         <nav id="menu">
             <ul>
-                <li id='gimp-home'><a href="/"><img src='/images/wilbericon.svg' id='menuWilber' 
style='width:25px;height:20px;' alt='Tiny Wilber'> GIMP</a></li>
+                <li id='gimp-home'><a href="/"><img src='/images/wilbericon.svg' id='menuWilber'  alt='Tiny 
Wilber'> GIMP</a></li>
                 <li><a href="/downloads/"><i class="fa fa-download"></i> Download</a></li>
                 <li><a href="/news/"><i class="fa fa-newspaper-o"></i> News</a></li>
                 <li><a href="/about/"><i class="fa fa-info-circle"></i> About</a></li>
@@ -87,7 +86,7 @@
                 #}
 
                 <li>
-                    <a href="/donating/" style="color:#f57900;"><i class="fa fa-money"></i> Donate</a>
+                    <a class='donate-orange' href="/donating/"><i class="fa fa-money"></i> Donate</a>
                     <a 
href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=gimp%40gnome%2eorg&lc=US&item_name=Donation%20to%20GIMP%20Project&item_number=106&currency_code=USD";
 title='Donate with PayPal' class='donate-type'>
                         <img src='/theme/images/pp16.png' alt="PayPal" >
                     </a>
@@ -105,7 +104,7 @@
 
         <div id='navstrip' class='nav-down'>
             <a href="/" class='navfive'>
-                <img id='wilber-tiny' src="/images/wilbericon.svg" style="width:25px;height:20px;" 
alt='Wilber Icon'><br/>
+                <img id='wilber-tiny' src="/images/wilbericon.svg"  alt='Wilber Icon'><br/>
                 GIMP
             </a>
             <a href="/news/" class='navfive'>
@@ -142,7 +141,7 @@
                 <div class="row clearfix">
                     <div class="column third">
                         <ul class="nav-bottom">
-                            <li id='nav-btm-gimp-home'><a href="/"><img src='/images/wilbericon.svg' 
style='width:25px;height:20px;' id='footerWilber' alt='Tiny Wilber'> GIMP</a></li>
+                            <li id='nav-btm-gimp-home'><a href="/"><img src='/images/wilbericon.svg'  
id='footerWilber' alt='Tiny Wilber'> GIMP</a></li>
                             <li id="nav-btm-downloads"><a href="/downloads/"><i class="fa fa-download 
fa-fw"></i> Download</a></li>
                             <li id="nav-btm-news"><a href="/news/"><i class="fa fa-newspaper-o fa-fw"></i> 
News</a></li>
                         </ul>
@@ -256,18 +255,10 @@
     </div>
 
     {# We use this for the sliding menu on small responsive screen (phone/tablet) #}
-    <script async src="/js/push-menu.js"></script>
-
-    <script>
-        var searchForm = document.getElementById('search-form');
-        var tipue_input = document.getElementById('tipue_search_input');
-        while( searchForm.firstChild ){
-            searchForm.removeChild( searchForm.firstChild );
-        }
-        tipue_input.placeholder = "Search GIMP.org";
-        searchForm.appendChild( tipue_input );
-        searchForm.action = "/search.html";
-    </script>
+    <script async src='/js/push-menu.js'></script>
+
+    {# including the js snippet for searching with tipuesearch #}
+    <script async src='/js/search-embed.js'></script>
 
 </body>
 </html>
diff --git a/themes/newgimp/templates/downloads.html b/themes/newgimp/templates/downloads.html
index 22f7fb6..176d027 100644
--- a/themes/newgimp/templates/downloads.html
+++ b/themes/newgimp/templates/downloads.html
@@ -5,6 +5,11 @@
     Access it using GIMP.###
 #}
 
+{% block head %}
+{{ super() }}
+        <link rel='stylesheet' type='text/css' href='/theme/css/downloads.css' />
+{% endblock %}
+
 {% block data %}
 
     <figure>
@@ -289,130 +294,8 @@
     </div>
 
 
-    <script src="/js/platform.js"></script>
-
-    <script>
-
-    if ( platform.os.family.indexOf('Win') !== -1 && platform.os.family.indexOf('Phone') == -1 ){
-        // Windows, _not_ Phone
-        document.getElementById('win').style.display = 'block';
-        document.getElementById('mac').style.display = 'none';
-        document.getElementById('linux').style.display = 'none';
-        document.getElementById('pOSTEST').innerHTML = 'Microsoft Windows.';
-    }else if ( platform.os.family.indexOf('OS X') !== -1 ){
-        // OS X
-        document.getElementById('win').style.display = 'none';
-        document.getElementById('mac').style.display = 'block';
-        document.getElementById('linux').style.display = 'none';
-        document.getElementById('pOSTEST').innerHTML = 'OS X.';
-    }else if ( platform.os.family.indexOf('iOS') !== -1 || platform.os.family.indexOf('Android') !== -1 ){
-        // iOS or Android
-        document.getElementById('pOSTEST').innerHTML = platform.os.family + '.';
-        var nope = "<br/><strong>This platform is not currently supported.</strong>";
-        document.getElementById('pOSTEST').innerHTML += nope;
-        document.getElementById('win').style.display = 'none';
-        document.getElementById('mac').style.display = 'none';
-        document.getElementById('linux').style.display = 'none';
-    }else {
-        // Everything else (assuming *nix-type)
-        document.getElementById('pOSTEST').innerHTML = platform.os.family + '.';
-        document.getElementById('win').style.display = 'none';
-        document.getElementById('mac').style.display = 'none';
-        document.getElementById('linux').style.display = 'block';
-    }
-
-    function render( os ){
-        switch( this.id ) {
-            case 'os_linux':
-                document.getElementById('linux').style.display = 'block';
-                document.getElementById('win').style.display = 'none';
-                document.getElementById('mac').style.display = 'none';
-                break;
-            case 'os_win':
-                document.getElementById('linux').style.display = 'none';
-                document.getElementById('win').style.display = 'block';
-                document.getElementById('mac').style.display = 'none';
-                break;
-            case 'os_mac':
-                document.getElementById('linux').style.display = 'none';
-                document.getElementById('win').style.display = 'none';
-                document.getElementById('mac').style.display = 'block';
-                break;
-            default:
-                document.getElementById('linux').style.display = 'block';
-                document.getElementById('win').style.display = 'block';
-                document.getElementById('mac').style.display = 'block';
-                break;
-        }
-        return false;
-    }
-
-    document.getElementById('os_all').addEventListener("click", render );
-    document.getElementById('os_linux').addEventListener("click", render );
-    document.getElementById('os_win').addEventListener("click", render );
-    document.getElementById('os_mac').addEventListener("click", render );
-    </script>
-
-    <style>
-    table {
-        max-width: 35rem;
-        margin: 1rem auto;
-    }
-    td, th {
-        padding: 0 1rem;
-    }
-
-    .download-mirrors{
-        word-wrap: break-word;
-    }
-
-    @media ( max-width: 40rem ){
-        .download-mirrors dd {
-            margin-left: 0.5rem;
-        }
-    }
-
-    .os {
-        display: block;
-    }
-
-    #pOSTEST {
-        font-style: italic;
-    }
-
-    .show_links {
-        color: #497bad;
-        cursor: pointer;
-    }
-
-    .win-button {
-        display: inline-block;
-        border: solid 1px #666;
-        background-color: #f57900;
-        margin: 0.5rem 0;
-        border-radius: 10px;
-        box-shadow: 1px 1px 2px;
-        text-align: center;
-        font-family: Questrial;
-        font-weight: 400;
-        width: 49%;
-    }
-
-    #win-torrent, #osx-torrent {
-        background-color: #008080;
-    }
-
-    .win-button a {
-        color: white;
-        font-weight: bold;
-        display: inline-block;
-        padding: 1rem;
-    }
-
-    .mirrors {
-        display: none;
-    }
-    </style>
+    <script src='/js/platform.js'></script>
+    <script src='/js/platform-display.js'></script>
 
 
 {% endblock data %}
diff --git a/themes/newgimp/templates/home.html b/themes/newgimp/templates/home.html
index 6c110ad..adb0561 100644
--- a/themes/newgimp/templates/home.html
+++ b/themes/newgimp/templates/home.html
@@ -21,9 +21,7 @@
 
 {% block header %}
 <header id="banner" class="body clearfix">
-    {#
-    <img id='twenty-banner' src='/images/frontpage/20banner.svg' alt='GIMP 20th Anniversary Banner' 
width='250' height='250' style='position: absolute; left: 0; width: 250px; height: 250px;'/>
-    #}
+    
             <div class="container">
                 <div class="intro row">
 
@@ -273,70 +271,5 @@
         
     </section>
 
-    {#
-    <section style='background: repeating-linear-gradient(-45deg, transparent, transparent 40px, 
rgba(166,166,166,.07) 40px, rgba(166,166,166,.07) 80px);'>
-        <div class='container'>
-            <div class='row clearfix'>
-                <div class='column full'>
-                    <h2>Temporary Stuff Below Here</h2>
-                    <p>
-                        The content below this section is almost entirely for testing the build system and 
article parsing.
-                        Disregard the formatting/content unless specifically addressing something that was 
asked about.
-                    </p>
-                </div>
-            </div>
-        </div>
-    </section>
-    #}
-
-{#
-    <section id="articles">
-{#
-        {% block content_title %}
-            <h2>Recent News</h2>
-        {% endblock %}
-
-        
-        {# original stuff ...
-        <ol id="post-list">
-        {% for article in articles_page.object_list %}
-                <li><article class="hentry">
-                        <header> <h2 class="entry-title"><a href="/{{ article.url }}" rel="bookmark" 
title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
-                        <footer class="post-info">
-                            <abbr class="published" title="{{ article.date.isoformat() }}"> {{ 
article.locale_date }} </abbr>
-                            <address class="vcard author">By
-                            {% for author in article.authors %}
-                                <a class="url fn" href="/{{ author.url }}">{{ author }}</a>
-                            {% endfor %}
-                            </address>
-                        </footer><!-- /.post-info -->
-                        <div class="entry-content"> {{ article.summary }} </div><!-- /.entry-content -->
-                </article></li>
-        {% endfor %}
-        </ol><!-- /#posts-list -->
-        {% if articles_page.has_other_pages() %}
-            {% include 'pagination.html' %}
-        {% endif %}
-#}
-
-{#
-
-        <h3>Articles Object</h3>
-        <div>
-            <a href="{{ articles[0].url }}">{{ articles[0].title }}</a>
-        </div>
-        <div>
-            {{ articles[0].summary }}
-        </div>
-        <div>
-            {{ articles[0].author }}
-        </div>
-        <div>
-            articles[0].date: {{ articles[0].date }}<br/>
-            articles[0].locale_date: {{ articles[0].locale_date }}<br/>
-            articles[0].locale_modified: {{ articles[0].locale_modified }}
-        </div>
-    </section><!-- /#content -->
-#}
 
 {% endblock content %}
diff --git a/themes/newgimp/templates/index.html b/themes/newgimp/templates/index.html
index 0160ffe..d8b1c54 100644
--- a/themes/newgimp/templates/index.html
+++ b/themes/newgimp/templates/index.html
@@ -49,80 +49,14 @@
 #}
     
 {% block content %}
-{#
-    <section id='introduction'>
-        <div class='container'>
-            <div class='row clearfix'>
-                <div class='column two-thirds'>
-                    <h2>The Free &amp; Open Source Image Editor</h2>
-                    {# <h2>This is the official GIMP website</h2> #}
-{#
-                    <p>
-                        This is the official GIMP website.
-                        It contains information about downloading, installing, using, and enhancing it. 
-                        This site also serves as a distribution point for the latest releases. 
-                        We try to provide as much information about the GIMP community and related projects 
as possible.
-                        Hopefully you will find what you need here.
-                        Grab a properly chilled beverage and enjoy...
-                    </p>
-                    <p>
-                        <b>I feel that this section should tell a visitor exactly <em>what</em> GIMP is, 
what it does, as well as how to get it.</b>
-                    </p>
-                </div>
-
-                <div class='column third' style="background-color: white; margin-left: 10px; margin-right: 
-10px; padding: 1rem; box-shadow: rgba(127,127,127,1) 2px 2px, rgba(127,127,127,1) 3px 3px, 
rgba(127,127,127,1) 4px 4px, rgba(127,127,127,1) 5px 5px, rgba(127,127,127,1) 6px 6px;">
-                    <h2 style="color: red;">STILL WORKING</h2>
-                    <p style='font-size: 0.85rem;color: red;'>
-                        I am still in the process of building this site out.  Things are in a great state of 
flux.  For further information on building the new site refer to the <a href="/about/meta">Meta</a> page.
-                    </p>
-                </div>
-
-
-            </div>
-        </div>
-    </section>
 
-    <section id='cap-photos'>
-        <div class='container'>
-            <div class='row clearfix'>
-                <div class='column third'>
-                    &nbsp;
-                </div>
-                <div class='column two-thirds'>
-                    <h3>High Quality Photo Manipulation</h3>
-                    <p>
-                        GIMP provides the tools for needed for high quality image manipulation.
-                        From retouching to creative composites, the only limit is your imagination.
-                    </p>
-                </div>
-            </div>
-        </div>
-    </section>
-
-
-    <section style='background: repeating-linear-gradient(-45deg, transparent, transparent 40px, 
rgba(166,166,166,.07) 40px, rgba(166,166,166,.07) 80px);'>
-        <div class='container'>
-            <div class='row clearfix'>
-                <div class='column full'>
-                    <h2>Temporary Stuff Below Here</h2>
-                    <p>
-                        The content below this section is almost entirely for testing the build system and 
article parsing.
-                        Disregard the formatting/content unless specifically addressing something that was 
asked about.
-                        (Like, do those dates look funny to you?)
-                    </p>
-                </div>
-            </div>
-        </div>
-    </section>
-
-#}
 
     <div class="container title">
         <div class="row clearfix">
             <div class="column full">
                 {% block content_title %}
                 <h1>Recent News</h1>
-                <div style='font-size: 0.85rem;'><a href='/feeds/atom.xml'>Feed <i class='fa 
fa-rss'></i></a></div>
+                <div class='feed-text'><a href='/feeds/atom.xml'>Feed <i class='fa fa-rss'></i></a></div>
                 {% endblock %}
             </div>
         </div>
diff --git a/themes/newgimp/templates/page.html b/themes/newgimp/templates/page.html
index 7949c12..da1cf14 100644
--- a/themes/newgimp/templates/page.html
+++ b/themes/newgimp/templates/page.html
@@ -69,9 +69,9 @@
 
 
     {% if PAGES_DEBUG == true %}
-    <div style="border: dotted 1px #ccc; ;" class='page_content'>
+    <div class='page_content debug'>
         
-        <div style='font-size: 80%;'>
+        <div>
             <p>Debug stuff.  Ignore</p>
             <p>
                 url: {{ page.url }} <br/>
diff --git a/themes/newgimp/templates/page_author.html b/themes/newgimp/templates/page_author.html
index e264fc5..4430e05 100644
--- a/themes/newgimp/templates/page_author.html
+++ b/themes/newgimp/templates/page_author.html
@@ -79,9 +79,9 @@
 
 
     {% if PAGES_DEBUG == true %}
-    <div style="border: dotted 1px #ccc; ;" class='page_content'>
+    <div  class='page_content debug'>
         
-        <div style='font-size: 80%;'>
+        <div>
             <p>Debug stuff.  Ignore</p>
             <p>
                 url: {{ page.url }} <br/>
diff --git a/themes/newgimp/templates/search.html b/themes/newgimp/templates/search.html
index ca6104a..5784870 100644
--- a/themes/newgimp/templates/search.html
+++ b/themes/newgimp/templates/search.html
@@ -64,7 +64,7 @@
                     <form action='https://duckduckgo.com/' id='search-form'> 
                     {# <form action='/search.html' id='search-form'> #}
                         {# <input type='text' name='q' id='tipue_search_input' autocomplete='off' required> 
#}
-                        <input type='text' name='q' id='tipue_search_input' autocomplete='off' required 
placeholder='Search with DuckDuckGo' style='width:100%;'>
+                        <input type='text' name='q' id='tipue_search_input' class='on_search_page' 
autocomplete='off' required placeholder='Search with DuckDuckGo' >
                         <input type='hidden' name='sites' value='www.gimp.org'>
                         {#
                         # These only work for js-enabled browsers...
@@ -92,9 +92,9 @@
 
 
     {% if PAGES_DEBUG == true %}
-    <div style="border: dotted 1px #ccc; ;" class='page_content'>
+    <div class='page_content'>
         
-        <div style='font-size: 80%;'>
+        <div>
             <p>Debug stuff.  Ignore</p>
             <p>
                 url: {{ page.url }} <br/>
@@ -125,22 +125,6 @@
     </div>
     {% endif %}
 
-    <script>
-    $(document).ready(function() {
-        $('#tipue_search_input').tipuesearch({
-            'descriptiveWords': 50
-                });
-    });
-    </script>
-    <script>
-        var searchForm = document.getElementById('search-form');
-        var tipue_input = document.getElementById('tipue_search_input');
-        while( searchForm.firstChild ){
-            searchForm.removeChild( searchForm.firstChild );
-        }
-        tipue_input.placeholder = "Search GIMP.org";
-        searchForm.appendChild( tipue_input );
-        searchForm.action = "/search.html";
-    </script>
+    <script async src='/js/search-ready.js'></script>
 
 {% endblock %}
diff --git a/themes/newgimp/templates/tutorial-list.html b/themes/newgimp/templates/tutorial-list.html
index 0be9b05..60bbddc 100644
--- a/themes/newgimp/templates/tutorial-list.html
+++ b/themes/newgimp/templates/tutorial-list.html
@@ -54,7 +54,7 @@
                   </div><!-- /.post-info -->
                   #}
 
-                  <div class="entry-content" style='text-align: left;'>
+                  <div class="entry-content" >
                     {{ page.content }}
                   </div><!-- /.entry-content -->
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]