<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Html on dev.endevour</title><link>https://devendevour.iankulin.com/tags/html/</link><description>Recent content in Html on dev.endevour</description><generator>Hugo</generator><language>en-AU</language><lastBuildDate>Fri, 05 Jan 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://devendevour.iankulin.com/tags/html/index.xml" rel="self" type="application/rss+xml"/><item><title>htmx - A To Do Example</title><link>https://devendevour.iankulin.com/htmx-a-to-do-example/</link><pubDate>Fri, 05 Jan 2024 00:00:00 +0000</pubDate><guid>https://devendevour.iankulin.com/htmx-a-to-do-example/</guid><description>&lt;p&gt;&lt;img src="https://devendevour.iankulin.com/images/0-eawgkaegdkhvqwcg.png" alt="" class="img-responsive"&gt; &lt;/p&gt;
&lt;p&gt;HTMX is an interesting project to me, and I&amp;rsquo;ve used it a bit in my large collection of 70% completed side projects, but haven&amp;rsquo;t really discussed it here. The plan for this post is to talk briefly about what it is exactly, then convert a simple &amp;lsquo;conventional&amp;rsquo; (HTML/CSS/Javascript) app to htmx and think about some the differences.&lt;/p&gt;
&lt;h3 id="htmx"&gt;htmx&lt;/h3&gt; &lt;p&gt;You could (I recommend you do) read the &lt;a href="https://hypermedia.systems/book/contents/" target="_blank" rel="noopener"&gt;book&lt;/a&gt; about the concepts behind &lt;a href="https://htmx.org/" target="_blank" rel="noopener"&gt;htmx&lt;/a&gt; . Carson Gross (the man behind htmx) calls it a book, but its quite the treatise, it could fairly be called a manifesto.&lt;/p&gt;</description></item><item><title>React code is not HTML</title><link>https://devendevour.iankulin.com/react-code-is-not-html/</link><pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate><guid>https://devendevour.iankulin.com/react-code-is-not-html/</guid><description>&lt;p&gt;&lt;img src="https://devendevour.iankulin.com/images/pucker_the_react_atom_logo_fighting_with_some_html_4b0d18eb-b17f-471f-a42c-a99e160b1231-copy.jpg" alt="The React atom logo fighting with some HTML - midjourney, edited" class="img-responsive"&gt; &lt;/p&gt;
&lt;p&gt;I was looking at this ugly code in a React app:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;&amp;lt;div style={{overflow: &amp;#39;scroll&amp;#39;, border: &amp;#39;1px solid black&amp;#39;, height: &amp;#39;600px&amp;#39; }}&amp;gt;
 { props.children }
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Since I don&amp;rsquo;t need any of those CSS properties to change at any stage, I could just convert it to pure HTML/CSS right? Well no:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devendevour.iankulin.com/images/screen-shot-2023-01-09-at-4.26.54-pm.png" alt="" class="img-responsive"&gt; &lt;/p&gt;
&lt;p&gt;The newbie trap I&amp;rsquo;ve fallen for here is that although that &lt;code&gt;&amp;lt;div style= tag&lt;/code&gt; looks like HTML, it&amp;rsquo;s actually not. It&amp;rsquo;s not a template that will be filled out in the build step, it&amp;rsquo;s React code that will be used to mutate the virtual DOM.&lt;/p&gt;</description></item><item><title>Calculator</title><link>https://devendevour.iankulin.com/calculator-2/</link><pubDate>Mon, 16 Jan 2023 00:00:00 +0000</pubDate><guid>https://devendevour.iankulin.com/calculator-2/</guid><description>&lt;p&gt;I&amp;rsquo;ve been doing a bit of driving during the holidays, which means a lot of podcast listening. An episode of &lt;a href="https://topenddevs.com/podcasts/javascript-jabber/episodes/splatty-doo-and-other-javascript-features-you-should-avoid-jsj-543" target="_blank" rel="noopener"&gt;JavaScript Jabber about JS features you should never use&lt;/a&gt; sparked my interest in &lt;code&gt;[eval()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval)&lt;/code&gt;. &lt;code&gt;eval()&lt;/code&gt; takes whatever you pass it in a string and executes it in the JS engine. This is a crazy concept if you&amp;rsquo;ve come from complied languages, and has obvious security implications. As with dynamic typing, I&amp;rsquo;m trying to force myself out of my comfort zone to embrace JS&amp;rsquo;s unique talents so I was keen to try &lt;code&gt;eval()&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>HTML 001</title><link>https://devendevour.iankulin.com/html-001/</link><pubDate>Fri, 16 Dec 2022 00:00:00 +0000</pubDate><guid>https://devendevour.iankulin.com/html-001/</guid><description>&lt;p&gt;A HTML file is a text file that can be displayed in a web browser. It is &lt;em&gt;marked up&lt;/em&gt; in the sense that &lt;em&gt;tags&lt;/em&gt; are applied to the text to signify the purpose of that text in the structure of the document. For example:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Greetings&amp;lt;/h1&amp;gt;
Hello Earthlings
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; tag tells the browser that &lt;code&gt;Greetings&lt;/code&gt; is a heading. The heading tag is &lt;em&gt;paired&lt;/em&gt;. There&amp;rsquo;s an opening tag &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; and closing tag &lt;code&gt;&amp;lt;/h1&amp;gt;&lt;/code&gt; that let the browser know where the heading starts and ends. Most tags are paired, but there are some &lt;em&gt;unpaired&lt;/em&gt; tags such as &lt;br&gt; which inserts a line break.&lt;/p&gt;</description></item><item><title>Who is Emmet?</title><link>https://devendevour.iankulin.com/who-is-emmet/</link><pubDate>Wed, 14 Dec 2022 00:00:00 +0000</pubDate><guid>https://devendevour.iankulin.com/who-is-emmet/</guid><description>&lt;p&gt;&lt;a href="https://www.piqsels.com/en/public-domain-photo-ircsa" target="_blank" rel="noopener"&gt;&lt;img src="https://devendevour.iankulin.com/images/css-hacks.jpg" alt="" class="img-responsive"&gt; &lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I knew there was some magical way of entering all the the &lt;HTML&gt; boilerplate in Visual Studio Code as I&amp;rsquo;d seen it happen in several videos, and assumed is was some sort of macro expansion thing in the editor. Fast forward a few blog post readings and youtube viewings and I keep seeing tangential references to someone called Emmet. Turns out they&amp;rsquo;re the same thing, and it&amp;rsquo;s pretty cool.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s not a new idea to have functionality in code editors to insert snippets of code. &lt;a href="https://docs.emmet.io/" target="_blank" rel="noopener"&gt;Emmet&lt;/a&gt; goes a bit further than that - and like many tools made by programmers for programmers it goes way to technical to the point where you need to memorise ridiculous amounts of combos to to some awesome stuff (I&amp;rsquo;m looking at you whoever made it possible to use vi commands in VS Code). Nevertheless, Emmet is extremely handy even at my n00b level.&lt;/p&gt;</description></item><item><title>Wordpress Code Blocks</title><link>https://devendevour.iankulin.com/wordpress-code-blocks/</link><pubDate>Wed, 21 Sep 2022 00:00:00 +0000</pubDate><guid>https://devendevour.iankulin.com/wordpress-code-blocks/</guid><description>&lt;p&gt;Non-iOS post warning :- )&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m not really happy with the way I&amp;rsquo;m sharing code in these posts. I started off with the regular Wordpress code blocks:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt; func isPossible(word: String) -&amp;gt; Bool {
 var tempWord = rootWord
 for letter in word {
 if let pos = tempWord.firstIndex(of: letter) {
 tempWord.remove(at: pos)
 } else {
 return false
 }
 }
 return true
 }
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;These seem a bit large to me, but it comes with a font size choice, which I like setting to &amp;ldquo;Tiny&amp;rdquo;:&lt;/p&gt;</description></item><item><title>CSS Intro</title><link>https://devendevour.iankulin.com/css-intro/</link><pubDate>Thu, 18 Aug 2022 00:00:00 +0000</pubDate><guid>https://devendevour.iankulin.com/css-intro/</guid><description>&lt;p&gt;When I wrote my last commercial HTML (in 1996 lol) I&amp;rsquo;m pretty sure there was no CSS. It was the land of textured backgrounds, blinking scrolling text, &amp;ldquo;under construction&amp;rdquo; gifs, and links to &lt;a href="https://en.wikipedia.org/wiki/Gopher_%5c%28protocol%5c%29" target="_blank" rel="noopener"&gt;gopher&lt;/a&gt; URLs were not uncommon. So this is an area I need to update my skills a little just to carry on a coherent conversation in the developer world.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve bumped into a couple of &lt;a href="https://www.techwithtim.net/" target="_blank" rel="noopener"&gt;Tech With Tim&lt;/a&gt; &lt;a href="https://www.youtube.com/c/TechWithTim/videos" target="_blank" rel="noopener"&gt;videos&lt;/a&gt; recently, and I really liked his CSS intro for &amp;ldquo;Non-web developers&amp;rdquo;.&lt;/p&gt;</description></item></channel></rss>