<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: moji ///</title>
    <description>The latest articles on Forem by moji /// (@mojitane).</description>
    <link>https://forem.com/mojitane</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F159678%2Fcbd7f23f-d782-4f48-bebc-04d60ad7b7a6.png</url>
      <title>Forem: moji ///</title>
      <link>https://forem.com/mojitane</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mojitane"/>
    <language>en</language>
    <item>
      <title>Webmentions and the blogging void – part 1</title>
      <dc:creator>moji ///</dc:creator>
      <pubDate>Mon, 09 Jan 2023 00:31:42 +0000</pubDate>
      <link>https://forem.com/mojitane/webmentions-and-the-blogging-void-part-1-1cfe</link>
      <guid>https://forem.com/mojitane/webmentions-and-the-blogging-void-part-1-1cfe</guid>
      <description>&lt;p&gt;Being social on your own platform or self-hosted blog is difficult. Comment systems are often underused and not where the real discussions happen – and for guestbooks to come back it might need a few more years. Webmentions can bridge the gap between your personal island and the outside world.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are Webmentions?
&lt;/h2&gt;

&lt;p&gt;Webmentions (&lt;a href="https://webmention.io/" rel="noopener noreferrer"&gt;webmention.io&lt;/a&gt;) are a way to bring social activity and interactivity to your site without having it on your platform itself or needing to have complex systems in place.&lt;br&gt;&lt;br&gt;
Harness the &lt;span&gt;activity, audience, and functionality from existing platforms&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;Using webmention.io, all reported mentions of your content on networks like Twitter or other sites will be collected for your usage. This will:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Verify the linking&lt;/li&gt;
&lt;li&gt;Parse Microformats&lt;/li&gt;
&lt;li&gt;Interpret them as likes, reply, etc.
Then all that's left is you retrieving them to display.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you think this sounds like good ol' pingbacks that is not by chance. Webmentions are basically a replacement and improvement on that idea and can work in tandem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdevdbre5k7i40l8xnul5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdevdbre5k7i40l8xnul5.png" alt="Screenshot of webmention.io login screen" width="800" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To enable collection, all that's needed is adding a few tags to the head of every page it should be active at, and you are done.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"webmention"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://webmention.io/username/webmention"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"pingback"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://webmention.io/username/xmlrpc"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For some CMS like WordPress, there are even plugins available doing that part.&lt;/p&gt;

&lt;h2&gt;
  
  
  Signing in
&lt;/h2&gt;

&lt;p&gt;Next and the last step for setting everything up for receiving mentions is logging in. This can be a little bit confusing at first.&lt;br&gt;
At &lt;a href="https://webmention.io/" rel="noopener noreferrer"&gt;webmention.io&lt;/a&gt; enter your site url.&lt;/p&gt;

&lt;p&gt;Next, you have around a &lt;a href="https://indielogin.com/setup" rel="noopener noreferrer"&gt;half dozen of different ways&lt;/a&gt; to confirm that you are indeed the owner of that website.&lt;br&gt;
I found authenticating by Twitter and GitHub to be easiest.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fch9o35ssj3e3l8qtjc81.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fch9o35ssj3e3l8qtjc81.png" alt="Screenshot of webmention.io auth links" width="800" height="538"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The steps are basically:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Adding a &lt;code&gt;rel="me"&lt;/code&gt; to a tag linking to your respective profile &lt;/li&gt;
&lt;li&gt;And also mentioning your site's name on that profile.
If everything works fine, you have now the option to use this as an authentication provider. And – &lt;span&gt;we are in&lt;/span&gt; 🥸.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now the world is your oyster to use this data for yourself or to display on the relevant sites.&lt;/p&gt;

&lt;h2&gt;
  
  
  The crawler
&lt;/h2&gt;

&lt;p&gt;Being ready for webmentions doesn't mean much when no one is sending them. While some platforms or plugins might do this automatically, there is also &lt;a href="https://brid.gy/" rel="noopener noreferrer"&gt;brid.gy&lt;/a&gt; to help.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsnxj915jnensp7szojpq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsnxj915jnensp7szojpq.png" alt="Screenshot of brid.gy crawler waiting to search twitter again" width="507" height="90"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Bridgy periodically checks social networks for responses to your posts and links to your web site and sends them back to your site as webmentions. Bridgy also translates the responses to microformats so that your web site can fetch and parse them.&lt;/p&gt;

