summaryrefslogtreecommitdiffstats
path: root/afb-client/bower_components/tether/examples/scroll
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2016-02-09 18:40:49 +0100
committerFulup Ar Foll <fulup@iot.bzh>2016-02-09 18:40:49 +0100
commit3d2fda7dd39e2363682f1fa353c951ab0d44ddfa (patch)
treeaf968a8ac5d4fde1f3cebcec5fb0973eb2bfb2cb /afb-client/bower_components/tether/examples/scroll
parent12a3520ba440316c76b95d92a684666f03f7b47d (diff)
Implemented URL query parsing for initial token /opa/?token=abcde
Diffstat (limited to 'afb-client/bower_components/tether/examples/scroll')
-rw-r--r--afb-client/bower_components/tether/examples/scroll/index.html922
1 files changed, 922 insertions, 0 deletions
diff --git a/afb-client/bower_components/tether/examples/scroll/index.html b/afb-client/bower_components/tether/examples/scroll/index.html
new file mode 100644
index 0000000..40b0a61
--- /dev/null
+++ b/afb-client/bower_components/tether/examples/scroll/index.html
@@ -0,0 +1,922 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <link rel="stylesheet" href="../resources/css/base.css" />
+ <link rel="stylesheet" href="../common/css/style.css" />
+ </head>
+ <body>
+
+ <div class="instructions">Scroll the page</div>
+
+ <h2>THE END OF THE TETHER</h2>
+
+ <p>By Joseph Conrad</p>
+
+ <h3>Chapter I</h3>
+
+ <p>For a long time after the course of the steamer <em>Sofala</em> had been
+ altered for the land, the low swampy coast had retained its appearance
+ of a mere smudge of darkness beyond a belt of glitter. The sunrays
+ seemed to fall violently upon the calm sea--seemed to shatter themselves
+ upon an adamantine surface into sparkling dust, into a dazzling vapor
+ of light that blinded the eye and wearied the brain with its unsteady
+ brightness.</p>
+
+ <p>Captain Whalley did not look at it. When his Serang, approaching the
+ roomy cane arm-chair which he filled capably, had informed him in a low
+ voice that the course was to be altered, he had risen at once and had
+ remained on his feet, face forward, while the head of his ship swung
+ through a quarter of a circle. He had not uttered a single word, not
+ even the word to steady the helm. It was the Serang, an elderly, alert,
+ little Malay, with a very dark skin, who murmured the order to the
+ helmsman. And then slowly Captain Whalley sat down again in the
+ arm-chair on the bridge and fixed his eyes on the deck between his feet.</p>
+
+ <p>He could not hope to see anything new upon this lane of the sea. He had
+ been on these coasts for the last three years. From Low Cape to Malantan
+ the distance was fifty miles, six hours' steaming for the old ship with
+ the tide, or seven against. Then you steered straight for the land, and
+ by-and-by three palms would appear on the sky, tall and slim, and with
+ their disheveled heads in a bunch, as if in confidential criticism of
+ the dark mangroves. The Sofala would be headed towards the somber
+ strip of the coast, which at a given moment, as the ship closed with
+ it obliquely, would show several clean shining fractures--the brimful
+ estuary of a river. Then on through a brown liquid, three parts water
+ and one part black earth, on and on between the low shores, three parts
+ black earth and one part brackish water, the Sofala would plow her way
+ up-stream, as she had done once every month for these seven years or
+ more, long before he was aware of her existence, long before he had ever
+ thought of having anything to do with her and her invariable voyages.
+ The old ship ought to have known the road better than her men, who had
+ not been kept so long at it without a change; better than the faithful
+ Serang, whom he had brought over from his last ship to keep the
+ captain's watch; better than he himself, who had been her captain for
+ the last three years only. She could always be depended upon to make her
+ courses. Her compasses were never out. She was no trouble at all to
+ take about, as if her great age had given her knowledge, wisdom, and
+ steadiness. She made her landfalls to a degree of the bearing, and
+ almost to a minute of her allowed time. At any moment, as he sat on
+ the bridge without looking up, or lay sleepless in his bed, simply by
+ reckoning the days and the hours he could tell where he was--the precise
+ spot of the beat. He knew it well too, this monotonous huckster's
+ round, up and down the Straits; he knew its order and its sights and its
+ people. Malacca to begin with, in at daylight and out at dusk, to cross
+ over with a rigid phosphorescent wake this highway of the Far East.
+ Darkness and gleams on the water, clear stars on a black sky, perhaps
+ the lights of a home steamer keeping her unswerving course in the
+ middle, or maybe the elusive shadow of a native craft with her mat sails
+ flitting by silently--and the low land on the other side in sight
+ at daylight. At noon the three palms of the next place of call, up a
+ sluggish river. The only white man residing there was a retired young
+ sailor, with whom he had become friendly in the course of many voyages.
+ Sixty miles farther on there was another place of call, a deep bay with
+ only a couple of houses on the beach. And so on, in and out, picking
+ up coastwise cargo here and there, and finishing with a hundred miles'
+ steady steaming through the maze of an archipelago of small islands up
+ to a large native town at the end of the beat. There was a three days'
+ rest for the old ship before he started her again in inverse order,
+ seeing the same shores from another bearing, hearing the same voices
+ in the same places, back again to the Sofala's port of registry on
+ the great highway to the East, where he would take up a berth nearly
+ opposite the big stone pile of the harbor office till it was time to
+ start again on the old round of 1600 miles and thirty days. Not a very
+ enterprising life, this, for Captain Whalley, Henry Whalley, otherwise
+ Dare-devil Harry--Whalley of the Condor, a famous clipper in her day.
+ No. Not a very enterprising life for a man who had served famous firms,
+ who had sailed famous ships (more than one or two of them his own); who
+ had made famous passages, had been the pioneer of new routes and new
+ trades; who had steered across the unsurveyed tracts of the South Seas,
+ and had seen the sun rise on uncharted islands. Fifty years at sea, and
+ forty out in the East ("a pretty thorough apprenticeship," he used
+ to remark smilingly), had made him honorably known to a generation of
+ shipowners and merchants in all the ports from Bombay clear over to
+ where the East merges into the West upon the coast of the two Americas.
+ His fame remained writ, not very large but plain enough, on the
+ Admiralty charts. Was there not somewhere between Australia and China a
+ Whalley Island and a Condor Reef? On that dangerous coral formation the
+ celebrated clipper had hung stranded for three days, her captain and
+ crew throwing her cargo overboard with one hand and with the other, as
+ it were, keeping off her a flotilla of savage war-canoes. At that time
+ neither the island nor the reef had any official existence. Later the
+ officers of her Majesty's steam vessel Fusilier, dispatched to make a
+ survey of the route, recognized in the adoption of these two names the
+ enterprise of the man and the solidity of the ship. Besides, as anyone
+ who cares may see, the "General Directory," vol. ii. p. 410, begins the
+ description of the "Malotu or Whalley Passage" with the words: "This
+ advantageous route, first discovered in 1850 by Captain Whalley in the
+ ship Condor," &amp;c., and ends by recommending it warmly to sailing vessels
+ leaving the China ports for the south in the months from December to
+ April inclusive.</p>
+
+ <p>This was the clearest gain he had out of life. Nothing could rob him
+ of this kind of fame. The piercing of the Isthmus of Suez, like the
+ breaking of a dam, had let in upon the East a flood of new ships, new
+ men, new methods of trade. It had changed the face of the Eastern seas
+ and the very spirit of their life; so that his early experiences meant
+ nothing whatever to the new generation of seamen.</p>
+
+ <p>In those bygone days he had handled many thousands of pounds of his
+ employers' money and of his own; he had attended faithfully, as by law
+ a shipmaster is expected to do, to the conflicting interests of owners,
+ charterers, and underwriters. He had never lost a ship or consented to
+ a shady transaction; and he had lasted well, outlasting in the end the
+ conditions that had gone to the making of his name. He had buried his
+ wife (in the Gulf of Petchili), had married off his daughter to the man
+ of her unlucky choice, and had lost more than an ample competence in the
+ crash of the notorious Travancore and Deccan Banking Corporation, whose
+ downfall had shaken the East like an earthquake. And he was sixty-five
+ years old.</p>
+
+ <h3>Chapter II</h3>
+
+ <p>His age sat lightly enough on him; and of his ruin he was not ashamed.
+ He had not been alone to believe in the stability of the Banking
+ Corporation. Men whose judgment in matters of finance was as expert as
+ his seamanship had commended the prudence of his investments, and had
+ themselves lost much money in the great failure. The only difference
+ between him and them was that he had lost his all. And yet not his all.
+ There had remained to him from his lost fortune a very pretty little
+ bark, Fair Maid, which he had bought to occupy his leisure of a retired
+ sailor--"to play with," as he expressed it himself.</p>
+
+ <p>He had formally declared himself tired of the sea the year preceding his
+ daughter's marriage. But after the young couple had gone to settle in
+ Melbourne he found out that he could not make himself happy on shore. He
+ was too much of a merchant sea-captain for mere yachting to satisfy him.
+ He wanted the illusion of affairs; and his acquisition of the Fair
+ Maid preserved the continuity of his life. He introduced her to his
+ acquaintances in various ports as "my last command." When he grew too
+ old to be trusted with a ship, he would lay her up and go ashore to be
+ buried, leaving directions in his will to have the bark towed out and
+ scuttled decently in deep water on the day of the funeral. His daughter
+ would not grudge him the satisfaction of knowing that no stranger would
+ handle his last command after him. With the fortune he was able to leave
+ her, the value of a 500-ton bark was neither here nor there. All this
+ would be said with a jocular twinkle in his eye: the vigorous old man
+ had too much vitality for the sentimentalism of regret; and a little
+ wistfully withal, because he was at home in life, taking a genuine
+ pleasure in its feelings and its possessions; in the dignity of his
+ reputation and his wealth, in his love for his daughter, and in his
+ satisfaction with the ship--the plaything of his lonely leisure.</p>
+
+ <p>He had the cabin arranged in accordance with his simple ideal of comfort
+ at sea. A big bookcase (he was a great reader) occupied one side of his
+ stateroom; the portrait of his late wife, a flat bituminous oil-painting
+ representing the profile and one long black ringlet of a young woman,
+ faced his bed-place. Three chronometers ticked him to sleep and greeted
+ him on waking with the tiny competition of their beats. He rose at five
+ every day. The officer of the morning watch, drinking his early cup
+ of coffee aft by the wheel, would hear through the wide orifice of the
+ copper ventilators all the splashings, blowings, and splutterings of
+ his captain's toilet. These noises would be followed by a sustained
+ deep murmur of the Lord's Prayer recited in a loud earnest voice. Five
+ minutes afterwards the head and shoulders of Captain Whalley emerged
+ out of the companion-hatchway. Invariably he paused for a while on the
+ stairs, looking all round at the horizon; upwards at the trim of the
+ sails; inhaling deep draughts of the fresh air. Only then he would step
+ out on the poop, acknowledging the hand raised to the peak of the cap
+ with a majestic and benign "Good morning to you." He walked the deck
+ till eight scrupulously. Sometimes, not above twice a year, he had to
+ use a thick cudgel-like stick on account of a stiffness in the hip--a
+ slight touch of rheumatism, he supposed. Otherwise he knew nothing of
+ the ills of the flesh. At the ringing of the breakfast bell he went
+ below to feed his canaries, wind up the chronometers, and take the
+ head of the table. From there he had before his eyes the big carbon
+ photographs of his daughter, her husband, and two fat-legged babies
+ --his grandchildren--set in black frames into the maplewood bulkheads
+ of the cuddy. After breakfast he dusted the glass over these portraits
+ himself with a cloth, and brushed the oil painting of his wife with a
+ plumate kept suspended from a small brass hook by the side of the heavy
+ gold frame. Then with the door of his stateroom shut, he would sit down
+ on the couch under the portrait to read a chapter out of a thick pocket
+ Bible--her Bible. But on some days he only sat there for half an hour
+ with his finger between the leaves and the closed book resting on his
+ knees. Perhaps he had remembered suddenly how fond of boat-sailing she
+ used to be.</p>
+
+ <p>She had been a real shipmate and a true woman too. It was like an
+ article of faith with him that there never had been, and never could be,
+ a brighter, cheerier home anywhere afloat or ashore than his home under
+ the poop-deck of the Condor, with the big main cabin all white and gold,
+ garlanded as if for a perpetual festival with an unfading wreath. She
+ had decorated the center of every panel with a cluster of home flowers.
+ It took her a twelvemonth to go round the cuddy with this labor of love.
+ To him it had remained a marvel of painting, the highest achievement of
+ taste and skill; and as to old Swinburne, his mate, every time he
+ came down to his meals he stood transfixed with admiration before the
+ progress of the work. You could almost smell these roses, he declared,
+ sniffing the faint flavor of turpentine which at that time pervaded the
+ saloon, and (as he confessed afterwards) made him somewhat less hearty
+ than usual in tackling his food. But there was nothing of the sort to
+ interfere with his enjoyment of her singing. "Mrs. Whalley is a regular
+ out-and-out nightingale, sir," he would pronounce with a judicial air
+ after listening profoundly over the skylight to the very end of the
+ piece. In fine weather, in the second dog-watch, the two men could hear
+ her trills and roulades going on to the accompaniment of the piano in
+ the cabin. On the very day they got engaged he had written to London
+ for the instrument; but they had been married for over a year before it
+ reached them, coming out round the Cape. The big case made part of the
+ first direct general cargo landed in Hong-kong harbor--an event that to
+ the men who walked the busy quays of to-day seemed as hazily remote as
+ the dark ages of history. But Captain Whalley could in a half hour of
+ solitude live again all his life, with its romance, its idyl, and its
+ sorrow. He had to close her eyes himself. She went away from under the
+ ensign like a sailor's wife, a sailor herself at heart. He had read
+ the service over her, out of her own prayer-book, without a break in his
+ voice. When he raised his eyes he could see old Swinburne facing him
+ with his cap pressed to his breast, and his rugged, weather-beaten,
+ impassive face streaming with drops of water like a lump of chipped red
+ granite in a shower. It was all very well for that old sea-dog to cry.
+ He had to read on to the end; but after the splash he did not remember
+ much of what happened for the next few days. An elderly sailor of the
+ crew, deft at needlework, put together a mourning frock for the child
+ out of one of her black skirts.</p>
+
+ <p>He was not likely to forget; but you cannot dam up life like a sluggish
+ stream. It will break out and flow over a man's troubles, it will close
+ upon a sorrow like the sea upon a dead body, no matter how much love has
+ gone to the bottom. And the world is not bad. People had been very
+ kind to him; especially Mrs. Gardner, the wife of the senior partner
+ in Gardner, Patteson, &amp; Co., the owners of the Condor. It was she who
+ volunteered to look after the little one, and in due course took her to
+ England (something of a journey in those days, even by the overland
+ mail route) with her own girls to finish her education. It was ten years
+ before he saw her again.</p>
+
+ <p>As a little child she had never been frightened of bad weather; she
+ would beg to be taken up on deck in the bosom of his oilskin coat to
+ watch the big seas hurling themselves upon the Condor. The swirl and
+ crash of the waves seemed to fill her small soul with a breathless
+ delight. "A good boy spoiled," he used to say of her in joke. He had
+ named her Ivy because of the sound of the word, and obscurely fascinated
+ by a vague association of ideas. She had twined herself tightly round
+ his heart, and he intended her to cling close to her father as to a
+ tower of strength; forgetting, while she was little, that in the nature
+ of things she would probably elect to cling to someone else. But
+ he loved life well enough for even that event to give him a certain
+ satisfaction, apart from his more intimate feeling of loss.</p>
+
+ <p>After he had purchased the Fair Maid to occupy his loneliness, he
+ hastened to accept a rather unprofitable freight to Australia simply for
+ the opportunity of seeing his daughter in her own home. What made him
+ dissatisfied there was not to see that she clung now to somebody else,
+ but that the prop she had selected seemed on closer examination "a
+ rather poor stick"--even in the matter of health. He disliked his
+ son-in-law's studied civility perhaps more than his method of
+ handling the sum of money he had given Ivy at her marriage. But of his
+ apprehensions he said nothing. Only on the day of his departure, with
+ the hall-door open already, holding her hands and looking steadily into
+ her eyes, he had said, "You know, my dear, all I have is for you and the
+ chicks. Mind you write to me openly." She had answered him by an almost
+ imperceptible movement of her head. She resembled her mother in
+ the color of her eyes, and in character--and also in this, that she
+ understood him without many words.</p>
+
+ <p>Sure enough she had to write; and some of these letters made Captain
+ Whalley lift his white eye-brows. For the rest he considered he was
+ reaping the true reward of his life by being thus able to produce on
+ demand whatever was needed. He had not enjoyed himself so much in a
+ way since his wife had died. Characteristically enough his son-in-law's
+ punctuality in failure caused him at a distance to feel a sort of
+ kindness towards the man. The fellow was so perpetually being jammed on
+ a lee shore that to charge it all to his reckless navigation would be
+ manifestly unfair. No, no! He knew well what that meant. It was bad
+ luck. His own had been simply marvelous, but he had seen in his life too
+ many good men--seamen and others--go under with the sheer weight of bad
+ luck not to recognize the fatal signs. For all that, he was cogitating
+ on the best way of tying up very strictly every penny he had to leave,
+ when, with a preliminary rumble of rumors (whose first sound reached
+ him in Shanghai as it happened), the shock of the big failure came;
+ and, after passing through the phases of stupor, of incredulity, of
+ indignation, he had to accept the fact that he had nothing to speak of
+ to leave.</p>
+
+ <p>Upon that, as if he had only waited for this catastrophe, the unlucky
+ man, away there in Melbourne, gave up his unprofitable game, and sat
+ down--in an invalid's bath-chair at that too. "He will never walk
+ again," wrote the wife. For the first time in his life Captain Whalley
+ was a bit staggered.</p>
+
+ <p>The Fair Maid had to go to work in bitter earnest now. It was no longer
+ a matter of preserving alive the memory of Dare-devil Harry Whalley in
+ the Eastern Seas, or of keeping an old man in pocket-money and clothes,
+ with, perhaps, a bill for a few hundred first-class cigars thrown in at
+ the end of the year. He would have to buckle-to, and keep her going hard
+ on a scant allowance of gilt for the ginger-bread scrolls at her stem
+ and stern.</p>
+
+ <p>This necessity opened his eyes to the fundamental changes of the world.
+ Of his past only the familiar names remained, here and there, but
+ the things and the men, as he had known them, were gone. The name of
+ Gardner, Patteson, &amp; Co. was still displayed on the walls of warehouses
+ by the waterside, on the brass plates and window-panes in the business
+ quarters of more than one Eastern port, but there was no longer a
+ Gardner or a Patteson in the firm. There was no longer for Captain
+ Whalley an arm-chair and a welcome in the private office, with a bit of
+ business ready to be put in the way of an old friend, for the sake of
+ bygone services. The husbands of the Gardner girls sat behind the desks
+ in that room where, long after he had left the employ, he had kept his
+ right of entrance in the old man's time. Their ships now had yellow
+ funnels with black tops, and a time-table of appointed routes like a
+ confounded service of tramways. The winds of December and June were all
+ one to them; their captains (excellent young men he doubted not) were,
+ to be sure, familiar with Whalley Island, because of late years the
+ Government had established a white fixed light on the north end (with
+ a red danger sector over the Condor Reef), but most of them would have
+ been extremely surprised to hear that a flesh-and-blood Whalley still
+ existed--an old man going about the world trying to pick up a cargo here
+ and there for his little bark.</p>
+
+ <p>And everywhere it was the same. Departed the men who would have nodded
+ appreciatively at the mention of his name, and would have thought
+ themselves bound in honor to do something for Dare-devil Harry Whalley.
+ Departed the opportunities which he would have known how to seize; and
+ gone with them the white-winged flock of clippers that lived in the
+ boisterous uncertain life of the winds, skimming big fortunes out of
+ the foam of the sea. In a world that pared down the profits to an
+ irreducible minimum, in a world that was able to count its disengaged
+ tonnage twice over every day, and in which lean charters were snapped up
+ by cable three months in advance, there were no chances of fortune for
+ an individual wandering haphazard with a little bark--hardly indeed any
+ room to exist.</p>
+
+ <p>He found it more difficult from year to year. He suffered greatly from
+ the smallness of remittances he was able to send his daughter. Meantime
+ he had given up good cigars, and even in the matter of inferior cheroots
+ limited himself to six a day. He never told her of his difficulties, and
+ she never enlarged upon her struggle to live. Their confidence in each
+ other needed no explanations, and their perfect understanding endured
+ without protestations of gratitude or regret. He would have been shocked
+ if she had taken it into her head to thank him in so many words, but
+ he found it perfectly natural that she should tell him she needed two
+ hundred pounds.</p>
+
+ <p>He had come in with the Fair Maid in ballast to look for a freight in
+ the Sofala's port of registry, and her letter met him there. Its tenor
+ was that it was no use mincing matters. Her only resource was in opening
+ a boarding-house, for which the prospects, she judged, were good. Good
+ enough, at any rate, to make her tell him frankly that with two hundred
+ pounds she could make a start. He had torn the envelope open, hastily,
+ on deck, where it was handed to him by the ship-chandler's runner, who
+ had brought his mail at the moment of anchoring. For the second time
+ in his life he was appalled, and remained stock-still at the cabin door
+ with the paper trembling between his fingers. Open a boarding-house! Two
+ hundred pounds for a start! The only resource! And he did not know where
+ to lay his hands on two hundred pence.</p>
+
+ <p>All that night Captain Whalley walked the poop of his anchored ship, as
+ though he had been about to close with the land in thick weather, and
+ uncertain of his position after a run of many gray days without a sight
+ of sun, moon, or stars. The black night twinkled with the guiding lights
+ of seamen and the steady straight lines of lights on shore; and all
+ around the Fair Maid the riding lights of ships cast trembling trails
+ upon the water of the roadstead. Captain Whalley saw not a gleam
+ anywhere till the dawn broke and he found out that his clothing was
+ soaked through with the heavy dew.</p>
+
+ <p>His ship was awake. He stopped short, stroked his wet beard, and
+ descended the poop ladder backwards, with tired feet. At the sight
+ of him the chief officer, lounging about sleepily on the quarterdeck,
+ remained open-mouthed in the middle of a great early-morning yawn.</p>
+
+ <p>"Good morning to you," pronounced Captain Whalley solemnly, passing into
+ the cabin. But he checked himself in the doorway, and without looking
+ back, "By the bye," he said, "there should be an empty wooden case put
+ away in the lazarette. It has not been broken up--has it?"</p>
+
+ <p>The mate shut his mouth, and then asked as if dazed, "What empty case,
+ sir?"</p>
+
+ <p>"A big flat packing-case belonging to that painting in my room. Let it
+ be taken up on deck and tell the carpenter to look it over. I may want
+ to use it before long."</p>
+
+ <p>The chief officer did not stir a limb till he had heard the door of the
+ captain's state-room slam within the cuddy. Then he beckoned aft the
+ second mate with his forefinger to tell him that there was something "in
+ the wind."</p>
+
+ <p>When the bell rang Captain Whalley's authoritative voice boomed out
+ through a closed door, "Sit down and don't wait for me." And his
+ impressed officers took their places, exchanging looks and whispers
+ across the table. What! No breakfast? And after apparently knocking
+ about all night on deck, too! Clearly, there was something in the wind.
+ In the skylight above their heads, bowed earnestly over the plates,
+ three wire cages rocked and rattled to the restless jumping of the
+ hungry canaries; and they could detect the sounds of their "old
+ man's" deliberate movements within his state-room. Captain Whalley was
+ methodically winding up the chronometers, dusting the portrait of
+ his late wife, getting a clean white shirt out of the drawers, making
+ himself ready in his punctilious unhurried manner to go ashore. He could
+ not have swallowed a single mouthful of food that morning. He had made
+ up his mind to sell the Fair Maid.</p>
+
+ <h3>Chapter III</h3>
+
+ <p>Just at that time the Japanese were casting far and wide for ships
+ of European build, and he had no difficulty in finding a purchaser, a
+ speculator who drove a hard bargain, but paid cash down for the Fair
+ Maid, with a view to a profitable resale. Thus it came about that
+ Captain Whalley found himself on a certain afternoon descending the
+ steps of one of the most important post-offices of the East with a slip
+ of bluish paper in his hand. This was the receipt of a registered letter
+ enclosing a draft for two hundred pounds, and addressed to Melbourne.
+ Captain Whalley pushed the paper into his waistcoat-pocket, took his
+ stick from under his arm, and walked down the street.</p>
+
+ <p>It was a recently opened and untidy thoroughfare with rudimentary
+ side-walks and a soft layer of dust cushioning the whole width of
+ the road. One end touched the slummy street of Chinese shops near the
+ harbor, the other drove straight on, without houses, for a couple of
+ miles, through patches of jungle-like vegetation, to the yard gates
+ of the new Consolidated Docks Company. The crude frontages of the new
+ Government buildings alternated with the blank fencing of vacant plots,
+ and the view of the sky seemed to give an added spaciousness to the
+ broad vista. It was empty and shunned by natives after business
+ hours, as though they had expected to see one of the tigers from the
+ neighborhood of the New Waterworks on the hill coming at a loping canter
+ down the middle to get a Chinese shopkeeper for supper. Captain Whalley
+ was not dwarfed by the solitude of the grandly planned street. He
+ had too fine a presence for that. He was only a lonely figure walking
+ purposefully, with a great white beard like a pilgrim, and with a thick
+ stick that resembled a weapon. On one side the new Courts of Justice had
+ a low and unadorned portico of squat columns half concealed by a few old
+ trees left in the approach. On the other the pavilion wings of the
+ new Colonial Treasury came out to the line of the street. But Captain
+ Whalley, who had now no ship and no home, remembered in passing that
+ on that very site when he first came out from England there had stood a
+ fishing village, a few mat huts erected on piles between a muddy tidal
+ creek and a miry pathway that went writhing into a tangled wilderness
+ without any docks or waterworks.</p>
+
+ <p>No ship--no home. And his poor Ivy away there had no home either. A
+ boarding-house is no sort of home though it may get you a living. His
+ feelings were horribly rasped by the idea of the boarding-house. In his
+ rank of life he had that truly aristocratic temperament characterized by
+ a scorn of vulgar gentility and by prejudiced views as to the derogatory
+ nature of certain occupations. For his own part he had always preferred
+ sailing merchant ships (which is a straightforward occupation) to buying
+ and selling merchandise, of which the essence is to get the better of
+ somebody in a bargain--an undignified trial of wits at best. His father
+ had been Colonel Whalley (retired) of the H. E. I. Company's service,
+ with very slender means besides his pension, but with distinguished
+ connections. He could remember as a boy how frequently waiters at the
+ inns, country tradesmen and small people of that sort, used to "My lord"
+ the old warrior on the strength of his appearance.</p>
+
+ <p>Captain Whalley himself (he would have entered the Navy if his father
+ had not died before he was fourteen) had something of a grand air which
+ would have suited an old and glorious admiral; but he became lost like
+ a straw in the eddy of a brook amongst the swarm of brown and yellow
+ humanity filling a thoroughfare, that by contrast with the vast and
+ empty avenue he had left seemed as narrow as a lane and absolutely
+ riotous with life. The walls of the houses were blue; the shops of the
+ Chinamen yawned like cavernous lairs; heaps of nondescript merchandise
+ overflowed the gloom of the long range of arcades, and the fiery
+ serenity of sunset took the middle of the street from end to end with a
+ glow like the reflection of a fire. It fell on the bright colors and the
+ dark faces of the bare-footed crowd, on the pallid yellow backs of the
+ half-naked jostling coolies, on the accouterments of a tall Sikh trooper
+ with a parted beard and fierce mustaches on sentry before the gate of
+ the police compound. Looming very big above the heads in a red haze of
+ dust, the tightly packed car of the cable tramway navigated cautiously
+ up the human stream, with the incessant blare of its horn, in the manner
+ of a steamer groping in a fog.</p>
+
+ <p>Captain Whalley emerged like a diver on the other side, and in the
+ desert shade between the walls of closed warehouses removed his hat to
+ cool his brow. A certain disrepute attached to the calling of a
+ landlady of a boarding-house. These women were said to be rapacious,
+ unscrupulous, untruthful; and though he contemned no class of his
+ fellow-creatures--God forbid!--these were suspicions to which it was
+ unseemly that a Whalley should lay herself open. He had not expostulated
+ with her, however. He was confident she shared his feelings; he was
+ sorry for her; he trusted her judgment; he considered it a merciful
+ dispensation that he could help her once more,--but in his aristocratic
+ heart of hearts he would have found it more easy to reconcile himself to
+ the idea of her turning seamstress. Vaguely he remembered reading years
+ ago a touching piece called the "Song of the Shirt." It was all very
+ well making songs about poor women. The granddaughter of Colonel
+ Whalley, the landlady of a boarding-house! Pooh! He replaced his hat,
+ dived into two pockets, and stopping a moment to apply a flaring match
+ to the end of a cheap cheroot, blew an embittered cloud of smoke at a
+ world that could hold such surprises.</p>
+
+ <p>Of one thing he was certain--that she was the own child of a clever
+ mother. Now he had got over the wrench of parting with his ship, he
+ perceived clearly that such a step had been unavoidable. Perhaps he had
+ been growing aware of it all along with an unconfessed knowledge. But
+ she, far away there, must have had an intuitive perception of it, with
+ the pluck to face that truth and the courage to speak out--all the
+ qualities which had made her mother a woman of such excellent counsel.</p>
+
+ <p>It would have had to come to that in the end! It was fortunate she had
+ forced his hand. In another year or two it would have been an utterly
+ barren sale. To keep the ship going he had been involving himself deeper
+ every year. He was defenseless before the insidious work of adversity,
+ to whose more open assaults he could present a firm front; like a
+ cliff that stands unmoved the open battering of the sea, with a lofty
+ ignorance of the treacherous backwash undermining its base. As it was,
+ every liability satisfied, her request answered, and owing no man a
+ penny, there remained to him from the proceeds a sum of five hundred
+ pounds put away safely. In addition he had upon his person some forty
+ odd dollars--enough to pay his hotel bill, providing he did not linger
+ too long in the modest bedroom where he had taken refuge.</p>
+
+ <p>Scantily furnished, and with a waxed floor, it opened into one of
+ the side-verandas. The straggling building of bricks, as airy as a
+ bird-cage, resounded with the incessant flapping of rattan screens
+ worried by the wind between the white-washed square pillars of the
+ sea-front. The rooms were lofty, a ripple of sunshine flowed over the
+ ceilings; and the periodical invasions of tourists from some passenger
+ steamer in the harbor flitted through the wind-swept dusk of the
+ apartments with the tumult of their unfamiliar voices and impermanent
+ presences, like relays of migratory shades condemned to speed headlong
+ round the earth without leaving a trace. The babble of their irruptions
+ ebbed out as suddenly as it had arisen; the draughty corridors and
+ the long chairs of the verandas knew their sight-seeing hurry or
+ their prostrate repose no more; and Captain Whalley, substantial and
+ dignified, left well-nigh alone in the vast hotel by each light-hearted
+ skurry, felt more and more like a stranded tourist with no aim in view,
+ like a forlorn traveler without a home. In the solitude of his room he
+ smoked thoughtfully, gazing at the two sea-chests which held all that he
+ could call his own in this world. A thick roll of charts in a sheath
+ of sailcloth leaned in a corner; the flat packing-case containing the
+ portrait in oils and the three carbon photographs had been pushed under
+ the bed. He was tired of discussing terms, of assisting at surveys, of
+ all the routine of the business. What to the other parties was merely
+ the sale of a ship was to him a momentous event involving a radically
+ new view of existence. He knew that after this ship there would be no
+ other; and the hopes of his youth, the exercise of his abilities, every
+ feeling and achievement of his manhood, had been indissolubly connected
+ with ships. He had served ships; he had owned ships; and even the years
+ of his actual retirement from the sea had been made bearable by the idea
+ that he had only to stretch out his hand full of money to get a ship. He
+ had been at liberty to feel as though he were the owner of all the
+ ships in the world. The selling of this one was weary work; but when
+ she passed from him at last, when he signed the last receipt, it was as
+ though all the ships had gone out of the world together, leaving him on
+ the shore of inaccessible oceans with seven hundred pounds in his hands.</p>
+
+ <p>Striding firmly, without haste, along the quay, Captain Whalley averted
+ his glances from the familiar roadstead. Two generations of seamen born
+ since his first day at sea stood between him and all these ships at the
+ anchorage. His own was sold, and he had been asking himself, What next?</p>
+
+ <p>From the feeling of loneliness, of inward emptiness,--and of loss
+ too, as if his very soul had been taken out of him forcibly,--there had
+ sprung at first a desire to start right off and join his daughter.
+ "Here are the last pence," he would say to her; "take them, my dear. And
+ here's your old father: you must take him too."</p>
+
+ <p>His soul recoiled, as if afraid of what lay hidden at the bottom of
+ this impulse. Give up! Never! When one is thoroughly weary all sorts of
+ nonsense come into one's head. A pretty gift it would have been for a
+ poor woman--this seven hundred pounds with the incumbrance of a hale old
+ fellow more than likely to last for years and years to come. Was he not
+ as fit to die in harness as any of the youngsters in charge of these
+ anchored ships out yonder? He was as solid now as ever he had been. But
+ as to who would give him work to do, that was another matter. Were he,
+ with his appearance and antecedents, to go about looking for a junior's
+ berth, people, he was afraid, would not take him seriously; or else if
+ he succeeded in impressing them, he would maybe obtain their pity, which
+ would be like stripping yourself naked to be kicked. He was not anxious
+ to give himself away for less than nothing. He had no use for anybody's
+ pity. On the other hand, a command--the only thing he could try for with
+ due regard for common decency--was not likely to be lying in wait
+ for him at the corner of the next street. Commands don't go a-begging
+ nowadays. Ever since he had come ashore to carry out the business of
+ the sale he had kept his ears open, but had heard no hint of one being
+ vacant in the port. And even if there had been one, his successful past
+ itself stood in his way. He had been his own employer too long. The only
+ credential he could produce was the testimony of his whole life. What
+ better recommendation could anyone require? But vaguely he felt that
+ the unique document would be looked upon as an archaic curiosity of the
+ Eastern waters, a screed traced in obsolete words--in a half-forgotten
+ language.</p>
+
+ <h3>Chapter IV</h3>
+
+ <p>Revolving these thoughts, he strolled on near the railings of the quay,
+ broad-chested, without a stoop, as though his big shoulders had never
+ felt the burden of the loads that must be carried between the cradle
+ and the grave. No single betraying fold or line of care disfigured the
+ reposeful modeling of his face. It was full and untanned; and the upper
+ part emerged, massively quiet, out of the downward flow of silvery hair,
+ with the striking delicacy of its clear complexion and the powerful
+ width of the forehead. The first cast of his glance fell on you candid
+ and swift, like a boy's; but because of the ragged snowy thatch of the
+ eyebrows the affability of his attention acquired the character of a
+ dark and searching scrutiny. With age he had put on flesh a little, had
+ increased his girth like an old tree presenting no symptoms of decay;
+ and even the opulent, lustrous ripple of white hairs upon his chest
+ seemed an attribute of unquenchable vitality and vigor.</p>
+
+ <p>Once rather proud of his great bodily strength, and even of his personal
+ appearance, conscious of his worth, and firm in his rectitude, there had
+ remained to him, like the heritage of departed prosperity, the tranquil
+ bearing of a man who had proved himself fit in every sort of way for the
+ life of his choice. He strode on squarely under the projecting brim of
+ an ancient Panama hat. It had a low crown, a crease through its whole
+ diameter, a narrow black ribbon. Imperishable and a little discolored,
+ this headgear made it easy to pick him out from afar on thronged wharves
+ and in the busy streets. He had never adopted the comparatively modern
+ fashion of pipeclayed cork helmets. He disliked the form; and he hoped
+ he could manage to keep a cool head to the end of his life without all
+ these contrivances for hygienic ventilation. His hair was cropped close,
+ his linen always of immaculate whiteness; a suit of thin gray flannel,
+ worn threadbare but scrupulously brushed, floated about his burly limbs,
+ adding to his bulk by the looseness of its cut. The years had mellowed
+ the good-humored, imperturbable audacity of his prime into a temper
+ carelessly serene; and the leisurely tapping of his iron-shod stick
+ accompanied his footfalls with a self-confident sound on the flagstones.
+ It was impossible to connect such a fine presence and this unruffled
+ aspect with the belittling troubles of poverty; the man's whole
+ existence appeared to pass before you, facile and large, in the freedom
+ of means as ample as the clothing of his body.</p>
+
+ <p>The irrational dread of having to break into his five hundred pounds for
+ personal expenses in the hotel disturbed the steady poise of his mind.
+ There was no time to lose. The bill was running up. He nourished the
+ hope that this five hundred would perhaps be the means, if everything
+ else failed, of obtaining some work which, keeping his body and soul
+ together (not a matter of great outlay), would enable him to be of use
+ to his daughter. To his mind it was her own money which he employed, as
+ it were, in backing her father and solely for her benefit. Once at work,
+ he would help her with the greater part of his earnings; he was good for
+ many years yet, and this boarding-house business, he argued to himself,
+ whatever the prospects, could not be much of a gold-mine from the first
+ start. But what work? He was ready to lay hold of anything in an honest
+ way so that it came quickly to his hand; because the five hundred pounds
+ must be preserved intact for eventual use. That was the great point.
+ With the entire five hundred one felt a substance at one's back; but
+ it seemed to him that should he let it dwindle to four-fifty or even
+ four-eighty, all the efficiency would be gone out of the money, as though
+ there were some magic power in the round figure. But what sort of work?</p>
+
+ <p>Confronted by that haunting question as by an uneasy ghost, for whom he
+ had no exorcising formula, Captain Whalley stopped short on the apex
+ of a small bridge spanning steeply the bed of a canalized creek with
+ granite shores. Moored between the square blocks a seagoing Malay prau
+ floated half hidden under the arch of masonry, with her spars lowered
+ down, without a sound of life on board, and covered from stem to stern
+ with a ridge of palm-leaf mats. He had left behind him the overheated
+ pavements bordered by the stone frontages that, like the sheer face of
+ cliffs, followed the sweep of the quays; and an unconfined spaciousness
+ of orderly and sylvan aspect opened before him its wide plots of rolled
+ grass, like pieces of green carpet smoothly pegged out, its long ranges
+ of trees lined up in colossal porticos of dark shafts roofed with a
+ vault of branches.</p>
+
+ <p>Some of these avenues ended at the sea. It was a terraced shore; and
+ beyond, upon the level expanse, profound and glistening like the gaze
+ of a dark-blue eye, an oblique band of stippled purple lengthened itself
+ indefinitely through the gap between a couple of verdant twin islets.
+ The masts and spars of a few ships far away, hull down in the outer
+ roads, sprang straight from the water in a fine maze of rosy lines
+ penciled on the clear shadow of the eastern board. Captain Whalley gave
+ them a long glance. The ship, once his own, was anchored out there. It
+ was staggering to think that it was open to him no longer to take a boat
+ at the jetty and get himself pulled off to her when the evening came. To
+ no ship. Perhaps never more. Before the sale was concluded, and till the
+ purchase-money had been paid, he had spent daily some time on board the
+ Fair Maid. The money had been paid this very morning, and now, all at
+ once, there was positively no ship that he could go on board of when he
+ liked; no ship that would need his presence in order to do her work--to
+ live. It seemed an incredible state of affairs, something too bizarre
+ to last. And the sea was full of craft of all sorts. There was that prau
+ lying so still swathed in her shroud of sewn palm-leaves--she too had
+ her indispensable man. They lived through each other, this Malay he had
+ never seen, and this high-sterned thing of no size that seemed to be
+ resting after a long journey. And of all the ships in sight, near and
+ far, each was provided with a man, the man without whom the finest ship
+ is a dead thing, a floating and purposeless log.</p>
+
+ <p>After his one glance at the roadstead he went on, since there was
+ nothing to turn back for, and the time must be got through somehow. The
+ avenues of big trees ran straight over the Esplanade, cutting each other
+ at diverse angles, columnar below and luxuriant above. The interlaced
+ boughs high up there seemed to slumber; not a leaf stirred overhead:
+ and the reedy cast-iron lampposts in the middle of the road, gilt like
+ scepters, diminished in a long perspective, with their globes of white
+ porcelain atop, resembling a barbarous decoration of ostriches' eggs
+ displayed in a row. The flaming sky kindled a tiny crimson spark upon
+ the glistening surface of each glassy shell.</p>
+
+ <p>With his chin sunk a little, his hands behind his back, and the end of
+ his stick marking the gravel with a faint wavering line at his heels,
+ Captain Whalley reflected that if a ship without a man was like a body
+ without a soul, a sailor without a ship was of not much more account
+ in this world than an aimless log adrift upon the sea. The log might be
+ sound enough by itself, tough of fiber, and hard to destroy--but what of
+ that! And a sudden sense of irremediable idleness weighted his feet like
+ a great fatigue.</p>
+
+ <p>A succession of open carriages came bowling along the newly opened
+ sea-road. You could see across the wide grass-plots the discs of
+ vibration made by the spokes. The bright domes of the parasols swayed
+ lightly outwards like full-blown blossoms on the rim of a vase; and
+ the quiet sheet of dark-blue water, crossed by a bar of purple, made a
+ background for the spinning wheels and the high action of the horses,
+ whilst the turbaned heads of the Indian servants elevated above the line
+ of the sea horizon glided rapidly on the paler blue of the sky. In an
+ open space near the little bridge each turn-out trotted smartly in a
+ wide curve away from the sunset; then pulling up sharp, entered the main
+ alley in a long slow-moving file with the great red stillness of the sky
+ at the back. The trunks of mighty trees stood all touched with red on
+ the same side, the air seemed aflame under the high foliage, the
+ very ground under the hoofs of the horses was red. The wheels turned
+ solemnly; one after another the sunshades drooped, folding their colors
+ like gorgeous flowers shutting their petals at the end of the day. In
+ the whole half-mile of human beings no voice uttered a distinct word,
+ only a faint thudding noise went on mingled with slight jingling sounds,
+ and the motionless heads and shoulders of men and women sitting in
+ couples emerged stolidly above the lowered hoods--as if wooden. But one
+ carriage and pair coming late did not join the line.</p>
+
+ <p>It fled along in a noiseless roll; but on entering the avenue one of the
+ dark bays snorted, arching his neck and shying against the steel-tipped
+ pole; a flake of foam fell from the bit upon the point of a satiny
+ shoulder, and the dusky face of the coachman leaned forward at once over
+ the hands taking a fresh grip of the reins. It was a long dark-green
+ landau, having a dignified and buoyant motion between the sharply
+ curved C-springs, and a sort of strictly official majesty in its supreme
+ elegance. It seemed more roomy than is usual, its horses seemed slightly
+ bigger, the appointments a shade more perfect, the servants perched
+ somewhat higher on the box. The dresses of three women--two young
+ and pretty, and one, handsome, large, of mature age--seemed to fill
+ completely the shallow body of the carriage. The fourth face was that
+ of a man, heavy lidded, distinguished and sallow, with a somber, thick,
+ iron-gray imperial and mustaches, which somehow had the air of solid
+ appendages. His Excellency--</p>
+
+ <p>The rapid motion of that one equipage made all the others appear utterly
+ inferior, blighted, and reduced to crawl painfully at a snail's pace.
+ The landau distanced the whole file in a sort of sustained rush; the
+ features of the occupant whirling out of sight left behind an impression
+ of fixed stares and impassive vacancy; and after it had vanished in full
+ flight as it were, notwithstanding the long line of vehicles hugging the
+ curb at a walk, the whole lofty vista of the avenue seemed to lie open
+ and emptied of life in the enlarged impression of an august solitude.</p>
+
+ <p>Captain Whalley had lifted his head to look, and his mind, disturbed in
+ its meditation, turned with wonder (as men's minds will do) to matters
+ of no importance. It struck him that it was to this port, where he had
+ just sold his last ship, that he had come with the very first he had
+ ever owned, and with his head full of a plan for opening a new trade
+ with a distant part of the Archipelago. The then governor had given
+ him no end of encouragement. No Excellency he--this Mr. Denham--this
+ governor with his jacket off; a man who tended night and day, so to
+ speak, the growing prosperity of the settlement with the self-forgetful
+ devotion of a nurse for a child she loves; a lone bachelor who lived as
+ in a camp with the few servants and his three dogs in what was called
+ then the Government Bungalow: a low-roofed structure on the half-cleared
+ slope of a hill, with a new flagstaff in front and a police orderly on
+ the veranda. He remembered toiling up that hill under a heavy sun for
+ his audience; the unfurnished aspect of the cool shaded room; the long
+ table covered at one end with piles of papers, and with two guns, a
+ brass telescope, a small bottle of oil with a feather stuck in the neck
+ at the other--and the flattering attention given to him by the man in
+ power. It was an undertaking full of risk he had come to expound, but a
+ twenty minutes' talk in the Government Bungalow on the hill had made it
+ go smoothly from the start. And as he was retiring Mr. Denham, already
+ seated before the papers, called out after him, "Next month the Dido
+ starts for a cruise that way, and I shall request her captain officially
+ to give you a look in and see how you get on." The Dido was one of the
+ smart frigates on the China station--and five-and-thirty years make a
+ big slice of time. Five-and-thirty years ago an enterprise like his had
+ for the colony enough importance to be looked after by a Queen's ship.
+ A big slice of time. Individuals were of some account then. Men like
+ himself; men, too, like poor Evans, for instance, with his red face,
+ his coal-black whiskers, and his restless eyes, who had set up the first
+ patent slip for repairing small ships, on the edge of the forest, in
+ a lonely bay three miles up the coast. Mr. Denham had encouraged that
+ enterprise too, and yet somehow poor Evans had ended by dying at
+ home deucedly hard up. His son, they said, was squeezing oil out of
+ cocoa-nuts for a living on some God-forsaken islet of the Indian Ocean;
+ but it was from that patent slip in a lonely wooded bay that had sprung
+ the workshops of the Consolidated Docks Company, with its three
+ graving basins carved out of solid rock, its wharves, its jetties,
+ its electric-light plant, its steam-power houses--with its gigantic
+ sheer-legs, fit to lift the heaviest weight ever carried afloat, and
+ whose head could be seen like the top of a queer white monument peeping
+ over bushy points of land and sandy promontories, as you approached the
+ New Harbor from the west.</p>
+
+ <p>There had been a time when men counted: there were not so many carriages
+ in the colony then, though Mr. Denham, he fancied, had a buggy. And
+ Captain Whalley seemed to be swept out of the great avenue by the swirl
+ of a mental backwash. He remembered muddy shores, a harbor without
+ quays, the one solitary wooden pier (but that was a public work) jutting
+ out crookedly, the first coal-sheds erected on Monkey Point, that caught
+ fire mysteriously and smoldered for days, so that amazed ships came
+ into a roadstead full of sulphurous smoke, and the sun hung blood-red
+ at midday. He remembered the things, the faces, and something more
+ besides--like the faint flavor of a cup quaffed to the bottom, like a
+ subtle sparkle of the air that was not to be found in the atmosphere of
+ to-day.</p>
+
+ <p>In this evocation, swift and full of detail like a flash of magnesium
+ light into the niches of a dark memorial hall, Captain Whalley
+ contemplated things once important, the efforts of small men, the growth
+ of a great place, but now robbed of all consequence by the greatness
+ of accomplished facts, by hopes greater still; and they gave him for a
+ moment such an almost physical grip upon time, such a comprehension of
+ our unchangeable feelings, that he stopped short, struck the ground with
+ his stick, and ejaculated mentally, "What the devil am I doing here!" He
+ seemed lost in a sort of surprise; but he heard his name called out in
+ wheezy tones once, twice--and turned on his heels slowly.</p>
+
+ <p>He beheld then, waddling towards him autocratically, a man of an
+ old-fashioned and gouty aspect, with hair as white as his own, but with
+ shaved, florid cheeks, wearing a necktie--almost a neckcloth--whose
+ stiff ends projected far beyond his chin; with round legs, round arms,
+ a round body, a round face--generally producing the effect of his short
+ figure having been distended by means of an air-pump as much as the
+ seams of his clothing would stand. This was the Master-Attendant of the
+ port. A master-attendant is a superior sort of harbor-master; a person,
+ out in the East, of some consequence in his sphere; a Government
+ official, a magistrate for the waters of the port, and possessed of vast
+ but ill-defined disciplinary authority over seamen of all classes.
+ This particular Master-Attendant was reported to consider it miserably
+ inadequate, on the ground that it did not include the power of life
+ and death. This was a jocular exaggeration. Captain Eliott was fairly
+ satisfied with his position, and nursed no inconsiderable sense of such
+ power as he had. His conceited and tyrannical disposition did not allow
+ him to let it dwindle in his hands for want of use. The uproarious,
+ choleric frankness of his comments on people's character and conduct
+ caused him to be feared at bottom; though in conversation many pretended
+ not to mind him in the least, others would only smile sourly at the
+ mention of his name, and there were even some who dared to pronounce him
+ "a meddlesome old ruffian." But for almost all of them one of Captain
+ Eliott's outbreaks was nearly as distasteful to face as a chance of
+ annihilation.</p>
+
+ <style>
+ body {
+ padding: 15px;
+ }
+
+ .pointer {
+ padding: 15px;
+ background-color: rgba(0, 0, 0, 0.4);
+ color: white;
+ border-radius: 10px;
+ pointer-events: none;
+ opacity: 0;
+
+ transition: opacity 300ms;
+ -webkit-transition: opacity 300ms;
+ }
+
+ .pointer.show {
+ opacity: 1;
+ }
+ </style>
+
+
+ <div class="pointer"></div>
+
+ <script src="../../tether.js"></script>
+ <script>
+ new Tether({
+ element: '.pointer',
+ attachment: 'middle right',
+ targetAttachment: 'middle left',
+ targetModifier: 'scroll-handle',
+ target: document.body
+ });
+
+ var headers = document.querySelectorAll('h1,h2,h3,h4,h5,h6');
+ var hideTimeout = null;
+ var pointer = document.querySelector('.pointer')
+
+ var getSection = function(){
+ var closest, closestTop;
+ for (var i=0; i < headers.length; i++){
+ var rect = headers[i].getBoundingClientRect();
+
+ if (closestTop === undefined || (rect.top < 0 && rect.top > closestTop)){
+ closestTop = rect.top;
+ closest = headers[i];
+ }
+ }
+ return closest.innerHTML;
+ }
+
+ document.addEventListener('scroll', function(){
+ var percentage = Math.floor((100 * Math.max(0, pageYOffset)) / (document.body.scrollHeight - innerHeight)) + '%'
+ pointer.innerHTML = getSection() + ' - ' + percentage
+
+ pointer.classList.add('show');
+
+ if (hideTimeout)
+ clearTimeout(hideTimeout);
+
+ hideTimeout = setTimeout(function(){
+ pointer.classList.remove('show');
+ }, 1000);
+ });
+ </script>
+ </body>
+</html>