Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
decker
decker
Commits
d32517e8
Commit
d32517e8
authored
Apr 15, 2021
by
Mario Botsch
Browse files
Merge branch 'master' into mario
parents
7a90c01c
ea98cae7
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
app/Decker.hs
View file @
d32517e8
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
...
...
@@ -10,6 +11,7 @@ import Data.IORef ()
import
Data.List
import
Data.String
()
import
qualified
Data.Text
as
Text
import
Data.Time
(
diffUTCTime
)
import
Data.Version
import
Development.Shake
import
GHC.IO.Encoding
...
...
@@ -268,8 +270,19 @@ run = do
--
"**/*-recording.mp4"
%>
\
out
->
do
let
src
=
replaceSuffix
"-recording.mp4"
"-recording.webm"
out
need
[
src
]
command
[]
"ffmpeg"
[
"-nostdin"
,
"-v"
,
"fatal"
,
"-y"
,
"-i"
,
src
,
"-vcodec"
,
"copy"
,
"-acodec"
,
"aac"
,
out
]
let
runFfmpeg
=
command
[]
"ffmpeg"
[
"-nostdin"
,
"-v"
,
"fatal"
,
"-y"
,
"-i"
,
src
,
"-vcodec"
,
"copy"
,
"-acodec"
,
"aac"
,
out
]
webmExists
<-
liftIO
$
Dir
.
doesFileExist
src
when
(
webmExists
)
$
do
need
[
src
]
mp4Exists
<-
liftIO
$
Dir
.
doesFileExist
out
if
not
mp4Exists
then
runFfmpeg
else
do
let
modTime
=
liftIO
.
Dir
.
getModificationTime
mp4Mod
<-
modTime
out
webmMod
<-
modTime
src
when
(
diffUTCTime
webmMod
mp4Mod
>
0.0
)
runFfmpeg
--
"**/*.tex.svg"
%>
\
out
->
do
let
src
=
dropExtension
out
...
...
resource/support/css/decker.css
View file @
d32517e8
This diff is collapsed.
Click to expand it.
resource/support/css/decker.scss
View file @
d32517e8
...
...
@@ -15,11 +15,12 @@
@import
"fonts"
;
@import
"boxes"
;
@import
"code"
;
@import
"quizzes"
;
@import
"new-media"
;
@import
"columns"
;
}
@import
"quizzes"
;
// Global styles
body
{
background
:
#fff
;
...
...
src/Text/Decker/Project/Project.hs
View file @
d32517e8
...
...
@@ -189,7 +189,9 @@ annotationSuffix = "-annot.json"
timesSuffix
=
"-times.json"
recordingSuffix
=
"-recording.webm"
recordingSuffix1
=
"-recording.webm"
recordingSuffix2
=
"-recording.mp4"
recordingTargetSuffix
=
"-recording.mp4"
...
...
@@ -199,6 +201,7 @@ sourceRegexes :: [String] =
"-deck-index.yaml
\\
'"
,
"-quest.yaml
\\
'"
,
"-recording.webm
\\
'"
,
"-recording.mp4
\\
'"
,
"-times.json
\\
'"
,
"-annot.json
\\
'"
,
"
\\
`(^_).*
\\
.scss
\\
'"
...
...
@@ -250,7 +253,10 @@ scanTargets meta = do
_questions
=
sort
$
calcTargets
questSuffix
questHTMLSuffix
srcs
,
_annotations
=
sort
$
calcTargets
annotationSuffix
annotationSuffix
srcs
,
_times
=
sort
$
calcTargets
timesSuffix
timesSuffix
srcs
,
_recordings
=
sort
$
calcTargets
recordingSuffix
recordingTargetSuffix
srcs
,
_recordings
=
List
.
nub
$
sort
$
calcTargets
recordingSuffix1
recordingTargetSuffix
srcs
<>
calcTargets
recordingSuffix2
recordingTargetSuffix
srcs
,
_css
=
sort
$
calcTargets
".scss"
".css"
srcs
}
where
...
...
src/Text/Decker/Project/Shake.hs
View file @
d32517e8
...
...
@@ -252,11 +252,11 @@ deckerShakeOptions ctx = do
shakeThreads
=
cores
,
-- , shakeStaunch = True
shakeColor
=
True
,
shakeChange
=
ChangeModtime
,
shakeChange
=
ChangeModtime
-- , shakeChange = ChangeModtimeAndDigest
shakeLint
=
Just
LintBasic
,
--
shakeLint = Just LintBasic,
-- , shakeLint = Just LintFSATrace
shakeReport
=
[
".decker/shake-report.html"
]
--
shakeReport = [".decker/shake-report.html"]
}
actionContextKey
::
TypeRep
...
...
stack.yaml
View file @
d32517e8
...
...
@@ -21,10 +21,10 @@ extra-deps:
-
pandoc-types-1.22
-
regex-posix-clib-2.7
-
rfc5051-0.2
-
shake-0.19.1
-
skylighting-0.10.2
-
skylighting-core-0.10.2
-
texmath-0.12.1
resolver
:
lts-17.0
-
shake-0.19.1
resolver
:
lts-17.2
ghc-options
:
"
$locals"
:
-fhide-source-paths -Wno-missing-home-modules
third-party/vendor.ps1
View file @
d32517e8
...
...
@@ -63,4 +63,4 @@ Foreach ($i in ( "css\all.css", "webfonts")) {
# Copy video.js
New-Item
-Path
"
$support
\videojs"
-Force
-ItemType
"directory"
Copy-Item
"
$third
\video.js\*"
"
$support
\video.js"
-Force
\ No newline at end of file
Copy-Item
-Recurse
"
$third
\video.js\*"
"
$support
\videojs"
-Force
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment