git://git.nikiroo.be
/
gofetch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d7e6c7c
)
Fix html (gopher links with selectors, useless BR)
author
Niki Roo
<niki@nikiroo.be>
Sun, 6 Aug 2017 11:39:03 +0000
(13:39 +0200)
committer
Niki Roo
<niki@nikiroo.be>
Sun, 6 Aug 2017 11:39:03 +0000
(13:39 +0200)
src/be/nikiroo/gofetch/output/Html.java
patch
|
blob
|
blame
|
history
diff --git
a/src/be/nikiroo/gofetch/output/Html.java
b/src/be/nikiroo/gofetch/output/Html.java
index c087ef24d91ced582827d5cac32f9dcf8574424f..fea5f67997c0b36ad3f45734051a32ce6d16d911 100644
(file)
--- a/
src/be/nikiroo/gofetch/output/Html.java
+++ b/
src/be/nikiroo/gofetch/output/Html.java
@@
-13,16
+13,19
@@
public class Html extends Output {
@Override
public String getIndexHeader() {
@Override
public String getIndexHeader() {
- String gopherUrl = "gopher://" + hostname + preselector + ":" + port;
+ String sel = preselector;
+ if (!sel.isEmpty()) {
+ sel = "/1" + sel;
+ }
+
+ String gopherUrl = "gopher://" + hostname + sel + ":" + port;
return "<h1>News</h1>\n"//
+ "<p>You will find here a few pages full of news, mirroring <a href='"
+ gopherUrl + "'>"
+ gopherUrl
+ "</a>.</p>\n"//
return "<h1>News</h1>\n"//
+ "<p>You will find here a few pages full of news, mirroring <a href='"
+ gopherUrl + "'>"
+ gopherUrl
+ "</a>.</p>\n"//
- + "<br/>\n"//
+ "<p>They are simply scrapped from their associated webpage and updated a few times a day.</p>\n"//
+ "<p>They are simply scrapped from their associated webpage and updated a few times a day.</p>\n"//
- + "<br/>\n"//
;
}
;
}