Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Displaying Code Snippets

Featured Replies

Can anyone tell me what the best way to achieve what this site does please?

 

http://bootsnipp.com/snippets/featured/profile-card

 

They show a bootstrap code snippet on their site which is interactive or an option to view the source HTML / CSS via a click of a button.

 

Is there a plugin or similar to achieve this on WP? If not, what would be the best way to achieve the same results by manually coding it?

 

Thanks guys!

I'd say the easiest and most reliable method is to embed an iframe in your page that links to the hosted code on GitHub. You can use JavaScript to toggle between the tabs, each tab contains a different iframe linking to that snippet.

There are many other ways of doing this, but this is the most straightforward seen as we should now be hosting our version-controlled code on a repository like Github these days.

  • Author

Good idea! I think a code playground would work as well like Codepen or JSFiddle? Cheers Rob!

  • 3 weeks later...

I was going to say that you can embed a Codepen which is essentially the same thing. Doesn't have version control but would be a lot less work ;)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.