on master help sign in
Merge pull request #202 from drisc/master
8750383Лu Лinveгa
links/main.css+8
@@ -43,6 +43,14 @@ body #hallway p { padding-left: 60px;background-image: url(../icon.white.svg);ba
43body #hallway ul { max-width: 100%; }
43body #hallway ul { max-width: 100%; }
44body #hallway ul li:last-child { border-bottom:0px; }
44body #hallway ul li:last-child { border-bottom:0px; }
45
45
46+@media only screen and (min-width:200px) and (max-width: 800px) {
47+ body #hallway #entries { width: 100% !important;margin-top: 30px; }
48+ body #hallway #sidebar { position: absolute;top: 0px;right: 0px;padding: 15px;width: 200px;display: none;background-color: #000; }
49+ body #hallway #showbar { position: absolute;top: 0px;width: 92%;height: 50px; background-image: url("data:image/svg+xml; utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22'><path d='M11,4 L11,18 M4,4 L 4,18 M18,4 L18,18' stroke='%23555' fill='none' stroke-width='2' stroke-linecap='round'/></svg>");background-repeat: no-repeat;background-position: right;background-size: 25px; }
50+ body #hallway #hidebar { position: absolute;top: 0px;width: 100%;height: 50px;background-image: url("data:image/svg+xml; utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22'><path d='M5,5 L17,17 M17,5 L5,17' stroke='%23555' fill='none' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");background-repeat: no-repeat;background-position: left;background-size: 25px; }
51+ body #hallway #sidebar #channels { margin-top: 30px; }
52+}
53+
46/* Portal */
54/* Portal */
47
55
48body #portal #icon { display: block;width: 30px;height: 30px;background-image: url(../icon.white.svg);background-size: cover;background-repeat: no-repeat;position: absolute;bottom: 15px;right:15px;background-position: center;padding:0px }
56body #portal #icon { display: block;width: 30px;height: 30px;background-image: url(../icon.white.svg);background-size: cover;background-repeat: no-repeat;position: absolute;bottom: 15px;right:15px;background-position: center;padding:0px }
scripts/hallway.js+10
@@ -40,7 +40,9 @@ function Hallway (sites) {
40 ${[...Array(Math.ceil(relevantEntries.length / 20)).keys()].reduce((acc, num) => `${acc}<span class='${Number(hallway.finder.page) === num + 1 ? 'selected' : ''}' onclick='filter("${this.finder.filter}^${num + 1}")'>${num + 1}</span>`, '')}
40 ${[...Array(Math.ceil(relevantEntries.length / 20)).keys()].reduce((acc, num) => `${acc}<span class='${Number(hallway.finder.page) === num + 1 ? 'selected' : ''}' onclick='filter("${this.finder.filter}^${num + 1}")'>${num + 1}</span>`, '')}
41 </div>
41 </div>
42 </div>
42 </div>
43+ <a id='showbar' onclick="toggleVisibility('sidebar');"></a>
43 <div id='sidebar'>
44 <div id='sidebar'>
45+ <a id='hidebar' onclick="toggleVisibility('sidebar');"></a>
44 <ul id='channels'>
46 <ul id='channels'>
45 <li onclick='filter("")' class='${hallway.finder.filter === '' ? 'selected' : ''}'><a href='#'>hallway <span class='right'>${entries.length}</span></a></li>
47 <li onclick='filter("")' class='${hallway.finder.filter === '' ? 'selected' : ''}'><a href='#'>hallway <span class='right'>${entries.length}</span></a></li>
46 ${Object.keys(channels).slice(0, 15).reduce((acc, val) => acc + `<li onclick='filter("${val}")' class='${hallway.finder.filter === val ? 'selected' : ''}'><a href='#${val}'>${val} <span class='right'>${channels[val]}</span></a></li>\n`, '')}
48 ${Object.keys(channels).slice(0, 15).reduce((acc, val) => acc + `<li onclick='filter("${val}")' class='${hallway.finder.filter === val ? 'selected' : ''}'><a href='#${val}'>${val} <span class='right'>${channels[val]}</span></a></li>\n`, '')}
@@ -184,6 +186,14 @@ function Hallway (sites) {
184 }
186 }
185}
187}
186
188
189+function toggleVisibility (id) {
190+ var e = document.getElementById(id);
191+ if(e.style.display == 'block')
192+ e.style.display = 'none';
193+ else
194+ e.style.display = 'block';
195+ }
196+
187function escapeHtml (unsafe) {
197function escapeHtml (unsafe) {
188 return unsafe.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#039;')
198 return unsafe.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#039;')
189}
199}