Tag Archives: examples

Thumbnail

Contributing To MDN Web Docs




Contributing To MDN Web Docs

Rachel Andrew



MDN Web Docs has been documenting the web platform for over twelve years and is now a cross-platform effort with contributions and an Advisory Board with members from Google, Microsoft and Samsung as well as those representing Firefox. Something that is fundamental to MDN is that it is a huge community effort, with the web community helping to create and maintain the documentation. In this article, I’m going to give you some pointers as to the places where you can help contribute to MDN and exactly how to do so.

If you haven’t contributed to an open source project before, MDN is a brilliant place to start. Skills needed range from copyediting, translating from English to other languages, HTML and CSS skills for creating Interactive Examples, or an interest in browser compatibility for updating Browser Compatibility data. What you don’t need to do is to write a whole lot of code to contribute. It’s very straightforward, and an excellent way to give back to the community if you have ever found these docs useful.

Contributing To The Documentation Pages

The first place you might want to contribute is to the MDN docs themselves. MDN is a wiki, so you can log in and start to help by correcting or adding to any of the documentation for CSS, HTML, JavaScript or any of the other parts of the web platform covered by MDN.

To start editing, you need to log in using GitHub. As is usual with a wiki, any editors of a page are listed, and this section will use your GitHub username. If you look at any of the pages on MDN contributors are listed at the bottom of the page, the below image shows the current contributors to the page on CSS Grid Layout.


A list showing names of people who contributed to this page


The contributors to the CSS Grid Layout page. (Large preview)

What Might You Edit?

Things that you might consider as an editor are fixing obvious typos and grammatical errors. If you are a good proofreader and copyeditor, then you may well be able to improve the readability of the docs by fixing any spelling or other errors that you spot.

You might also spot a technical error, or somewhere the specs have changed and where an update or clarification would be useful. With the huge range of web platform features covered by MDN and the rate of change, it is very easy for things to get out of date, if you spot something – fix it!

You may be able to use some specific knowledge you have to add additional information. For example, Eric Bailey has been adding Accessibility Concerns sections to many pages. This is a brilliant effort to highlight the things we should be thinking about when using a certain thing.


A screenshot of the Accessibility Concerns section


This section highlights the things we should be aware of when using background-color. (Large preview)

Another place you could add to a page is in adding “See also” links. These could be links to other parts of MDN, or to external resources. When adding external resources, these should be highly relevant to the property, element or technique being described by that document. A good candidate would be a tutorial which demonstrates how to use that feature, something which would give a reader searching for information a valuable next step.

How To Edit A Document?

Once you are logged in you will see a link to Edit on pages in MDN, clicking this will take you into a WYSIWYG editor for editing content. Your first few edits are likely to be small changes, in which case you should be able to follow your nose and edit the text. If you are making extensive edits, then it would be worth taking a look at the style guide first. There is also a guide to using the WYSIWYG Editor.

After making your edit, you can Preview and then Publish. Before publishing it is a good idea to explain what you added and why using the Revision Comment field.


Screenshot of this field in the edit form


Add a comment using the Revision Comment field. (Large preview)

Language Translations

Those of us with English as a first language are incredibly fortunate when it comes to information on the web, being able to get pretty much all of the information that we could ever want in our own language. If you are able to translate English language pages into other languages, then you can help to translate MDN Web Docs, making all of this information available to more people.


A screenshot showing the drop-down translations list


Translations available for the background-color page. (Large preview)

If you click on the language icon on any page, you can see which languages that information has been translated into, and you can add your own translations following the information on the page Translating MDN Pages.

Interactive Examples

The Interactive Examples on MDN, are the examples that you will see at the top of many pages of MDN, such as this one for the grid-area property.


Screenshot of an Interactive Example


The Interactive Example for the grid-area property. (Large preview)

These examples allow visitors to MDN to try out various values for CSS properties or try out a JavaScript function, right there on MDN without needing to head into a development environment to do so. The project to add these examples has been in progress for around a year, you can read about the project and progress to date in the post Bringing Interactive Examples to MDN.

