Mercurial Hosting > nabble
annotate src/global/web/Index.jtp @ 47:72765b66e2c3
remove mailing list code
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Fri, 18 Jun 2021 17:44:24 -0600 |
| parents | 5ea557eece1f |
| children | 56accc959f8c |
| rev | line source |
|---|---|
| 0 | 1 <% |
| 2 package global.web; | |
| 3 | |
| 4 import fschmidt.util.servlet.JtpContext; | |
| 5 import fschmidt.util.servlet.ServletUtils; | |
| 6 import global.HtmlGlobalUtils; | |
| 7 import global.Site; | |
| 8 import nabble.view.web.more.ForumStart; | |
| 9 import org.apache.lucene.index.Term; | |
| 10 import org.apache.lucene.search.IndexSearcher; | |
| 11 import org.apache.lucene.search.TermQuery; | |
| 12 import org.apache.lucene.search.Query; | |
| 13 import org.apache.lucene.search.ScoreDoc; | |
| 14 import org.apache.lucene.search.TopDocs; | |
| 15 import org.slf4j.Logger; | |
| 16 import org.slf4j.LoggerFactory; | |
| 17 | |
| 18 import javax.servlet.ServletException; | |
| 19 import javax.servlet.http.HttpServlet; | |
| 20 import javax.servlet.http.HttpServletRequest; | |
| 21 import javax.servlet.http.HttpServletResponse; | |
| 22 import java.io.IOException; | |
| 23 import java.io.PrintWriter; | |
| 24 | |
| 25 | |
| 26 public final class Index extends HttpServlet { | |
| 27 | |
| 28 private static final Logger logger = LoggerFactory.getLogger(Index.class); | |
| 29 | |
| 30 // private static boolean hasJobsAtNabble = Init.get("hasJobsAtNabble",false); | |
| 31 | |
| 32 public static String path() { | |
| 33 return "/"; | |
| 34 } | |
| 35 | |
| 36 protected void service(HttpServletRequest request,HttpServletResponse response) | |
| 37 throws ServletException, IOException | |
| 38 { | |
| 39 JtpContext jtpContext = (JtpContext)getServletContext().getAttribute(JtpContext.attrName); | |
| 40 jtpContext.setEtag(request,response,"x"); | |
| 41 PrintWriter out = response.getWriter(); | |
| 42 %> | |
| 43 <!DOCTYPE html> | |
| 44 <html lang="en"> | |
| 45 <head> | |
| 46 <% HtmlGlobalUtils.head(request, response, "Free Forum • Embeddable Web Apps"); %> | |
| 47 <link rel="canonical" href="https://www.nabble.com/"> | |
| 48 <meta name="description" content="Create a free forum online in less than one minute. All forums are embeddable and fully customizable with scripting language. Choose a unique style and build a discussion board for your community." /> | |
|
47
72765b66e2c3
remove mailing list code
Franklin Schmidt <fschmidt@gmail.com>
parents:
35
diff
changeset
|
49 <meta name="keywords" content="free forum, free photo gallery, free newspaper, free blog, best forum, free message board, message board hosting, bulletin board, customizable, private forum, phpBB, vBulletin, hosted, communities"> |
| 0 | 50 <meta name="google-site-verification" content="SUurO4gVJ46SZyzANkH4pJBGH8q-6Bv5P-ZgRBH8Cck" /> |
| 51 <style> | |
| 21 | 52 div[actions] i.fa.fa-chevron-right { |
| 53 color: #DDD; | |
| 54 float: right; | |
| 55 } | |
| 56 a[fixed] { | |
| 57 margin-top: -3em; | |
| 58 position: absolute; | |
| 59 right: 1em; | |
| 60 text-decoration: none; | |
| 61 background-color: #555; | |
| 62 border-radius: .5em; | |
| 63 padding: .5em; | |
| 64 color: #D0D0D0; | |
| 65 text-shadow: 0px 1px 1px black; | |
| 66 border-bottom: 1px dotted #757474; | |
| 67 } | |
| 68 @media (max-width: 950px) { | |
| 69 div[footer] { | |
| 70 padding-bottom: 5em; | |
| 71 } | |
| 72 } | |
| 73 div[note] { | |
| 74 margin-top: 1em; | |
| 75 text-align: right; | |
| 76 } | |
| 0 | 77 </style> |
|
7
a04508136174
add ads to homepage for verification
Raymond <mazdarulez@hotmail.com>
parents:
0
diff
changeset
|
78 <script async="true" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> |
|
a04508136174
add ads to homepage for verification
Raymond <mazdarulez@hotmail.com>
parents:
0
diff
changeset
|
79 <script> |
|
a04508136174
add ads to homepage for verification
Raymond <mazdarulez@hotmail.com>
parents:
0
diff
changeset
|
80 (adsbygoogle = window.adsbygoogle || []).push({ |
|
a04508136174
add ads to homepage for verification
Raymond <mazdarulez@hotmail.com>
parents:
0
diff
changeset
|
81 google_ad_client: "ca-pub-6750305871516672", |
|
a04508136174
add ads to homepage for verification
Raymond <mazdarulez@hotmail.com>
parents:
0
diff
changeset
|
82 enable_page_level_ads: true |
|
a04508136174
add ads to homepage for verification
Raymond <mazdarulez@hotmail.com>
parents:
0
diff
changeset
|
83 }); |
|
a04508136174
add ads to homepage for verification
Raymond <mazdarulez@hotmail.com>
parents:
0
diff
changeset
|
84 </script> |
| 0 | 85 </head> |
| 86 <body lato> | |
| 87 <% HtmlGlobalUtils.header(request,response); %> | |
| 88 <div full> | |
| 21 | 89 <div content center> |
| 90 <span style="display:inline-block"> | |
| 0 | 91 <div col1 center> |
| 92 <h1 oswald>Free Forum Hosting & Online Web Apps!</h1> | |
| 93 <h2 lato gray>Clean Look <span light>•</span> Embeddable <span light>•</span> Customizable</h2> | |
| 94 <img src="/assets/images/home.png" alt="Free forum hosting and online embeddable apps"/> | |
| 95 </div> | |
| 96 <div col2 actions> | |
| 97 <ul> | |
| 98 <li><a href="<%=HtmlGlobalUtils.nabbleContextUrl%><%=ForumStart.path("forum")%>" title="Click to create a free forum">Create Free Forum</a> <i class="fa fa-chevron-right"></i></li> | |
| 99 <li><a href="<%=HtmlGlobalUtils.nabbleContextUrl%><%=ForumStart.path("gallery")%>" title="Click to create a free photo gallery">Create Photo Gallery</a> <i class="fa fa-chevron-right"></i></li> | |
| 100 <li><a href="<%=HtmlGlobalUtils.nabbleContextUrl%><%=ForumStart.path("newspaper")%>" title="Click to create a free newspaper">Create News Site</a> <i class="fa fa-chevron-right"></i></li> | |
| 101 <li><a href="<%=HtmlGlobalUtils.nabbleContextUrl%><%=ForumStart.path("blog")%>" title="Click to create a free blog">Create Blog</a> <i class="fa fa-chevron-right"></i></li> | |
| 102 </ul> | |
| 103 </div> | |
| 21 | 104 </span> |
| 0 | 105 </div> |
| 106 <div content paddingTop> | |
| 107 <div col33 center> | |
| 108 <h2 oswald>Multi Language</h2> | |
| 109 <ul floating> | |
| 110 <li>English</li> | |
| 111 <li>Čeština (Czech Republic)</li> | |
| 112 <li>Español</li> | |
| 113 <li>Français</li> | |
| 114 <li>Polski</li> | |
| 115 <li>Português (Brasil)</li> | |
| 116 <li>Svenska</li> | |
| 117 <li>Türkçe</li> | |
| 118 <li>Русский</li> | |
| 119 <li>Ελληνικά</li> | |
| 120 <li>中文 (简体)</li> | |
| 121 <li><a href="http://support.nabble.com/Nabble-Translations-f6669344.html">Translate to other languages</a> »</li> | |
| 122 </ul> | |
| 123 </div> | |
| 124 <div col33 center> | |
| 125 <h2 oswald>Embed into any Website</h2> | |
| 126 <p lineHeight marginHorizontal>All Nabble apps are naturally embeddable, which means that they can be easily displayed inside any web page. | |
| 127 </p> | |
| 128 </div> | |
| 129 <div col33 center> | |
| 130 <h2 oswald>Fully Customizable</h2> | |
| 131 <p lineHeight marginHorizontal>All Nabble apps are built with NAML, a scripting language that gives you full control over the app pages.</p> | |
| 132 </div> | |
| 133 </div> | |
| 134 <div content center paddingTop> | |
| 135 <h2 oswald>Browse Active Nabble Apps</h2> | |
| 136 <% topSites(out); %> | |
| 137 </div> | |
| 138 </div> | |
| 139 <% HtmlGlobalUtils.footer(request,response); %> | |
| 140 <%/*%> | |
| 141 <a fixed href="http://www.blasma.com">Help design a new forum <i class="fa fa-chevron-right"></i></a> | |
| 142 <%*/%> | |
| 143 </body> | |
| 144 </html> | |
| 145 <% | |
| 146 } | |
| 147 | |
| 148 static Query query = new TermQuery(new Term(Site.EMBARRASSING_FLD,"false")); | |
| 149 | |
| 150 private static void topSites(PrintWriter out) | |
| 151 throws ServletException, IOException | |
| 152 { | |
| 153 IndexSearcher searcher; | |
| 154 TopDocs hits; | |
| 155 try { | |
| 156 searcher = new IndexSearcher(Site.dir()); | |
| 157 hits = searcher.search( query, 60, Site.SORT_BY_VALUE ); | |
| 158 } catch(IOException e) { | |
| 159 logger.error("Index error", e); | |
| 160 %>[Rebuilding Index]<% | |
| 161 return; | |
| 162 } | |
| 163 try { | |
| 164 %> | |
| 165 <ul floating center> | |
| 166 <% | |
| 167 for( ScoreDoc sd : hits.scoreDocs ) { | |
| 168 Site site = new Site( searcher.doc(sd.doc) ); | |
| 169 %> | |
| 170 <li><%=site.link()%></li> | |
| 171 <% | |
| 172 } | |
| 173 %> | |
| 174 </ul> | |
| 175 <div style="padding-top:.5em;clear:both"> | |
| 176 <a bold href="<%=RootForums.path()%>" title="View more active forums and apps">View More</a></b> <i class="fa fa-chevron-right"></i> | |
| 177 </div> | |
| 178 <% | |
| 179 } finally { | |
| 180 searcher.close(); | |
| 181 } | |
| 182 } | |
| 183 | |
| 184 } | |
| 185 %> |
