on master help sign in
Merge pull request #238 from dym-sh/master
b8f8cd9Chris
links/main.css+5−5
@@ -62,22 +62,22 @@ body #hallway ul li:last-child { border-bottom:0px; }
62body #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 }
62body #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 }
63body #portal ul { columns:3; }
63body #portal ul { columns:3; }
64body #portal ul li { display:block; padding-left:5px; text-overflow: ellipsis; text-transform: lowercase;}
64body #portal ul li { display:block; padding-left:5px; text-overflow: ellipsis; text-transform: lowercase;}
65−body #portal ul li.wiki::after { content:"<wiki>"; color:#555; }
65+body #portal ul li:before { content: attr(id) ")"; }
66−body #portal ul li.blog::after { content:"<blog>"; color:#555; }
66+body #portal ul li[data-type]::after { content:"<" attr(data-type) ">"; color:#555; }
67body #portal ul li a { line-height: 20px; padding:0px 5px; text-decoration: none;}
67body #portal ul li a { line-height: 20px; padding:0px 5px; text-decoration: none;}
68body #portal ul li a:visited { color:#ccc; text-decoration: none;}
68body #portal ul li a:visited { color:#ccc; text-decoration: none;}
69body #portal ul li a:hover { text-decoration: underline; }
69body #portal ul li a:hover { text-decoration: underline; }
70
70
71@media (max-width: 730px) {
71@media (max-width: 730px) {
72− body #portal ul li span.counter { display: none }
72+ body #portal ul li:before { display: none }
73}
73}
74@media (max-width: 630px) {
74@media (max-width: 630px) {
75 body #portal ul { columns: 2 !important; }
75 body #portal ul { columns: 2 !important; }
76− body #portal ul li span.counter { display: none }
76+ body #portal ul li:before { display: none }
77}
77}
78@media (max-width: 530px) {
78@media (max-width: 530px) {
79 body #portal ul { columns: 1 !important; }
79 body #portal ul { columns: 1 !important; }
80− body #portal ul li span.counter { display: inline }
80+ body #portal ul li:before { display: inline }
81}
81}
82
82
83/* Wiki */
83/* Wiki */
scripts/portal.js+4−2
@@ -17,11 +17,13 @@ function Portal (sites) {
17
17
18 function _directory (sites) {
18 function _directory (sites) {
19 return `
19 return `
20+ <ul>${sites.reduce( (acc, site, id) =>
20− <ul>${sites.reduce((acc, site, id) => { return `${acc}<li class='${site.type}'><span class='counter'>${id})</span><a href='${site.url}'>${_name(site)}</a></li>` }, '')}</ul>\n${_readme()}${_buttons()}`
21+ `${acc}<li ${site.type ? `data-type="${site.type}"` : ''} id='${id}'><a href='${site.url}'>${_name(site)}</a></li>`
22+ , '')}</ul>\n${_readme()}${_buttons()}`
21 }
23 }
22
24
23 function _name (site) {
25 function _name (site) {
24− return site.title ? site.title : `${site.url.split('//')[1]}`
26+ return site.title || `${site.url.split('//')[1]}`
25 }
27 }
26
28
27 function _redirect (site) {
29 function _redirect (site) {