The content for these Interactive Examples is held in the Interactive Examples GitHub repository. For example, if you wanted to locate the example for grid-area, you would find it in that repo under live-examples/css-examples/grid. Under that folder, you will find two files for grid-area, an HTML and a CSS file.

grid-area.html


<section id="example-choice-list" class="example-choice-list large" data-property="grid-area">
    <div class="example-choice" initial-choice="true">
        <pre><code class="language-css">grid-area: a;</code></pre>
        <button type="button" class="copy hidden" aria-hidden="true">
        <span class="visually-hidden">Copy to Clipboard</span>
        </button>
    </div>
    
    <div class="example-choice">
        <pre><code class="language-css">grid-area: b;</code></pre>
        <button type="button" class="copy hidden" aria-hidden="true">
        <span class="visually-hidden">Copy to Clipboard</span>
        </button>
    </div>
    
    <div class="example-choice">
        <pre><code class="language-css">grid-area: c;</code></pre>
        <button type="button" class="copy hidden" aria-hidden="true">
        <span class="visually-hidden">Copy to Clipboard</span>
        </button>
    </div> 
    
    <div class="example-choice">
        <pre><code class="language-css">grid-area: 2 / 1 / 2 / 4;</code></pre>
        <button type="button" class="copy hidden" aria-hidden="true">
        <span class="visually-hidden">Copy to Clipboard</span>
        </button>
    </div> 
</section>
    
<div id="output" class="output large hidden">
    <section id="default-example" class="default-example">
        <div class="example-container">
            <div id="example-element" class="transition-all">Example</div>
        </div>
    </section>
</div>

grid.area.css


.example-container 
    background-color: #eee;
    border: .75em solid;
    padding: .75em;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: repeat(3, minmax(40px, auto));
    grid-template-areas: 
    "a a a"
    "b c c"
    "b c c";
    grid-gap: 10px;
    width: 200px;
    
    
    .example-container > div 
    background-color: rgba(0, 0, 255, 0.2);
    border: 3px solid blue;
    
    
    example-element 
    background-color: rgba(255, 0, 200, 0.2);
    border: 3px solid rebeccapurple;
    

An Interactive Example is just a small demo, which uses some standard classes and IDs in order that the framework can pick up the example and make it interactive, where the values can be changed by a visitor to the page who wants to quickly see how it works. To add or edit an Interactive Example, first fork the Interactive Examples repo, clone it to your machine and follow the instructions on the Contributing page to install the required packages from npm and be able to build and test examples locally.

Then create a branch and edit or create your new example. Once you are happy with it, send a Pull Request to the Interactive Examples repo to ask for your example to be reviewed. In order to keep the examples consistent, reviews are fairly nitpicky but should point out the changes you need to make in a clear way, so you can update your example and have it approved, merged and added to an MDN page.


Screenshot of a tweet asking for help with HTML examples


MDN looking for help with HTML Interactive Examples. (Large preview)

With pretty much all of CSS now covered (in addition to the JavaScript examples), MDN is now looking for help to build the HTML examples. There are instructions as to how to get started in a post on the MDN Discourse Forum. Check out that post as it gives links to a Google doc that you can use to indicate that you are working on a particular example, as well as some other useful information.

The Interactive Examples are incredibly useful for people exploring the web platform, so adding to the project is an excellent way to contribute. Contributing to CSS or HTML examples requires knowledge of CSS and HTML, plus the ability to think up a clear demonstration. This last point is often the hardest part, I’ve created a lot of CSS Interactive Examples and spent more time thinking up the best example for each property than I do actually writing the code.

Browser Compat Data

Fairly recently the browser compatibility data listed on MDN Pages has begun to be updated through the Browser Compatibility Project. This project is developing browser compat data in JSON format, which can display the compatibility tables on MDN but also be useful data for other purposes.


An example screenshot of the old tables on MDN


