fix asset imports
12
.gitignore
vendored
@ -1,3 +1,9 @@
|
||||
node_modules
|
||||
elm-stuff/
|
||||
result
|
||||
/elm-stuff/
|
||||
/review/elm-stuff
|
||||
|
||||
/dist/
|
||||
|
||||
/result*
|
||||
|
||||
/node_modules
|
||||
|
||||
|
@ -2,21 +2,21 @@
|
||||
|
||||
I remember his name for the first time and having ths probably intended "huh, that's odd" reaction a long time ago. If you look at the Wikipedia article for [Pringles](https://en.wikipedia.org/wiki/Pringles) and search for "Julius", it should be relatively easy to not only find his name, but also validate this claim through a citation linking to an [official document](https://s1.q4cdn.com/243145854/files/doc_financials/2021/ar/Kellogg-Company_AR_2022_Bookmarked.pdf) by Kellogg Company, the owners of the Pringles brand.
|
||||
|
||||

|
||||

|
||||
|
||||
This should be the end of the story, an odd name for an odd character, on a product oddly compared to potato chips, that's just good marketting. It is not hard to confirm this name comes directly from the Kellogg company. But there is one small question, where did it come from?
|
||||
|
||||

|
||||

|
||||
|
||||
A quick web search will show you [many](https://www.bakeryandsnacks.com/Article/2021/09/22/Julius-Pringles-gets-a-makeover-to-celebrate-brands-30th-birthday-in-the-UK) [many](https://www.buckinghamshirelive.com/whats-on/food-drink/pringles-mascot-julius-gets-new-5942616) [many](https://www.rd.com/article/pringles-man/) [many](https://retroist.com/what-is-the-name-of-the-pringles-mascot/) [many](https://consequence.net/2020/12/pringles-mascot-john-oliver/) [many](https://www.yahoo.com/video/real-true-history-julius-pringles-131830442.html) (though one may wonder why the last article is so skeptical of the name) more reasons to assure yourself this is *definitely* real. There was even a Jeopardy question (answer?) concreting his name!
|
||||
|
||||

|
||||

|
||||
|
||||
I know it might be more normal for me to write about my weird tech hacks, or at least something vaguely related to my area of expertise, but I found this just interesting enough and digging up weird things is *always* enticing to me.
|
||||
|
||||
I was browinsg a Bird Website™ briefly when I came across the weirdest claim I have perhaps ever seen in my life, it was what appeared at first to be some classic internet hyperbole, a claim along the lines of "The birds work for the bourgeoisie". This time, a user was claiming to be the author of Mr Pringles' first name, although entirely by accident, while trolling on Wikipedia. I almost dismissed it, but I at least wanted to deconfirm it first, so that in case this became a popular myth I could help dispel it. It appeared that this user had posted about this a few times, but why would I trust [their tweet](https://twitter.com/Platypus222/status/1219677784919986176) instead of [the official Pringles Twitter](https://twitter.com/Pringles/status/948316144372416513) helping bring us back to reality, and remind us that this claim is silly.
|
||||
|
||||

|
||||

|
||||
|
||||
Meet "Playpus Man" ([@Platypus222](https://twitter.com/Platypus222)), the person *apparently* responsible for this name (and ludicrous explanation). According to [this tweet](https://twitter.com/Platypus222/status/1506117845746429956) and subsequent replies, they moderated Wikipedia articles with a great reputation, and then abused their trust to inject various made-up "facts". They expanded on this to also credit [@therealwiseman](https://twitter.com/therealwiseman) as the "true" source of the name, both explaining that they worked together on this alleged hoax.
|
||||
|
||||
@ -24,11 +24,11 @@ Meet "Playpus Man" ([@Platypus222](https://twitter.com/Platypus222)), the person
|
||||
|
||||
That's a lot to hear, but it should be pretty easy to confirm or deny, Wikipedia has an edit history after all. So I picked up a "blame" tool and found the exact edit responsible for introducing the word "Julius" [here](https://en.wikipedia.org/w/index.php?title=Pringles&diff=prev&oldid=91948521) - it was authored by a user named "Platypus222" in 2006, well there we go, we've confirmed it! Well, not quite. The mysterious "Platypus Man" himself also said *"Some will claim that the company probably just used it before that but you'll never find proof of that."*, so despite his suspious uncited insertation, this *may* have been an existing name, and the addition of "you'll never find proof of that" sounds like a challenge to me.
|
||||
|
||||

|
||||

|
||||
|
||||
True, it appears *very difficult* to find any source of that name pre-dating that Wikipedia edit, but not impossible. Curiously, one of the few results I could find, was a [drawing from Danbooru](https://danbooru.donmai.us/posts/9727).
|
||||
|
||||

|
||||

|
||||
|
||||
The date on the left clearly shows this was uploaded in 2005, seemingly disproving this asinine story, albeit in one of the weirdest ways possible. Although, after asking the Platypus about this image, and looking into it more myself, it appears the `julius_pringles` tag appeared around 2021, and the upload date is questionable given the uploader joined the site in 2007.
|
||||
|
||||
|
17
elm-srcs.nix
@ -11,8 +11,8 @@
|
||||
};
|
||||
|
||||
"elm/core" = {
|
||||
sha256 = "1l0qdbczw91kzz8sx5d5zwz9x662bspy7p21dsr3f2rigxiix2as";
|
||||
version = "1.0.2";
|
||||
sha256 = "19w0iisdd66ywjayyga4kv2p1v9rxzqjaxhckp8ni6n8i0fb2dvf";
|
||||
version = "1.0.5";
|
||||
};
|
||||
|
||||
"elm/html" = {
|
||||
@ -35,9 +35,14 @@
|
||||
version = "1.0.0";
|
||||
};
|
||||
|
||||
"hmsk/elm-vite-plugin-helper" = {
|
||||
sha256 = "047j9qpq0pw8b9yc1xanr4x8j3s39fiza31ks21pg0r1djy7ypp4";
|
||||
version = "1.0.1";
|
||||
};
|
||||
|
||||
"mdgriffith/elm-ui" = {
|
||||
sha256 = "17iayf13r5fy38xlliaizi6af12jp1yw2vjxyhi6qf16xy579vn8";
|
||||
version = "1.1.5";
|
||||
sha256 = "0ffcqv4a4ad400hwp824m3qq4jy82cqp5ghmhp1m0q7n004z6kgv";
|
||||
version = "1.1.8";
|
||||
};
|
||||
|
||||
"elm/bytes" = {
|
||||
@ -66,8 +71,8 @@
|
||||
};
|
||||
|
||||
"elm/virtual-dom" = {
|
||||
sha256 = "0q1v5gi4g336bzz1lgwpn5b1639lrn63d8y6k6pimcyismp2i1yg";
|
||||
version = "1.0.2";
|
||||
sha256 = "1yvb8px2z62xd578ag2q0r5hd1vkz9y7dfkx05355iiy1d7jwq4v";
|
||||
version = "1.0.3";
|
||||
};
|
||||
|
||||
"rtfeldman/elm-hex" = {
|
||||
|
7
elm.json
@ -8,12 +8,13 @@
|
||||
"direct": {
|
||||
"dillonkearns/elm-markdown": "7.0.1",
|
||||
"elm/browser": "1.0.2",
|
||||
"elm/core": "1.0.2",
|
||||
"elm/core": "1.0.5",
|
||||
"elm/html": "1.0.0",
|
||||
"elm/http": "2.0.0",
|
||||
"elm/regex": "1.0.0",
|
||||
"elm/url": "1.0.0",
|
||||
"mdgriffith/elm-ui": "1.1.5"
|
||||
"hmsk/elm-vite-plugin-helper": "1.0.1",
|
||||
"mdgriffith/elm-ui": "1.1.8"
|
||||
},
|
||||
"indirect": {
|
||||
"elm/bytes": "1.0.8",
|
||||
@ -21,7 +22,7 @@
|
||||
"elm/json": "1.1.3",
|
||||
"elm/parser": "1.1.0",
|
||||
"elm/time": "1.0.0",
|
||||
"elm/virtual-dom": "1.0.2",
|
||||
"elm/virtual-dom": "1.0.3",
|
||||
"rtfeldman/elm-hex": "1.0.0"
|
||||
}
|
||||
},
|
||||
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 309 KiB After Width: | Height: | Size: 309 KiB |
Before Width: | Height: | Size: 393 KiB After Width: | Height: | Size: 393 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 138 KiB |
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
BIN
registry.dat
@ -7,7 +7,7 @@ import Element.Font as Font
|
||||
import Element.Input as Input
|
||||
import Html
|
||||
import Html.Attributes
|
||||
import Markdown.Block as Block exposing (Block, Inline, ListItem(..), Task(..))
|
||||
import Markdown.Block as Block exposing (ListItem(..), Task(..))
|
||||
import Markdown.Html
|
||||
import Markdown.Parser
|
||||
import Markdown.Renderer
|
||||
@ -113,12 +113,12 @@ renderer =
|
||||
, tableBody = column []
|
||||
, tableRow = row [ height fill, width fill ]
|
||||
, tableHeaderCell =
|
||||
\maybeAlignment children ->
|
||||
\_ children ->
|
||||
paragraph
|
||||
tableBorder
|
||||
children
|
||||
, tableCell =
|
||||
\maybeAlignment children ->
|
||||
\_ children ->
|
||||
paragraph
|
||||
tableBorder
|
||||
children
|
||||
|
80
src/Main.elm
@ -2,16 +2,16 @@ module Main exposing (main)
|
||||
|
||||
import Browser
|
||||
import Browser.Navigation as Nav
|
||||
import Dict exposing (Dict)
|
||||
import Dict
|
||||
import Element exposing (..)
|
||||
import Element.Background as Background
|
||||
import Element.Font as Font
|
||||
import Http
|
||||
import List
|
||||
import MParser exposing (ezmd)
|
||||
import SiteComponents exposing (..)
|
||||
import Url
|
||||
import Url.Parser exposing ((</>), Parser)
|
||||
import VitePluginHelper exposing (asset)
|
||||
|
||||
|
||||
|
||||
@ -60,27 +60,13 @@ type Route
|
||||
type alias Model =
|
||||
{ key : Nav.Key
|
||||
, route : Route
|
||||
, sources : Dict String String
|
||||
}
|
||||
|
||||
|
||||
fetchPage pageName =
|
||||
Http.get
|
||||
{ url = "/data/pages/" ++ pageName ++ ".md"
|
||||
, expect = Http.expectString (GotSrc pageName)
|
||||
}
|
||||
|
||||
|
||||
init : () -> Url.Url -> Nav.Key -> ( Model, Cmd Msg )
|
||||
init _ url key =
|
||||
( { key = key, route = routeFromUrl url, sources = Dict.empty }
|
||||
, Cmd.batch
|
||||
[ fetchPage "home"
|
||||
, fetchPage "about"
|
||||
, fetchPage "posts/julius-pringles"
|
||||
, fetchPage "posts/viveahk"
|
||||
, fetchPage "posts/librebasics"
|
||||
]
|
||||
( { key = key, route = routeFromUrl url }
|
||||
, Cmd.none
|
||||
)
|
||||
|
||||
|
||||
@ -88,6 +74,7 @@ init _ url key =
|
||||
-- UPDATE
|
||||
|
||||
|
||||
nameFromRoute : Route -> String
|
||||
nameFromRoute route =
|
||||
case route of
|
||||
Home ->
|
||||
@ -109,7 +96,6 @@ nameFromRoute route =
|
||||
type Msg
|
||||
= LinkClicked Browser.UrlRequest
|
||||
| UrlChanged Url.Url
|
||||
| GotSrc String (Result Http.Error String)
|
||||
|
||||
|
||||
update : Msg -> Model -> ( Model, Cmd Msg )
|
||||
@ -126,16 +112,6 @@ update msg model =
|
||||
UrlChanged url ->
|
||||
( { model | route = routeFromUrl url }, Cmd.none )
|
||||
|
||||
GotSrc pageName result ->
|
||||
case result of
|
||||
Ok src ->
|
||||
( { model | sources = Dict.insert pageName src model.sources }
|
||||
, Cmd.none
|
||||
)
|
||||
|
||||
Err err ->
|
||||
( model, Cmd.none )
|
||||
|
||||
|
||||
|
||||
-- SUBSCRIPTIONS
|
||||
@ -167,15 +143,17 @@ view model =
|
||||
}
|
||||
|
||||
|
||||
navbarHeader : Element Msg
|
||||
navbarHeader =
|
||||
link
|
||||
[ centerX
|
||||
, centerY
|
||||
, Font.size 35
|
||||
]
|
||||
{ url = "/", label = image [ width fill ] { src = "/data/images/icon.png", description = "gen2 space" } }
|
||||
{ url = "/", label = image [ width fill ] { src = asset "/data/images/icon.png", description = "gen2 space" } }
|
||||
|
||||
|
||||
navbarLinks : Element Msg
|
||||
navbarLinks =
|
||||
List.map
|
||||
(\pageLink ->
|
||||
@ -195,6 +173,7 @@ navbarLinks =
|
||||
]
|
||||
|
||||
|
||||
navbar : Element Msg
|
||||
navbar =
|
||||
column
|
||||
[ width fill
|
||||
@ -205,6 +184,7 @@ navbar =
|
||||
[ navbarHeader, navbarLinks ]
|
||||
|
||||
|
||||
page : Model -> Element Msg
|
||||
page model =
|
||||
column
|
||||
[ width fill
|
||||
@ -216,6 +196,7 @@ page model =
|
||||
]
|
||||
|
||||
|
||||
posts : Dict.Dict String { subtext : String }
|
||||
posts =
|
||||
Dict.fromList
|
||||
[ ( "julius-pringles", { subtext = "Hey, where did that name come from anyway?" } )
|
||||
@ -224,29 +205,49 @@ posts =
|
||||
]
|
||||
|
||||
|
||||
postPreview : ( String, { subtext : String } ) -> Element Msg
|
||||
postPreview ( name, data ) =
|
||||
textColumn [ width fill, spacing 15 ] [ link [] { url = "/posts/" ++ name, label = basicNiceHeader 2 ("Post: " ++ name) }, paragraph [] [ text data.subtext ] ]
|
||||
|
||||
|
||||
postsText : List (Element Msg)
|
||||
postsText =
|
||||
[ List.map postPreview (Dict.toList posts)
|
||||
|> textColumn [ width fill, spacing 50 ]
|
||||
]
|
||||
|
||||
|
||||
notFoundLines : List (Element Msg)
|
||||
notFoundLines =
|
||||
[ text "this page doesn't exist, sorry" ]
|
||||
|
||||
|
||||
postText model name =
|
||||
case Dict.get name posts of
|
||||
postText : String -> List (Element Msg)
|
||||
postText name =
|
||||
let
|
||||
a =
|
||||
case name of
|
||||
"julius-pringles" ->
|
||||
Just (asset "../data/pages/posts/julius-pringles.md?raw")
|
||||
|
||||
"viveahk" ->
|
||||
Just (asset "../data/pages/posts/viveahk.md?raw")
|
||||
|
||||
"librebasics" ->
|
||||
Just (asset "../data/pages/posts/librebasics.md?raw")
|
||||
|
||||
_ ->
|
||||
Nothing
|
||||
in
|
||||
case a of
|
||||
Just x ->
|
||||
[ basicNiceHeader 1 name, ezmd x ]
|
||||
|
||||
Nothing ->
|
||||
notFoundLines
|
||||
|
||||
Just data ->
|
||||
basicNiceHeader 1 name :: [ ezmd (Maybe.withDefault "" (Dict.get ("posts/" ++ name) model.sources)) ]
|
||||
|
||||
|
||||
body : Model -> Element Msg
|
||||
body model =
|
||||
el
|
||||
[ Background.color basedBackground
|
||||
@ -262,12 +263,15 @@ body model =
|
||||
postsText
|
||||
|
||||
Post name ->
|
||||
postText model name
|
||||
postText name
|
||||
|
||||
NotFound ->
|
||||
notFoundLines
|
||||
|
||||
_ ->
|
||||
[ ezmd (Maybe.withDefault "" (Dict.get (nameFromRoute model.route) model.sources)) ]
|
||||
Home ->
|
||||
[ ezmd (asset "../data/pages/home.md?raw") ]
|
||||
|
||||
About ->
|
||||
[ ezmd (asset "../data/pages/about.md?raw") ]
|
||||
)
|
||||
)
|
||||
|