&lt;p&gt;Bridgy can also publish posts, comments, likes, and retweets from your web site to social networks. When you ask Bridgy to publish a post, it analyzes its microformats data and publishes it using the social network APIs.&lt;/p&gt;

&lt;p&gt;Connect your Twitter, Instagram or a number of other account types once and brid.gy will crawl them for free regularly for new mentions like replies or likes and send them your way.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Connect your Twitter, Instagram or a number of other account types once and brid.gy will &lt;span&gt;crawl them for free regularly&lt;/span&gt; for new mentions like replies or likes and send them your way.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is missing?
&lt;/h2&gt;

&lt;p&gt;While webmentions are an incredible easy way to include activity from other platforms and make your own site feel more fun and alive. What it can't do is foster your own community.&lt;br&gt;&lt;br&gt;
So, if growing a personal following that will outlive any social network is a goal, then webmentions could be a part of that, but not the solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;span&gt;Implementing webmentions&lt;/span&gt;
&lt;/h2&gt;

&lt;p&gt;Webmentions can be seen in action wonderfully on &lt;a href="https://nerdy.dev/gradients-going-the-shorter-longer-increasing-or-decreasing-route#comments" rel="noopener noreferrer"&gt;Adam Argyle's nerdy.dev&lt;/a&gt;. Which was also the inspiration for including them on my own.  &lt;/p&gt;

&lt;p&gt;💡🔧 Tune in next week on how to include and display Webmentions on &lt;a href="https://www.moji.blog" rel="noopener noreferrer"&gt;moji.blog&lt;/a&gt; in this 2 part series.&lt;/p&gt;

</description>
      <category>powerplatform</category>
      <category>security</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Removing complexity with container size queries</title>
      <dc:creator>moji ///</dc:creator>
      <pubDate>Mon, 09 Jan 2023 00:21:01 +0000</pubDate>
      <link>https://forem.com/mojitane/removing-complexity-with-container-size-queries-4bkg</link>
      <guid>https://forem.com/mojitane/removing-complexity-with-container-size-queries-4bkg</guid>
      <description>&lt;p&gt;📦 Container Size Queries in CSS are exceptionally helpful when building dashboards. Especially when they are user configurable. Imagine a scenario where the same component can be placed multiple times, displaying different information and having different column-span settings. Or just being used in the sidebar as well as in the main content area depending on the page.&lt;/p&gt;

&lt;p&gt;Here we use the same component in two different places with different column-span. They show us information in different formats:&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://stackblitz.com/edit/typescript-8ew4k7?embed=1&amp;amp;file=style.css&amp;amp;hideExplorer=1&amp;amp;hideNavigation=1&amp;amp;view=preview" width="100%" height="500"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Try it out by opening it in a new tab and resizing. It is the exact same component. Of course as a simplified version of a real component in a project.&lt;/p&gt;

&lt;p&gt;Up until now, with media queries, we could not have solved this easily. Our styling would apply to all instances of the component on the page equally and could not handle sizing dependent on placement. This would require complex classes that get set or removed and would trigger mobile styling earlier on larger uses..&lt;/p&gt;

&lt;p&gt;✅ Lets use a container query and also define the container type. Figuring out where to set a container type like &lt;code&gt;container-type: inline-size&lt;/code&gt; can be a challenge when creating the component.&lt;br&gt;&lt;br&gt;
Be careful, as you can not put a container query on the same element you apply the container type to.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.item&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;6px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--shadow-elevation-medium&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;container-type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-size&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@container&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;400px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;.shipping__line&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;flex-wrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;wrap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;#f1cffc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;6px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Extending this a little bit more we can easily build our multi-use dashboard components – and not worry about device size &amp;amp; adding and removing complex extra classes.&lt;/p&gt;

&lt;p&gt;There is also the possiblity to use &lt;strong&gt;style queries&lt;/strong&gt; in addition, to offer even more flexiblity to the user without much effort. &lt;a href="https://ishadeed.com/article/css-container-style-queries/" rel="noopener noreferrer"&gt;Ahmad Shadeed&lt;/a&gt; has written a fantastic article on that with quite a lot of use cases and examples.&lt;/p&gt;

&lt;p&gt;Have you used container queries already or are planning to?&lt;br&gt;
You can find me on &lt;a href="https://twitter.com/mojitane/status/1612155035311570945" rel="noopener noreferrer"&gt;twitter here&lt;/a&gt; or on my &lt;a href="https://www.moji.blog/" rel="noopener noreferrer"&gt;blog here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>softwaredevelopment</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
