diff --git a/README.md b/README.md index 46cc391..224ffe9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # ZeroMe + Social network for ZeroNet + + diff --git a/content.json b/content.json index 8180a9a..ea7e9a3 100644 --- a/content.json +++ b/content.json @@ -1,6 +1,7 @@ { "address": "1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH", "background-color": "#F2F4F6", + "background-color-dark": "#242424", "cloneable": true, "description": "Social site", "domain": "Me.ZeroNetwork.bit", @@ -78,6 +79,10 @@ "sha512": "dfd554eca364f1fb86ecedc98866638dee8c2118bedbf9b32fee797ec6b60fe4", "size": 3491 }, + "languages/sk.json": { + "sha512": "779e69b2a6750847438458971431b0406047784314c1c30a66f6b03091d378c1", + "size": 3518 + }, "languages/tr.json": { "sha512": "d9df6b218bcf359766ee3416a0cf4b4a3e9181601a7106957f674b22a79aa07a", "size": 3428 @@ -101,9 +106,9 @@ "postmessage_nonce_security": true, "settings": { "default_hubs": { - "1White24UrrwQrD86o6Vrc1apgZ1x1o51": { + "1MoonP8t4rk9QamBUPh5Aspkwa1Xhf5ux2": { "description": "Hub for ZeroMe users. Runner: Nofish", - "title": "White hub" + "title": "Moon hub" } } }, @@ -115,5 +120,5 @@ "title": "ZeroMe", "translate": ["js/all.js"], "viewport": "width=device-width, initial-scale=0.8", - "zeronet_version": "0.5.7" -} \ No newline at end of file + "zeronet_version": "0.6.0" +} diff --git a/css/Button.css b/css/Button.css index cc4a8bf..0dd8d6c 100644 --- a/css/Button.css +++ b/css/Button.css @@ -8,7 +8,7 @@ .button:active { transform: translateY(1px); transition: all 0.3s, transform none; box-shadow: inset 0px 5px 7px -3px rgba(212, 212, 212, 0.41); outline: none; transition: none } .button.loading { - color: rgba(0,0,0,0) !important; background: url(../img/loading.gif) no-repeat center center !important; border-color: rgba(0,0,0,0) !important; + color: rgba(0,0,0,0) !important; background: rgba(128, 128, 128, 0.5) url(../img/loading.gif) no-repeat center center !important; border-color: rgba(0,0,0,0) !important; transition: all 0.5s ease-out; pointer-events: none; transition-delay: 0.5s } @@ -24,7 +24,7 @@ padding: 12px 30px; border-radius: 3px; margin-top: 11px; background-color: #5d68ff; /*box-shadow: 0px 1px 4px rgba(93, 104, 255, 0.41);*/ border: none; border-bottom: 2px solid #4952c7; font-weight: bold; color: #ffffff; font-size: 12px; text-transform: uppercase; margin-left: 10px; } -.button-submit:hover { color: white; background-color: #6d78ff } +.button-submit:hover, .button-submit:focus { color: white; background-color: #6d78ff } .button-small { padding: 7px 20px; margin-left: 10px } .button-outline { background-color: white; border: 1px solid #EEE; border-bottom: 2px solid #EEE; color: #AAA; } diff --git a/css/Comment.css b/css/Comment.css index 2019e8b..547c99c 100644 --- a/css/Comment.css +++ b/css/Comment.css @@ -5,7 +5,9 @@ .comment-list .body { padding-top: 0px } .comment-list .body p { padding: 0px } -.comment-create textarea { width: 100%; margin-bottom: 11px; box-sizing: border-box; } +.comment-create { position: relative; } +.comment-create textarea { width: 100%; margin-bottom: 11px; box-sizing: border-box; padding-right: 90px; } +.comment-create .button-submit { right: 13px; position: absolute; bottom: 23px; } .comment { padding-top: 10px } .comment-list .comment .user { padding-bottom: 0px; white-space: nowrap; line-height: 15px; } .comment .body { padding-top: 4px; padding-bottom: 10px; } @@ -15,4 +17,4 @@ .comment .icon-reply:hover { opacity: 1; transition: none } .comment .user .name { line-height: 16px; } -.comment h1, .comment h2, .comment h3, .comment h4, .comment h5, .comment h6 { font-size: inherit; font-weight: bold } \ No newline at end of file +.comment h1, .comment h2, .comment h3, .comment h4, .comment h5, .comment h6 { font-size: inherit; font-weight: bold } diff --git a/css/Head.css b/css/Head.css index 12fa469..a93911a 100644 --- a/css/Head.css +++ b/css/Head.css @@ -11,7 +11,7 @@ .head .user .address { display: block } .head .settings { display: inline-block; height: 50px; width: 50px; text-align: center; vertical-align: middle; transition: all 0.3s; - border-left: 1px solid #EEE; line-height: 50px; font-size: 20px; color: #AAA; font-weight: normal; text-decoration: none; + border-left: 1px solid rgba(0, 0, 0, 0.05); line-height: 50px; font-size: 20px; color: #AAA; font-weight: normal; text-decoration: none; } .head .settings:hover { color: #5d68ff; background-color: #FAFAFA; transition: none } .head .settings:active { background-color: #F5F5F5; transition: none } @@ -20,4 +20,4 @@ @media screen and (max-width: 1100px) { .head .right { margin-right: 80px; } -} \ No newline at end of file +} diff --git a/css/Menu.css b/css/Menu.css index 2147819..2b0a243 100644 --- a/css/Menu.css +++ b/css/Menu.css @@ -1,7 +1,7 @@ .menu { background-color: white; padding: 10px 0px; position: absolute; top: 0px; max-height: 0px; overflow: hidden; transform: translate(-100%, -30px); pointer-events: none; box-shadow: 0px 2px 8px rgba(0,0,0,0.1); border-radius: 2px; opacity: 0; transition: opacity 0.2s ease-out, transform 1s ease-out, max-height 0.2s ease-in-out; z-index: 99; - display: inline-block; z-index: 999; margin-top: 50px; + display: inline-block; z-index: 99999999999999999; margin-top: 50px; } .menu-right { left: 100% } .menu.visible { opacity: 1; max-height: 350px; transform: translate(-100%, 0px); transition: opacity 0.1s ease-out, transform 0.3s ease-out, max-height 0.3s ease-in-out; pointer-events: all } @@ -10,8 +10,120 @@ .menu-item-separator { margin-top: 3px; margin-bottom: 3px; border-top: 1px solid #eee } .menu-item:hover { background-color: #F6F6F6; transition: none; color: inherit; cursor: pointer; color: black; text-decoration: none } -.menu-item:active, .menu-item:focus { background-color: #AF3BFF; color: white; transition: none } +.menu-item:active, .menu-item:focus { +background-color: transparent; +color: white; transition: none; +-webkit-tap-highlight-color: transparent; +} .menu-item.selected:before { content: "L"; display: inline-block; transform: rotateZ(45deg) scaleX(-1); line-height: 15px; font-weight: bold; position: absolute; margin-left: -14px; font-size: 12px; margin-top: 2px; -} \ No newline at end of file +} + +.menu-radio { white-space: normal; line-height: 26px } +.menu-item:hover, .menu-radio:hover {background-color: transparent} +.menu-radio span, .menu-radio a.all, .menu-radio a.filter { + background-color: #EEE; width: 18.5%; text-align: center; margin-top: 2px; margin-bottom: 2px; color: #333; font-weight: bold; + text-decoration: none; font-size: 13px; transition: all 0.3s; text-transform: uppercase; display: inline-block; +} +.post-list-type .menu-radio a:hover {color: #333} +.menu-item .menu-radio .lang-on:hover, +.menu-radio .lang-on.selected { +background-color: rgba(130,255,137,0.2); +} +.menu-item .menu-radio .lang-off:hover, +.menu-radio .lang-off.selected { +background-color: rgba(255,138,140,0.2); +} +.menu-radio a:hover, .menu-radio a.all.active { transition: none; background-color: #d8f1d9;} +.menu-radio a.long { font-size: 11px } + +.menu-radio span { +text-align: center; +width: 46%; +margin-top: 2px; +margin-right: 4px; +display: inline-block; +white-space: pre; +outline: 4px solid transparent; +} +.menu-radio a { +position: absolute; +white-space: pre; +display: block !important; +width: 59px !important; +} +.menu-radio a.all, .menu-radio a.filter { +position: relative; +width: 46% !important; +float: left; +margin-right: 4px !important; +} +.menu-radio .lang-on { +text-align: left; +color: #333; +} +.menu-radio .lang-off { +color: #333; +text-align: right; +margin-left: 59px !important; +} + +.post-list-type .menu { +width: 280px; +text-align: left; +margin-left: -55px; +margin-top: 43px; +transform: none; +transition: max-height 0.3s ease-out; +} +.post-list-type .hub-menu, .post-list-type .filters-menu { +position: relative; +z-index: 1; +display: inline-block; +} +.post-list-type .filters-menu .menu { +margin-left: -85px; +width: 257px; +padding-left: 15px; +} +.post-list-type .hub-menu .menu .menu-item { +width: 90px; +overflow: hidden; +} +.post-list-type .hub-menu .menu .menu-item a { +width: 90%; +overflow: hidden; +text-overflow: ellipsis; +} +.post-list-type .menu .menu-item, .post-list-type .menu .menu-radio a { +padding: 0; +margin: 0px; +border-bottom: none !important; +} +.post-list-type .menu .menu-radio .all, .post-list-type .menu .menu-radio .filter { +margin-bottom: 2px; +margin-top: 2px; +} + +/* Drop menu show after */ + +.show-after, .show-since { +padding: 3px 0; +} +.show-after .menu-item, .show-since .menu-item { +display: inline; +padding-right: 5px; +} +.show-after #show-after-date { +width: 100px; +border: 1px solid transparent; +border-bottom: 1px solid #333; +padding: 1px 5px; +} +.show-since #show-since-day { +width: 17px; +border: 1px solid transparent; +border-bottom: 1px solid #333; +padding: 1px 5px; +} diff --git a/css/all.css b/css/all.css index 2c378a3..43ffa02 100644 --- a/css/all.css +++ b/css/all.css @@ -1,6 +1,6 @@ -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/Activity.css ---- */ +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/Activity.css ---- */ .activity-list { margin-bottom: 30px } @@ -23,7 +23,7 @@ .activity.latest .circle { border-color: #666 } -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/Button.css ---- */ +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/Button.css ---- */ .button { @@ -36,7 +36,7 @@ .button:active { -webkit-transform: translateY(1px); -moz-transform: translateY(1px); -o-transform: translateY(1px); -ms-transform: translateY(1px); transform: translateY(1px) ; -webkit-transition: all 0.3s, transform none; -moz-transition: all 0.3s, transform none; -o-transition: all 0.3s, transform none; -ms-transition: all 0.3s, transform none; transition: all 0.3s, transform none ; -webkit-box-shadow: inset 0px 5px 7px -3px rgba(212, 212, 212, 0.41); -moz-box-shadow: inset 0px 5px 7px -3px rgba(212, 212, 212, 0.41); -o-box-shadow: inset 0px 5px 7px -3px rgba(212, 212, 212, 0.41); -ms-box-shadow: inset 0px 5px 7px -3px rgba(212, 212, 212, 0.41); box-shadow: inset 0px 5px 7px -3px rgba(212, 212, 212, 0.41) ; outline: none; -webkit-transition: none ; -moz-transition: none ; -o-transition: none ; -ms-transition: none ; transition: none } .button.loading { - color: rgba(0,0,0,0) !important; background: url(../img/loading.gif) no-repeat center center !important; border-color: rgba(0,0,0,0) !important; + color: rgba(0,0,0,0) !important; background: rgba(128, 128, 128, 0.5) url(../img/loading.gif) no-repeat center center !important; border-color: rgba(0,0,0,0) !important; -webkit-transition: all 0.5s ease-out; -moz-transition: all 0.5s ease-out; -o-transition: all 0.5s ease-out; -ms-transition: all 0.5s ease-out; transition: all 0.5s ease-out ; pointer-events: none; transition-delay: 0.5s } @@ -52,7 +52,7 @@ padding: 12px 30px; -webkit-border-radius: 3px; -moz-border-radius: 3px; -o-border-radius: 3px; -ms-border-radius: 3px; border-radius: 3px ; margin-top: 11px; background-color: #5d68ff; /*box-shadow: 0px 1px 4px rgba(93, 104, 255, 0.41);*/ border: none; border-bottom: 2px solid #4952c7; font-weight: bold; color: #ffffff; font-size: 12px; text-transform: uppercase; margin-left: 10px; } -.button-submit:hover { color: white; background-color: #6d78ff } +.button-submit:hover, .button-submit:focus { color: white; background-color: #6d78ff } .button-small { padding: 7px 20px; margin-left: 10px } .button-outline { background-color: white; border: 1px solid #EEE; border-bottom: 2px solid #EEE; color: #AAA; } @@ -60,7 +60,7 @@ -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/Comment.css ---- */ +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/Comment.css ---- */ .comment-list { @@ -70,7 +70,9 @@ .comment-list .body { padding-top: 0px } .comment-list .body p { padding: 0px } -.comment-create textarea { width: 100%; margin-bottom: 11px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -o-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box ; } +.comment-create { position: relative; } +.comment-create textarea { width: 100%; margin-bottom: 11px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -o-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box ; padding-right: 90px; } +.comment-create .button-submit { right: 13px; position: absolute; bottom: 23px; } .comment { padding-top: 10px } .comment-list .comment .user { padding-bottom: 0px; white-space: nowrap; line-height: 15px; } .comment .body { padding-top: 4px; padding-bottom: 10px; } @@ -83,7 +85,8 @@ .comment h1, .comment h2, .comment h3, .comment h4, .comment h5, .comment h6 { font-size: inherit; font-weight: bold } -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/Editable.css ---- */ + +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/Editable.css ---- */ .editable .icon-edit { margin-left: -24px; padding: 7px; -webkit-border-radius: 30px; -moz-border-radius: 30px; -o-border-radius: 30px; -ms-border-radius: 30px; border-radius: 30px ; margin-top: -5px; position: absolute; opacity: 0; -webkit-transition: all 0.3s ; -moz-transition: all 0.3s ; -o-transition: all 0.3s ; -ms-transition: all 0.3s ; transition: all 0.3s } @@ -97,7 +100,7 @@ } -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/Head.css ---- */ +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/Head.css ---- */ .head-container { background-color: white; -webkit-box-shadow: 0px -7px 32px rgba(0,0,0,0.15); -moz-box-shadow: 0px -7px 32px rgba(0,0,0,0.15); -o-box-shadow: 0px -7px 32px rgba(0,0,0,0.15); -ms-box-shadow: 0px -7px 32px rgba(0,0,0,0.15); box-shadow: 0px -7px 32px rgba(0,0,0,0.15) ; } @@ -113,7 +116,7 @@ .head .user .address { display: block } .head .settings { display: inline-block; height: 50px; width: 50px; text-align: center; vertical-align: middle; -webkit-transition: all 0.3s; -moz-transition: all 0.3s; -o-transition: all 0.3s; -ms-transition: all 0.3s; transition: all 0.3s ; - border-left: 1px solid #EEE; line-height: 50px; font-size: 20px; color: #AAA; font-weight: normal; text-decoration: none; + border-left: 1px solid rgba(0, 0, 0, 0.05); line-height: 50px; font-size: 20px; color: #AAA; font-weight: normal; text-decoration: none; } .head .settings:hover { color: #5d68ff; background-color: #FAFAFA; -webkit-transition: none ; -moz-transition: none ; -o-transition: none ; -ms-transition: none ; transition: none } .head .settings:active { background-color: #F5F5F5; -webkit-transition: none ; -moz-transition: none ; -o-transition: none ; -ms-transition: none ; transition: none } @@ -125,7 +128,8 @@ } -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/Hub.css ---- */ + +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/Hub.css ---- */ .hub.card { padding: 21px; text-align: left; font-size: 18px; width: 80%; display: block; margin-left: auto; margin-right: auto; } @@ -136,7 +140,7 @@ .hubselect { padding-top: 30px } -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/Maxheight.css ---- */ +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/Maxheight.css ---- */ .maxheight { max-height: 550px; overflow: hidden; -webkit-transition: all 1s ease-in-out ; -moz-transition: all 1s ease-in-out ; -o-transition: all 1s ease-in-out ; -ms-transition: all 1s ease-in-out ; transition: all 1s ease-in-out } @@ -147,13 +151,13 @@ } -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/Menu.css ---- */ +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/Menu.css ---- */ .menu { background-color: white; padding: 10px 0px; position: absolute; top: 0px; max-height: 0px; overflow: hidden; -webkit-transform: translate(-100%, -30px); -moz-transform: translate(-100%, -30px); -o-transform: translate(-100%, -30px); -ms-transform: translate(-100%, -30px); transform: translate(-100%, -30px) ; pointer-events: none; -webkit-box-shadow: 0px 2px 8px rgba(0,0,0,0.1); -moz-box-shadow: 0px 2px 8px rgba(0,0,0,0.1); -o-box-shadow: 0px 2px 8px rgba(0,0,0,0.1); -ms-box-shadow: 0px 2px 8px rgba(0,0,0,0.1); box-shadow: 0px 2px 8px rgba(0,0,0,0.1) ; -webkit-border-radius: 2px; -moz-border-radius: 2px; -o-border-radius: 2px; -ms-border-radius: 2px; border-radius: 2px ; opacity: 0; -webkit-transition: opacity 0.2s ease-out, transform 1s ease-out, max-height 0.2s ease-in-out; -moz-transition: opacity 0.2s ease-out, transform 1s ease-out, max-height 0.2s ease-in-out; -o-transition: opacity 0.2s ease-out, transform 1s ease-out, max-height 0.2s ease-in-out; -ms-transition: opacity 0.2s ease-out, transform 1s ease-out, max-height 0.2s ease-in-out; transition: opacity 0.2s ease-out, transform 1s ease-out, max-height 0.2s ease-in-out ; z-index: 99; - display: inline-block; z-index: 999; margin-top: 50px; + display: inline-block; z-index: 99999999999999999; margin-top: 50px; } .menu-right { left: 100% } .menu.visible { opacity: 1; max-height: 350px; -webkit-transform: translate(-100%, 0px); -moz-transform: translate(-100%, 0px); -o-transform: translate(-100%, 0px); -ms-transform: translate(-100%, 0px); transform: translate(-100%, 0px) ; -webkit-transition: opacity 0.1s ease-out, transform 0.3s ease-out, max-height 0.3s ease-in-out; -moz-transition: opacity 0.1s ease-out, transform 0.3s ease-out, max-height 0.3s ease-in-out; -o-transition: opacity 0.1s ease-out, transform 0.3s ease-out, max-height 0.3s ease-in-out; -ms-transition: opacity 0.1s ease-out, transform 0.3s ease-out, max-height 0.3s ease-in-out; transition: opacity 0.1s ease-out, transform 0.3s ease-out, max-height 0.3s ease-in-out ; pointer-events: all } @@ -162,14 +166,127 @@ .menu-item-separator { margin-top: 3px; margin-bottom: 3px; border-top: 1px solid #eee } .menu-item:hover { background-color: #F6F6F6; -webkit-transition: none; -moz-transition: none; -o-transition: none; -ms-transition: none; transition: none ; color: inherit; cursor: pointer; color: black; text-decoration: none } -.menu-item:active, .menu-item:focus { background-color: #AF3BFF; color: white; -webkit-transition: none ; -moz-transition: none ; -o-transition: none ; -ms-transition: none ; transition: none } +.menu-item:active, .menu-item:focus { +background-color: transparent; +color: white; -webkit-transition: none; -moz-transition: none; -o-transition: none; -ms-transition: none; transition: none ; +-webkit-tap-highlight-color: transparent; +} .menu-item.selected:before { content: "L"; display: inline-block; -webkit-transform: rotateZ(45deg) scaleX(-1); -moz-transform: rotateZ(45deg) scaleX(-1); -o-transform: rotateZ(45deg) scaleX(-1); -ms-transform: rotateZ(45deg) scaleX(-1); transform: rotateZ(45deg) scaleX(-1) ; line-height: 15px; font-weight: bold; position: absolute; margin-left: -14px; font-size: 12px; margin-top: 2px; } +.menu-radio { white-space: normal; line-height: 26px } +.menu-item:hover, .menu-radio:hover {background-color: transparent} +.menu-radio span, .menu-radio a.all, .menu-radio a.filter { + background-color: #EEE; width: 18.5%; text-align: center; margin-top: 2px; margin-bottom: 2px; color: #333; font-weight: bold; + text-decoration: none; font-size: 13px; -webkit-transition: all 0.3s; -moz-transition: all 0.3s; -o-transition: all 0.3s; -ms-transition: all 0.3s; transition: all 0.3s ; text-transform: uppercase; display: inline-block; +} +.post-list-type .menu-radio a:hover {color: #333} +.menu-item .menu-radio .lang-on:hover, +.menu-radio .lang-on.selected { +background-color: rgba(130,255,137,0.2); +} +.menu-item .menu-radio .lang-off:hover, +.menu-radio .lang-off.selected { +background-color: rgba(255,138,140,0.2); +} +.menu-radio a:hover, .menu-radio a.all.active { -webkit-transition: none; -moz-transition: none; -o-transition: none; -ms-transition: none; transition: none ; background-color: #d8f1d9;} +.menu-radio a.long { font-size: 11px } -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/Overlay.css ---- */ +.menu-radio span { +text-align: center; +width: 46%; +margin-top: 2px; +margin-right: 4px; +display: inline-block; +white-space: pre; +outline: 4px solid transparent; +} +.menu-radio a { +position: absolute; +white-space: pre; +display: block !important; +width: 59px !important; +} +.menu-radio a.all, .menu-radio a.filter { +position: relative; +width: 46% !important; +float: left; +margin-right: 4px !important; +} +.menu-radio .lang-on { +text-align: left; +color: #333; +} +.menu-radio .lang-off { +color: #333; +text-align: right; +margin-left: 59px !important; +} + +.post-list-type .menu { +width: 280px; +text-align: left; +margin-left: -55px; +margin-top: 43px; +-webkit-transform: none; -moz-transform: none; -o-transform: none; -ms-transform: none; transform: none ; +-webkit-transition: max-height 0.3s ease-out; -moz-transition: max-height 0.3s ease-out; -o-transition: max-height 0.3s ease-out; -ms-transition: max-height 0.3s ease-out; transition: max-height 0.3s ease-out ; +} +.post-list-type .hub-menu, .post-list-type .filters-menu { +position: relative; +z-index: 1; +display: inline-block; +} +.post-list-type .filters-menu .menu { +margin-left: -85px; +width: 257px; +padding-left: 15px; +} +.post-list-type .hub-menu .menu .menu-item { +width: 90px; +overflow: hidden; +} +.post-list-type .hub-menu .menu .menu-item a { +width: 90%; +overflow: hidden; +text-overflow: ellipsis; +} +.post-list-type .menu .menu-item, .post-list-type .menu .menu-radio a { +padding: 0; +margin: 0px; +border-bottom: none !important; +} +.post-list-type .menu .menu-radio .all, .post-list-type .menu .menu-radio .filter { +margin-bottom: 2px; +margin-top: 2px; +} + +/* Drop menu show after */ + +.show-after, .show-since { +padding: 3px 0; +} +.show-after .menu-item, .show-since .menu-item { +display: inline; +padding-right: 5px; +} +.show-after #show-after-date { +width: 100px; +border: 1px solid transparent; +border-bottom: 1px solid #333; +padding: 1px 5px; +} +.show-since #show-since-day { +width: 17px; +border: 1px solid transparent; +border-bottom: 1px solid #333; +padding: 1px 5px; +} + + + +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/Overlay.css ---- */ #Overlay { @@ -180,7 +297,7 @@ #Overlay .img { position: absolute; background-size: contain; -webkit-transition: all 0.3s; -moz-transition: all 0.3s; -o-transition: all 0.3s; -ms-transition: all 0.3s; transition: all 0.3s ; background-repeat: no-repeat; } -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/Post.css ---- */ +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/Post.css ---- */ .post { @@ -279,14 +396,14 @@ .post .img .oldversion { background-color: rgba(0, 0, 0, 0.5); padding: 10px 10px; top: 49%; position: relative; color: white; -webkit-border-radius: 25px; -moz-border-radius: 25px; -o-border-radius: 25px; -ms-border-radius: 25px; border-radius: 25px ; } -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/Uploadable.css ---- */ +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/Uploadable.css ---- */ .uploadable .icon-upload { opacity: 0; -webkit-transition: all 0.3s ; -moz-transition: all 0.3s ; -o-transition: all 0.3s ; -ms-transition: all 0.3s ; transition: all 0.3s } .uploadable .icon-upload:hover { opacity: 0.8; -webkit-transition: all 0.1s ; -moz-transition: all 0.1s ; -o-transition: all 0.1s ; -ms-transition: all 0.1s ; transition: all 0.1s } -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/User.css ---- */ +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/User.css ---- */ .users .user { padding-left: 70px; padding-bottom: 20px } @@ -336,7 +453,7 @@ -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/ZeroMe.css ---- */ +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/ZeroMe.css ---- */ body { @@ -478,7 +595,64 @@ h5 { font-weight: normal; color: rgba(0, 0, 0, 0.5) } -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/fonts.css ---- */ +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/dark.css ---- */ + + +.theme-dark { background-color: #1b1b1b; color: #ccc; } +.theme-dark .head-container { background-color: #242424; } + +.theme-dark #Overlay.visible { background-color: rgba(53, 52, 60, 0.89); } + +.theme-dark a { color: #a69988 } +.theme-dark .menu-item { color: #000 } +.theme-dark .post .user .settings:hover { color: #ccc } + +.theme-dark .head .user .name { color: #a69988 } +.theme-dark .user .name { color: #a69988 } +.theme-dark .post-list-type a { color: #adadad; } +.theme-dark .post-list-type a:hover { color: #a69988; border-bottom-color: #a69988 } +.theme-dark .post-list-type .active { color: #a69988; border-bottom-color: #a69988 } + +.theme-dark .post-create .postfield { border-color: #333; } +.theme-dark .post-create.editing { -webkit-box-shadow: 0px 1px 13px 1px #111213 ; -moz-box-shadow: 0px 1px 13px 1px #111213 ; -o-box-shadow: 0px 1px 13px 1px #111213 ; -ms-box-shadow: 0px 1px 13px 1px #111213 ; box-shadow: 0px 1px 13px 1px #111213 } + +.theme-dark .button-submit { color: #ccc } +.theme-dark .button-outline { color: #333; } + +.theme-dark .post .body { color: #dcd9e5; } +.theme-dark .post { background-color: #242424; border: none; -webkit-border-radius: 0px; -moz-border-radius: 0px; -o-border-radius: 0px; -ms-border-radius: 0px; border-radius: 0px ; } +.theme-dark .comment-list { background-color: #242424; border-top-color: #333 } +.theme-dark .post .img .fullsize { background-color: #333 } +.theme-dark .post .reply-name { color: #ccc } +.theme-dark .post .user .address { color: #ccc } +.theme-dark .post .added, .theme-dark .post .sep { color: #a69988 } +.theme-dark .post .body a { color: #a69988 } +.theme-dark .post blockquote { border-left: 3px solid #444; } + +.theme-dark .activity-list .items a { color: #a69988 } +.theme-dark .activity { color: #ccc } +.theme-dark .activity-list .bg-line { background-color: #444 } +.theme-dark .activity-list .circle { border-color: #333; background-color: #1b1b1b } +.theme-dark .activity:last-child { background-color: #1b1b1b; } + +.theme-dark input.text, .theme-dark textarea { background-color: #1b1b1b; border-color: #333; color: #ccc; } +.theme-dark .card { -webkit-box-shadow: 0px 1px 11px #1b1b1b; -moz-box-shadow: 0px 1px 11px #1b1b1b; -o-box-shadow: 0px 1px 11px #1b1b1b; -ms-box-shadow: 0px 1px 11px #1b1b1b; box-shadow: 0px 1px 11px #1b1b1b ; background-color: #242424; } + +.theme-dark .button-follow:hover { background-color: rgba(74, 160, 177, 0.1) !important; border-color: #444 !important; color: #55cedf !important } +.theme-dark .users.gray .button-follow { border: 1px solid #3b8297 } +.theme-dark .user.notseeding .button-follow { border-color: #393251 } +.theme-dark h2.sep { border-top: 1px solid #333; } + +.theme-dark .post code { background-color: #232323; border-color: #0A0A0A; color: #d3d3d3; } +.theme-dark .icon-heart.active { color: #a69988; -webkit-filter: sepia(1) hue-rotate(504deg) brightness(0.75) saturate(5); -moz-filter: sepia(1) hue-rotate(504deg) brightness(0.75) saturate(5); -o-filter: sepia(1) hue-rotate(504deg) brightness(0.75) saturate(5); -ms-filter: sepia(1) hue-rotate(504deg) brightness(0.75) saturate(5); filter: sepia(1) hue-rotate(504deg) brightness(0.75) saturate(5) ; } +.theme-dark .post .actions .link.active { color: #a69988; } + +.theme-dark .button-follow-big:hover { background-color: #444; } +.theme-dark .maxheight-limited:before { background: -webkit-linear-gradient(rgba(38, 36, 46, 0), #242424 70%);background: -moz-linear-gradient(rgba(38, 36, 46, 0), #242424 70%);background: -o-linear-gradient(rgba(38, 36, 46, 0), #242424 70%);background: -ms-linear-gradient(rgba(38, 36, 46, 0), #242424 70%);background: linear-gradient(rgba(38, 36, 46, 0), #242424 70%); } + + + +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/fonts.css ---- */ /* Base64 encoder: http://www.motobit.com/util/base64-decoder-encoder.asp */ @@ -515,7 +689,7 @@ h5 { font-weight: normal; color: rgba(0, 0, 0, 0.5) } } -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/icons.css ---- */ +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/icons.css ---- */ .icon { @@ -614,7 +788,7 @@ h5 { font-weight: normal; color: rgba(0, 0, 0, 0.5) } -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/css/mobile.css ---- */ +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/css/mobile.css ---- */ /* ZeroMe Mobile */ @@ -629,21 +803,20 @@ font-size: medium !important; .head-container { position: fixed; -background-color: #fff; width: 100%; height: 50px; z-index: 30; } .head { width: 100%; -background-color: #fff; } .head .logo { -margin-left: 50px; +margin-left: 5px; position: absolute; z-index: 1; } .right { +margin-right: 0px !important; position: fixed; right: 0; top: 0; @@ -654,7 +827,6 @@ margin-top: 60px; margin-bottom: 5px; } .col-center { -background-color: #f6f7f8; width: 100%; overflow: auto; padding-left: 5px; @@ -680,6 +852,9 @@ overflow-y: auto; z-index: 1; -webkit-transition: 0.3s all cubic-bezier(0.77, 0, 0.175, 1); -moz-transition: 0.3s all cubic-bezier(0.77, 0, 0.175, 1); -o-transition: 0.3s all cubic-bezier(0.77, 0, 0.175, 1); -ms-transition: 0.3s all cubic-bezier(0.77, 0, 0.175, 1); transition: 0.3s all cubic-bezier(0.77, 0, 0.175, 1) ; } +.theme-dark .col-left, .theme-dark .col-right { +background-color: #242424; +} .trigger-on .col-left, .trigger-on .col-right { left: 0px; -webkit-box-shadow: 0px 0px 30px #999; -moz-box-shadow: 0px 0px 30px #999; -o-box-shadow: 0px 0px 30px #999; -ms-box-shadow: 0px 0px 30px #999; box-shadow: 0px 0px 30px #999 ; @@ -688,25 +863,27 @@ left: 0px; #Trigger { display: block; position: fixed; -left: 5px; +left: 2px; top: 3px; -width: 40px; +width: 33px; height: 40px; z-index: 100; -border: 1px solid #bbb; +border: 1px solid transparent; -webkit-border-radius: 5px; -moz-border-radius: 5px; -o-border-radius: 5px; -ms-border-radius: 5px; border-radius: 5px ; } #Trigger .icon { background-image: url(../img/nav-icon.png); display: block; -border: 12px solid #fff; +border: 12px solid transparent; height: 16px; outline: none; -webkit-border-radius: 5px; -moz-border-radius: 5px; -o-border-radius: 5px; -ms-border-radius: 5px; border-radius: 5px ; } - +.col-left.faded { +opacity: 1; +-webkit-filter: none; -moz-filter: none; -o-filter: none; -ms-filter: none; filter: none ; +} .user.card { -background-color: #f6f7f8; -webkit-box-shadow: none; -moz-box-shadow: none; -o-box-shadow: none; -ms-box-shadow: none; box-shadow: none ; margin-top: 10px; margin-left: -15px; @@ -717,8 +894,6 @@ margin-bottom: 0px; .more.small { padding: 10px; margin-bottom: 5px; -background-color: #fff; -border: 1px solid #eef0f1; -webkit-border-radius: 5px; -moz-border-radius: 5px; -o-border-radius: 5px; -ms-border-radius: 5px; border-radius: 5px ; } .post-create .icon-image { diff --git a/css/dark.css b/css/dark.css new file mode 100644 index 0000000..a86baeb --- /dev/null +++ b/css/dark.css @@ -0,0 +1,51 @@ +.theme-dark { background-color: #1b1b1b; color: #ccc; } +.theme-dark .head-container { background-color: #242424; } + +.theme-dark #Overlay.visible { background-color: rgba(53, 52, 60, 0.89); } + +.theme-dark a { color: #a69988 } +.theme-dark .menu-item { color: #000 } +.theme-dark .post .user .settings:hover { color: #ccc } + +.theme-dark .head .user .name { color: #a69988 } +.theme-dark .user .name { color: #a69988 } +.theme-dark .post-list-type a { color: #adadad; } +.theme-dark .post-list-type a:hover { color: #a69988; border-bottom-color: #a69988 } +.theme-dark .post-list-type .active { color: #a69988; border-bottom-color: #a69988 } + +.theme-dark .post-create .postfield { border-color: #333; } +.theme-dark .post-create.editing { box-shadow: 0px 1px 13px 1px #111213 } + +.theme-dark .button-submit { color: #ccc } +.theme-dark .button-outline { color: #333; } + +.theme-dark .post .body { color: #dcd9e5; } +.theme-dark .post { background-color: #242424; border: none; border-radius: 0px; } +.theme-dark .comment-list { background-color: #242424; border-top-color: #333 } +.theme-dark .post .img .fullsize { background-color: #333 } +.theme-dark .post .reply-name { color: #ccc } +.theme-dark .post .user .address { color: #ccc } +.theme-dark .post .added, .theme-dark .post .sep { color: #a69988 } +.theme-dark .post .body a { color: #a69988 } +.theme-dark .post blockquote { border-left: 3px solid #444; } + +.theme-dark .activity-list .items a { color: #a69988 } +.theme-dark .activity { color: #ccc } +.theme-dark .activity-list .bg-line { background-color: #444 } +.theme-dark .activity-list .circle { border-color: #333; background-color: #1b1b1b } +.theme-dark .activity:last-child { background-color: #1b1b1b; } + +.theme-dark input.text, .theme-dark textarea { background-color: #1b1b1b; border-color: #333; color: #ccc; } +.theme-dark .card { box-shadow: 0px 1px 11px #1b1b1b; background-color: #242424; } + +.theme-dark .button-follow:hover { background-color: rgba(74, 160, 177, 0.1) !important; border-color: #444 !important; color: #55cedf !important } +.theme-dark .users.gray .button-follow { border: 1px solid #3b8297 } +.theme-dark .user.notseeding .button-follow { border-color: #393251 } +.theme-dark h2.sep { border-top: 1px solid #333; } + +.theme-dark .post code { background-color: #232323; border-color: #0A0A0A; color: #d3d3d3; } +.theme-dark .icon-heart.active { color: #a69988; filter: sepia(1) hue-rotate(504deg) brightness(0.75) saturate(5); } +.theme-dark .post .actions .link.active { color: #a69988; } + +.theme-dark .button-follow-big:hover { background-color: #444; } +.theme-dark .maxheight-limited:before { background: linear-gradient(rgba(38, 36, 46, 0), #242424 70%); } diff --git a/css/mobile.css b/css/mobile.css index 5536df7..e0628d6 100644 --- a/css/mobile.css +++ b/css/mobile.css @@ -10,21 +10,20 @@ font-size: medium !important; .head-container { position: fixed; -background-color: #fff; width: 100%; height: 50px; z-index: 30; } .head { width: 100%; -background-color: #fff; } .head .logo { -margin-left: 50px; +margin-left: 5px; position: absolute; z-index: 1; } .right { +margin-right: 0px !important; position: fixed; right: 0; top: 0; @@ -35,7 +34,6 @@ margin-top: 60px; margin-bottom: 5px; } .col-center { -background-color: #f6f7f8; width: 100%; overflow: auto; padding-left: 5px; @@ -61,6 +59,9 @@ overflow-y: auto; z-index: 1; transition: 0.3s all cubic-bezier(0.77, 0, 0.175, 1); } +.theme-dark .col-left, .theme-dark .col-right { +background-color: #242424; +} .trigger-on .col-left, .trigger-on .col-right { left: 0px; box-shadow: 0px 0px 30px #999; @@ -69,18 +70,18 @@ box-shadow: 0px 0px 30px #999; #Trigger { display: block; position: fixed; -left: 5px; +left: 2px; top: 3px; -width: 40px; +width: 33px; height: 40px; z-index: 100; -border: 1px solid #bbb; +border: 1px solid transparent; border-radius: 5px; } #Trigger .icon { background-image: url(../img/nav-icon.png); display: block; -border: 12px solid #fff; +border: 12px solid transparent; height: 16px; outline: none; border-radius: 5px; @@ -90,7 +91,6 @@ opacity: 1; filter: none; } .user.card { -background-color: #f6f7f8; box-shadow: none; margin-top: 10px; margin-left: -15px; @@ -101,8 +101,6 @@ margin-bottom: 0px; .more.small { padding: 10px; margin-bottom: 5px; -background-color: #fff; -border: 1px solid #eef0f1; border-radius: 5px; } .post-create .icon-image { diff --git a/dbschema.json b/dbschema.json index 4e34eee..0085c5a 100644 --- a/dbschema.json +++ b/dbschema.json @@ -7,7 +7,7 @@ "to_json_table": [ "cert_auth_type", "cert_user_id" ], "to_table": ["user"] }, - ".+/data/userdb/users.json": { + ".+/data/userdb/users.*json": { "to_table": ["user"] }, ".+/data/users/.+/content.json": { @@ -69,7 +69,7 @@ ["date_added", "INTEGER"], ["json_id", "INTEGER REFERENCES json (json_id)"] ], - "indexes": ["CREATE UNIQUE INDEX comment_key ON comment(json_id, comment_id)", "CREATE INDEX comment_post_uri ON comment(post_uri)"], + "indexes": ["CREATE UNIQUE INDEX comment_key ON comment(json_id, comment_id)", "CREATE INDEX comment_post_uri ON comment(post_uri)", "CREATE INDEX comment_date_added ON comment(date_added)"], "schema_changed": 2 }, "follow": { @@ -81,7 +81,7 @@ ["date_added", "INTEGER"], ["json_id", "INTEGER REFERENCES json (json_id)"] ], - "indexes": ["CREATE UNIQUE INDEX follow_key ON follow(json_id, follow_id)"], + "indexes": ["CREATE UNIQUE INDEX follow_key ON follow(json_id, follow_id)", "CREATE INDEX follow_date_added ON follow(date_added)"], "schema_changed": 2 }, "user": { @@ -103,4 +103,4 @@ "Posts": "SELECT 'post' AS type, post.date_added AS date_added, 'In ' || json.user_name || \"'s post\" AS title, post.body AS body, '?Post/' || json.site || '/' || REPLACE(json.directory, 'data/users/', '') || '/' || post_id AS url FROM post LEFT JOIN json USING (json_id)", "Comments": "SELECT 'comment' AS type, comment.date_added AS date_added, 'a post' AS title, '@' || user_name || ': ' || comment.body AS body, '?Post/' || json.site || '/' || REPLACE(post_uri, '_', '/') AS url FROM comment LEFT JOIN json USING (json_id)" } -} \ No newline at end of file +} diff --git a/index.html b/index.html index 4a07d78..cadf141 100644 --- a/index.html +++ b/index.html @@ -5,11 +5,11 @@
"+(escaped?code:escape(code,true))+"\n"}return''+(escaped?code:escape(code,true))+"\n\n"};Renderer.prototype.blockquote=function(quote){return"\n"+quote+"\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"
"+text+"
\n"};Renderer.prototype.table=function(header,body){return""+text+""};Renderer.prototype.br=function(){return this.options.xhtml?""+escape(e.message+"",true)+""}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}()); +!function(e){"use strict";var k={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:f,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:f,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:f,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function a(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||b.defaults,this.rules=k.normal,this.options.pedantic?this.rules=k.pedantic:this.options.gfm&&(this.options.tables?this.rules=k.tables:this.rules=k.gfm)}k._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,k._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,k.def=i(k.def).replace("label",k._label).replace("title",k._title).getRegex(),k.bullet=/(?:[*+-]|\d{1,9}\.)/,k.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,k.item=i(k.item,"gm").replace(/bull/g,k.bullet).getRegex(),k.list=i(k.list).replace(/bull/g,k.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+k.def.source+")").getRegex(),k._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",k._comment=//,k.html=i(k.html,"i").replace("comment",k._comment).replace("tag",k._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),k.paragraph=i(k.paragraph).replace("hr",k.hr).replace("heading",k.heading).replace("lheading",k.lheading).replace("tag",k._tag).getRegex(),k.blockquote=i(k.blockquote).replace("paragraph",k.paragraph).getRegex(),k.normal=d({},k),k.gfm=d({},k.normal,{fences:/^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),k.gfm.paragraph=i(k.paragraph).replace("(?!","(?!"+k.gfm.fences.source.replace("\\1","\\2")+"|"+k.list.source.replace("\\1","\\3")+"|").getRegex(),k.tables=d({},k.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),k.pedantic=d({},k.normal,{html:i("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|
'+(n?e:u(e,!0))+"\n":""+(n?e:u(e,!0))+""},r.prototype.blockquote=function(e){return"\n"+e+"\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n,r){return this.options.headerIds?"
"+e+"
\n"},r.prototype.table=function(e,t){return t&&(t=""+t+""),""+e+""},r.prototype.br=function(){return this.options.xhtml?""+u(e.message+"",!0)+"";throw e}}f.exec=f,b.options=b.setOptions=function(e){return d(b.defaults,e),b},b.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new r,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},b.defaults=b.getDefaults(),b.Parser=h,b.parser=h.parse,b.Renderer=r,b.TextRenderer=s,b.Lexer=a,b.lexer=a.lex,b.InlineLexer=p,b.inlineLexer=p.output,b.Slugger=t,b.parse=b,"undefined"!=typeof module&&"object"==typeof exports?module.exports=b:"function"==typeof define&&define.amd?define(function(){return b}):e.marked=b}(this||("undefined"!=typeof window?window:global)); -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/js/utils/Animation.coffee ---- */ + +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/js/utils/Animation.coffee ---- */ (function() { @@ -1324,8 +1331,8 @@ function clone(obj) { }; Animation.prototype.show = function(elem, props) { - var delay, _ref; - delay = ((_ref = arguments[arguments.length - 2]) != null ? _ref.delay : void 0) * 1000 || 1; + var delay, ref; + delay = ((ref = arguments[arguments.length - 2]) != null ? ref.delay : void 0) * 1000 || 1; elem.className += " animate"; elem.style.opacity = 0; setTimeout((function() { @@ -1339,8 +1346,8 @@ function clone(obj) { }; Animation.prototype.hide = function(elem, remove_func, props) { - var delay, _ref; - delay = ((_ref = arguments[arguments.length - 2]) != null ? _ref.delay : void 0) * 1000 || 1; + var delay, ref; + delay = ((ref = arguments[arguments.length - 2]) != null ? ref.delay : void 0) * 1000 || 1; elem.className += " animate"; setTimeout((function() { return elem.style.opacity = 0; @@ -1413,37 +1420,57 @@ function clone(obj) { }).call(this); -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/js/utils/Autosize.coffee ---- */ + +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/js/utils/Autosize.coffee ---- */ (function() { var Autosize, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __hasProp = {}.hasOwnProperty; - - Autosize = (function(_super) { - __extends(Autosize, _super); - - function Autosize(_at_attrs) { - var _base; - this.attrs = _at_attrs != null ? _at_attrs : {}; - this.render = __bind(this.render, this); - this.handleKeydown = __bind(this.handleKeydown, this); - this.handleInput = __bind(this.handleInput, this); - this.autoHeight = __bind(this.autoHeight, this); - this.setValue = __bind(this.setValue, this); - this.storeNode = __bind(this.storeNode, this); + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Autosize = (function(superClass) { + extend(Autosize, superClass); + + function Autosize(attrs1) { + var base, base1, base2, base3, base4, base5, base6, base7, base8; + this.attrs = attrs1 != null ? attrs1 : {}; + this.render = bind(this.render, this); + this.submit = bind(this.submit, this); + this.handleKeydown = bind(this.handleKeydown, this); + this.handleInput = bind(this.handleInput, this); + this.autoHeight = bind(this.autoHeight, this); + this.setValue = bind(this.setValue, this); + this.storeNode = bind(this.storeNode, this); this.node = null; - if ((_base = this.attrs).classes == null) { - _base.classes = {}; - } - this.attrs.classes.loading = false; - this.attrs.oninput = this.handleInput; - this.attrs.onkeydown = this.handleKeydown; - this.attrs.afterCreate = this.storeNode; - this.attrs.rows = 1; - this.attrs.disabled = false; + if ((base = this.attrs).classes == null) { + base.classes = {}; + } + if ((base1 = this.attrs.classes).loading == null) { + base1.loading = false; + } + if ((base2 = this.attrs).oninput == null) { + base2.oninput = this.handleInput; + } + if ((base3 = this.attrs).onkeydown == null) { + base3.onkeydown = this.handleKeydown; + } + if ((base4 = this.attrs).afterCreate == null) { + base4.afterCreate = this.storeNode; + } + if ((base5 = this.attrs).rows == null) { + base5.rows = 1; + } + if ((base6 = this.attrs).disabled == null) { + base6.disabled = false; + } + if ((base7 = this.attrs).value == null) { + base7.value = ""; + } + if ((base8 = this.attrs).title_submit == null) { + base8.title_submit = null; + } } Autosize.property('loading', { @@ -1514,32 +1541,43 @@ function clone(obj) { if (e == null) { e = null; } - if (e.which === 13 && !e.shiftKey && this.attrs.onsubmit && this.attrs.value.trim()) { - this.attrs.onsubmit(); - setTimeout(((function(_this) { - return function() { - return _this.autoHeight(); - }; - })(this)), 100); - return false; + if (e.which === 13 && e.ctrlKey && this.attrs.onsubmit && this.attrs.value.trim()) { + return this.submit(); } }; + Autosize.prototype.submit = function() { + this.attrs.onsubmit(); + setTimeout(((function(_this) { + return function() { + return _this.autoHeight(); + }; + })(this)), 100); + return false; + }; + Autosize.prototype.render = function(body) { - var attrs; + var attrs, tag_textarea; if (body == null) { body = null; } - if (body && this.attrs.value === void 0) { + if (body && !this.attrs.value) { this.setValue(body); } if (this.loading) { attrs = clone(this.attrs); attrs.disabled = true; - return h("textarea.autosize", attrs); + tag_textarea = h("textarea.autosize", attrs); } else { - return h("textarea.autosize", this.attrs); + tag_textarea = h("textarea.autosize", this.attrs); } + return [ + tag_textarea, this.attrs.title_submit ? h("a.button.button.button-submit.button-small", { + href: "#Submit", + onclick: this.submit, + classes: this.attrs.classes + }, this.attrs.title_submit) : void 0 + ]; }; return Autosize; @@ -1551,7 +1589,8 @@ function clone(obj) { }).call(this); -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/js/utils/Debug.coffee ---- */ + +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/js/utils/Debug.coffee ---- */ (function() { @@ -1584,28 +1623,29 @@ function clone(obj) { }).call(this); -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/js/utils/Editable.coffee ---- */ + +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/js/utils/Editable.coffee ---- */ (function() { var Editable, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __hasProp = {}.hasOwnProperty; - - Editable = (function(_super) { - __extends(Editable, _super); - - function Editable(_at_type, _at_handleSave, _at_handleDelete) { - this.type = _at_type; - this.handleSave = _at_handleSave; - this.handleDelete = _at_handleDelete; - this.render = __bind(this.render, this); - this.handleSaveClick = __bind(this.handleSaveClick, this); - this.handleDeleteClick = __bind(this.handleDeleteClick, this); - this.handleCancelClick = __bind(this.handleCancelClick, this); - this.handleEditClick = __bind(this.handleEditClick, this); - this.storeNode = __bind(this.storeNode, this); + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Editable = (function(superClass) { + extend(Editable, superClass); + + function Editable(type, handleSave, handleDelete) { + this.type = type; + this.handleSave = handleSave; + this.handleDelete = handleDelete; + this.render = bind(this.render, this); + this.handleSaveClick = bind(this.handleSaveClick, this); + this.handleDeleteClick = bind(this.handleDeleteClick, this); + this.handleCancelClick = bind(this.handleCancelClick, this); + this.handleEditClick = bind(this.handleEditClick, this); + this.storeNode = bind(this.storeNode, this); this.node = null; this.editing = false; this.render_function = null; @@ -1695,20 +1735,21 @@ function clone(obj) { }).call(this); -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/js/utils/ImagePreview.coffee ---- */ + +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/js/utils/ImagePreview.coffee ---- */ (function() { var ImagePreview, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __hasProp = {}.hasOwnProperty; + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; - ImagePreview = (function(_super) { - __extends(ImagePreview, _super); + ImagePreview = (function(superClass) { + extend(ImagePreview, superClass); function ImagePreview() { - this.setPreviewData = __bind(this.setPreviewData, this); + this.setPreviewData = bind(this.setPreviewData, this); this.width = 0; this.height = 0; this.preview_data = ""; @@ -1730,14 +1771,14 @@ function clone(obj) { return [Math.round(width), Math.round(height)]; }; - ImagePreview.prototype.setPreviewData = function(_at_preview_data) { - var colors, pixels, _ref; - this.preview_data = _at_preview_data; - return _ref = this.preview_data.split(","), this.width = _ref[0], this.height = _ref[1], colors = _ref[2], pixels = _ref[3], _ref; + ImagePreview.prototype.setPreviewData = function(preview_data) { + var colors, pixels, ref; + this.preview_data = preview_data; + return ref = this.preview_data.split(","), this.width = ref[0], this.height = ref[1], colors = ref[2], pixels = ref[3], ref; }; ImagePreview.prototype.getPreviewUri = function(target_width, target_height) { - var b, back, canvas, color, color_codes, colors, ctx, di, g, height, hex, i, image_data, pixel, pixels, r, width, _i, _j, _len, _len1, _ref, _ref1; + var b, back, canvas, canvas2, color, color_codes, colors, ctx, di, g, height, hex, i, image_data, j, k, len, len1, pixel, pixels, r, ref, ref1, width; if (target_width == null) { target_width = 10; } @@ -1745,8 +1786,8 @@ function clone(obj) { target_height = 10; } this.logStart("Render"); - _ref = this.preview_data.split(","), this.width = _ref[0], this.height = _ref[1], colors = _ref[2], pixels = _ref[3]; - _ref1 = this.getSize(target_width, target_height), width = _ref1[0], height = _ref1[1]; + ref = this.preview_data.split(","), this.width = ref[0], this.height = ref[1], colors = ref[2], pixels = ref[3]; + ref1 = this.getSize(target_width, target_height), width = ref1[0], height = ref1[1]; colors = colors.match(/.{3}/g); pixels = pixels.split(""); canvas = document.createElement("canvas"); @@ -1755,13 +1796,13 @@ function clone(obj) { ctx = canvas.getContext('2d'); image_data = ctx.createImageData(width, height); color_codes = {}; - for (i = _i = 0, _len = colors.length; _i < _len; i = ++_i) { + for (i = j = 0, len = colors.length; j < len; i = ++j) { color = colors[i]; color_codes[this.pixel_chars[i]] = color; } di = 0; - for (_j = 0, _len1 = pixels.length; _j < _len1; _j++) { - pixel = pixels[_j]; + for (k = 0, len1 = pixels.length; k < len1; k++) { + pixel = pixels[k]; hex = color_codes[pixel]; r = parseInt(hex[0], 16) * 17; g = parseInt(hex[1], 16) * 17; @@ -1773,18 +1814,14 @@ function clone(obj) { di += 4; } ctx.putImageData(image_data, 0, 0); - - /* - canvas2 = document.createElement("canvas") - canvas2.width = width*3 - canvas2.height = height*3 - ctx = canvas2.getContext('2d') - ctx.filter = "blur(1px)" - ctx.drawImage(canvas, 1, 0, canvas.width*3, canvas.height*3) - ctx.drawImage(canvas, 0, 1, canvas.width*3, canvas.height*3) - ctx.drawImage(canvas, 0, 0, canvas.width*3, canvas.height*3) - */ - back = canvas.toDataURL("image/png"); + canvas2 = document.createElement("canvas"); + canvas2.width = width * 3; + canvas2.height = height * 3; + ctx = canvas2.getContext('2d'); + ctx.filter = "blur(1px)"; + ctx.drawImage(canvas, -5, -5, canvas.width * 3 + 10, canvas.height * 3 + 10); + ctx.drawImage(canvas, 0, 0, canvas.width * 3, canvas.height * 3); + back = canvas2.toDataURL("image/png"); this.logEnd("Render"); return back; }; @@ -1798,37 +1835,38 @@ function clone(obj) { }).call(this); -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/js/utils/ItemList.coffee ---- */ + +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/js/utils/ItemList.coffee ---- */ (function() { var ItemList; ItemList = (function() { - function ItemList(_at_item_class, _at_key) { - this.item_class = _at_item_class; - this.key = _at_key; + function ItemList(item_class1, key1) { + this.item_class = item_class1; + this.key = key1; this.items = []; this.items_bykey = {}; } ItemList.prototype.sync = function(rows, item_class, key) { - var current_obj, item, row, _i, _len, _results; + var current_obj, i, item, len, results, row; this.items.splice(0, this.items.length); - _results = []; - for (_i = 0, _len = rows.length; _i < _len; _i++) { - row = rows[_i]; + results = []; + for (i = 0, len = rows.length; i < len; i++) { + row = rows[i]; current_obj = this.items_bykey[row[this.key]]; if (current_obj) { current_obj.row = row; - _results.push(this.items.push(current_obj)); + results.push(this.items.push(current_obj)); } else { item = new this.item_class(row, this); this.items_bykey[row[this.key]] = item; - _results.push(this.items.push(item)); + results.push(this.items.push(item)); } } - return _results; + return results; }; ItemList.prototype.deleteItem = function(item) { @@ -1851,7 +1889,8 @@ function clone(obj) { }).call(this); -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/js/utils/Maxheight.coffee ---- */ + +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/js/utils/Maxheight.coffee ---- */ (function() { @@ -1887,31 +1926,32 @@ function clone(obj) { }).call(this); -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/js/utils/Menu.coffee ---- */ + +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/js/utils/Menu.coffee ---- */ (function() { var Menu, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; Menu = (function() { function Menu() { - this.render = __bind(this.render, this); - this.renderItem = __bind(this.renderItem, this); - this.handleClick = __bind(this.handleClick, this); - this.storeNode = __bind(this.storeNode, this); - this.toggle = __bind(this.toggle, this); - this.hide = __bind(this.hide, this); - this.show = __bind(this.show, this); + this.render = bind(this.render, this); + this.renderItem = bind(this.renderItem, this); + this.handleClick = bind(this.handleClick, this); + this.storeNode = bind(this.storeNode, this); + this.toggle = bind(this.toggle, this); + this.hide = bind(this.hide, this); + this.show = bind(this.show, this); this.visible = false; this.items = []; this.node = null; } Menu.prototype.show = function() { - var _ref; - if ((_ref = window.visible_menu) != null) { - _ref.hide(); + var ref; + if ((ref = window.visible_menu) != null) { + ref.hide(); } this.visible = true; return window.visible_menu = this; @@ -1948,17 +1988,21 @@ function clone(obj) { }; Menu.prototype.handleClick = function(e) { - var cb, item, keep_menu, selected, title, _i, _len, _ref; + var cb, i, item, keep_menu, len, ref, selected, title; keep_menu = false; - _ref = this.items; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - item = _ref[_i]; + ref = this.items; + for (i = 0, len = ref.length; i < len; i++) { + item = ref[i]; title = item[0], cb = item[1], selected = item[2]; if (title === e.target.textContent) { keep_menu = cb(item); } } - if (keep_menu !== true) { + if (e.target.type && (e.target.type === "everyone" || e.target.type === "lang" || e.target.type.slice(0, 3) === "hub")) { + this.hide(); + } else if (e.target.value || e.target.title === "") { + this.show(); + } else if (keep_menu !== true) { this.hide(); } return false; @@ -1980,14 +2024,34 @@ function clone(obj) { href = "#" + title; onclick = this.handleClick; } - return h("a.menu-item", { - href: href, - onclick: onclick, - key: title, - classes: { - "selected": selected - } - }, [title]); + if (title === "Show posts after") { + return h("div.show-after", h("a.menu-item", { + href: href, + onclick: onclick, + key: title + }, [title]), h("input#show-after-date", { + placeholder: "unix time", + value: selected + })); + } else if (title === "Show posts since") { + return h("div.show-since", h("a.menu-item", { + href: href, + onclick: onclick, + key: title + }, [title]), h("input#show-since-day", { + placeholder: " n ", + value: selected + }), " days ago"); + } else { + return h("a.menu-item", { + href: href, + onclick: onclick, + key: title, + classes: { + "selected": selected + } + }, [title]); + } } }; @@ -2015,7 +2079,7 @@ function clone(obj) { if (!window.visible_menu || !window.visible_menu.node) { return false; } - if (e.target !== window.visible_menu.node.parentNode && e.target.parentNode !== window.visible_menu.node && e.target.parentNode !== window.visible_menu.node.parentNode && e.target.parentNode !== window.visible_menu.node && e.target.parentNode.parentNode !== window.visible_menu.node.parentNode) { + if (e.target !== window.visible_menu.node.parentNode && e.target.parentNode !== window.visible_menu.node && e.target.parentNode !== window.visible_menu.node.parentNode && e.target.parentNode !== window.visible_menu.node && e.target.parentNode.parentNode !== window.visible_menu.node && e.target.parentNode.parentNode !== window.visible_menu.node.parentNode) { window.visible_menu.hide(); return Page.projector.scheduleRender(); } @@ -2024,22 +2088,23 @@ function clone(obj) { }).call(this); -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/js/utils/Overlay.coffee ---- */ + +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/js/utils/Overlay.coffee ---- */ (function() { var Overlay, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __hasProp = {}.hasOwnProperty; + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; - Overlay = (function(_super) { - __extends(Overlay, _super); + Overlay = (function(superClass) { + extend(Overlay, superClass); function Overlay() { - this.render = __bind(this.render, this); - this.handleClick = __bind(this.handleClick, this); - this.zoomImageTag = __bind(this.zoomImageTag, this); + this.render = bind(this.render, this); + this.handleClick = bind(this.handleClick, this); + this.zoomImageTag = bind(this.zoomImageTag, this); this.visible = false; this.called = false; this.height = 0; @@ -2142,20 +2207,21 @@ function clone(obj) { }).call(this); -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/js/utils/Scrollwatcher.coffee ---- */ + +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/js/utils/Scrollwatcher.coffee ---- */ (function() { var Scrollwatcher, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __hasProp = {}.hasOwnProperty; + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; - Scrollwatcher = (function(_super) { - __extends(Scrollwatcher, _super); + Scrollwatcher = (function(superClass) { + extend(Scrollwatcher, superClass); function Scrollwatcher() { - this.checkScroll = __bind(this.checkScroll, this); + this.checkScroll = bind(this.checkScroll, this); this.log("Scrollwatcher"); this.items = []; window.onscroll = (function(_this) { @@ -2167,24 +2233,24 @@ function clone(obj) { } Scrollwatcher.prototype.checkScroll = function() { - var cb, i, item_top, tag, view_bottom, view_top, _i, _ref, _ref1, _results; + var cb, i, item_top, j, ref, ref1, results, tag, view_bottom, view_top; if (!this.items.length) { return; } view_top = window.scrollY; view_bottom = window.scrollY + window.innerHeight; - _ref = this.items; - _results = []; - for (i = _i = _ref.length - 1; _i >= 0; i = _i += -1) { - _ref1 = _ref[i], item_top = _ref1[0], tag = _ref1[1], cb = _ref1[2]; + ref = this.items; + results = []; + for (i = j = ref.length - 1; j >= 0; i = j += -1) { + ref1 = ref[i], item_top = ref1[0], tag = ref1[1], cb = ref1[2]; if (item_top + 900 > view_top && item_top - 400 < view_bottom) { this.items.splice(i, 1); - _results.push(cb(tag)); + results.push(cb(tag)); } else { - _results.push(void 0); + results.push(void 0); } } - return _results; + return results; }; Scrollwatcher.prototype.add = function(tag, cb) { @@ -2201,18 +2267,19 @@ function clone(obj) { }).call(this); -/* ---- /1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH/js/utils/Text.coffee ---- */ + +/* ---- /1FZWQJgwcgeK5mUFsKA3JnxuQyjdZ5ErP2/js/utils/Text.coffee ---- */ (function() { var MarkedRenderer, Text, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __hasProp = {}.hasOwnProperty, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - MarkedRenderer = (function(_super) { - __extends(MarkedRenderer, _super); + MarkedRenderer = (function(superClass) { + extend(MarkedRenderer, superClass); function MarkedRenderer() { return MarkedRenderer.__super__.constructor.apply(this, arguments); @@ -2228,12 +2295,12 @@ function clone(obj) { Text = (function() { function Text() { - this.renderLinks = __bind(this.renderLinks, this); - this.renderMarked = __bind(this.renderMarked, this); + this.renderLinks = bind(this.renderLinks, this); + this.renderMarked = bind(this.renderMarked, this); } Text.prototype.toColor = function(text, saturation, lightness) { - var hash, i, _i, _ref; + var hash, i, j, ref, ref1, ref2; if (saturation == null) { saturation = 30; } @@ -2241,11 +2308,15 @@ function clone(obj) { lightness = 50; } hash = 0; - for (i = _i = 0, _ref = text.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) { + for (i = j = 0, ref = text.length - 1; 0 <= ref ? j <= ref : j >= ref; i = 0 <= ref ? ++j : --j) { hash += text.charCodeAt(i) * i; hash = hash % 1777; } - return "hsl(" + (hash % 360) + ("," + saturation + "%," + lightness + "%)"); + if (((ref1 = Page.server_info) != null ? (ref2 = ref1.user_settings) != null ? ref2.theme : void 0 : void 0) === "dark") { + return "hsl(" + (hash % 360) + ("," + (saturation + 5) + "%," + (lightness + 15) + "%)"); + } else { + return "hsl(" + (hash % 360) + ("," + saturation + "%," + lightness + "%)"); + } }; Text.prototype.renderMarked = function(text, options) { @@ -2261,7 +2332,8 @@ function clone(obj) { options["renderer"] = marked_renderer; text = this.fixReply(text); text = marked(text, options); - text = text.replace(/(@[^\x00-\x1f^\x21-\x2f^\x3a-\x40^\x5b-\x60^\x7b-\x7f]{1,16}):/g, '$1:'); + text = text.replace(/(.*?)<\/a>/g, '$1'); + text = text.replace(/(\s|>|^)(@[^\s]{1,50}):/g, '$1$2:'); return this.fixHtmlLinks(text); }; @@ -2271,7 +2343,7 @@ function clone(obj) { return "" + match + ""; }); text = text.replace(/\n/g, '
"+(escaped?code:escape(code,true))+"\n"}return''+(escaped?code:escape(code,true))+"\n\n"};Renderer.prototype.blockquote=function(quote){return"\n"+quote+"\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"
"+text+"
\n"};Renderer.prototype.table=function(header,body){return""+text+""};Renderer.prototype.br=function(){return this.options.xhtml?""+escape(e.message+"",true)+""}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}()); \ No newline at end of file +!function(e){"use strict";var k={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:f,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:f,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:f,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function a(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||b.defaults,this.rules=k.normal,this.options.pedantic?this.rules=k.pedantic:this.options.gfm&&(this.options.tables?this.rules=k.tables:this.rules=k.gfm)}k._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,k._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,k.def=i(k.def).replace("label",k._label).replace("title",k._title).getRegex(),k.bullet=/(?:[*+-]|\d{1,9}\.)/,k.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,k.item=i(k.item,"gm").replace(/bull/g,k.bullet).getRegex(),k.list=i(k.list).replace(/bull/g,k.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+k.def.source+")").getRegex(),k._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",k._comment=//,k.html=i(k.html,"i").replace("comment",k._comment).replace("tag",k._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),k.paragraph=i(k.paragraph).replace("hr",k.hr).replace("heading",k.heading).replace("lheading",k.lheading).replace("tag",k._tag).getRegex(),k.blockquote=i(k.blockquote).replace("paragraph",k.paragraph).getRegex(),k.normal=d({},k),k.gfm=d({},k.normal,{fences:/^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),k.gfm.paragraph=i(k.paragraph).replace("(?!","(?!"+k.gfm.fences.source.replace("\\1","\\2")+"|"+k.list.source.replace("\\1","\\3")+"|").getRegex(),k.tables=d({},k.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),k.pedantic=d({},k.normal,{html:i("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|
'+(n?e:u(e,!0))+"\n":""+(n?e:u(e,!0))+""},r.prototype.blockquote=function(e){return"\n"+e+"\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n,r){return this.options.headerIds?"
"+e+"
\n"},r.prototype.table=function(e,t){return t&&(t=""+t+""),""+e+""},r.prototype.br=function(){return this.options.xhtml?""+u(e.message+"",!0)+"";throw e}}f.exec=f,b.options=b.setOptions=function(e){return d(b.defaults,e),b},b.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new r,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},b.defaults=b.getDefaults(),b.Parser=h,b.parser=h.parse,b.Renderer=r,b.TextRenderer=s,b.Lexer=a,b.lexer=a.lex,b.InlineLexer=p,b.inlineLexer=p.output,b.Slugger=t,b.parse=b,"undefined"!=typeof module&&"object"==typeof exports?module.exports=b:"function"==typeof define&&define.amd?define(function(){return b}):e.marked=b}(this||("undefined"!=typeof window?window:global)); diff --git a/js/utils/Autosize.coffee b/js/utils/Autosize.coffee index 9fc412c..bb45d1d 100644 --- a/js/utils/Autosize.coffee +++ b/js/utils/Autosize.coffee @@ -3,12 +3,14 @@ class Autosize extends Class @node = null @attrs.classes ?= {} - @attrs.classes.loading = false - @attrs.oninput = @handleInput - @attrs.onkeydown = @handleKeydown - @attrs.afterCreate = @storeNode - @attrs.rows = 1 - @attrs.disabled = false + @attrs.classes.loading ?= false + @attrs.oninput ?= @handleInput + @attrs.onkeydown ?= @handleKeydown + @attrs.afterCreate ?= @storeNode + @attrs.rows ?= 1 + @attrs.disabled ?= false + @attrs.value ?= "" + @attrs.title_submit ?= null @property 'loading', get: -> @attrs.classes.loading @@ -49,22 +51,35 @@ class Autosize extends Class RateLimit 300, @autoHeight handleKeydown: (e=null) => - if e.which == 13 and not e.shiftKey and @attrs.onsubmit and @attrs.value.trim() - @attrs.onsubmit() - setTimeout ( => - @autoHeight() - ), 100 - return false + if e.which == 13 and e.ctrlKey and @attrs.onsubmit and @attrs.value.trim() + @submit() + + submit: => + @attrs.onsubmit() + setTimeout ( => + @autoHeight() + ), 100 + return false render: (body=null) => - if body and @attrs.value == undefined + if body and !@attrs.value @setValue(body) if @loading attrs = clone(@attrs) #attrs.value = "Submitting..." attrs.disabled = true - h("textarea.autosize", attrs) + tag_textarea = h("textarea.autosize", attrs) else - h("textarea.autosize", @attrs) + tag_textarea = h("textarea.autosize", @attrs) + + return [ + tag_textarea, + if @attrs.title_submit + h( + "a.button.button.button-submit.button-small", + {href: "#Submit", onclick: @submit, classes: @attrs.classes}, + @attrs.title_submit + ) + ] -window.Autosize = Autosize \ No newline at end of file +window.Autosize = Autosize diff --git a/js/utils/ImagePreview.coffee b/js/utils/ImagePreview.coffee index edba302..b8fc71b 100644 --- a/js/utils/ImagePreview.coffee +++ b/js/utils/ImagePreview.coffee @@ -52,18 +52,18 @@ class ImagePreview extends Class #ctx.putImageData(image_data, 1, 0) #ctx.putImageData(image_data, 0, 1) ctx.putImageData(image_data, 0, 0) - ### + + # Add some blur for more smooth image canvas2 = document.createElement("canvas") canvas2.width = width*3 canvas2.height = height*3 ctx = canvas2.getContext('2d') ctx.filter = "blur(1px)" - ctx.drawImage(canvas, 1, 0, canvas.width*3, canvas.height*3) - ctx.drawImage(canvas, 0, 1, canvas.width*3, canvas.height*3) + ctx.drawImage(canvas, -5, -5, canvas.width*3 + 10, canvas.height*3 + 10) ctx.drawImage(canvas, 0, 0, canvas.width*3, canvas.height*3) - ### - back = canvas.toDataURL("image/png") + + back = canvas2.toDataURL("image/png") @logEnd "Render" return back -window.ImagePreview = ImagePreview \ No newline at end of file +window.ImagePreview = ImagePreview diff --git a/js/utils/Menu.coffee b/js/utils/Menu.coffee index 9d81f70..80acbc4 100644 --- a/js/utils/Menu.coffee +++ b/js/utils/Menu.coffee @@ -39,7 +39,12 @@ class Menu [title, cb, selected] = item if title == e.target.textContent keep_menu = cb(item) - if keep_menu != true + # Keep Language Filter opened when selecting language + if e.target.type and (e.target.type == "everyone" or e.target.type == "lang" or e.target.type.slice(0,3) == "hub") + @hide() + else if e.target.value or e.target.title == "" + @show() + else if keep_menu != true @hide() return false @@ -56,7 +61,22 @@ class Menu else # Callback href = "#"+title onclick = @handleClick - h("a.menu-item", {href: href, onclick: onclick, key: title, classes: {"selected": selected}}, [title]) + if title == "Show posts after" + h("div.show-after", + h("a.menu-item", { + href: href, onclick: onclick, key: title}, [title]), + h("input#show-after-date", { + placeholder: "unix time", value: selected + })) + else if title == "Show posts since" + h("div.show-since", + h("a.menu-item", { + href: href, onclick: onclick, key: title}, [title]), + h("input#show-since-day", { + placeholder: " n ", value: selected + },)," days ago") + else + h("a.menu-item", {href: href, onclick: onclick, key: title, classes: {"selected": selected}}, [title]) render: (class_name="") => if @visible or @node @@ -68,6 +88,11 @@ window.Menu = Menu document.body.addEventListener "mouseup", (e) -> if not window.visible_menu or not window.visible_menu.node return false - if e.target != window.visible_menu.node.parentNode and e.target.parentNode != window.visible_menu.node and e.target.parentNode != window.visible_menu.node.parentNode and e.target.parentNode != window.visible_menu.node and e.target.parentNode.parentNode != window.visible_menu.node.parentNode + if e.target != window.visible_menu.node.parentNode and \ + e.target.parentNode != window.visible_menu.node and \ + e.target.parentNode != window.visible_menu.node.parentNode and \ + e.target.parentNode != window.visible_menu.node and \ + e.target.parentNode.parentNode != window.visible_menu.node and \ + e.target.parentNode.parentNode != window.visible_menu.node.parentNode window.visible_menu.hide() - Page.projector.scheduleRender() \ No newline at end of file + Page.projector.scheduleRender() diff --git a/js/utils/Text.coffee b/js/utils/Text.coffee index 86d8c3d..b869ef5 100644 --- a/js/utils/Text.coffee +++ b/js/utils/Text.coffee @@ -1,6 +1,6 @@ class MarkedRenderer extends marked.Renderer image: (href, title, text) -> - return ("
")
+ return ""
class Text
toColor: (text, saturation=30, lightness=50) ->
@@ -8,8 +8,10 @@ class Text
for i in [0..text.length-1]
hash += text.charCodeAt(i)*i
hash = hash % 1777
- return "hsl(" + (hash % 360) + ",#{saturation}%,#{lightness}%)";
-
+ if Page.server_info?.user_settings?.theme == "dark"
+ return "hsl(" + (hash % 360) + ",#{saturation + 5}%,#{lightness + 15}%)";
+ else
+ return "hsl(" + (hash % 360) + ",#{saturation}%,#{lightness}%)";
renderMarked: (text, options={}) =>
if not text
@@ -20,7 +22,8 @@ class Text
options["renderer"] = marked_renderer
text = @fixReply(text)
text = marked(text, options)
- text = text.replace(/(@[^\x00-\x1f^\x21-\x2f^\x3a-\x40^\x5b-\x60^\x7b-\x7f]{1,16}):/g, '$1:') # Highlight usernames
+ text = text.replace(/(.*?)<\/a>/g, '$1') # Disable email auto-convert
+ text = text.replace(/(\s|>|^)(@[^\s]{1,50}):/g, '$1$2:') # Highlight usernames
return @fixHtmlLinks text
renderLinks: (text) =>
@@ -28,7 +31,7 @@ class Text
text = text.replace /(https?:\/\/[^\s)]+)/g, (match) ->
return "#{match}" # UnSanitize & -> & in links
text = text.replace(/\n/g, '