mirror of
https://github.com/journeyman-cc/smeagol.git
synced 2026-04-12 18:05:06 +00:00
I *think* I've fixed the Tomcat redirect bug.
This commit is contained in:
parent
4003c0295f
commit
cf227b498a
4 changed files with 26 additions and 3 deletions
9
resources/public/content/Iceland.md
Normal file
9
resources/public/content/Iceland.md
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
Iceland (Icelandic: *Ísland*) is a Nordic island country in the North Atlantic, with a population of 360,390 and an area of 103,000 km2 (40,000 sq mi), making it the most sparsely populated country in Europe. The capital and largest city is Reykjavík. Reykjavik and the surrounding areas in the southwest of the country are home to over two-thirds of the population. Iceland is volcanically and geologically active. The interior consists of a plateau characterised by sand and lava fields, mountains, and glaciers, and many glacial rivers flow to the sea through the lowlands. Iceland is warmed by the Gulf Stream and has a temperate climate, despite a high latitude just outside the Arctic Circle. Its high latitude and marine influence keep summers chilly, with most of the archipelago having a tundra climate.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
According to the ancient manuscript *Landnámabók*, the settlement of Iceland began in 874 AD when the Norwegian chieftain Ingólfr Arnarson became the first permanent settler on the island. In the following centuries, Norwegians, and to a lesser extent other Scandinavians, emigrated to Iceland, bringing with them thralls (i.e., slaves or serfs) of Gaelic origin.
|
||||||
|
|
||||||
|
The island was governed as an independent commonwealth under the *Alþingi*, one of the world's oldest functioning legislative assemblies. Following a period of civil strife, Iceland acceded to Norwegian rule in the 13th century. The establishment of the Kalmar Union in 1397 united the kingdoms of Norway, Denmark, and Sweden. Iceland thus followed Norway's integration into that union, coming under Danish rule after Sweden's secession from the union in 1523. Although the Danish kingdom introduced Lutheranism forcefully in 1550, Iceland remained a distant semi-colonial territory in which Danish institutions and infrastructures were conspicuous by their absence.
|
||||||
|
|
||||||
|
In the wake of the French Revolution and the Napoleonic Wars, Iceland's struggle for independence took form and culminated in independence in 1918 and the founding of a republic in 1944. Although its parliament (Althing) was suspended from 1799 to 1845, the island republic has been credited with sustaining the world's oldest and longest-running parliament.
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
GeoCSV.setIconUrlBase( \""
|
GeoCSV.setIconUrlBase( \""
|
||||||
(-> config :formatters :geocsv :icon-url-base) "\");
|
(-> config :formatters :geocsv :icon-url-base) "\");
|
||||||
GeoCSV.initialiseMapElement(\"geocsv-" index "\",
|
GeoCSV.initialiseMapElement(\"geocsv-" index "\",
|
||||||
document.getElementById(\"geocsv-" index "\").innerText.trim().replace(/\\[\\[([^\\[\\]]*)\\]\\]/, \"<a href='wiki?page=$1'>$1</a>\"));
|
document.getElementById(\"geocsv-" index "\").innerText.trim().replace(/\\[\\[([^\\[\\]]*)\\]\\]/g, \"<a href='wiki?page=$1'>$1</a>\"));
|
||||||
}};
|
}};
|
||||||
//]]
|
//]]
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,8 @@
|
||||||
[smeagol.configuration :refer [config]]
|
[smeagol.configuration :refer [config]]
|
||||||
[smeagol.include.resolve-local-file :as resolve]
|
[smeagol.include.resolve-local-file :as resolve]
|
||||||
[smeagol.include :as include]
|
[smeagol.include :as include]
|
||||||
[smeagol.util :refer [content-dir local-url local-url-base upload-dir]]))
|
[smeagol.util :refer [content-dir get-servlet-context-path
|
||||||
|
local-url local-url-base upload-dir]]))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;;;
|
;;;;
|
||||||
|
|
@ -398,7 +399,10 @@
|
||||||
(and username password (auth/authenticate username password))
|
(and username password (auth/authenticate username password))
|
||||||
(do
|
(do
|
||||||
(session/put! :user username)
|
(session/put! :user username)
|
||||||
(response/redirect redirect-to))
|
(response/redirect
|
||||||
|
(or
|
||||||
|
redirect-to
|
||||||
|
(get-servlet-context-path request))))
|
||||||
true
|
true
|
||||||
(layout/render "auth.html"
|
(layout/render "auth.html"
|
||||||
(merge (util/standard-params request)
|
(merge (util/standard-params request)
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,16 @@
|
||||||
:version (System/getProperty "smeagol.version")}))
|
:version (System/getProperty "smeagol.version")}))
|
||||||
|
|
||||||
|
|
||||||
|
(defn get-servlet-context-path
|
||||||
|
[request]
|
||||||
|
(if-let [context (:servlet-context request)]
|
||||||
|
;; If we're not inside a serlvet environment (for
|
||||||
|
;; example when using mock requests), then
|
||||||
|
;; .getContextPath might not exist
|
||||||
|
(try (.getContextPath context)
|
||||||
|
(catch IllegalArgumentException _ context))))
|
||||||
|
|
||||||
|
|
||||||
(def get-messages
|
(def get-messages
|
||||||
"Return the most acceptable messages collection we have given the
|
"Return the most acceptable messages collection we have given the
|
||||||
`Accept-Language` header in this `request`."
|
`Accept-Language` header in this `request`."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue