• Luke MitchellLuke Mitchell, 6 years ago (edited 6 years ago )

    This is really interesting. It's randomly generated on page load. Does anyone know how this is done? I'm guessing serve-side as there JS or any signs of anything funky going on.

    It's really refreshing to see a personal site that takes a risk for once, not your standard 'rectangles on white, with blog' recipe.

    2 points
    • Neil Pullman, 6 years ago (edited 6 years ago )

      There's a small bit of javascript that does this client-side. It loops through the links, randomly places the element by it's left/top position, and tries to make it not overlap with any of the other links. It also randomly draws the background gradient each time from a set of colors.

      If you view the page source and search for "script" you can see the code for this. And if you search for "Math.random" it might help visualize how generative this is.

      Edit: the script tag wasn't showing up. Just "script" will work, too.

      1 point