The Old Browser Compat Tables on MDN. (Large preview)


An example screenshot of the new tables on MDN


The New Browser Compat Tables on MDN. (Large preview)

The Browser Compatibility Data is on GitHub, and if you find a page that has incorrect information or is still using the old tables, you can submit a Pull Request. The repository contains contribution information, however, the simplest way to start is to edit an existing example. I recently updated the information for the CSS shape-outside property. The property already had some data in the new format, but it was incomplete and incorrect.

To edit this data, I first forked the Browser Compat Data so that I had my own fork. I then cloned that to my machine and created a new branch to make my changes in.

Once I had my new branch, I found the JSON file for shape-outside and was able to make my edits. I already had a good idea about browser support for the property; I also used the live example on the shape-outside MDN page to test to see support when I wasn’t sure. Therefore making the edits was a case of working through the file, checking the version numbers listed for support of the property and updating those which were incorrect.

As the file is in JSON format is pretty straightforward to edit in any text editor. The .editorconfig file explains the simple formatting rules for these documents. There are also some helpful tips in this checklist.

Once you have made your edits, you can commit your changes, push your branch to your fork and then make a Pull Request to the Browser Compat Data repository. It’s likely that, as with the live examples, the reviewer will have some changes for you to make. In my PR for the Shapes data I had a few errors in how I had flagged the data and needed to make some changes to links. These were simple to make, and then my PR was merged.

Get Started

You can get started simply by picking something to add to and starting work on it in many cases. If you have any questions or need some help with any of this, then the MDN Discourse forum is a good place to post. MDN is the place I go to look up information, the place I send new developers and experienced developers alike, and its strength is the fact that we can all work to make it better.

If you have never made a Pull Request on a project before, it is a very friendly place to make that first PR and, as I hope I have shown, there are ways to contribute that don’t require writing any code at all. A very valuable skill for any documentation project is that of writing, editing and translating as these skills can help to make technical documentation easier to read and accessible to more people around the world.

Smashing Editorial
(il)


Read this article:

Contributing To MDN Web Docs

Product Marketing Lessons Learned: An Interview with Shopify’s Hana Abaza [Video]

Hana Abaza runs the marketing show over at Shopify Plus, the enterprise arm of e-commerce software giant Shopify. In the interview, we unpack some of the ways they’re increasing product awareness and adoption of a new product – including the genesis of the idea for Shopify Plus, and some product marketing lessons learned.

We also talk about MacGyvering, crazy startup ideas, and a ton of resources you can use for your own product marketing efforts.

Watch My Interview with Hana Abaza on Product Marketing Lessons Learned

Show Notes

Here are all the resources we talked about:

  1. 09:03 Jobs to be Done (JTBD) Framework | Framework
  2. 15:45 Product adoption tips
    Some of Hana’s presentation slides.
  3. 18:00 Partner Marketing
    How Shopify leveraged their partners to create content to influence organic search for a new product.
  4. 20:08 Marketing a product with no pricing on your website
    Is it harder or easier to market an enterprise product when you only have a demo request?
  5. 24:10 Who does product marketing well?
  6. 25:15 First Round Capital Interview with Joanna Lord
  7. 27:14 Intercom Product Marketing
  8. 30:13 MacGyvering
  9. 31:10 Who would Hana take to a deserted island?
    The Unpublished David Ogilvy.
  10. 33:50 Hana’s favourite dad joke
    What do you call cheese that isn’t yours? Nacho Cheese!

Cheers
Oli Gardner

Get back here on Monday where I’ll be showing you how to use Sticky Bars to craft really cool mobile user experiences.

See the original post: 

Product Marketing Lessons Learned: An Interview with Shopify’s Hana Abaza [Video]

The Exact Formula For Growing Your Personal Brand on Instagram (With Examples)

