Last active
September 25, 2017 04:43
-
-
Save rgchris/e5fe1de3d819e7483b391503e89ab684 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/red | |
Red [ | |
Title: "Isle of Arran" | |
Date: 16-April-2001 | |
Version: 1.1.0 | |
File: %arran.red | |
Home: http://www.ross-gill.com/ | |
Author: "Christopher Ross-Gill" | |
Owner: "Arran Multimedia Studio" | |
Rights: "Copyright ©2000-01 Arran Multimedia Studio" | |
Purpose: "To present the Isle of Arran on the World Wide Reb" | |
History: { | |
OK, I'm not very good at this but I'll try... | |
My first attempt used faces and worked pretty well but the | |
code was a mess. I wanted to do it in CID (thanks Allen for | |
giving me a demo showing how to do that) and then VID. But | |
until the certainty of /View 1.x, I didn't want to learn the | |
dialect unless it stuck. So here it is - my first (of many, | |
I hope) VID presentation. | |
Update: 25-Sep-2017 | |
Adapted to work with Red's VID. | |
} | |
] | |
;o) Settings | |
pics: http://www.ross-gill.com/files/ | |
;o) Window | |
arran: [ | |
(arran-style) | |
origin 12x12 | |
space 6x6 | |
display-text: text-display (current/text) 200x200 ; size doesn't carry from style | |
below | |
display-image: image-display (current/image) | |
across | |
button-previous "<" | |
button-next ">" | |
return | |
category "Home" extra "home" | |
category "Brodick" extra "brodick" | |
category "Goatfell" extra "goatfell" | |
return | |
category "Lochranza" extra "ranza" | |
category "Laggan" extra "laggan" | |
category "The Author" extra "chris" | |
] | |
;o) Style sheet | |
arran-style: [ | |
style text-display: text 200x220 | |
style image-display: image 244x184 | |
style button-nav: button 120x20 | |
style button-next: button-nav [ | |
either tail? next current/group [ | |
; face/text: "" | |
][ | |
current/group: next current/group | |
current/field: first current/group | |
display-text/text: current/text | |
display-image/image: current/image | |
; face/text: ">" | |
] | |
] | |
style button-previous: button-nav [ | |
either head? current/group [ | |
; face/text: "" | |
][ | |
current/group: back current/group | |
current/field: first current/group | |
display-text/text: current/text | |
display-image/image: current/image | |
; face/text: "<" | |
] | |
] | |
style category: button 148x22 [ | |
current/category: face/extra | |
current/group: select database current/category | |
current/field: first current/group | |
display-text/text: current/text | |
display-image/image: current/image | |
] | |
] | |
;o) Information | |
database: [ | |
"default" [ | |
[ | |
{ | |
Welcome to the Isle of Arran. Here are some photos | |
from summer 1999 with some informative text. | |
_Enjoy :-) | |
} | |
%goatfell-holyisle.jpg | |
] | |
] | |
"home" [ | |
[ | |
{ | |
From Goatfell facing south. _In | |
the foreground is Brodick Bay. Above | |
that is Lamlash Bay and Holy Isle | |
(due a visit this year from the Dalai | |
Lama). _In the distance is the Ayrshire | |
hills and Ailsa Craig. | |
} | |
%goatfell-holyisle.jpg | |
] | |
] | |
"brodick" [ | |
[ | |
{ | |
The main village on the island and a | |
gateway to the mountains, villages and | |
the mainland _Tourists here playing | |
putting with Goatfell in the background. | |
} | |
%brodick-putting.jpg | |
][ | |
{ | |
Brodick Castle, for centuries the home | |
of the Hamiltons, is steeped in Scottish | |
history. This was the first castle taken | |
by Robert the Bruce on his return to Scotland. | |
} | |
%castle-flag.jpg | |
][ | |
{ | |
There is a regular ferry crossing all year | |
round with a good train connection to Glasgow. | |
} | |
%brodick-ferry.jpg | |
][ | |
{ | |
Reinforcing the island's image as a holiday | |
destination, this picture shows just a handful | |
of the yachts that come from all over Europe | |
and beyond to sail round this and other | |
Scottish islands. | |
} | |
%brodick-yachtsb.jpg | |
] | |
] | |
"goatfell" [ | |
[ | |
{ | |
The highest mountain on Arran and for at | |
least a 50 mile radius. _The picture in | |
the 'HOME' section was taken from Goatfell, | |
facing Brodick and the south. | |
} | |
%goatfell-close.jpg | |
][ | |
{ | |
The Top _If you're going to climb, you may as | |
well take along a guitar (with amp). My friend | |
blending in with the other satisfied climbers. | |
Note the trig point (874m) and View Guide. | |
} | |
%goatfell-player.jpg | |
][ | |
{ | |
North West _You can see other Arran peaks - | |
Cir Mhor (under the buzzard), Caisteal Abhail | |
(to the right) and the Witch's Step (The giant | |
vertical groove). In the distance are the | |
paps of Jura beyond Kintyre. | |
} | |
%goatfell-jura.jpg | |
][ | |
{ | |
North _In the foreground is North Goatfell. | |
The Witch's Step is on the left with Glen Sannox | |
in between. The passage of water above is the | |
Firth of Clyde with Greenock and Glasgow to the | |
right. | |
} | |
%goatfell-north.jpg | |
][ | |
{ | |
East _The wonderfully positioned village of Corrie. | |
Considered by many to be the most picturesque | |
village on the island, it is a great starting point | |
for many walks and climbs. | |
} | |
%goatfell-corrie.jpg | |
][ | |
{ | |
South _Another man with a guitar, towering over the | |
speck that is Ailsa Craig (itself twice as big as | |
the great pyramids). | |
} | |
%goatfell-star.jpg | |
][ | |
{ | |
South West _Looking across the island over Glen | |
Rosa (foreground) to Shiskine. In the distance is | |
the Mull of Kintyre and Northern Ireland. | |
} | |
%goatfell-shiskine.jpg | |
] | |
] | |
"ranza" [ | |
[ | |
{ | |
Lochranza is based in a fjord-like glen. _As the | |
glen faces north, Lochranza doesn't see the sun | |
from mid-November to mid-February. But they | |
don't care, they have their own distillery. | |
} | |
%ranza-village.jpg | |
][ | |
{ | |
Lochranza Castle, set in the middle of the loch | |
on a small peninsula of its own _The peninsula | |
makes a wonderful shelter for small boats, | |
while the other side is deep and plays host to | |
a large number of yachts. | |
} | |
%ranza-castle.jpg | |
][ | |
{ | |
Arran's other ferry to the mainland runs from | |
Lochranza to Cloanaig on Kintyre. It is a summer | |
only service. _At the top-left of the picture, | |
you can just make out the Caisteal Abhail and | |
the Witch's Step. | |
} | |
%ranza-ferry.jpg | |
] | |
] | |
"laggan" [ | |
[ | |
{ | |
Laggan is an old mining village which was | |
completely emptied during the clearances. The | |
best way to reach it is by boat. _There are | |
many clearance sites on Arran in various states | |
of repair. | |
} | |
%laggan-ruin.jpg | |
][ | |
{ | |
The means of travel. _Edward here knows | |
everything about the Herring Fishing Industry | |
in Scotland, both past and present. Amongst | |
other things. | |
} | |
%laggan-boat.jpg | |
][ | |
{ | |
The north east corner of the island is the most | |
inaccessible. This was the main problem for | |
the residents of Laggan, and one of the reasons | |
they left. | |
} | |
%laggan-corner.jpg | |
][ | |
{ | |
Hold a camera over the side of a boat and you get... | |
} | |
%laggan-speed.jpg | |
] | |
] | |
"chris" [ | |
[ | |
{ | |
Modesty forbidding the use of my own picture, here's | |
my apple tree (new) sparkling in the summer sun. | |
_http://www.ross-gill.com/arran/ _Christopher Ross-Gill | |
} | |
%chris-apple.jpg | |
][ | |
{ | |
Here is Bonnie. A very well-behaved collie who | |
went almost everywhere the camera went :-) | |
} | |
%chris-bonnie.jpg | |
] | |
] | |
] | |
;o) Execute Program | |
format: func [txt][ | |
replace/all trim/lines copy txt "_" "^/^/" | |
] | |
images: make object! [ | |
location: :pics | |
images: #() | |
fetch: func [filename [file!]][ | |
any [ | |
select images filename | |
put images filename load location/:filename | |
] | |
] | |
] | |
current: make object! [ | |
category: "default" | |
group: select database category | |
field: first group | |
text: does [format first field] | |
image: does [images/fetch second field] | |
] | |
view x-arran: layout compose/deep arran |
Must have had something in mind there.
@dockimbel Stripped some display facets out and managed to get it working.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At line 40,
also
takes 2 arguments, but you provide only one.