├── .dockerignore ├── .gitignore ├── .nojekyll ├── Dockerfile ├── LICENSE.html ├── LICENSE.md ├── Makefile ├── MicrosoftEdgeWebview2Setup.exe ├── README.md ├── authentication ├── password.go └── session.go ├── build-docker.sh ├── built-in ├── admin │ ├── admin-angular.js │ ├── admin.css │ ├── admin.html │ ├── content.html │ ├── image-modal.tpl │ ├── login.html │ ├── post-help-modal.tpl │ ├── post-options-modal.tpl │ ├── post.html │ ├── registration.html │ └── settings.html ├── hbs │ ├── navigation.hbs │ └── pagination.hbs └── public │ ├── angular │ └── js │ │ ├── angular-bootstrap-switch.min.js │ │ ├── angular-route.min.js │ │ ├── angular.min.js │ │ ├── ng-infinite-scroll.min.js │ │ └── ui-bootstrap-tpls.min.js │ ├── bootstrap │ ├── config.json │ ├── css │ │ ├── bootstrap-switch.min.css │ │ ├── bootstrap.yeti.min.css │ │ └── fileinput.min.css │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── js │ │ ├── bootstrap-switch.min.js │ │ ├── bootstrap.min.js │ │ └── fileinput.min.js │ ├── images │ ├── blog-cover.jpg │ ├── blog-logo.jpg │ ├── no-image.png │ ├── user-cover.jpg │ └── user-image.jpg │ ├── jquery │ └── js │ │ ├── jquery.autosize.min.js │ │ └── jquery.min.js │ ├── showdown │ └── js │ │ ├── ng-showdown.min.js │ │ ├── showdown.footnotes.min.js │ │ └── showdown.min.js │ └── zepto │ └── zepto.min.js ├── changelog ├── common └── flags.go ├── configclients.png ├── configuration └── configuration.go ├── content ├── data │ └── README.md ├── https │ └── README.md ├── images │ └── README.md ├── pages │ └── README.md ├── plugins │ └── README.md └── themes │ ├── README.md │ └── promenade │ ├── .gitignore │ ├── Gruntfile.js │ ├── LICENSE.md │ ├── README.md │ ├── assets │ ├── css │ │ ├── normalize.css │ │ └── style.css │ └── sass │ │ ├── _variables.scss │ │ └── style.scss │ ├── default.hbs │ ├── index.hbs │ ├── package.json │ ├── page.hbs │ └── post.hbs ├── conversion ├── html.go └── markdown.go ├── darklight.css ├── database ├── deletion.go ├── initialization.go ├── insertion.go ├── migration │ └── ghost.go ├── retrieval.go └── update.go ├── date └── date.go ├── desc ├── description-pak ├── edit.png ├── embed.go ├── etc ├── default │ └── railroad ├── init.d │ └── railroad └── systemd │ └── system │ ├── railroad.d │ └── railroad.conf │ └── railroad.service ├── filenames └── filenames.go ├── go.mod ├── go.sum ├── hello.png ├── helpers ├── files.go └── files_test.go ├── home.css ├── https └── https.go ├── i2p-zero.nsi ├── i2plogo.png ├── icon ├── icon.png ├── iconunix.go ├── iconwin.go ├── iconwin.ico ├── make_icon.bat └── make_icon.sh ├── index.html ├── journey.png ├── lv.go ├── main.go ├── main_windows.go ├── menu.png ├── plugins ├── conversion.go ├── execution.go ├── loading.go ├── luapool.go └── noplugins.go ├── preinstall-pak ├── railroad.bat ├── railroad.nsi ├── railroad.sh ├── res └── desktop │ └── i2prailroad.desktop ├── server ├── admin.go ├── blog.go └── pages.go ├── showhider.css ├── slug └── slug.go ├── structure ├── blog.go ├── helper.go ├── methods │ ├── blog.go │ ├── helper.go │ ├── post.go │ ├── tag.go │ └── user.go ├── navigation.go ├── post.go ├── requestdata.go ├── requestdata_noplugins.go ├── tag.go └── user.go ├── style.css ├── systray_darwin.go ├── systray_linux.go ├── systray_windows.go ├── templates ├── execution.go ├── generation.go ├── handlebars.go ├── helperfunctions.go └── rss.go └── watcher └── watcher.go /.dockerignore: -------------------------------------------------------------------------------- 1 | *.private 2 | railroad 3 | railroad.exe 4 | *.dll 5 | railroad.tar.gz 6 | railroad.zip 7 | *.deb 8 | railroad-installer.exe 9 | ./content/data/journey.db 10 | *.crt 11 | *.crl 12 | *.key 13 | *.pem 14 | railroad-*-* 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.private 2 | railroad 3 | railroad.exe 4 | *.dll 5 | railroad.tar.gz 6 | railroad.zip 7 | *.deb 8 | railroad-installer.exe 9 | ./content/data/journey.db 10 | *.crt 11 | *.crl 12 | *.key 13 | *.pem 14 | railroad-* 15 | content/data/journey.db 16 | .i2cp.conf 17 | /client.yaml 18 | /plugin.yaml 19 | /*.zip 20 | /*public.txt 21 | /railroad.app 22 | /plugin-config -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eyedeekay/railroad/53b2cbae3fd85a08b1d0355d19f0bbfa2aa3c91c/.nojekyll -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye-backports 2 | RUN apt update && apt install -y \ 3 | apt-transport-https \ 4 | ca-certificates \ 5 | curl \ 6 | gnupg-agent \ 7 | golang-1.16-go \ 8 | make \ 9 | git \ 10 | build-essential \ 11 | libssl-dev \ 12 | g++ \ 13 | markdown \ 14 | libappindicator3*-dev \ 15 | libgtk-3-dev \ 16 | libwebkit2gtk-4.0-dev 17 | RUN addgroup --system --quiet --gid 1000 user 18 | RUN adduser --disabled-password --gecos "" --uid 1000 --gid 1000 --shell /bin/bash --home /home/user user 19 | COPY . /home/user/go/src/i2pgit.org/idk/railroad 20 | WORKDIR /home/user/go/src/i2pgit.org/idk/railroad 21 | RUN chown -R user:user /home/user 22 | CMD /usr/lib/go-1.16/bin/go mod vendor && GOOS=linux make rb -------------------------------------------------------------------------------- /LICENSE.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | railroad 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 51 | 52 | / 53 | 54 |

55 | The MIT License (MIT) 56 |

57 |

58 | Copyright © 2015 kabukky 59 |

60 |

61 | Permission is hereby granted, free of charge, to any person obtaining a copy 62 | of this software and associated documentation files (the “Software”), to deal 63 | in the Software without restriction, including without limitation the rights 64 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 65 | copies of the Software, and to permit persons to whom the Software is 66 | furnished to do so, subject to the following conditions: 67 |

68 |

69 | The above copyright notice and this permission notice shall be included in all 70 | copies or substantial portions of the Software. 71 |

72 |

73 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 74 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 75 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 76 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 77 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 78 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 79 | SOFTWARE. 80 |

81 |
82 | 83 | 84 | Get the source code: 85 | 86 | 87 | 94 |
95 |
96 | 97 | Show license 98 | 99 |
100 |
101 |
The MIT License (MIT)
102 | 
103 | Copyright (c) 2015 kabukky
104 | 
105 | Permission is hereby granted, free of charge, to any person obtaining a copy
106 | of this software and associated documentation files (the "Software"), to deal
107 | in the Software without restriction, including without limitation the rights
108 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
109 | copies of the Software, and to permit persons to whom the Software is
110 | furnished to do so, subject to the following conditions:
111 | 
112 | The above copyright notice and this permission notice shall be included in all
113 | copies or substantial portions of the Software.
114 | 
115 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
116 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
117 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
118 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
119 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
120 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
121 | SOFTWARE.
122 | 
123 | 124 | Hide license 125 | 126 |
127 |
128 |
129 |
130 |
131 | 132 |
133 |
134 | 135 | 136 | I2P 137 | 138 |
139 | 140 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 kabukky 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | REPO_NAME=railroad 3 | export GOPATH=$(HOME)/go 4 | GOPATH=$(HOME)/go 5 | VERSION=0.1.7 6 | LAST_VERSION=0.1.6 7 | USER_GH=eyedeekay 8 | CGO_ENABLED?=0 9 | 10 | GOOS?="linux" 11 | GOARCH?="amd64" 12 | 13 | bin: $(GOPATH)/src/i2pgit.org/idk/railroad 14 | 15 | releases: bin sums 16 | 17 | build: 18 | go build -tags=sqlite_omit_load_extension,netgo,osusergo -ldflags "-s -w" -o railroad-$(GOOS)-$(GOARCH) 19 | 20 | winbuild: 21 | GOOS=windows go build -tags="sqlite_omit_load_extension,netgo,osusergo" -ldflags="-H windowsgui -s -w" -o railroad-$(GOOS)-$(GOARCH).exe 22 | GOOS=windows go build -tags="sqlite_omit_load_extension,netgo,osusergo" -ldflags="-H windowsgui -s -w" -o railroad-$(GOOS)-$(GOARCH) 23 | 24 | linux: 25 | GOOS=linux make build 26 | GOOS=linux GOARCH=arm64 make build 27 | 28 | linux-release: linux 29 | 30 | linzip: linux 31 | tar -zcvf ./railroad-$(VERSION).tar.gz built-in content railroad-linux-amd64 railroad-linux-arm64 32 | 33 | windows: railroad-windows.exe 34 | 35 | railroad-windows.exe: 36 | GOOS=windows make winbuild 37 | 38 | winzip: windows nsis 39 | zip -r ./railroad-$(VERSION).zip built-in content railroad-windows-amd64.exe 40 | 41 | $(GOPATH)/src/i2pgit.org/idk/railroad: 42 | mkdir -p $(GOPATH)/src/i2pgit.org/idk/railroad 43 | git clone https://i2pgit.org/idk/railroad $(GOPATH)/src/i2pgit.org/idk/railroad 44 | 45 | clean: pc-clean 46 | rm -rf *.private railroad railroad-* *.public.txt *.tar.gz *.deb *.zip railroad*.exe plugin-config/WebView2Loader.dll plugin-config/webview.dll I2P-Zero plugin vendor 47 | 48 | sums: 49 | sha256sum *.tar.gz *.zip *.deb *-windows.exe 50 | ls -lah *.tar.gz *.zip *.deb *-windows.exe 51 | 52 | preinstall-pak: 53 | @echo "adduser --system --group --home /var/lib/railroad --disabled-login --disabled-password railroad" > preinstall-pak 54 | 55 | install: 56 | mkdir -p /var/lib/$(REPO_NAME)/ /var/lib/$(REPO_NAME)/icon/ 57 | cp -R content /var/lib/$(REPO_NAME)/content 58 | cp -R built-in /var/lib/$(REPO_NAME)/built-in 59 | install -m755 railroad.sh /usr/bin/railroad 60 | install -m755 railroad-$(GOOS)-$(GOARCH) /var/lib/$(REPO_NAME)/railroad 61 | cp res/desktop/i2prailroad.desktop /usr/share/applications 62 | install -m644 etc/default/$(REPO_NAME) /etc/default/$(REPO_NAME) 63 | install -m755 etc/init.d/$(REPO_NAME) /etc/init.d/$(REPO_NAME) 64 | mkdir -p /etc/systemd/system/$(REPO_NAME).d/ 65 | install -g railroad -o railroad -d /var/lib/$(REPO_NAME)/ 66 | cp -r content /var/lib/$(REPO_NAME)/content 67 | cp -r built-in /var/lib/$(REPO_NAME)/built-in 68 | cp icon/icon.png /var/lib/$(REPO_NAME)/icon/icon.png 69 | chown -R railroad:railroad /var/lib/$(REPO_NAME)/ 70 | install -m644 etc/systemd/system/$(REPO_NAME).d/$(REPO_NAME).conf /etc/systemd/system/$(REPO_NAME).d/$(REPO_NAME).conf 71 | install -m644 etc/systemd/system/$(REPO_NAME).service /etc/systemd/system/$(REPO_NAME).service 72 | 73 | uninstall: 74 | rm -rf /usr/bin/railroad \ 75 | /var/lib/$(REPO_NAME)/ \ 76 | /etc/systemd/system/$(REPO_NAME).d/ \ 77 | /etc/init.d/$(REPO_NAME) 78 | 79 | checkinstall: linux preinstall-pak 80 | fakeroot checkinstall \ 81 | --arch=$(GOARCH) \ 82 | --default \ 83 | --install=no \ 84 | --fstrans=yes \ 85 | --pkgname=i2p-railroad \ 86 | --pkgversion=$(VERSION) \ 87 | --pkggroup=net \ 88 | --pkgrelease=1 \ 89 | --pkgsource="https://i2pgit.org/idk/railroad" \ 90 | --maintainer="hankhill19580@gmail.com" \ 91 | --requires="libgtk-3-dev,libappindicator3-dev,libwebkit2gtk-4.0-dev,xclip,wl-clipboard" \ 92 | --suggests="i2p,i2p-router,syndie,tor,tsocks" \ 93 | --nodoc \ 94 | --deldoc=yes \ 95 | --deldesc=yes \ 96 | --pakdir=".." \ 97 | --backup=no 98 | cp -v ../i2p-railroad_$(VERSION)-1_$(GOARCH).deb . 99 | 100 | nsis: plugin-config windows 101 | makensis railroad.nsi 102 | cp ./railroad-installer.exe ./railroad-installer-$(VERSION).exe 103 | 104 | darwin: 105 | GOOS=darwin make build 106 | GOOS=darwin GOARCH=arm64 make build 107 | 108 | macapp: darwin 109 | mkdir -p railroad.app/Contents/MacOS/content 110 | cp -r content/* railroad.app/Contents/MacOS/content/ 111 | cp railroad-$(GOOS)-$(GOARCH) railroad.app/Contents/MacOS/railroad 112 | 113 | fmt: 114 | find . -name '*.go' -exec gofmt -w -s {} \; 115 | 116 | check: 117 | ls -lah "./railroad-$(VERSION).zip" \ 118 | "./railroad-windows-amd64-$(VERSION).exe" \ 119 | "./railroad-$(VERSION).tar.gz" \ 120 | "./i2p-railroad_$(VERSION)-1_amd64.deb" \ 121 | "./i2p-railroad_$(VERSION)-1_arm64.deb" \ 122 | "./railroad-linux-amd64.su3" \ 123 | "./railroad-linux-arm64.su3" \ 124 | "./railroad-darwin-amd64.su3" \ 125 | "./railroad-darwin-arm64.su3" \ 126 | "./railroad-windows-amd64.su3" 127 | echo "PRE RELEASE ARTIFACT CHECK PASSED." 128 | sleep 10s 129 | 130 | copy: 131 | cp -v ./railroad-windows-amd64.exe railroad-windows-amd64-$(VERSION).exe 132 | 133 | all: clean linzip winzip macapp debs plugins nsis copy 134 | 135 | release: all check release-upload 136 | 137 | file-release: 138 | cat desc changelog | grep -B 100 "$(LAST_VERSION)" | gothub release -p -u $(USER_GH) -r $(REPO_NAME) -t $(VERSION) -n $(VERSION) -d -; true 139 | sleep 3s 140 | 141 | release-upload: check file-release basic-release upload-su3s upload-debs 142 | 143 | basic-release: 144 | gothub upload -R -u $(USER_GH) -r "$(REPO_NAME)" -t $(VERSION) -l "`sha256sum ./railroad-$(VERSION).zip`" -n "railroad-$(VERSION).zip" -f "./railroad-$(VERSION).zip" 145 | gothub upload -R -u $(USER_GH) -r "$(REPO_NAME)" -t $(VERSION) -l "`sha256sum ./railroad-windows-amd64.exe`" -n "railroad-windows-amd64-$(VERSION).exe" -f "./railroad-windows-amd64.exe" 146 | gothub upload -R -u $(USER_GH) -r "$(REPO_NAME)" -t $(VERSION) -l "`sha256sum ./railroad-installer-$(VERSION).exe`" -n "railroad-installer-$(VERSION).exe" -f "./railroad-installer-$(VERSION).exe" 147 | gothub upload -R -u $(USER_GH) -r "$(REPO_NAME)" -t $(VERSION) -l "`sha256sum ./railroad-$(VERSION).tar.gz`" -n "railroad-$(VERSION).tar.gz" -f "./railroad-$(VERSION).tar.gz" 148 | 149 | upload-single-deb: 150 | gothub upload -R -u $(USER_GH) -r "$(REPO_NAME)" -t $(VERSION) -l "`sha256sum ./i2p-railroad_$(VERSION)-1_$(GOARCH).deb`" -n "i2p-railroad_$(VERSION)-1_$(GOARCH).deb" -f "./i2p-railroad_$(VERSION)-1_$(GOARCH).deb" 151 | 152 | upload-single-su3: 153 | echo gothub upload -R -u $(USER_GH) -r "$(REPO_NAME)" -t $(VERSION) -l "`sha256sum "./railroad-$(GOOS)-$(GOARCH).su3"`" -n "$(REPO_NAME)-$(GOOS)-$(GOARCH).su3" -f "./railroad-$(GOOS)-$(GOARCH).su3" 154 | 155 | debs: 156 | GOOS=linux GOARCH=amd64 make checkinstall 157 | GOOS=linux GOARCH=arm64 make checkinstall 158 | 159 | upload-debs: 160 | GOOS=linux GOARCH=amd64 make upload-single-deb 161 | GOOS=linux GOARCH=arm64 make upload-single-deb 162 | 163 | upload-su3s: 164 | GOOS=windows make upload-single-su3 165 | GOOS=linux make upload-single-su3 166 | GOOS=linux GOARCH=arm64 make upload-single-su3 167 | GOOS=darwin make upload-single-su3 168 | GOOS=darwin GOARCH=arm64 make upload-single-su3 169 | 170 | download-su3s: 171 | 172 | plugins: plugin-config plugin-linux plugin-darwin plugin-config plugin-windows 173 | 174 | pc-clean: 175 | rm -rf plugin-config 176 | 177 | plugin-config: pc-clean plugin-config/lib plugin-config/lib/content plugin-config/lib/built-in 178 | 179 | plugin-config/lib: 180 | mkdir -p plugin-config/lib/ 181 | cp LICENSE.md plugin-config/LICENSE 182 | 183 | plugin-config/lib/content: 184 | cp -r content plugin-config/lib/content 185 | 186 | plugin-config/lib/built-in: 187 | cp -r built-in plugin-config/lib/built-in 188 | 189 | plugin-linux: plugin-linux-amd64 plugin-linux-arm64 190 | 191 | plugin-build-linux: 192 | GOOS=linux make linux 193 | GOOS=linux make plugin-config 194 | GOOS=linux make plugin-pkg 195 | 196 | plugin-linux-amd64: 197 | GOOS=linux GOARCH=amd64 make plugin-build-linux 198 | 199 | plugin-linux-arm64: 200 | GOOS=linux GOARCH=arm64 make plugin-build-linux 201 | 202 | plugin-windows: 203 | GOOS=windows make railroad-windows.exe 204 | GOOS=windows make plugin-config 205 | GOOS=windows make plugin-pkg 206 | 207 | plugin-darwin: plugin-darwin-amd64 plugin-darwin-arm64 208 | 209 | plugin-build-darwin: 210 | GOOS=darwin make darwin 211 | GOOS=darwin make plugin-config 212 | GOOS=darwin make plugin-pkg 213 | 214 | plugin-darwin-amd64: 215 | GOOS=darwin GOARCH=amd64 make plugin-build-darwin 216 | 217 | plugin-darwin-arm64: 218 | GOOS=darwin GOARCH=arm64 make plugin-build-darwin 219 | 220 | SIGNER_DIR=$(HOME)/i2p-go-keys/ 221 | 222 | plugin-pkg: 223 | rm -f plugin.yaml client.yaml 224 | GOOS=windows i2p.plugin.native -name=railroad-$(GOOS)-$(GOARCH) \ 225 | -signer=hankhill19580@gmail.com \ 226 | -signer-dir=$(SIGNER_DIR) \ 227 | -version "$(VERSION)" \ 228 | -author=hankhill19580@gmail.com \ 229 | -autostart=true \ 230 | -clientname=railroad-$(GOOS)-$(GOARCH) \ 231 | -consolename="Railroad Blog" \ 232 | -consoleurl="http://127.0.0.1:7672" \ 233 | -name="railroad-$(GOOS)-$(GOARCH)" \ 234 | -delaystart="1" \ 235 | -desc="`cat desc`" \ 236 | -exename=railroad-$(GOOS)-$(GOARCH) \ 237 | -icondata=icon/icon.png \ 238 | -updateurl="http://idk.i2p/railroad/railroad-$(GOOS)-$(GOARCH).su3" \ 239 | -website="http://idk.i2p/railroad/" \ 240 | -command="railroad-$(GOOS)-$(GOARCH) -custompath \$$PLUGIN/" \ 241 | -license=MIT \ 242 | -targetos=$(GOOS)-$(GOARCH) \ 243 | -res=plugin-config/ 244 | cp -v railroad-$(GOOS)-$(GOARCH).su3 ./railroad-$(GOOS)-$(GOARCH)-$(VERSION).su3 245 | unzip -o railroad-$(GOOS)-$(GOARCH).zip -d railroad-$(GOOS)-$(GOARCH)-$(VERSION)-zip 246 | 247 | 248 | index: 249 | edgar -------------------------------------------------------------------------------- /MicrosoftEdgeWebview2Setup.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eyedeekay/railroad/53b2cbae3fd85a08b1d0355d19f0bbfa2aa3c91c/MicrosoftEdgeWebview2Setup.exe -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # railroad 2 | 3 | ![Journey](journey.png) 4 | 5 | Really, really easy, individual-oriented I2P blogging with a low barrier to 6 | entry formerly based on [kabukky/journey](github.com/kabukky/journey), now 7 | completely forked. 8 | 9 | The first time you run Railroad you'll need to set a password, then re-start 10 | the application. You can do this by visiting the WebView(via the traymenu) or 11 | by visiting [http://localhost:7672/admin/login](http://localhost:7672/admin/login). 12 | 13 | Enable the SAM API: Go to http://127.0.0.1:7657/configclients. Find the menu 14 | item called "SAM application bridge." Select "Run at Startup" and press the small 15 | arrow to the right of the text. 16 | 17 | - Easy: Markdown-based blogging with Side-by-Side WYSIWYG output for your 18 | blog's content. Edit live with a rich, intuitive interface. 19 | - Low barrier to Entry: Run on a desktop PC with any operating system. When 20 | it's running, it shows up as an application in your system tray. 21 | - Individual-oriented: Host it anywhere you can install an I2P router, no 22 | third-party hosting required. No complicated server setup. 23 | 24 | **Windows Users:** On Windows this application depends on the presence of WebView2 25 | libraries. If they aren't present, the application will attempt to automatically 26 | download and install them. This is normal. If you do not want the application to 27 | do it, then you should do it yourself: https://developer.microsoft.com/en-us/microsoft-edge/webview2/. 28 | 29 | ## Get it: 30 | 31 | ![Menu](menu.png) 32 | 33 | The first time you run `railroad` you'll need to set up an account. Go to 34 | [http://localhost:7672/admin/login/](http://localhost:7672/admin/login/) and 35 | fill in your username and password. Restart the plugin and your site will 36 | become available. 37 | 38 | - Windows I2P Plugin: [http://idk.i2p/railroad/railroad-windows-amd64.su3](http://idk.i2p/railroad/railroad-windows-amd64.su3) 39 | - Linux I2P Plugin: [http://idk.i2p/railroad/railroad-linux-amd64.su3](http://idk.i2p/railroad/railroad-linux-amd64.su3) 40 | - Linux ARM64 I2P Plugin: [http://idk.i2p/railroad/railroad-linux-arm64.su3](http://idk.i2p/railroad/railroad-linux-arm64.su3) 41 | 42 | - Binary Releases: [Github](https://github.com/eyedeekay/railroad/releases) 43 | - Source Code: [i2pgit.org](https://i2pgit.org/idk/railroad) 44 | 45 | ## OSX Builds 46 | 47 | I have no idea if these will work: 48 | 49 | - Darwin I2P Plugin: [http://idk.i2p/railroad/railroad-darwin-amd64.su3](http://idk.i2p/railroad/railroad-darwin-amd64.su3) 50 | - Darwin ARM64 I2P Plugin: [http://idk.i2p/railroad/railroad-darwin-arm64.su3](http://idk.i2p/railroad/railroad-darwin-arm64.su3) 51 | 52 | ## build from source 53 | 54 | ![Editing a post](edit.png) 55 | 56 | go get -u i2pgit.org/idk/railroad 57 | 58 | ## build a 'package' 59 | 60 | If your GOPATH is unset, set it to $HOME/go 61 | 62 | export GOPATH=$HOME/go 63 | 64 | If your $GOPATH is set, leave it as-is. 65 | 66 | mkdir -p $GOPATH/src/i2pgit.org/idk/railroad 67 | git clone https://i2pgit.org/idk/railroad \ 68 | $GOPATH/src/i2pgit.org/idk/railroad 69 | cd $GOPATH/src/i2pgit.org/idk/railroad 70 | make releases 71 | 72 | ## install a package 73 | 74 | Enable the SAM API: Go to http://127.0.0.1:7657/configclients. Find the menu 75 | item called "SAM application bridge." Select "Run at Startup" and press the small 76 | arrow to the right of the text. 77 | 78 | ![SAM API Screenshot](configclients.png) 79 | 80 | Download the package for your platform, `zip` for Windows, `tar.gz` for Linux. 81 | Unzip the package and double-click the `railroad.exe` file for Windows or the 82 | `railroad` file for Linux. 83 | 84 | ### build your own deb 85 | 86 | Using `checkinstall` to generate a deb is done for you: 87 | 88 | mkdir -p $GOPATH/src/i2pgit.org/idk/railroad 89 | git clone https://i2pgit.org/idk/railroad \ 90 | $GOPATH/src/i2pgit.org/idk/railroad 91 | cd $GOPATH/src/i2pgit.org/idk/railroad 92 | make checkinstall 93 | sudo apt-get install ./i2p-railroad_0.0.01-1_amd64.deb 94 | 95 | will set up railroad on Debian and Ubuntu for your system. 96 | 97 | ## install using `make install` 98 | 99 | When using make install a wrapper script is installed to set up railroad in 100 | the user's $HOME/.config/railroad directory. It's installed to 101 | `/usr/local/bin/railroad`. 102 | 103 | mkdir -p $GOPATH/src/i2pgit.org/idk/railroad 104 | git clone https://i2pgit.org/idk/railroad \ 105 | $GOPATH/src/i2pgit.org/idk/railroad 106 | cd $GOPATH/src/i2pgit.org/idk/railroad 107 | sudo make install 108 | -------------------------------------------------------------------------------- /authentication/password.go: -------------------------------------------------------------------------------- 1 | package authentication 2 | 3 | import ( 4 | "golang.org/x/crypto/bcrypt" 5 | "i2pgit.org/idk/railroad/database" 6 | ) 7 | 8 | func LoginIsCorrect(name string, password string) bool { 9 | hashedPassword, err := database.RetrieveHashedPasswordForUser([]byte(name)) 10 | if len(hashedPassword) == 0 || err != nil { // len(hashedPassword) == 0 probably not needed. 11 | // User name likely doesn't exist 12 | return false 13 | } 14 | err = bcrypt.CompareHashAndPassword(hashedPassword, []byte(password)) 15 | if err != nil { 16 | return false 17 | } 18 | return true 19 | } 20 | 21 | func EncryptPassword(password string) (string, error) { 22 | hashedPassword, err := bcrypt.GenerateFromPassword([]byte(password), 10) 23 | if err != nil { 24 | return "", err 25 | } 26 | return string(hashedPassword), nil 27 | } 28 | -------------------------------------------------------------------------------- /authentication/session.go: -------------------------------------------------------------------------------- 1 | package authentication 2 | 3 | import ( 4 | "github.com/gorilla/securecookie" 5 | "net/http" 6 | ) 7 | 8 | var cookieHandler = securecookie.New( 9 | securecookie.GenerateRandomKey(64), 10 | securecookie.GenerateRandomKey(32)) 11 | 12 | func SetSession(userName string, response http.ResponseWriter) { 13 | value := map[string]string{ 14 | "name": userName, 15 | } 16 | if encoded, err := cookieHandler.Encode("session", value); err == nil { 17 | cookie := &http.Cookie{ 18 | Name: "session", 19 | Value: encoded, 20 | Path: "/admin/", 21 | } 22 | http.SetCookie(response, cookie) 23 | } 24 | } 25 | 26 | func GetUserName(request *http.Request) (userName string) { 27 | if cookie, err := request.Cookie("session"); err == nil { 28 | cookieValue := make(map[string]string) 29 | if err = cookieHandler.Decode("session", cookie.Value, &cookieValue); err == nil { 30 | userName = cookieValue["name"] 31 | } 32 | } 33 | return userName 34 | } 35 | 36 | func ClearSession(response http.ResponseWriter) { 37 | cookie := &http.Cookie{ 38 | Name: "session", 39 | Value: "", 40 | Path: "/admin/", 41 | MaxAge: -1, 42 | } 43 | http.SetCookie(response, cookie) 44 | } 45 | -------------------------------------------------------------------------------- /build-docker.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env sh 2 | docker rm -f i2p-zero-build 3 | docker run -td --name i2p-zero-build --rm ubuntu 4 | docker exec -ti i2p-zero-build bash -c ' 5 | apt-get update && 6 | apt-get -y install git wget zip unzip && 7 | git clone https://github.com/i2p-zero/i2p-zero.git && 8 | cd i2p-zero && bash bin/build-all-and-zip.sh' 9 | docker cp i2p-zero-build:/i2p-zero/dist-zip ./ 10 | docker container stop i2p-zero-build 11 | -------------------------------------------------------------------------------- /built-in/admin/admin.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 45px; /* To offset against Bootstrap navbar. */ 3 | padding-bottom: 50px; /* To offset against Bootstrap navbar. */ 4 | } 5 | 6 | /* To fit images into the preview box */ 7 | img { 8 | max-width:100%; 9 | max-height:100%; 10 | } 11 | 12 | /* To make lead text black regardless of bootstrap theme */ 13 | .lead { 14 | color: #000000 !important; 15 | } 16 | 17 | /* To make text in input fields black regardless of bootstrap theme */ 18 | .form-control { 19 | color: #000000 !important; 20 | } 21 | 22 | /* To make bootsrap switches fit into the yeti theme */ 23 | .bootstrap-switch { 24 | border-radius: 0 !important; 25 | } 26 | 27 | .bootstrap-switch-label { 28 | border-radius: 0 !important; 29 | } 30 | 31 | .bootstrap-switch-handle-on { 32 | border-radius: 0 !important; 33 | } 34 | 35 | .bootstrap-switch-handle-off { 36 | border-radius: 0 !important; 37 | } 38 | 39 | .img-settings { 40 | cursor: pointer; 41 | min-height: 5em; 42 | min-width: 5em; 43 | max-height: 35%; 44 | max-width: 35%; 45 | background-color: #f8f8f8; 46 | } 47 | 48 | #post-cover-delete { 49 | cursor: pointer; 50 | } 51 | 52 | /* To move collapsed button in bottom navbar to right */ 53 | .bottom-collapsed-button { 54 | float: left; 55 | margin-left: 15px; 56 | margin-right: 0; 57 | } 58 | 59 | .save-button-navbar { 60 | position: fixed; 61 | bottom: 0; 62 | right: 0; 63 | padding: 0; 64 | margin-left: 15px; 65 | margin-right: 15px; 66 | } 67 | 68 | .logout { 69 | color: #f04124 !important; 70 | } 71 | 72 | .post-content-row { 73 | cursor: pointer; 74 | } 75 | 76 | .post-content-row:hover { 77 | color: #ffffff !important; 78 | background-color: #cccccc !important; 79 | } 80 | 81 | .post-cell { 82 | max-width: 200px; 83 | } 84 | 85 | .help-inner-col { 86 | padding: 10px; 87 | background-color: #f8f8f8; 88 | margin-bottom: 10px; 89 | margin-left: -10px; 90 | margin-right: -10px; 91 | } 92 | 93 | /* To offset the modal footer against the file input field */ 94 | .modal-divider { 95 | margin-top: 15px; 96 | 97 | } 98 | 99 | .img-modal { 100 | cursor: pointer; 101 | } 102 | 103 | .imgselected { 104 | background-color: #337AB7; 105 | outline: none; 106 | border-color: #337AB7; 107 | box-shadow: 0 0 10px #337AB7; 108 | } 109 | 110 | #image-delete { 111 | cursor: pointer; 112 | text-align: right; 113 | margin-bottom: 15px; 114 | } 115 | 116 | #markdown-title-input { 117 | padding: 0; 118 | resize: none; 119 | border: none; 120 | box-shadow: none; 121 | font-size: 2em; 122 | color: black; 123 | margin-top: 0.5em; 124 | margin-bottom: 0.5em; 125 | } 126 | 127 | #markdown-textarea { 128 | outline: none; 129 | box-shadow: none; 130 | -webkit-box-shadow: none; 131 | width: 100%; 132 | padding: 0; 133 | resize: none; 134 | border: none; 135 | margin-top: 20px; 136 | } 137 | 138 | .markdown-modal-button { 139 | cursor: pointer; 140 | float: right; 141 | font-size: 1.3em; 142 | opacity: 0.4; 143 | padding-right: 0.8em; 144 | color: #000000; 145 | } 146 | 147 | .markdown-modal-button:hover { 148 | opacity: 1.0; 149 | } 150 | 151 | #markdown-text-div { 152 | padding-bottom: 3em; 153 | } 154 | 155 | .navbar-label-text { 156 | font-size: 16px; 157 | color: #ffffff; 158 | } 159 | 160 | .navigation-item { 161 | padding-top: 10px; 162 | padding-bottom: 10px; 163 | background-color: #f8f8f8; 164 | outline: 1px solid #dddddd; 165 | margin-right: 0 !important; 166 | margin-left: 0 !important; 167 | } 168 | -------------------------------------------------------------------------------- /built-in/admin/admin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Admin Area 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 | -------------------------------------------------------------------------------- /built-in/admin/content.html: -------------------------------------------------------------------------------- 1 | 16 |
17 | 18 | 19 | 20 | 23 | 24 | 25 | 28 | 32 | 35 | 36 | 37 |
21 |
No posts to show. Create some!
22 |
26 |

{{$index + 1}}

27 |
29 |

{{post.Title}} PublishedDraft

30 |

{{post.Markdown | limitTo: 400}}{{post.Markdown.length > 400 ? '...' : ''}}

31 |
33 |
Delete
34 |
38 |
-------------------------------------------------------------------------------- /built-in/admin/image-modal.tpl: -------------------------------------------------------------------------------- 1 | 4 | 21 | 25 | -------------------------------------------------------------------------------- /built-in/admin/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Admin Area 7 | 8 | 9 | 10 |
11 | 14 |
15 |
16 | 17 |
18 | 19 |
20 |
21 |
22 | 23 |
24 | 25 |
26 |
27 |
28 | 29 |
30 |
31 |
32 | 33 | -------------------------------------------------------------------------------- /built-in/admin/post-help-modal.tpl: -------------------------------------------------------------------------------- 1 | 4 | 269 | -------------------------------------------------------------------------------- /built-in/admin/post-options-modal.tpl: -------------------------------------------------------------------------------- 1 | 4 | 46 | -------------------------------------------------------------------------------- /built-in/admin/post.html: -------------------------------------------------------------------------------- 1 | 16 |
17 |
18 |
19 |
20 |
21 | 22 |
23 |
24 |
25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
35 |
36 |
37 |
38 |
39 | 71 | -------------------------------------------------------------------------------- /built-in/admin/registration.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Admin Area 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 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 | 67 | -------------------------------------------------------------------------------- /built-in/hbs/navigation.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /built-in/hbs/pagination.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /built-in/public/angular/js/angular-bootstrap-switch.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-bootstrap-switch 3 | * @version v0.4.0-alpha.1 - 2014-11-21 4 | * @author Francesco Pontillo (francescopontillo@gmail.com) 5 | * @link https://github.com/frapontillo/angular-bootstrap-switch 6 | * @license Apache License 2.0(http://www.apache.org/licenses/LICENSE-2.0.html) 7 | **/ 8 | 9 | "use strict";angular.module("frapontillo.bootstrap-switch",[]),angular.module("frapontillo.bootstrap-switch").directive("bsSwitch",["$parse","$timeout",function(a,b){return{restrict:"A",require:"ngModel",link:function(c,d,e,f){var g=!1,h=function(){var b=a(e.ngTrueValue)(c);return angular.isString(b)||(b=!0),b},i=function(a){return a===!0||"true"===a||!a},j=function(a){return a?a:void 0},k=function(a){var b={switchRadioOff:function(a){return a===!0||"true"===a},switchActive:function(a){return!i(a)},switchAnimate:function(a){return c.$eval(a||"true")},switchLabel:function(a){return a?a:" "},switchIcon:function(a){return a?"":void 0},switchWrapper:function(a){return a||"wrapper"}},d=b[a]||j;return d(e[a])},l=function(a,b,c){if(g){var d=k(c);a.bootstrapSwitch(b,d)}},m=function(){l(d,"disabled","switchActive")},n=function(){if(!g){var a=f.$modelValue===h();g=!g,d.bootstrapSwitch({radioAllOff:k("switchRadioOff"),disabled:k("switchActive"),state:a,onText:k("switchOnText"),offText:k("switchOffText"),onColor:k("switchOnColor"),offColor:k("switchOffColor"),animate:k("switchAnimate"),size:k("switchSize"),labelText:k(e.switchLabel?"switchLabel":"switchIcon"),wrapperClass:k("switchWrapper"),handleWidth:k("switchHandleWidth"),labelWidth:k("switchLabelWidth")}),f.$setViewValue(a)}},o=function(){e.$observe("switchActive",function(a){var c=i(a);c?m(c):b(function(){m(c)})}),c.$watch(e.ngModel,function(a){n(),void 0!==a&&d.bootstrapSwitch("state",a===h(),!0)},!0);var a={switchRadioOff:"radioAllOff",switchOnText:"onText",switchOffText:"offText",switchOnColor:"onColor",switchOffColor:"offColor",switchAnimate:"animate",switchSize:"size",switchLabel:"labelText",switchIcon:"labelText",switchWrapper:"wrapperClass",switchHandleWidth:"handleWidth",switchLabelWidth:"labelWidth"},f=function(a,b){return function(){e.$observe(a,function(){l(d,b[a],a)})}};for(var g in a)e.$observe(g,f(g,a))},p=function(){d.on("switchChange.bootstrapSwitch",function(a,b){f.$setViewValue(b)})};p(),o(),c.$on("$destroy",function(){d.bootstrapSwitch("destroy")})}}}]).directive("bsSwitch",function(){return{restrict:"E",require:"ngModel",template:"",replace:!0}}); -------------------------------------------------------------------------------- /built-in/public/angular/js/angular-route.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | AngularJS v1.4.7 3 | (c) 2010-2015 Google, Inc. http://angularjs.org 4 | License: MIT 5 | */ 6 | (function(p,c,C){'use strict';function v(r,h,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,f,b,d,y){function z(){k&&(g.cancel(k),k=null);l&&(l.$destroy(),l=null);m&&(k=g.leave(m),k.then(function(){k=null}),m=null)}function x(){var b=r.current&&r.current.locals;if(c.isDefined(b&&b.$template)){var b=a.$new(),d=r.current;m=y(b,function(b){g.enter(b,null,m||f).then(function(){!c.isDefined(t)||t&&!a.$eval(t)||h()});z()});l=d.scope=b;l.$emit("$viewContentLoaded"); 7 | l.$eval(w)}else z()}var l,m,k,t=b.autoscroll,w=b.onload||"";a.$on("$routeChangeSuccess",x);x()}}}function A(c,h,g){return{restrict:"ECA",priority:-400,link:function(a,f){var b=g.current,d=b.locals;f.html(d.$template);var y=c(f.contents());b.controller&&(d.$scope=a,d=h(b.controller,d),b.controllerAs&&(a[b.controllerAs]=d),f.data("$ngControllerController",d),f.children().data("$ngControllerController",d));y(a)}}}p=c.module("ngRoute",["ng"]).provider("$route",function(){function r(a,f){return c.extend(Object.create(a), 8 | f)}function h(a,c){var b=c.caseInsensitiveMatch,d={originalPath:a,regexp:a},g=d.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,c,b,d){a="?"===d?d:null;d="*"===d?d:null;g.push({name:b,optional:!!a});c=c||"";return""+(a?"":c)+"(?:"+(a?c:"")+(d&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");d.regexp=new RegExp("^"+a+"$",b?"i":"");return d}var g={};this.when=function(a,f){var b=c.copy(f);c.isUndefined(b.reloadOnSearch)&&(b.reloadOnSearch=!0); 9 | c.isUndefined(b.caseInsensitiveMatch)&&(b.caseInsensitiveMatch=this.caseInsensitiveMatch);g[a]=c.extend(b,a&&h(a,b));if(a){var d="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";g[d]=c.extend({redirectTo:a},h(d,b))}return this};this.caseInsensitiveMatch=!1;this.otherwise=function(a){"string"===typeof a&&(a={redirectTo:a});this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(a,f,b,d,h,p,x){function l(b){var e=s.current; 10 | (v=(n=k())&&e&&n.$$route===e.$$route&&c.equals(n.pathParams,e.pathParams)&&!n.reloadOnSearch&&!w)||!e&&!n||a.$broadcast("$routeChangeStart",n,e).defaultPrevented&&b&&b.preventDefault()}function m(){var u=s.current,e=n;if(v)u.params=e.params,c.copy(u.params,b),a.$broadcast("$routeUpdate",u);else if(e||u)w=!1,(s.current=e)&&e.redirectTo&&(c.isString(e.redirectTo)?f.path(t(e.redirectTo,e.params)).search(e.params).replace():f.url(e.redirectTo(e.pathParams,f.path(),f.search())).replace()),d.when(e).then(function(){if(e){var a= 11 | c.extend({},e.resolve),b,f;c.forEach(a,function(b,e){a[e]=c.isString(b)?h.get(b):h.invoke(b,null,null,e)});c.isDefined(b=e.template)?c.isFunction(b)&&(b=b(e.params)):c.isDefined(f=e.templateUrl)&&(c.isFunction(f)&&(f=f(e.params)),c.isDefined(f)&&(e.loadedTemplateUrl=x.valueOf(f),b=p(f)));c.isDefined(b)&&(a.$template=b);return d.all(a)}}).then(function(f){e==s.current&&(e&&(e.locals=f,c.copy(e.params,b)),a.$broadcast("$routeChangeSuccess",e,u))},function(b){e==s.current&&a.$broadcast("$routeChangeError", 12 | e,u,b)})}function k(){var a,b;c.forEach(g,function(d,g){var q;if(q=!b){var h=f.path();q=d.keys;var l={};if(d.regexp)if(h=d.regexp.exec(h)){for(var k=1,m=h.length;k=h?(clearTimeout(f),c.cancel(f),f=null,e=g,a.call()):f?void 0:f=c(d,h,1)}},null!=d&&(o=v(o,d)),e.$on("$destroy",function(){return j.unbind("scroll",o),null!=w?(w(),w=null):void 0}),m=function(a){return t=parseFloat(a)||0},e.$watch("infiniteScrollDistance",m),m(e.infiniteScrollDistance),l=function(a){return u=!a,u&&i?(i=!1,o()):void 0},e.$watch("infiniteScrollDisabled",l),l(e.infiniteScrollDisabled),n=function(a){return x=a},e.$watch("infiniteScrollUseDocumentBottom",n),n(e.infiniteScrollUseDocumentBottom),h=function(a){return null!=j&&j.unbind("scroll",o),j=a,null!=a?j.bind("scroll",o):void 0},h(y),e.infiniteScrollListenForEvent&&(w=a.$on(e.infiniteScrollListenForEvent,o)),k=function(a){if(null!=a&&0!==a.length){if(a instanceof HTMLElement?a=angular.element(a):"function"==typeof a.append?a=angular.element(a[a.length-1]):"string"==typeof a&&(a=angular.element(document.querySelector(a))),null!=a)return h(a);throw new Exception("invalid infinite-scroll-container attribute.")}},e.$watch("infiniteScrollContainer",k),k(e.infiniteScrollContainer||[]),null!=g.infiniteScrollParent&&h(angular.element(f.parent())),null!=g.infiniteScrollImmediateCheck&&(q=e.$eval(g.infiniteScrollImmediateCheck)),c(function(){return q?o():void 0},0,1)}}}]); -------------------------------------------------------------------------------- /built-in/public/bootstrap/css/bootstrap-switch.min.css: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * bootstrap-switch - v3.3.2 3 | * http://www.bootstrap-switch.org 4 | * ======================================================================== 5 | * Copyright 2012-2013 Mattia Larentis 6 | * 7 | * ======================================================================== 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | * ======================================================================== 20 | */ 21 | 22 | .bootstrap-switch{display:inline-block;direction:ltr;cursor:pointer;border-radius:4px;border:1px solid;border-color:#ccc;position:relative;text-align:left;overflow:hidden;line-height:8px;z-index:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.bootstrap-switch .bootstrap-switch-container{display:inline-block;top:0;border-radius:4px;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.bootstrap-switch .bootstrap-switch-handle-on,.bootstrap-switch .bootstrap-switch-handle-off,.bootstrap-switch .bootstrap-switch-label{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:inline-block !important;height:100%;padding:6px 12px;font-size:14px;line-height:20px}.bootstrap-switch .bootstrap-switch-handle-on,.bootstrap-switch .bootstrap-switch-handle-off{text-align:center;z-index:1}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary{color:#fff;background:#428bca}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info{color:#fff;background:#5bc0de}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success{color:#fff;background:#5cb85c}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning{background:#f0ad4e;color:#fff}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger{color:#fff;background:#d9534f}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default{color:#000;background:#eee}.bootstrap-switch .bootstrap-switch-label{text-align:center;margin-top:-1px;margin-bottom:-1px;z-index:100;color:#333;background:#fff}.bootstrap-switch .bootstrap-switch-handle-on{border-bottom-left-radius:3px;border-top-left-radius:3px}.bootstrap-switch .bootstrap-switch-handle-off{border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch input[type='radio'],.bootstrap-switch input[type='checkbox']{position:absolute !important;top:0;left:0;opacity:0;filter:alpha(opacity=0);z-index:-1}.bootstrap-switch input[type='radio'].form-control,.bootstrap-switch input[type='checkbox'].form-control{height:auto}.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label{padding:1px 5px;font-size:12px;line-height:1.5}.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label{padding:5px 10px;font-size:12px;line-height:1.5}.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label{padding:6px 16px;font-size:18px;line-height:1.33}.bootstrap-switch.bootstrap-switch-disabled,.bootstrap-switch.bootstrap-switch-readonly,.bootstrap-switch.bootstrap-switch-indeterminate{cursor:default !important}.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label{opacity:.5;filter:alpha(opacity=50);cursor:default !important}.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container{-webkit-transition:margin-left .5s;transition:margin-left .5s}.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on{border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off{border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-left-radius:3px;border-top-left-radius:3px}.bootstrap-switch.bootstrap-switch-focused{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label{border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label{border-bottom-left-radius:3px;border-top-left-radius:3px} -------------------------------------------------------------------------------- /built-in/public/bootstrap/css/fileinput.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2015 3 | * @package bootstrap-fileinput 4 | * @version 4.2.7 5 | * 6 | * File input styling for Bootstrap 3.0 7 | * Built for Yii Framework 2.0 8 | * Author: Kartik Visweswaran 9 | * Year: 2015 10 | * For more Yii related demos visit http://demos.krajee.com 11 | */.file-preview-frame,.file-preview-image,.file-preview-other{height:160px;vertical-align:middle}.file-loading{top:0;right:0;width:25px;height:25px;font-size:999px;text-align:right;color:#fff;background:url(../img/loading.gif)top left no-repeat;border:none}.file-object{margin:0 0 -5px;padding:0}.btn-file{position:relative;overflow:hidden}.btn-file input[type=file]{position:absolute;top:0;right:0;min-width:100%;min-height:100%;text-align:right;opacity:0;background:0 0;cursor:inherit;display:block}.file-caption-name{display:inline-block;overflow:hidden;height:20px;word-break:break-all}.input-group-lg .file-caption-name{height:25px}.file-preview-detail-modal{text-align:left}.file-error-message{background-color:#f2dede;color:#a94442;text-align:center;border-radius:5px;padding:5px 10px 5px 5px}.file-error-message pre,.file-error-message ul{margin:5px 0;text-align:left}.file-caption-disabled{background-color:#EEE;cursor:not-allowed;opacity:1}.file-preview{border-radius:5px;border:1px solid #ddd;padding:5px;width:100%;margin-bottom:5px}.file-preview-frame{display:table;margin:8px;border:1px solid #ddd;box-shadow:1px 1px 5px 0 #a2958a;padding:6px;float:left;text-align:center}.file-preview-frame:not(.file-preview-error):hover{box-shadow:3px 3px 5px 0 #333}.file-preview-text{text-align:left;width:160px;margin-bottom:2px;color:#428bca;background:#fff;overflow-x:hidden}.file-preview-other{display:table-cell;text-align:center;width:160px;border:2px solid #999;border-radius:30px;opacity:.8}.file-actions,.file-other-error{text-align:left}.file-icon-lg{font-size:1.2em}.file-icon-2x{font-size:2.4em}.file-icon-4x{font-size:4.8em}.file-input-ajax-new .fileinput-remove-button,.file-input-ajax-new .fileinput-upload-button,.file-input-new .close,.file-input-new .file-preview,.file-input-new .fileinput-remove-button,.file-input-new .fileinput-upload-button,.file-input-new .glyphicon-file{display:none}.loading{background:url(../img/loading.gif)center center no-repeat content-box!important}.file-actions{margin-top:15px}.file-footer-buttons{float:right}.file-upload-indicator{padding-top:2px;cursor:default;opacity:.8;width:60%}.file-upload-indicator:hover{font-weight:700;opacity:1}.file-footer-caption{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:160px;text-align:center;padding-top:4px;font-size:11px;color:#777;margin:5px auto 10px}.file-preview-error{opacity:.65;box-shadow:none}.file-preview-frame:not(.file-preview-error) .file-footer-caption:hover{color:#000}.file-drop-zone{border:1px dashed #aaa;border-radius:4px;height:100%;text-align:center;vertical-align:middle;margin:12px 15px 12px 12px;padding:5px}.file-drop-zone-title{color:#aaa;font-size:40px;padding:85px 10px}.highlighted{border:2px dashed #999!important;background-color:#f0f0f0}.file-uploading{background:url(../img/loading-sm.gif)center bottom 10px no-repeat;opacity:.65}.file-error-message .close{margin-top:5px}.file-thumb-progress .progress,.file-thumb-progress .progress-bar{height:10px;font-size:9px;line-height:10px}.file-thumbnail-footer{position:relative}.file-thumb-progress{position:absolute;top:22px;left:0;right:0} -------------------------------------------------------------------------------- /built-in/public/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eyedeekay/railroad/53b2cbae3fd85a08b1d0355d19f0bbfa2aa3c91c/built-in/public/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /built-in/public/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eyedeekay/railroad/53b2cbae3fd85a08b1d0355d19f0bbfa2aa3c91c/built-in/public/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /built-in/public/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eyedeekay/railroad/53b2cbae3fd85a08b1d0355d19f0bbfa2aa3c91c/built-in/public/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /built-in/public/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eyedeekay/railroad/53b2cbae3fd85a08b1d0355d19f0bbfa2aa3c91c/built-in/public/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /built-in/public/images/blog-cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eyedeekay/railroad/53b2cbae3fd85a08b1d0355d19f0bbfa2aa3c91c/built-in/public/images/blog-cover.jpg -------------------------------------------------------------------------------- /built-in/public/images/blog-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eyedeekay/railroad/53b2cbae3fd85a08b1d0355d19f0bbfa2aa3c91c/built-in/public/images/blog-logo.jpg -------------------------------------------------------------------------------- /built-in/public/images/no-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eyedeekay/railroad/53b2cbae3fd85a08b1d0355d19f0bbfa2aa3c91c/built-in/public/images/no-image.png -------------------------------------------------------------------------------- /built-in/public/images/user-cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eyedeekay/railroad/53b2cbae3fd85a08b1d0355d19f0bbfa2aa3c91c/built-in/public/images/user-cover.jpg -------------------------------------------------------------------------------- /built-in/public/images/user-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eyedeekay/railroad/53b2cbae3fd85a08b1d0355d19f0bbfa2aa3c91c/built-in/public/images/user-image.jpg -------------------------------------------------------------------------------- /built-in/public/jquery/js/jquery.autosize.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Autosize 1.18.18 3 | license: MIT 4 | http://www.jacklmoore.com/autosize 5 | */ 6 | !function(e){var t,o={className:"autosizejs",id:"autosizejs",append:"\n",callback:!1,resizeDelay:10,placeholder:!0},i=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent","whiteSpace"],a=e('