Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende ÜberarbeitungNächste ÜberarbeitungBeide Seiten der Revision | ||
pub:ios-apps [2014/08/26 22:48] – angelegt Marco Krage | pub:ios-apps [2014/10/21 09:22] – Marco Krage | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== iOS Apps ====== | ====== iOS Apps ====== | ||
- | ===== Grafik ===== | + | < |
+ | < | ||
+ | .app { | ||
+ | list-style: none; | ||
+ | overflow: auto; | ||
+ | margin-bottom: | ||
+ | } | ||
+ | .app .icon{ | ||
+ | float: | ||
+ | margin-right: | ||
+ | } | ||
+ | .app .icon img { | ||
+ | | ||
+ | | ||
+ | } | ||
+ | </ | ||
+ | <div id=" | ||
+ | Castro 723142770 fooo // | ||
+ | Spotify 324684580 #Musik | ||
+ | Google Maps 585027354 #Karten | ||
+ | Tydling 721606556 http:// | ||
+ | Dropbox 327630330 #Sync | ||
+ | Reeder 697846300 #RSS | ||
+ | Schritzähler 712286167 | ||
+ | Wordpress 335703880 #Blog | ||
+ | Pocket 309601447 # | ||
+ | Tweetbot 722294701 #Twitter | ||
+ | finanzblick 401912744 # | ||
+ | Photosynt 430065256 #Pano | ||
+ | Photosphere 904418768 #Pano | ||
+ | Hyperlapse 740146917 # | ||
+ | Spritmonitor 616137163 | ||
+ | Scanbot 834854351 | ||
+ | HDE OTP 571240327 | ||
+ | Barcode 522354642 | ||
+ | PhotoPresenter 690440141 | ||
+ | </ | ||
+ | < | ||
+ | String.prototype.trim=function(){return this.replace(/ | ||
+ | jQuery(document).ready(function($){ | ||
- | ===== Timelapse ===== | + | var data = $('# |
+ | var apps = parseData(data); | ||
+ | console.log(' | ||
+ | updateLayout('# | ||
+ | function parseData(data) { | ||
+ | var lines = data.split(" | ||
+ | var apps = []; | ||
+ | |||
+ | $.each(lines, | ||
+ | var app = {}; | ||
+ | | ||
+ | if(line.trim() == "" | ||
+ | | ||
+ | var preSplit = line.trim().split('#' | ||
+ | (preSplit[1]) ? app.desc = preSplit[1].trim() : ''; | ||
+ | | ||
+ | var parts = preSplit[0].split(' | ||
+ | | ||
+ | app.name = parts.shift(); | ||
+ | | ||
+ | $.each(parts, | ||
+ | if(typeof app.id == " | ||
+ | app.id = part; | ||
+ | return; | ||
+ | } | ||
+ | if(typeof app.url == " | ||
+ | app.url = part; | ||
+ | return; | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | apps.push(app); | ||
+ | | ||
+ | }); | ||
+ | | ||
+ | return apps; | ||
+ | } | ||
+ | |||
+ | function updateLayout(selector, | ||
+ | var $container = $(selector).empty(); | ||
+ | |||
+ | var $list = $('< | ||
+ | | ||
+ | $.each(apps, | ||
+ | | ||
+ | var $entry = $($('# | ||
+ | | ||
+ | $entry.find(' | ||
+ | |||
+ | if(app.id) { | ||
+ | var $itunesLink = $('< | ||
+ | $entry.find(' | ||
+ | $entry.find(' | ||
+ | getItunesData(app, | ||
+ | } | ||
+ | | ||
+ | if(app.url) { | ||
+ | var $webLink = $('< | ||
+ | $entry.find(' | ||
+ | } | ||
+ | | ||
+ | $entry.find(' | ||
+ | | ||
+ | }); | ||
+ | |||
+ | } | ||
+ | |||
+ | function getItunesData(app, | ||
+ | console.log(' | ||
+ | $.getJSON(' | ||
+ | if(data.resultCount == 0) { return false; } | ||
+ | $image = $('< | ||
+ | $entry.find(' | ||
+ | }); | ||
+ | } | ||
+ | |||
+ | }); // END jQuery.ready | ||
+ | </ | ||
+ | <script id=" | ||
+ | <li class=" | ||
+ | <div class=" | ||
+ | <div class=" | ||
+ | <div> | ||
+ | <span class=" | ||
+ | <span class=" | ||
+ | </ | ||
+ | </li> | ||
+ | </ | ||
+ | |||
+ | |||
+ | </ |