{"id":301,"date":"2016-02-06T16:30:48","date_gmt":"2016-02-06T21:30:48","guid":{"rendered":"https:\/\/jacob.steenhagen.us\/blog\/?p=301"},"modified":"2016-02-11T14:10:50","modified_gmt":"2016-02-11T19:10:50","slug":"simple-responsive-design-for-aruba-captive-portal","status":"publish","type":"post","link":"https:\/\/jacob.steenhagen.us\/blog\/2016\/02\/simple-responsive-design-for-aruba-captive-portal\/","title":{"rendered":"Simple Responsive Design for Aruba Captive Portal"},"content":{"rendered":"<p>At work, we have an Aruba wireless system. This system has the ability to have multiple SSID&#8217;s available. One of those SSID&#8217;s is for guest access. We require that every guest has a username and password to access our wi-fi system. This requires a captive portal. Aruba supports these captive portals quite nicely, but their authentication pages leave a lot to be desired. I recently spent some time searching Google for some sample templates that work well on cell phones, tablets and computers. While I did find some information it was mostly vague information (yes, it&#8217;s possible) or based on using other web design templates and uploading the necessary files.<\/p>\n<p>This isn&#8217;t what I wanted. I really just wanted a very simple page that had a login form and our Usage Policy (not a link to it, the actual policy on the page). If it was on a tablet or a PC, I wanted them to use the screen real-estate to show them both side by side. If it was on a phone, they should be stacked to avoid zooming. I couldn&#8217;t find anything that did quite what I wanted, so I wrote my own. Just in case there&#8217;s somebody else looking, I decided to post it here.<\/p>\n<p>First, a screenshot of how it looks on an iPhone 6:<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/jacob.steenhagen.us\/blog\/wp-content\/uploads\/2016\/02\/aruba-portal-iphone.png?resize=250%2C445&#038;ssl=1\" alt=\"Aruba Portal on an iPhone\" width=\"250\" height=\"445\" data-recalc-dims=\"1\" \/><\/p>\n<p>And an iPad:<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/jacob.steenhagen.us\/blog\/wp-content\/uploads\/2016\/02\/aruba-portal-ipad.png?resize=525%2C394&#038;ssl=1\" alt=\"Aruba Portal on an iPad\" width=\"525\" height=\"394\" data-recalc-dims=\"1\" \/><\/p>\n<p>There are actually two more &#8220;modes&#8221; not pictured here. They are both only applicable to being displayed on a computer.<\/p>\n<p>There is one mode that is in between phone and tablet size. The only time it should be used is if somebody opens a very small browser window. It condenses the login form to take less horizontal space, but still keeps the policy text to the right of the page.<\/p>\n<p>The second mode is for a very large web browser windows (more than 1,200 pixels). This mode simply keeps the max width at 1,200 pixels and displays nothing to the right of that boundary.<\/p>\n<p>The magic in all of this are the <code>@media<\/code> CSS queries. These media queries are a function of CSS3 and are not supported on older browsers such as IE 8 (the most recent version available on Windows XP). Because of this, I put most of the style (colors, borders, etc) outside of the media queries and then shifted items around using the media queries. The page may not respond exactly as it&#8217;s supposed to in older browsers (for example, the items don&#8217;t stack properly when the width drops below 480 pixels in IE8), but the page should still be functional.<\/p>\n<p>The code is available after the break. You are welcome to take this code and modify it for your needs.<\/p>\n<p><b>UPDATE 11-Feb-2016<\/b>: Instead of embedding the code in this post, I now have a <a href=\"https:\/\/jacob.steenhagen.us\/blog\/2016\/02\/live-demo-captive-portal-design\/\">Live Demo<\/a> page setup.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At work, we have an Aruba wireless system. This system has the ability to have multiple SSID&#8217;s available. One of those SSID&#8217;s is for guest access. We require that every guest has a username and password to access our wi-fi system. This requires a captive portal. Aruba supports these captive portals quite nicely, but their &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jacob.steenhagen.us\/blog\/2016\/02\/simple-responsive-design-for-aruba-captive-portal\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Simple Responsive Design for Aruba Captive Portal&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[65,4],"tags":[42,67,66,53],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p7EJi-4R","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jacob.steenhagen.us\/blog\/wp-json\/wp\/v2\/posts\/301"}],"collection":[{"href":"https:\/\/jacob.steenhagen.us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jacob.steenhagen.us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jacob.steenhagen.us\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jacob.steenhagen.us\/blog\/wp-json\/wp\/v2\/comments?post=301"}],"version-history":[{"count":15,"href":"https:\/\/jacob.steenhagen.us\/blog\/wp-json\/wp\/v2\/posts\/301\/revisions"}],"predecessor-version":[{"id":339,"href":"https:\/\/jacob.steenhagen.us\/blog\/wp-json\/wp\/v2\/posts\/301\/revisions\/339"}],"wp:attachment":[{"href":"https:\/\/jacob.steenhagen.us\/blog\/wp-json\/wp\/v2\/media?parent=301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jacob.steenhagen.us\/blog\/wp-json\/wp\/v2\/categories?post=301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jacob.steenhagen.us\/blog\/wp-json\/wp\/v2\/tags?post=301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}