فهرست منبع

Slurp script, add to login page.

Andy Baugh 4 سال پیش
والد
کامیت
53c2eccf32
3فایلهای تغییر یافته به همراه9 افزوده شده و 2 حذف شده
  1. 1 0
      .gitignore
  2. 3 2
      Makefile
  3. 5 0
      www/templates/login.tx

+ 1 - 0
.gitignore

@@ -10,6 +10,7 @@ pod2htmd.tmp
 fgEmojiPicker.js
 full-emoji-list.json
 highlight.min.js
+matrix-login.js
 obsidian.min.css
 www/.well_known
 config/auth.db

+ 3 - 2
Makefile

@@ -41,10 +41,11 @@ prereq-perl:
 
 .PHONY: prereq-frontend
 prereq-frontend:
-	mkdir -p www/scripts; pushd www/scripts && curl -L --remote-name-all                                 \
+	mkdir -p www/scripts; pushd www/scripts && curl -L --remote-name-all                              \
 		"https://github.com/woody180/vanilla-javascript-emoji-picker/raw/master/fgEmojiPicker.js"     \
 		"https://github.com/woody180/vanilla-javascript-emoji-picker/raw/master/full-emoji-list.json" \
-		"https://raw.githubusercontent.com/highlightjs/cdn-release/main/build/highlight.min.js"; popd
+		"https://unpkg.com/signin-with-matrix@latest/dist/index.umd.js"                               \
+		"https://raw.githubusercontent.com/highlightjs/cdn-release/main/build/highlight.min.js"; mv index.umd.js matrix-login.js; popd
 	mkdir -p www/styles; cd www/styles && curl -L --remote-name-all \
 		"https://raw.githubusercontent.com/highlightjs/cdn-release/main/build/styles/obsidian.min.css"
 

+ 5 - 0
www/templates/login.tx

@@ -21,4 +21,9 @@
       <br />
       <input type="submit" id="maximumGo" value="<: $btnmsg :>"></input>
     </form>
+	<script defer src="/scripts/matrix-login.js"></script>
+	<matrix-signin id="signin"></matrix-signin>
+	<matrix-signin-button target="signin">
+		Sign in with Matrix
+	</matrix-signin-button>
 </div>