Power Armour Through the Ages

Let me tell you, discovering that your site isn’t running is just a GREAT way to start the day. Turns out MySQL fell over for some reason. I’ll need to keep an eye on that…

Anyway here’s yet another blank 40k template, this time for all 8 Marks of classic Astartes Power Armour.

Trump declares himself “Wrath of God”

Exclusive image of ex-President Trump departing Washington for Florida

Ex-President Trump departed Washington on a raft for Florida this morning, skipping the inauguration of his successor Joe Biden.

Aides close to the President state that during the trip down the Potomac he declared himself “The Wrath of God” and announced his intention to marry his daughter, found “the purest dynasty the world has ever seen” and rule the entire north American continent.

He then proceeded to interrogate several squirrel monkeys, demanding to know which of them were “with him”.

Tech Support

Hello there! This post intended for a specific individual that I’m helping with their website. If you’re not that specific individual then it won’t be much use to you – here’s a link where you can go and see some cute goats.

Now, assuming you’re the person I’ve written this for, you should open up the link I sent you to the test page. The first step is to make sure the menus do what you want them to do on mobile. If they do, carry on to find out how I did it. If they don’t, message me and tell me where I went wrong!

Using jQuery to make Javascript stuff Easier

Assuming I’m remembering correctly the issue was getting control of the dropdown menus on mobile devices where there’s no cursor to hover with. The easiest solution for this is to use some Javascript, and the easiest way to use Javascript is with jQuery.

jQuery is an API, a collection of prewritten code that removes most of the heavy lifting for common tasks. With an API you can tell the webpage WHAT to do without having to explain every single step of HOW to do it.

If you view the source of the test page and look at line 17 you’ll see the include line for jQuery….

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

I’ve used the version hosted by Google, but you can easily just save the file – jquery.min.js – and host it locally if you prefer. In either case including the file in the page like this is all you need to make jQuery available.

Changes I’ve made to the Page Code

As I mentioned the other day, a hazard of getting a web developer to look at your code is that they just can’t stop themselves from messing with stuff other than that you asked them to. As such I’ve made a number of changes to the code of the test page, and will detail them here so you can tell what is important to getting the dropdowns working and what isn’t.

  • I rearranged the header section to put the <title> and <description> tags right at the top. Search Engine Optimisation is a hodgepodge of rumour and voodoo, but at least some of the legends claim that putting this info at the top of the header gives a slight boost to rankings.
  • Any <tag> that doesn’t have an ending </tag> should ideally get a slash put at the end of it, for instance…
        <meta charset="utf-8"/>
<img src="blah.png" alt="blah blah" />
<br/>

I’ve done this to the meta tags, image tags and <br/> tags through the page.

  • It’s not mandatory but <style> and <script> tags can include a “type” attribute telling the browser exactly what’s inside them. Browsers these days are smart enough to figure this out for themselves, but telling them might save a few milliseconds of rendering time. The types to fill in are…
        <style type="text/css">
<script type="text/javascript">
  • For some reason the way I uploaded the test page has added a chunk of Javascript code into the top-container div at lines 24 to 26. Please pretend this isn’t there 😀
  • Indenting your code takes up more space, but makes it much easier to read. Basically when you open a new element, such as a <div> you jump to a new line and add a tab, then when you close the element you jump to a new line and go back a tab. For instance instead of…
  <div>
  <div class="some-class">
  <img src="/headerlogo.png" width="900px" alt="Logo"/>
  </div>
  </div>

you arrange the code like this…

  <div>
       <div class="some-class">
            <img src="/headerlogo.png" width="900px" alt="Logo"/>
       </div>
  </div>
  • The character entity &copy; is displayed more reliably across browsers, fonts and languages than a the literal © character
  • I took the liberty of moving the script block before the </body> tag, because it was bothering me 🙂
  • You can put as much Javascript as you like inside a single script block rather than opening and closing new ones for each bit of code.

The Actual Javascript

OK, on to the actual Javascript that makes everything work. I rewrote the functions you already had on the page to use jQuery for consistancy’s sake. Because all the code seems to have run together in the test file I’ll copy it all here and run through what it does and how it does it.

  $(window).scroll(function() { myFunctionSticky() });
  $(window).click(function() { $(".dropdown-content").hide(); });
  $('#menu').click(function(event){ event.stopPropagation(); });

These three lines add some behaviors to objects on the page. The first line is the jQuery equivalent of the code you already had telling the page to run the “myFunctionSticky” function whenever the page scrolls. It grabs the ‘window’ object (which is effectively the webpage), attaches the ‘scroll’ trigger to it and then runs ‘myfunctionSticky()’ when the trigger fires.

The second line also grabs the ‘window’ (which is to say page) object, and adds a ‘click’ trigger, which will fire whenever anything on the page is clicked. This then calls the code

$(“.dropdown-content”).hide();

which tells jQuery to find all items on the page with the class “dropdown-content” and hide them by making them invisible. This means that clicking anything anywhere on the page will close all open dropdown menus.

The third line is a bit complicated, but you don’t need to know too much about it. It grabs the div with the id menu object and isolates it from the click trigger defined on the line before. This means that clicking the menu object (and anything inside it) will NOT close the dropdown menus. If we didn’t do this then clicking to open a dropdown menu would immediately close all the dropdown menus and they’d never appear at all.

  var stickyheader = $("#menubar");
  var stickyoffset = stickyheader.offset();

  function myFunctionSticky() {
    if ($(window).scrollTop() > stickyoffset.top) {
      stickyheader.addClass("sticky");
    } else {
      stickyheader.removeClass("sticky");
    }
  }

This block of code is the jQuery version of the stickyheader code you already had. The only really differences are that

document.getElementById(“menubar”)

is replaced with the shorter jQuery version

$(“#menubar”)

and the “sticky” class is added and removed with addClass and removeClass

  // When the user clicks on the button, 
  // toggle between hiding and showing the dropdown content 
  function myFunction(the_button) {
    var the_dropdown = $(the_button).closest('div').find(".dropdown-content");
    $(the_dropdown).toggle();
  }

This final bit of code is the jQuery version of the function that turns the menus on and off when clicked. The major change is the definition of “the_button” in between the round brackets of the function definition. If you have a look back up at the buttons in the menu you’ll see that the onclick definitions now read…

"myFunction(this)"

“this” is a javascript codeword that represents the current element. So when the button is clicked, “this” becomes a reference to the button, which is then passed to the function, and the function assigns it to “the_button”.

If that’s confusing, basically it means that in the function, ‘the_button’ refers to the button that was clicked to trigger it.

The first line of the function (starting with var the_dropdown) uses jQuery to find the appropriate dropdown-content object. “Closest” gets the button’s parent div, and “find” gets anything with the class “dropdown_content” within that div.

Once we have the dropdown, we use the built in jQuery toggle() command to turn it on or off.

Conclusion

So, that’s everything! Let me know if any of this makes sense, and if you have any problems getting it working.

With Apologies to Leon Payne…

Can you fry me up some slab, Mamma?
‘Cause I’m as hungry as can be
Life in this hive is just so drab, Mamma
You know that everyone hates me

Like the Gangers with their hair, Mamma
Down by the manufactory arch
There was some lightning from the air, Mamma
And now they’re turning them to starch

Think I’m a Psyker, don’t you Mamma?
The warp into my mind it drips
Think I’m a Psyker, don’t you Mamma?
They’re gonna take me to the ships

You won’t believe the things I’ve seen, Mamma
When I lay me down to rest
I’ve been having crazy dreams, Mamma
About this lady named ‘Slaanesh’

She has all these wild plans, Mamma
And they all seem really great
But I just don’t understand, Mama
Why she keeps calling me ‘The Gate’?

Think I’m a Psyker, don’t you Mamma?
You think I’m gonna lose control
Think I’m a Psyker, don’t you Mamma?
They’ll put those bindings on my soul

You know the Temple by the shore, Mamma?
Well I was feeling kind of lost
So I walked in through the door, Mamma
But everything got rimed with frost

An Ecclesiarchy Clerk, Mamma
Offered me the Emperor’s Grace
Well I kind of went berserk, Mamma
And somehow melted off his face

Think I’m a Psyker, don’t you Mamma?
Please Mamma hide me here at home
Think I’m a Psyker, don’t you Mamma?
Don’t let them feed me to the Throne

Think I’m a Psyker, don’t you Mamma?
The Inquisition’s drawing near
Think I’m a Psyker, don’t you Mamma?
But Mamma…
Didn’t you die last year?

(And some versions of the original, in case you’re not familiar…)

Wasp

The shape of the Australian continent and its position on the globe means that Perth summers are plagued by hot winds from the east.

A high pressure system halts its drift eastwards over the shallow waters of the vast bight that cuts into the continent’s southern edge. Its anti-clockwise winds sweep out across the Tasman Sea, swing north, then west, crossing the Queensland coast laden down with heat and moisture from the tropical waters of the Coral Sea.

Continuing west they encounter the ancient line of the Great Dividing Range, whose complex ridges and plateaus wring out the moisture like a fist squeezing a sponge. The warm, dry air rolls down the far side of the range into the vast plains of the interior. As the wind continues westwards the land becomes dryer and drier until it transitions into the red-dirt deserts of the continent’s dead heart.

The wind races across the Tanami desert of the Northern Territory and crosses the Western Australian border into the Gibson, soaking up heat from the burning land and blazing sun. It starts to swing southwards, passing out of the deserts and across the Wheatbelt, rattling the kernels on their stalks, and ascending the gentle rear slope of the Darling Escarpment before finally cresting the ridge and falling upon the city, bringing all the heat of the central deserts with it.

As long at the high pressure system remains in the bight the easterly wind grows stronger, hotter and more northerly until the city – buffeted by scorching gales – bakes in temperatures in excess of 40 centigrade. But eventually the pressure behind the high grows too great and it grinds back into motion, resuming its eastwards course. The winds shift dead north, fading away to nothing, then return from the south, cooler but laden down with moisture from the Southern Ocean, and the city perspires until the humidity fades, a new high moves into the bight, and the cycle begins again.

My primary school (elementary school for Americans and other aliens) stood on top of a hill with the parish church at one end of the block, separated from the years one to three classrooms by a narrow gap, leading to the grotty old toilet block and the long grassy slope down to the school oval. A concrete pathway hugged the school side of this gap, the rest was theoretically grassed, but the baking summer sun and the regular passage of hundreds of juvenile feet meant that it was usually a morass of hard baked sand and stone shards. The gap was oriented south east and when the summer easterlies got going it formed a perfect wind tunnel, scouring the bitumen assembly yard at the school’s front with gale force furnace blasts, laden with grit from the exposed ground.

So it happened that one baking summer day my best friend Gerald (stress on the second syllable please) and I were perched on the low wall surrounding the church, just in front of the gap. We were about nine years old and the easterly was howling through, pelting us with sand – but sitting in the wind felt slightly cooler than sitting in the still, baked air of the verandah or lunch area. We were discussing whatever it was that nine year old boys discussed in the mid 1980s when I felt a sudden, intense, stinging pain in my left foot.

Looking down I beheld a tiny wasp – no more than five millimeters long, pinned by the wind against one of the leather straps of my school uniform mandated sandal. As it struggled to free itself it raised its abdomen and plunged its stinger into my foot for a second time.

I swatted it away and – not being a particularly robust child – immediately burst into tears, crying and wailing at both the pain in my foot and the brutality of the universe in general.

Gerald helped me limp across the assembly yard to the school office where we expected to find Mrs Marsh – the school secretary – who could always be relied on for a sympathetic ear no matter how ridiculous our problems. Instead we found Mrs Billington the school principal, who on being informed of my dilemma immediately lowered herself somewhat in my opinion by asking if I’d got the sting out, despite my clearly stating that I had been stung by a wasp.

Entomological ignorance aside I was soon furnished with a cold drink, some anti-inflamatory cream and a bandaid and was allowed to lie down in the sick room for a while, which is really all a healthy nine year old requires when stung by a microscopic insect.

So that is the story of the only time I have ever been stung by a wasp.

The Sons of Pavlach

This post is part of the Skereig Subsector project

NAME: Sons of Pavlach
CHAPTER MASTER: Matteus Vyev
HOMEWORLD: Freo Prime, Insignus Cluster, Skerieg Subsector, Chiros Sector, Segmentum Tempestus
FORTRESS MONASTERY: The Anchor
RECRUITING WORLDS: Freo Prime, Saversnake III
PROGENITOR CHAPTER: Unknown. Raven Guard Presumed.
FOUNDING: Unknown. Earliest Known Reference 300.M36
GENESEED DEFECTS: Defective Melanchromic Organ and Betcher’s Gland. Missing Mucranoid.
CODEX COMPLIANCE: High Compliance
BATTLE CRY: Spectant Tenebris – “Look to the Darkness”
TACTICAL SPECIALTIES: Stealth, Infiltration
STRENGTH: Estimated at 847 Battle Brothers as of 985.M41

The Sons of Pavlach Astartes Chapter is based on the ocean world of Freo Prime in the Skerieg Subsector of the Chiros Sector of the Segmentum Tempestus. Established since at least 300.M36 the Chapter’s Fortress Monastery is constructed within the planet’s highest mountain – the Anchor – which is located near the centre of the world’s only continent.

Aspirants are recruited from the fishing people of the planet’s main archipelago, and expeditions are made approximately every 20 years to the feral world of Saversnake III to supervise the ‘Games of Ayefel’ – a tournament held to select the strongest and most athletic youths for induction into the Chapter.

Similarly to their presumed progenitors in the Raven Guard, the defective Melanchromic Organs of the Sons of Pavlach result in pale white skin and coal black hair and eyes. Unlike the Raven Guard however they possess semi-functional Betcher’s glands capable of generating a dilute form of the acidic venom produced by other marines. They completely lack the Mucranoid system.

Non-Astartes personal interacting with the Sons of Pavlach have reported unusually high levels of unease – occasionally approaching outright panic – in their presence, beyond that typically categorised as “transhuman dread”. It is theorised that this is the result of a low-level or subconscious psyker ability inherent in the Chapter’s geneseed. The Subsector authorities prefer to communicate with the Chapter via vox and viewscreen over which this effect does not manifest – a preference that does not appear to concern the Chapter in the slightest.

The current Chapter Master is Matteus Vyev, a native of Freo Prime who was promoted from Captain of the Second Company in 878.M41 after the death of Chapter Master Kristoss Mann and First Company Captain Lang during the Purge of Adderstone.


In case you were wondering, the Sons of Pavlach – originally the Freo Marines – began as a joke based around creating Space Marine chapters out of AFL teams. But then I decided to incorporate them into my Skerieg Subsector project and had to clean them up some. They are now slightly less ridiculous, although it is sadly unavoidable that any AFL fan would recognise their origin immediately.

Anthemic

Well, we made it. The horror year of 2020 is behind us, and we can now look forward to fresh, new horrors in this year of our lord 2021 (I suspect they will involve bees).

I broke my usual habit of going to bed early to express my contempt for a calendar that assigns the turn of the year to a completely arbitrary point, and stayed up ’til midnight – partially to make sure that 2020 actually ended, and partially because they were playing a repeat of the latest Red Dwarf special which I missed when it was on the other week. It was actually not bad, not as good as the original series of course, but a lot better than their last effort. Watching this one was fun, whereas Back to Earth was just painful.

Hang on, there’ve been three entire series between Back to Earth and The Promised Land?! And I was not informed!?

Anyway, not here to talk about that. Here to talk about the national anthem.

It was announced today that the line of Advance Australia Fair reading “For we are young and free” is being changed to “For we are one and free”. Doing something about this line has been on the left wing agenda (an agenda that – lest anyone get the wrong idea – I am fully in favour of) for the last few years, after it was pointed out that our nation is home to the oldest living culture on Earth, and hence any description of our country as ‘young’ is appallingly exclusionary to indigenous Australians. The replacement of ‘young’ with ‘one’ was suggested – or at least bought to the attention of the mainstream – by Gladys Berejiklian last year, and here we suddenly are.

(The fact that the change was publicised by an embattled Liberal – which is to say conservative, Australian politics can be very confusing – state Premier probably has a lot to do with Scumo’s mob of reactionary neocons actually doing something for Indigenous Australians. Can you imagine them changing the national anthem at the behest of Dan Andrews?)

My feelings on this change are mildly mixed. I fully support changing the word, but I’m not super keen on the way the new line scans. That said however I have for many years been firmly of the opinion that Advance Australia Fair is a terrible song anyway, so screwing up a single line is a small price to pay to address – no matter how minutely – some historical injustices.

So, why is Advance Australia Fair such an awful song? Well, to start with the tune is a goddamn dirge. Get a military band with trumpets and things to play it and it can sound somewhat regal, but it hardly lends itself to spontaneous outbreaks of national pride. As a song for the common citizen to whip out at, say, a sporting event, it’s a complete non-starter. It’s slow, it’s dull, and attempting to speed it up to give it a bit of kick just makes it sound like the theme to The Beverly Hillbillies.

Then we come to the lyrics. They were written in 1878 by Peter Dodds McCormick who wrote under the pen name “Amicus”, which probably tells you 90% of what you need to know about him. The original words as written by this faithful son of the Empire are notable for being composed in the second-rate faux-classical mode so beloved by Victorians with literary pretensions, and are very, very, very pro-British, pro-Empire and anti-anyone or anything else…

Australia’s sons, let us rejoice,
For we are young and free;
We’ve golden soil and wealth for toil,
Our home is girt by sea;
Our land abounds in nature’s gifts
Of beauty rich and rare;
In history’s page, let every stage
Advance Australia fair.
In joyful strains let us sing,
Advance, Australia fair.

When gallant Cook from Albion sail’d,
To trace wide oceans o’er,
True British courage bore him on,
Til he landed on our shore.
Then here he raised Old England’s flag,
The standard of the brave;
“With all her faults we love her still”
“Britannia rules the wave.”
In joyful strains then let us sing,
Advance, Australia fair.

While other nations of the globe
Behold us from afar,
We’ll rise to high renown and shine
Like our glorious southern star;
From England soil and Fatherland,
Scotia and Erin fair,
Let all combine with heart and hand
To advance Australia fair.
In joyful strains then let us sing
Advance, Australia fair.

Should foreign foe e’er sight our coast,
Or dare a foot to land,
We’ll rouse to arms like sires of yore,
To guard our native strand;
Britannia then shall surely know,
Though oceans roll between,
Her sons in fair Australia’s land
Still keep their courage green.
In joyful strains then let us sing
Advance Australia fair.

Out of four verses, three of them are all about how great Britain is, which is kind of weird for a song that claims to be about Australia. It’s riddled with pretentious ’tils and o’ers and e’ers and even with those it can’t manage to properly fit the words to the tune. There are half rhymes, far too many uses of “fair” – including an instance of rhyming “fair” with “fair” – and the inclusion of the word “girt”, which – while a fine word of noble pedigree – in a song sounds like the vocalist swallowed their tongue halfway through the line. The words are repetitive, lugubrious, and let’s not even get started on the overwrought syntax of the phrase “Advance Australia Fair” itself.

In 1901 the third verse was replaced with the following…

Beneath our radiant Southern Cross,
We’ll toil with hearts and hands;
To make our youthful Commonwealth,
Renowned of all the lands;
For loyal sons beyond the seas
We’ve boundless plains to share;
With courage let us all combine
To advance Australia fair.
In joyful strains then let us sing
Advance Australia fair!

Now this contains the one decent line in the entire song – Beneath our radiant Southern Cross. This line is so good in fact that it could lead one to presume that McCormick had nothing to do with the new verse, but he soon regains his stride by invoking “loyal sons” and jamming 15 syllables into 14 notes forcing the singer to break rhythm and gabble out “combine-to” in a desperate attempt to keep pace.

The song replaced God Save the Queen as our official national anthem in 1984 with the following revised set of two verses…

Australians all let us rejoice,
For we are young and free;
We’ve golden soil and wealth for toil;
Our home is girt by sea;
Our land abounds in nature’s gifts
Of beauty rich and rare;
In history’s page, let every stage
Advance Australia Fair.
In joyful strains then let us sing,
Advance Australia Fair.

Beneath our radiant Southern Cross
We’ll toil with hearts and hands;
To make this Commonwealth of ours
Renowned of all the lands;
For those who’ve come across the seas
We’ve boundless plains to share;
With courage let us all combine
To Advance Australia Fair.
In joyful strains then let us sing,
Advance Australia Fair.

Which, with the change from “young” to “one” in the second line, is the version sung today. McCormick’s “Australia’s sons” has been replaced with “Australians all” which is a bit awkward but fully justified (providing a precedent for trading scansion for inclusivity) and the pro-Empire “loyal sons beyond the seas” has been cleaned up. They still left “girt” in their though.

So, this is the anthem we are stuck with. Personally I’d prefer to salvage the line about the Southern Cross, throw the rest in the bin and then come up with some suitable versus fitted to the jaunty march bit of the Space Battleship Yamato theme, but that’s probably just me.

Happy new year!

Close Bitnami banner
Bitnami