diff --git a/app/src/gambas-wiki/.public/home.png b/app/src/gambas-wiki/.public/home.png new file mode 100644 index 000000000..b0dcf8d4a Binary files /dev/null and b/app/src/gambas-wiki/.public/home.png differ diff --git a/app/src/gambas-wiki/.public/style.css b/app/src/gambas-wiki/.public/style.css index da0e0c6fb..de2b7eea2 100644 --- a/app/src/gambas-wiki/.public/style.css +++ b/app/src/gambas-wiki/.public/style.css @@ -58,7 +58,7 @@ PRE HR { border-top: solid #C0C0C0 1px; } -TABLE { +TABLE.table { border-bottom: solid #A0A0A0 1px; border-right: solid #A0A0A0 1px; padding: 0px; @@ -67,14 +67,14 @@ TABLE { empty-cells: show; } -TABLE TD { +TABLE.table > TBODY > TR > TD { border-top: solid #A0A0A0 1px; border-left: solid #A0A0A0 1px; padding: 3px 6px; vertical-align: top; } -TABLE TH { +TABLE.table > TBODY > TR > TH { border-top: solid #A0A0A0 1px; border-left: solid #A0A0A0 1px; padding: 3px 6px; @@ -120,6 +120,14 @@ TABLE.example TH { color: white; } +.title-v { + font-size: 75%; +} + +.title-v A { + color: gray; +} + .login { position: absolute; display: inline-table; @@ -138,6 +146,10 @@ TABLE.example TH { padding-top: 24px; } +.page-v { + padding: 4px 8px; +} + .unknown { color: red; font-style: italic; @@ -264,8 +276,11 @@ DIV.syntax { white-space: pre; } -DIV.syntax > P { +DIV.syntax > P:first-child { margin-top: -1em; +} + +DIV.syntax > P:last-child { margin-bottom: -1em; } @@ -317,3 +332,7 @@ DIV.index { padding-right: 32px; margin-top: 1em; } + +.symbol { + color: black; +} diff --git a/app/src/gambas-wiki/.public/up-gray.png b/app/src/gambas-wiki/.public/up-gray.png new file mode 100644 index 000000000..fd234d65f Binary files /dev/null and b/app/src/gambas-wiki/.public/up-gray.png differ diff --git a/app/src/gambas-wiki/.src/Main.module b/app/src/gambas-wiki/.src/Main.module index afc38713b..7ae9773c1 100644 --- a/app/src/gambas-wiki/.src/Main.module +++ b/app/src/gambas-wiki/.src/Main.module @@ -16,17 +16,31 @@ Public Path As String Public Exist As Boolean Public Edit As Boolean Public Image As Boolean +Public LinkSuffix As String Public Component As String Public Class As String Public Symbol As String +Private Sub AddLinkSuffix(sReq As String) + + If LinkSuffix Then + LinkSuffix &= "&" + Else + LinkSuffix = "?" + Endif + LinkSuffix &= sReq + +End + Public Sub SetLanguage(sLang As String) Dim iLang As Integer Lang = sLang - If Not Lang Then Lang = DEFAULT_LANG + + If Not Lang Then Lang = DEFAULT_LANG + iLang = Languages.Find(Lang) If iLang >= 0 Then System.Language = SystemLanguages[iLang] @@ -34,6 +48,8 @@ Public Sub SetLanguage(sLang As String) Lang = DEFAULT_LANG Endif + If Lang <> DEFAULT_LANG Then AddLinkSuffix("l=" & sLang) + End Public Sub GetPagePath(Optional bSuffix As Boolean) As String @@ -161,6 +177,7 @@ Public Sub Main() Endif SetLanguage(Request["l"]) + If Request.Exist("v") Then AddLinkSuffix("v") If Request.Exist("logout") Then diff --git a/app/src/gambas-wiki/.src/Wiki.class b/app/src/gambas-wiki/.src/Wiki.class index fc4d3727f..100f838d9 100644 --- a/app/src/gambas-wiki/.src/Wiki.class +++ b/app/src/gambas-wiki/.src/Wiki.class @@ -19,7 +19,7 @@ Private Sub _PrintLink() aPath = Split(Main.Path, "/", "", True) For Each sElt In aPath sPath &= "/" & sElt - Print ""; "/"; sElt; ""; + Print ""; "/"; sElt; ""; Next End @@ -59,7 +59,8 @@ Private Sub _PrintPage() If iPos = 0 Then iPos = Len(sData) sData = Mid$(sData, iPos + 1) Endif - sData = "# " & Main.GetSymbolTitle() & sData + 'sData = "# " & Html(Main.GetSymbolTitle()) & "\n" & sData + sData = "# " & Main.GetSymbolTitle() & "\n" & sData Endif Print WikiMarkdown.ToHTML(sData); @@ -71,12 +72,12 @@ End Private Sub _PrintParent() - Dim sPath As String + 'Dim sPath As String - sPath = Request.Path - If sPath Then sPath = File.Dir(sPath) - Print Application.Root &/ sPath; - If Main.Lang <> Main.DEFAULT_LANG Then Print "?l="; Main.Lang; + 'sPath = Request.Path + 'If sPath Then sPath = File.Dir(sPath) + 'Print Application.Root &/ sPath; Main.LinkSuffix; + Print Application.Root; Main.LinkSuffix; End diff --git a/app/src/gambas-wiki/.src/Wiki.webpage b/app/src/gambas-wiki/.src/Wiki.webpage index 6407c1abe..506778ce7 100644 --- a/app/src/gambas-wiki/.src/Wiki.webpage +++ b/app/src/gambas-wiki/.src/Wiki.webpage @@ -13,6 +13,17 @@
+<%If Request.Exist("v") Then%> + +
+ + + + +
 
<%_PrintLink%>
+ +<%Else%> +
<%If Main.Edit%> @@ -63,6 +74,9 @@ <%Endif%>
+ +<%Endif%> + <%If Main.Edit Then%> <%If Main.Image Then%>
diff --git a/app/src/gambas-wiki/.src/WikiMarkdown.class b/app/src/gambas-wiki/.src/WikiMarkdown.class index 845a23d09..152952b96 100644 --- a/app/src/gambas-wiki/.src/WikiMarkdown.class +++ b/app/src/gambas-wiki/.src/WikiMarkdown.class @@ -8,7 +8,7 @@ Public Sub Link(hLink As MarkdownLink) Dim sLink As String = hLink.Link Dim iPos As Integer - If Main.Lang <> Main.DEFAULT_LANG Then hLink.Query = "l=" & Main.Lang + hLink.Query = Mid$(Main.LinkSuffix, 2) If sLink Begins "/" Then sPath = sLink @@ -31,7 +31,7 @@ Public Sub Link(hLink As MarkdownLink) If Not hLink.Text Or If hLink.Text = hLink.Link Then If Main.IsImage(sPath) Then - hLink.Html = " Main.DEFAULT_LANG, "&l=" & Main.Lang, "") & "\" />" + hLink.Html = "" Return Endif diff --git a/comp/src/gb.markdown/.src/Markup.module b/comp/src/gb.markdown/.src/Markup.module index 18e9b9c26..eb5cac798 100644 --- a/comp/src/gb.markdown/.src/Markup.module +++ b/comp/src/gb.markdown/.src/Markup.module @@ -292,7 +292,7 @@ Private Sub ConvertMarkup(aLine As String[], Optional bDoNotSetLine As Boolean) If aCommand Then aResult.Insert(aCommand) aResult.Add("") Else - aResult.Add("
") + aResult.Add("
") Endif aResult.Add("
") bIgnorePar = False