-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#954 Add a type of presentation and create presentation from Markdown.
- Loading branch information
1 parent
27f674b
commit cefed4c
Showing
17 changed files
with
239 additions
and
21 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
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
21 changes: 21 additions & 0 deletions
21
src/main/java/org/support/project/knowledge/deploy/v1_12/Migrate_1_12_1.java
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,21 @@ | ||
package org.support.project.knowledge.deploy.v1_12; | ||
|
||
import org.support.project.knowledge.deploy.Migrate; | ||
import org.support.project.ormapping.tool.dao.InitializeDao; | ||
|
||
public class Migrate_1_12_1 implements Migrate { | ||
|
||
public static Migrate_1_12_1 get() { | ||
return org.support.project.di.Container.getComp(Migrate_1_12_1.class); | ||
} | ||
|
||
@Override | ||
public boolean doMigrate() throws Exception { | ||
InitializeDao initializeDao = InitializeDao.get(); | ||
String[] sqlpaths = { | ||
"/org/support/project/knowledge/deploy/v1_12/migrate_v1_12_1.sql", | ||
}; | ||
initializeDao.initializeDatabase(sqlpaths); | ||
return true; | ||
} | ||
} |
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
6 changes: 6 additions & 0 deletions
6
src/main/resources/org/support/project/knowledge/deploy/v1_12/migrate_v1_12_1.sql
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 @@ | ||
DELETE FROM TEMPLATE_MASTERS WHERE TYPE_ID = -102; | ||
DELETE FROM TEMPLATE_ITEMS WHERE TYPE_ID = -102; | ||
|
||
INSERT INTO TEMPLATE_MASTERS ( TYPE_ID, TYPE_NAME, TYPE_ICON, DESCRIPTION, INSERT_USER, INSERT_DATETIME, UPDATE_USER, UPDATE_DATETIME, DELETE_FLAG ) | ||
VALUES (-102,'presentation', 'fa-television', 'It is presentation by Markdown',0,'2017-12-01 00:00:00',null,null,0); | ||
|
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
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
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
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
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
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
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,65 @@ | ||
.markdownSlide div, span, object, iframe, | ||
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | ||
abbr, address, cite, code, | ||
del, dfn, em, img, ins, kbd, q, samp, | ||
small, strong, sub, sup, var, | ||
b, i, | ||
dl, dt, dd, ol, ul, li, | ||
fieldset, form, label, legend, | ||
table, caption, tbody, tfoot, thead, tr, th, td, | ||
article, aside, canvas, details, figcaption, figure, | ||
footer, header, hgroup, menu, nav, section, summary, | ||
time, mark, audio, video { | ||
margin: 0; | ||
padding: 0; | ||
border: 0; | ||
outline: 0; | ||
font-size: 100%; | ||
vertical-align: baseline; | ||
background: transparent; | ||
font-weight: normal; | ||
} | ||
|
||
.markdownSlide { | ||
background-color: white; | ||
overflow: hidden; | ||
font-size: 3vh; | ||
padding: 3vh; | ||
} | ||
|
||
.markdownSlide ul, ol { | ||
padding-left: 3vh; | ||
padding-top: 2vh; | ||
} | ||
|
||
|
||
.markdownSlide p, | ||
.markdownSlide h1, | ||
.markdownSlide h2, | ||
.markdownSlide h3, | ||
.markdownSlide h4 { | ||
margin: 0px; | ||
} | ||
.markdownSlide p { | ||
font-size: 3vh; | ||
line-height: 4vh; | ||
} | ||
.markdownSlide h1 { | ||
font-size: 5vh; | ||
line-height: 6vh; | ||
border-bottom: 0.2vh solid gray; | ||
} | ||
.markdownSlide h2 { | ||
font-size: 4vh; | ||
line-height: 5vh; | ||
border-bottom: 0.2vh dotted gray; | ||
} | ||
.markdownSlide h3 { | ||
font-size: 3vh; | ||
line-height: 4vh; | ||
} | ||
.markdownSlide h4 { | ||
font-size: 3vh; | ||
line-height: 4vh; | ||
} | ||
|
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
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
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
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,98 @@ | ||
var setHeight = function() { | ||
var width = $('#presentation').width(); | ||
var height = width * 9 / 16; | ||
logging(width + ':' + height); | ||
$('.markdownSlide').height(height); | ||
if ($('#presentation').innerWidth() > 1024) { | ||
// 全画面表示と判定 | ||
$('.markdownSlide').css('padding', '6vh'); | ||
$('.markdownSlide').css('font-size', '5vh'); | ||
$('.markdownSlide p').css('font-size', '5vh'); | ||
$('.markdownSlide h1').css('font-size', '10vh'); | ||
$('.markdownSlide h2').css('font-size', '8vh'); | ||
$('.markdownSlide h3').css('font-size', '6vh'); | ||
$('.markdownSlide h4').css('font-size', '5vh'); | ||
$('.markdownSlide p').css('line-height', '6vh'); | ||
$('.markdownSlide h1').css('line-height', '12vh'); | ||
$('.markdownSlide h2').css('line-height', '10vh'); | ||
$('.markdownSlide h3').css('line-height', '6vh'); | ||
$('.markdownSlide h4').css('line-height', '6vh'); | ||
} else { | ||
$('.markdownSlide').css('padding', '3vh'); | ||
$('.markdownSlide').css('font-size', '3vh'); | ||
$('.markdownSlide p').css('font-size', '3vh'); | ||
$('.markdownSlide h1').css('font-size', '5vh'); | ||
$('.markdownSlide h2').css('font-size', '4vh'); | ||
$('.markdownSlide h3').css('font-size', '3vh'); | ||
$('.markdownSlide h4').css('font-size', '3vh'); | ||
$('.markdownSlide p').css('line-height', '4vh'); | ||
$('.markdownSlide h1').css('line-height', '6vh'); | ||
$('.markdownSlide h2').css('line-height', '5vh'); | ||
$('.markdownSlide h3').css('line-height', '4vh'); | ||
$('.markdownSlide h4').css('line-height', '4vh'); | ||
} | ||
}; | ||
|
||
var createPresentation = function(targetId) { | ||
return Promise.try(function() { | ||
$(window).resize(function(){ | ||
setHeight(); | ||
}); | ||
|
||
logging('createPresentation'); | ||
var presentationArea = $('#presentationArea'); | ||
|
||
var slideLength = 2; | ||
var slideId = 'presentation'; | ||
|
||
indexMap[slideId] = 1; | ||
var slidehtml = '<div class="slideshow-area" id="' + slideId + '">'; | ||
slidehtml += '<div class="slideshow-container" id="sheets"></div>'; | ||
slidehtml += '<br/>'; | ||
slidehtml += '<div class="slideshow-control">'; | ||
slidehtml += '<a class="prev" onclick="plusSlides(-1, \'' + slideId + '\')">❮ prev</a>'; | ||
slidehtml += '<a class="next" onclick="plusSlides(1, \'' + slideId + '\')">next ❯</a>'; | ||
slidehtml += '<div style="text-align:center">'; | ||
slidehtml += '<div class="numbertext"><span class="current">1</span> / ' + slideLength; | ||
|
||
slidehtml += ' <a onclick="requestFullscreen(\'' + slideId + '\');">'; | ||
|
||
slidehtml += '<i class="full fa fa-television fa-2x" aria-hidden="true"></i></a></div>'; | ||
if (slideLength < 60) { | ||
slidehtml += '<div class="dotArea">'; | ||
for (var i = 0; i < slideLength; i++) { | ||
slidehtml += '<span class="dot" onclick="currentSlide(' + (i+1) + ', \'' + slideId + '\')"></span> '; | ||
} | ||
slidehtml += '</div>'; | ||
} | ||
slidehtml += '</div></div></div>'; | ||
presentationArea.html(slidehtml); | ||
|
||
var sections = []; | ||
var section = $('<div class="mySlides markdownSlide slide-fade in"></div>'); | ||
var add = false; | ||
$(targetId).children().each(function(i, elem) { | ||
if (elem.tagName.toLowerCase() == 'hr') { | ||
sections.push(section); | ||
section = $('<div class="mySlides markdownSlide slide-fade in"></div>'); | ||
add = false; | ||
} else { | ||
section.append($(elem).clone()); | ||
add = true; | ||
} | ||
}); | ||
if (add) { | ||
sections.push(section); | ||
} | ||
sections.forEach(function(s) { | ||
$('#sheets').append(s); | ||
}); | ||
|
||
logging(presentationArea.html()); | ||
showSlides(indexMap[slideId], slideId); | ||
setHeight(); | ||
}); | ||
|
||
|
||
}; | ||
|
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