Social media now has over 2 billion users worldwide. That’s nearly 35% of the population of the whole planet! And if your business has a target audience who respond well to visuals (think cooking, travel, or fitness) then Instagram is a platform that you cannot overlook. Instagram is becoming somewhat of a hidden gem for businesses. Despite its wild popularity, only 30% of businesses that use social media have an Instagram account. Which, if you think about it, is absolutely crazy. Even though you cannot include links in Instagram posts, Instagram is still an incredibly effective way to grow your…

The post The Exact Formula For Growing Your Personal Brand on Instagram (With Examples) appeared first on The Daily Egg.

See original – 

The Exact Formula For Growing Your Personal Brand on Instagram (With Examples)

Beautiful Examples of Kinetic Photography

When you hear the word ‘kinetic’ for the first time, probably the first thing that comes to your mind is motion. Kinetic Photography, also known as ‘camera tossing’, is a technique of shooting photos with the actual physical movement of the camera. However, it does not necessarily involve tossing of the camera — you can also shake, bounce, swing or spin it; the goal of the technique is to obtain unpredictable results which are sometimes fascinating, always abstract and rarely boring.

View the original here: 

Beautiful Examples of Kinetic Photography

40 Beautiful Examples Of Hand Drawn Typography

Beautiful and creative typography can come in a variety of different forms. Hand drawn typography can be an excellent source of inspiration for graphic designers and typography lovers. In this post we will feature 40 creations that use hand drawn type. Some have been created completely by hand. Others have been sketched and scanned into Photoshop or Illustrator. Another option is to use fonts that create a hand drawn effect.

Read the article:  

40 Beautiful Examples Of Hand Drawn Typography

35 Beautiful Spring Pics For Your Inspiration

Inspiration is all around us: you can derive new ideas from people you meet, places you visit and observations you make. Sometimes it is enough just to take a look around and observe the beauty of nature surrounding us everywhere. For instance, spring is often considered the most beautiful and inspirational period of the year, with its refreshing, colorful, vivid imagery and structures. And this post hopes to prove just that.

Link: 

35 Beautiful Spring Pics For Your Inspiration

70 New, Useful AJAX And JavaScript Techniques

As the Web grows and becomes more dynamic, more and more websites have user-generated content and tools that greatly improve the user experience in terms of usability and accessibility.
Interactive solutions for lightboxes, form validation, navigation, upload, auto-complete, image cropping, slideshows, tool tips, sliders and tables are being developed that use nifty JavaScript and AJAX scripts.
When using these, developers have to carefully consider many subtle techniques to help users get things done.

View original article – 

70 New, Useful AJAX And JavaScript Techniques

The World From Above: The Beauty Of Aerial Photography

Aerial photography offers a drastically different perspective than the one you get from shooting on the ground. It includes photographs taken from aircraft, helicopters, balloons, rockets, kites, skydives, etc. It can be a rewarding, challenging and enriching experience. It can produce unique shots that look different than any other ground shot you have ever taken. Scenic flights can give you some great, memorable photos. Below, we present over 50 amazing aerial photographs — photos shot “from above”, in the air.

Follow this link – 

The World From Above: The Beauty Of Aerial Photography

50 Beautiful Examples Of Tilt-Shift Photography

Tilt-shift photography is a creative and unique type of photography in which the camera is manipulated so that a life-sized location or subject looks like a miniature-scale model. Below we present 50 beautiful examples of tilt-shift photography. All examples are linked to their sources. We strongly encourage you to explore other works of the photographers we’ve featured in this post.
To add good miniature effect to your photographs, shoot subjects from a high angle (especially from the air).

Link:  

50 Beautiful Examples Of Tilt-Shift Photography

Thumbnail

Celebration Of High-Speed Photography

A digital camera, some fast-moving subject, and a bit of knowledge about how to take the best pictures of moving subjects will launch you on the road to some of the most interesting photographs you’ve ever taken. Although some blurring can be effective in communicating a sense of high-speed motion, some photographers want the subject to be frozen in time to get some pretty special photographic effects.
You may want to take a look at related articles:

Read this article: 

Celebration Of High-Speed Photography