-
-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,475 changed files
with
117,060 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
language: java | ||
jdk: | ||
- openjdk8 | ||
|
||
install: | ||
- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -Pci |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM maven:3-jdk-8-alpine as MVN_BUILD | ||
|
||
WORKDIR /opt/sym/ | ||
ADD . /tmp | ||
RUN cd /tmp && mvn package -DskipTests -Pci -q && mv target/symphony/* /opt/sym/ \ | ||
&& cp -f /tmp/src/main/resources/docker/* /opt/sym/ | ||
|
||
FROM openjdk:8-alpine | ||
LABEL maintainer="Liang Ding<[email protected]>" | ||
|
||
WORKDIR /opt/sym/ | ||
COPY --from=MVN_BUILD /opt/sym/ /opt/sym/ | ||
RUN apk add --no-cache ca-certificates tzdata ttf-dejavu | ||
|
||
ENV TZ=Asia/Shanghai | ||
EXPOSE 8080 | ||
|
||
ENTRYPOINT [ "java", "-cp", "lib/*:.", "org.b3log.symphony.Server" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,15 @@ | ||
# symphony | ||
🎶 一款用 Java 实现的现代化社区(论坛/BBS/社交网络/博客)平台。 | ||
* [一款用 Java 实现的现代化社区(论坛 /BBS/ 社交网络 / 博客)平台](https://hacpai.com/article/1570193280819) | ||
|
||
以下截图来自 Sym 商业版。 | ||
|
||
![index](https://user-images.githubusercontent.com/970828/68215287-edade380-0019-11ea-8af3-877f6cec716e.png) | ||
|
||
![list](https://user-images.githubusercontent.com/970828/61682145-08966980-ad43-11e9-9d90-b70c194e3d8b.png) | ||
|
||
![article](https://user-images.githubusercontent.com/970828/68215922-08348c80-001b-11ea-9163-3c2fd2ccfef0.png) | ||
|
||
![post](https://user-images.githubusercontent.com/970828/61682148-092f0000-ad43-11e9-8de3-46e35ec4b474.png) | ||
|
||
![pc home](https://user-images.githubusercontent.com/970828/68214389-5300d500-0018-11ea-9c58-9edb9d066353.png) | ||
|
||
![theme](https://user-images.githubusercontent.com/970828/68213511-af62f500-0016-11ea-8c82-1c20d23907e1.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Backend | ||
|
||
autolink: MIT | ||
commons*: APL | ||
hikaricp: APL | ||
emoji-java: MIT | ||
flexmark*: BSD | ||
freemarker: APL | ||
gson: APL | ||
javassist: APL | ||
jodd*: BSD | ||
jsoup: MIT | ||
latke*: APL | ||
log4j: APL | ||
mysql-connector-java: GPL | ||
ok*: APL | ||
patchca: GPL | ||
qiniu-java-sdk: MIT | ||
slf4j*: MIT | ||
UserAgentUtils: BSD | ||
|
||
# Frontend | ||
|
||
aplayer: SATA | ||
algolia*: MIT | ||
echarts: BSD | ||
emojify.js: MIT | ||
codemirror: MIT | ||
highlight.js: BSD | ||
jquery: MIT | ||
jquery.fileupload: MIT | ||
isotope: GPL/C | ||
jquery.bowknot: APL | ||
jquery.hotkeys: MIT | ||
jquery.linkify: MIT | ||
jquery.pjax: MIT | ||
jquery.qrcode: MIT | ||
nprogress: MIT | ||
SoundRecorder: CC BY-NC-SA/C | ||
MathJax: APL | ||
md5: BSD | ||
reconnecting-websocket: MIT | ||
to-markdown: MIT | ||
ua-parser: MIT | ||
diff2html: MIT | ||
flowchart: MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
/* | ||
* Symphony - A modern community (forum/BBS/SNS/blog) platform written in Java. | ||
* Copyright (C) 2012-present, b3log.org | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
/** | ||
* @file frontend tool. | ||
* | ||
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> | ||
* @author <a href="http://88250.b3log.org">Liang Ding</a> | ||
* @version 1.8.0.2, Mar 17, 2019 | ||
*/ | ||
|
||
'use strict' | ||
|
||
var gulp = require('gulp') | ||
var concat = require('gulp-concat') | ||
var cleanCSS = require('gulp-clean-css') | ||
var uglify = require('gulp-uglify') | ||
var sass = require('gulp-sass') | ||
var rename = require('gulp-rename') | ||
var del = require('del') | ||
|
||
function sassProcess () { | ||
return gulp.src('./src/main/resources/scss/*.scss'). | ||
pipe(sass({outputStyle: 'compressed', includePaths: ['node_modules']}). | ||
on('error', sass.logError)). | ||
pipe(gulp.dest('./src/main/resources/css')) | ||
} | ||
|
||
function sassProcessWatch () { | ||
gulp.watch('./src/main/resources/scss/*.scss', sassProcess) | ||
} | ||
|
||
gulp.task('watch', gulp.series(sassProcessWatch)) | ||
|
||
function cleanProcess () { | ||
return del(['./src/main/resources/js/*.min.js']) | ||
} | ||
|
||
function minArticleCSS () { | ||
// min article css | ||
return gulp.src([ | ||
'./src/main/resources/js/lib/diff2html/diff2html.min.css']). | ||
pipe(cleanCSS()). | ||
pipe(concat('article.min.css')). | ||
pipe(gulp.dest('./src/main/resources/js/lib/compress/')) | ||
} | ||
|
||
function minJS () { | ||
// min js | ||
return gulp.src('./src/main/resources/js/*.js'). | ||
pipe(uglify()). | ||
pipe(rename({suffix: '.min'})). | ||
pipe(gulp.dest('./src/main/resources/js/')) | ||
} | ||
|
||
function minUpload () { | ||
// concat js | ||
var jsJqueryUpload = [ | ||
'./src/main/resources/js/lib/jquery/file-upload-9.10.1/vendor/jquery.ui.widget.js', | ||
'./src/main/resources/js/lib/jquery/file-upload-9.10.1/jquery.iframe-transport.js', | ||
'./src/main/resources/js/lib/jquery/file-upload-9.10.1/jquery.fileupload.js', | ||
'./src/main/resources/js/lib/jquery/file-upload-9.10.1/jquery.fileupload-process.js', | ||
'./src/main/resources/js/lib/jquery/file-upload-9.10.1/jquery.fileupload-validate.js'] | ||
return gulp.src(jsJqueryUpload). | ||
pipe(uglify()). | ||
pipe(concat('jquery.fileupload.min.js')). | ||
pipe(gulp.dest('./src/main/resources/js/lib/jquery/file-upload-9.10.1/')) | ||
} | ||
|
||
function minLibs () { | ||
var jsCommonLib = [ | ||
'./src/main/resources/js/lib/jquery/jquery-3.1.0.min.js', | ||
'./src/main/resources/js/lib/md5.js', | ||
'./src/main/resources/js/lib/reconnecting-websocket.min.js', | ||
'./src/main/resources/js/lib/jquery/jquery.bowknot.min.js', | ||
'./src/main/resources/js/lib/ua-parser.min.js', | ||
'./src/main/resources/js/lib/jquery/jquery.hotkeys.js', | ||
'./src/main/resources/js/lib/jquery/jquery.pjax.js', | ||
'./src/main/resources/js/lib/nprogress/nprogress.js'] | ||
return gulp.src(jsCommonLib). | ||
pipe(uglify()). | ||
pipe(concat('libs.min.js')). | ||
pipe(gulp.dest('./src/main/resources/js/lib/compress/')) | ||
} | ||
|
||
function minArticleLibs () { | ||
var jsArticleLib = [ | ||
'./src/main/resources/js/lib/sound-recorder/SoundRecorder.js', | ||
'./src/main/resources/js/lib/jquery/jquery.qrcode.min.js', | ||
'./src/main/resources/js/lib/aplayer/APlayer.min.js', | ||
'./src/main/resources/js/lib/diff2html/diff2html.min.js', | ||
'./src/main/resources/js/lib/diff2html/diff2html-ui.min.js', | ||
'./src/main/resources/js/lib/diff2html/diff.min.js'] | ||
return gulp.src(jsArticleLib). | ||
pipe(uglify()). | ||
pipe(concat('article-libs.min.js')). | ||
pipe(gulp.dest('./src/main/resources/js/lib/compress/')) | ||
} | ||
|
||
gulp.task('default', | ||
gulp.series(cleanProcess, sassProcess, | ||
gulp.parallel(minJS, minUpload, minLibs), | ||
gulp.parallel(minArticleCSS, minArticleLibs))) |
Oops, something went wrong.