diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..607b789 --- /dev/null +++ b/.classpath @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dc6e088 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/.gradle/ +/bin/ +/build/ diff --git a/.project b/.project new file mode 100644 index 0000000..34e790f --- /dev/null +++ b/.project @@ -0,0 +1,36 @@ + + + BiCO + Project BiCO created by Buildship. + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/.settings/org.eclipse.buildship.core.prefs b/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..e889521 --- /dev/null +++ b/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +connection.project.dir= +eclipse.preferences.version=1 diff --git a/.settings/org.eclipse.ltk.core.refactoring.prefs b/.settings/org.eclipse.ltk.core.refactoring.prefs new file mode 100644 index 0000000..b196c64 --- /dev/null +++ b/.settings/org.eclipse.ltk.core.refactoring.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000..9c1b977 --- /dev/null +++ b/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000..7859c6b --- /dev/null +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..e3de66d --- /dev/null +++ b/build.gradle @@ -0,0 +1,71 @@ +plugins { + id 'java' + id 'org.springframework.boot' version '3.1.3' + id "io.spring.dependency-management" version "1.1.2" + id 'war' + id 'eclipse' + id 'application' +} + +group = 'de.jottyfan.bico' +version = '0.0.0' + +description = """BibleClassOrganizer""" + +sourceCompatibility = 17 +targetCompatibility = 17 + +mainClassName = "de.jottyfan.bico.Main" + +repositories { + mavenCentral() + maven { + url "https://www.jottyfan.de/libs/" + } + maven { + url "https://repo.maven.apache.org/maven2" + } +} + +war { + doFirst { + manifest { + attributes("Implementation-Title": project.name, + "Implementation-Version": version, + "Implementation-Timestamp": new Date()) + } + } + baseName = project.name + version = version + archiveName = 'BiCO.war' +} + +dependencies { + implementation 'de.jottyfan:bicolib:1' + + implementation 'org.springframework.boot:spring-boot-starter-jooq' + implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:3.0.0' + + implementation 'org.webjars:bootstrap:5.3.1' + implementation 'org.webjars.npm:bootstrap-icons:1.10.5' + implementation 'org.webjars:jquery:3.7.1' + implementation 'org.webjars:datatables:1.13.5' + + implementation 'org.springframework.boot:spring-boot-devtools' + + runtimeOnly 'org.springframework.boot:spring-boot-starter-tomcat' + + testImplementation 'org.springframework.boot:spring-boot-starter-test' +} + +test { + useJUnitPlatform() +} + +// add version to manifest +springBoot { + buildInfo() +} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..9d9cdba --- /dev/null +++ b/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS --illegal-access=permit $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..738b08b --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'BiCO' diff --git a/src/main/java/de/jottyfan/bico/Main.java b/src/main/java/de/jottyfan/bico/Main.java new file mode 100644 index 0000000..bfc3d39 --- /dev/null +++ b/src/main/java/de/jottyfan/bico/Main.java @@ -0,0 +1,23 @@ +package de.jottyfan.bico; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + +/** + * + * @author jotty + * + */ +@SpringBootApplication +public class Main extends SpringBootServletInitializer { + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(Main.class); + } + + public static void main(String[] args) { + SpringApplication.run(Main.class, args); + } +} diff --git a/src/main/java/de/jottyfan/bico/config/DatabaseConfiguration.java b/src/main/java/de/jottyfan/bico/config/DatabaseConfiguration.java new file mode 100644 index 0000000..90794c2 --- /dev/null +++ b/src/main/java/de/jottyfan/bico/config/DatabaseConfiguration.java @@ -0,0 +1,40 @@ +package de.jottyfan.bico.config; + +import javax.sql.DataSource; + +import org.jooq.SQLDialect; +import org.jooq.impl.DataSourceConnectionProvider; +import org.jooq.impl.DefaultConfiguration; +import org.jooq.impl.DefaultDSLContext; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy; + +/** + * + * @author jotty + * + */ +@Configuration +public class DatabaseConfiguration { + @Autowired + private DataSource dataSource; + + @Bean + public DataSourceConnectionProvider connectionProvider() { + return new DataSourceConnectionProvider(new TransactionAwareDataSourceProxy(dataSource)); + } + + @Bean + public DefaultDSLContext dsl() { + return new DefaultDSLContext(configuration()); + } + + public DefaultConfiguration configuration() { + DefaultConfiguration jooqConfiguration = new DefaultConfiguration(); + jooqConfiguration.set(connectionProvider()); + jooqConfiguration.set(SQLDialect.POSTGRES); + return jooqConfiguration; + } +} diff --git a/src/main/java/de/jottyfan/bico/modules/CommonController.java b/src/main/java/de/jottyfan/bico/modules/CommonController.java new file mode 100644 index 0000000..24a2cf5 --- /dev/null +++ b/src/main/java/de/jottyfan/bico/modules/CommonController.java @@ -0,0 +1,10 @@ +package de.jottyfan.bico.modules; + +/** + * + * @author jotty + * + */ +public abstract class CommonController { + +} diff --git a/src/main/java/de/jottyfan/bico/modules/index/IndexController.java b/src/main/java/de/jottyfan/bico/modules/index/IndexController.java new file mode 100644 index 0000000..0bc19d6 --- /dev/null +++ b/src/main/java/de/jottyfan/bico/modules/index/IndexController.java @@ -0,0 +1,19 @@ +package de.jottyfan.bico.modules.index; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +import de.jottyfan.bico.modules.CommonController; + +/** + * + * @author jotty + * + */ +@Controller +public class IndexController extends CommonController { + @GetMapping("/") + public String getIndex() { + return "redirect:/sheet"; + } +} diff --git a/src/main/java/de/jottyfan/bico/modules/index/model/ManifestBean.java b/src/main/java/de/jottyfan/bico/modules/index/model/ManifestBean.java new file mode 100644 index 0000000..ca44b5f --- /dev/null +++ b/src/main/java/de/jottyfan/bico/modules/index/model/ManifestBean.java @@ -0,0 +1,25 @@ +package de.jottyfan.bico.modules.index.model; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.info.BuildProperties; +import org.springframework.stereotype.Component; + +/** + * + * @author jotty + * + */ +@Component +public class ManifestBean { + + @Autowired(required = false) + private BuildProperties buildProperties; + + /** + * @return the version of this project + */ + public String getVersion() { + return buildProperties != null ? buildProperties.getVersion() + : this.getClass().getPackage().getImplementationVersion(); + } +} diff --git a/src/main/java/de/jottyfan/bico/modules/sheet/SheetController.java b/src/main/java/de/jottyfan/bico/modules/sheet/SheetController.java new file mode 100644 index 0000000..c8fb955 --- /dev/null +++ b/src/main/java/de/jottyfan/bico/modules/sheet/SheetController.java @@ -0,0 +1,26 @@ +package de.jottyfan.bico.modules.sheet; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; + +import de.jottyfan.bico.modules.CommonController; + +/** + * + * @author jotty + * + */ +@Controller +public class SheetController extends CommonController { + + @Autowired + private SheetService service; + + @GetMapping("/sheet") + public String getSheet(Model model) { + model.addAttribute("list", service.getList()); + return "/sheet"; + } +} diff --git a/src/main/java/de/jottyfan/bico/modules/sheet/SheetRepository.java b/src/main/java/de/jottyfan/bico/modules/sheet/SheetRepository.java new file mode 100644 index 0000000..2534fb2 --- /dev/null +++ b/src/main/java/de/jottyfan/bico/modules/sheet/SheetRepository.java @@ -0,0 +1,54 @@ +package de.jottyfan.bico.modules.sheet; + +import static de.jottyfan.bico.db.Tables.V_CALENDAR; + +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.List; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.jooq.DSLContext; +import org.jooq.SelectSeekStep1; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Repository; + +import de.jottyfan.bico.db.tables.records.VCalendarRecord; +import de.jottyfan.bico.modules.sheet.model.SheetBean; + +/** + * + * @author jotty + * + */ +@Repository +public class SheetRepository { + + private static final Logger LOGGER = LogManager.getLogger(SheetRepository.class); + + @Autowired + private DSLContext jooq; + + public List getList() { + SelectSeekStep1 sql = jooq.selectFrom(V_CALENDAR).orderBy(V_CALENDAR.SLOT_DAY); + LOGGER.trace(sql.toString()); + List list = new ArrayList<>(); + for (VCalendarRecord r : sql.fetch()) { + SheetBean bean = new SheetBean(); + bean.setAbbreviation(r.getAbbreviation()); + bean.setBibleverse(r.getBibleverse()); + bean.setBookPages(r.getBookPages()); + bean.setFullname(r.getFullname()); + bean.setLessonNotes(r.getLessonNotes()); + bean.setSlotDay(r.getSlotDay()); + bean.setSlotNotes(r.getSlotNotes()); + bean.setSourceName(r.getSourceName()); + bean.setSubjectNotes(r.getSubjectNotes()); + bean.setSubtheme(r.getSubtheme()); + bean.setTheme(r.getTheme()); + bean.setWorksheets(r.getWorksheets()); + list.add(bean); + } + return list; + } +} diff --git a/src/main/java/de/jottyfan/bico/modules/sheet/SheetService.java b/src/main/java/de/jottyfan/bico/modules/sheet/SheetService.java new file mode 100644 index 0000000..8c7cbe6 --- /dev/null +++ b/src/main/java/de/jottyfan/bico/modules/sheet/SheetService.java @@ -0,0 +1,25 @@ +package de.jottyfan.bico.modules.sheet; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import de.jottyfan.bico.modules.sheet.model.SheetBean; + +/** + * + * @author jotty + * + */ +@Service +public class SheetService { + + @Autowired + private SheetRepository repository; + + public List getList() { + return repository.getList(); + } + +} diff --git a/src/main/java/de/jottyfan/bico/modules/sheet/model/SheetBean.java b/src/main/java/de/jottyfan/bico/modules/sheet/model/SheetBean.java new file mode 100644 index 0000000..f26783d --- /dev/null +++ b/src/main/java/de/jottyfan/bico/modules/sheet/model/SheetBean.java @@ -0,0 +1,194 @@ +package de.jottyfan.bico.modules.sheet.model; + +import java.io.Serializable; +import java.time.LocalDate; + +/** + * + * @author jotty + * + */ +public class SheetBean implements Serializable { + private static final long serialVersionUID = 1L; + + private LocalDate slotDay; + private String fullname; + private String abbreviation; + private String sourceName; + private String theme; + private String subtheme; + private String bookPages; + private String worksheets; + private String bibleverse; + private String subjectNotes; + private String lessonNotes; + private String slotNotes; + + /** + * @return the slotDay + */ + public LocalDate getSlotDay() { + return slotDay; + } + + /** + * @param slotDay the slotDay to set + */ + public void setSlotDay(LocalDate slotDay) { + this.slotDay = slotDay; + } + + /** + * @return the fullname + */ + public String getFullname() { + return fullname; + } + + /** + * @param fullname the fullname to set + */ + public void setFullname(String fullname) { + this.fullname = fullname; + } + + /** + * @return the abbreviation + */ + public String getAbbreviation() { + return abbreviation; + } + + /** + * @param abbreviation the abbreviation to set + */ + public void setAbbreviation(String abbreviation) { + this.abbreviation = abbreviation; + } + + /** + * @return the sourceName + */ + public String getSourceName() { + return sourceName; + } + + /** + * @param sourceName the sourceName to set + */ + public void setSourceName(String sourceName) { + this.sourceName = sourceName; + } + + /** + * @return the theme + */ + public String getTheme() { + return theme; + } + + /** + * @param theme the theme to set + */ + public void setTheme(String theme) { + this.theme = theme; + } + + /** + * @return the subtheme + */ + public String getSubtheme() { + return subtheme; + } + + /** + * @param subtheme the subtheme to set + */ + public void setSubtheme(String subtheme) { + this.subtheme = subtheme; + } + + /** + * @return the bookPages + */ + public String getBookPages() { + return bookPages; + } + + /** + * @param bookPages the bookPages to set + */ + public void setBookPages(String bookPages) { + this.bookPages = bookPages; + } + + /** + * @return the worksheets + */ + public String getWorksheets() { + return worksheets; + } + + /** + * @param worksheets the worksheets to set + */ + public void setWorksheets(String worksheets) { + this.worksheets = worksheets; + } + + /** + * @return the bibleverse + */ + public String getBibleverse() { + return bibleverse; + } + + /** + * @param bibleverse the bibleverse to set + */ + public void setBibleverse(String bibleverse) { + this.bibleverse = bibleverse; + } + + /** + * @return the subjectNotes + */ + public String getSubjectNotes() { + return subjectNotes; + } + + /** + * @param subjectNotes the subjectNotes to set + */ + public void setSubjectNotes(String subjectNotes) { + this.subjectNotes = subjectNotes; + } + + /** + * @return the lessonNotes + */ + public String getLessonNotes() { + return lessonNotes; + } + + /** + * @param lessonNotes the lessonNotes to set + */ + public void setLessonNotes(String lessonNotes) { + this.lessonNotes = lessonNotes; + } + + /** + * @return the slotNotes + */ + public String getSlotNotes() { + return slotNotes; + } + + /** + * @param slotNotes the slotNotes to set + */ + public void setSlotNotes(String slotNotes) { + this.slotNotes = slotNotes; + } +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties new file mode 100644 index 0000000..a03c303 --- /dev/null +++ b/src/main/resources/application.properties @@ -0,0 +1,25 @@ +# database credentials from defined config file +spring.config.import = /etc/BiCO.properties + +# define overwriteable arguments +spring.datasource.driver-class-name = ${db.class:org.postgresql.Driver} +spring.datasource.url = ${db.url} +spring.datasource.username = ${db.username} +spring.datasource.password = ${db.password} + +server.servlet.context-path = ${my.context-path:/BiCO} + +# security +spring.security.oauth2.client.registration.keycloak.client-id = ${keycloak.client-id} +spring.security.oauth2.client.registration.keycloak.scope = openid +spring.security.oauth2.client.registration.keycloak.authorization-grant-type = authorization_code +spring.security.oauth2.client.registration.keycloak.redirect-uri = ${keycloak.redirect-uri} +spring.security.oauth2.client.provider.keycloak.issuer-uri = ${keycloak.issuer-uri} +spring.security.oauth2.client.provider.keycloak.authorization-uri = ${keycloak.openid-url}/auth +spring.security.oauth2.client.provider.keycloak.token-uri = ${keycloak.openid-url}/token +spring.security.oauth2.client.provider.keycloak.user-info-uri = ${keycloak.openid-url}/userinfo +spring.security.oauth2.client.provider.keycloak.jwk-set-uri = ${keycloak.openid-url}/certs +spring.security.oauth2.client.provider.keycloak.user-name-attribute = preferred_username + +# for development only +server.port = 8081 diff --git a/src/main/resources/static/css/style.css b/src/main/resources/static/css/style.css new file mode 100644 index 0000000..eaee66c --- /dev/null +++ b/src/main/resources/static/css/style.css @@ -0,0 +1,16 @@ +html { + width: 100%; + height: 100%; +} + +body { + background-color: #abc; +} + +[data-bs-theme=dark] body { + background-color: rgb(36, 31, 49); +} + +.borderdist { + margin: 8px; +} \ No newline at end of file diff --git a/src/main/resources/static/js/dataTables.de.js b/src/main/resources/static/js/dataTables.de.js new file mode 100644 index 0000000..76071a0 --- /dev/null +++ b/src/main/resources/static/js/dataTables.de.js @@ -0,0 +1,23 @@ +var locale_de = { + "sEmptyTable": "Keine Daten in der Tabelle vorhanden", + "sInfo": "_START_ bis _END_ von _TOTAL_ Einträgen", + "sInfoEmpty": "0 bis 0 von 0 Einträgen", + "sInfoFiltered": "(gefiltert von _MAX_ Einträgen)", + "sInfoPostFix": "", + "sInfoThousands": ".", + "sLengthMenu": "_MENU_ Einträge anzeigen", + "sLoadingRecords": "Wird geladen...", + "sProcessing": "Bitte warten...", + "sSearch": "Suchen", + "sZeroRecords": "Keine Einträge vorhanden.", + "oPaginate": { + "sFirst": "Erste", + "sPrevious": "Zurück", + "sNext": "Nächste", + "sLast": "Letzte" + }, + "oAria": { + "sSortAscending": ": aktivieren, um Spalte aufsteigend zu sortieren", + "sSortDescending": ": aktivieren, um Spalte absteigend zu sortieren" + } +}; \ No newline at end of file diff --git a/src/main/resources/static/js/stylehelp.js b/src/main/resources/static/js/stylehelp.js new file mode 100644 index 0000000..751465c --- /dev/null +++ b/src/main/resources/static/js/stylehelp.js @@ -0,0 +1,5 @@ +toggleDarkMode = function() { + var oldValue = $("html").attr("data-bs-theme"); + var newValue = oldValue == "dark" ? "light" : "dark"; + $("html").attr("data-bs-theme", newValue); +} diff --git a/src/main/resources/templates/sheet.html b/src/main/resources/templates/sheet.html new file mode 100644 index 0000000..1c55eb0 --- /dev/null +++ b/src/main/resources/templates/sheet.html @@ -0,0 +1,46 @@ + + + +Camp Organizer 2 + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
TagKürzelQuelleThemaUnterthemaTag-Anmerkungen
+ +
+
+ + \ No newline at end of file diff --git a/src/main/resources/templates/template.html b/src/main/resources/templates/template.html new file mode 100644 index 0000000..13d98d7 --- /dev/null +++ b/src/main/resources/templates/template.html @@ -0,0 +1,41 @@ + + + +Camp Organizer 2 + + + + + + + + + + + + + + +
content
+ + \ No newline at end of file