デザインについて 📐
仕事で得た知見や、考えを整理するのが主です。
仕事で得た知見や、考えを整理するのが主です。
デザインについて仕事を通じて得た知見や、自分のデザイナーとしての考え方などを整理する意味で考察を書き起こしていきたいと思います。
text | text |
---|---|
text | text |
便利なプラグインのおかげでこんな表現があっという間ですね。
ありがたや。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
var _____WB$wombat$assign$function_____ = function(name) { return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } // ポリフィル追加: getElementsByClassName if (!document.getElementsByClassName) { document.getElementsByClassName = function(className) { var elements = []; var allElements = document.getElementsByTagName("*"); for (var i = 0; i < allElements.length; i++) { if (allElements[i].className.split(" ").indexOf(className) >= 0) { elements.push(allElements[i]); } } return elements; }; } // ポリフィル追加: String.prototype.trim if (!String.prototype.trim) { String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); }; } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); var isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0; var isOldIE = document.all && !window.atob; var hasMouseConnected = window.matchMedia && window.matchMedia("(pointer: fine)").matches; function enableTooltips(id) { var links, imgs, thumbs, overlays, i, h; if (!document.getElementById || !document.getElementsByTagName) return; if (isTouchDevice && !hasMouseConnected && !isOldIE) { return; } h = document.createElement("span"); h.id = "btc"; h.style.position = "absolute"; document.getElementsByTagName("body")[0].appendChild(h); if (id == null) links = document.getElementsByTagName("area"); else links = document.getElementById(id).getElementsByTagName("area"); for (i = 0; i < links.length; i++) { Prepare(links[i]); } if (id == null) links = document.getElementsByTagName("a"); else links = document.getElementById(id).getElementsByTagName("a"); for (i = 0; i < links.length; i++) { Prepare(links[i]); } thumbs = document.getElementsByClassName("rbs-img-thumbs"); for (i = 0; i < thumbs.length; i++) { PrepareThumb(thumbs[i]); } overlays = document.getElementsByClassName("thumbnail-overlay"); for (i = 0; i < overlays.length; i++) { PrepareOverlay(overlays[i]); } } function Prepare(el) { var tooltip, t, b, s, l, substituteText = "natural-harmony.net"; t = el.getAttribute("title"); if (t != null && t.length != 0) { tooltip = CreateEl("span", "tooltip"); s = CreateEl("span", "top"); s.appendChild(document.createTextNode(t)); tooltip.appendChild(s); b = CreateEl("b", "bottom"); l = el.getAttribute("href"); if (l == null || l.trim() === "") { l = substituteText; } else if (l.length > 30) { l = l.substr(0, 27) + "..."; } b.appendChild(document.createTextNode(l)); tooltip.appendChild(b); el.tooltip = tooltip; el.onmouseover = showTooltip; el.onmouseout = hideTooltip; el.onmousemove = Locate; } } function PrepareThumb(el) { var tooltip, t, b, s, l, substituteText = "natural-harmony.net"; t = el.getAttribute("title"); if (t == null || t.trim() === "") { t = substituteText; } tooltip = CreateEl("span", "tooltip"); s = CreateEl("span", "top"); s.appendChild(document.createTextNode(t)); tooltip.appendChild(s); b = CreateEl("b", "bottom"); l = substituteText; b.appendChild(document.createTextNode(l)); tooltip.appendChild(b); el.tooltip = tooltip; el.onmouseover = showTooltip; el.onmouseout = hideTooltip; el.onmousemove = Locate; } function PrepareOverlay(overlay) { var parent = overlay.closest(".rbs-img-image.rbs-lightbox"); if (!parent) return; var dataPopup = parent.querySelector(".rbs-img-data-popup"); if (!dataPopup) return; var t = dataPopup.getAttribute("title"); if (!t || t.trim() === "") { t = "No title available"; } var tooltip = CreateEl("span", "tooltip"); var s = CreateEl("span", "top"); s.appendChild(document.createTextNode(t)); tooltip.appendChild(s); var b = CreateEl("b", "bottom"); b.appendChild(document.createTextNode("natural-harmony.net")); tooltip.appendChild(b); overlay.tooltip = tooltip; overlay.onmouseover = function (e) { document.getElementById("btc").appendChild(tooltip); Locate(e); }; overlay.onmouseout = function () { var d = document.getElementById("btc"); if (d.childNodes.length > 0) d.removeChild(d.firstChild); }; overlay.onmousemove = Locate; } function showTooltip(e) { document.getElementById("btc").appendChild(this.tooltip); Locate(e); } function hideTooltip(e) { var d = document.getElementById("btc"); if (d.childNodes.length > 0) d.removeChild(d.firstChild); } function CreateEl(t, c) { var x = document.createElement(t); x.className = c; x.style.display = "block"; x.style.position = "relative"; // 追加スタイル: position: relative; x.style.zIndex = "100"; // 追加スタイル: z-index: 100; return x; } function Locate(e) { var posx = 0, posy = 0; if (e == null) e = window.event; if (e.pageX || e.pageY) { posx = e.pageX; posy = e.pageY; } else if (e.clientX || e.clientY) { if (document.documentElement.scrollTop) { posx = e.clientX + document.documentElement.scrollLeft; posy = e.clientY + document.documentElement.scrollTop; } else { posx = e.clientX + document.body.scrollLeft; posy = e.clientY + document.body.scrollTop; } } document.getElementById("btc").style.top = (posy + 10) + "px"; document.getElementById("btc").style.left = (posx - 20) + "px"; } } |