Exemple #1
0
        private string RenderSlide(Slide slide)
        {
            var page = StandaloneLayout.Page(course, slide, CreateToc(slide), GetCssFiles(), GetJsFiles());

            foreach (var block in slide.Blocks.OfType <MdBlock>())
            {
                CopyLocalFiles(block.Markdown, slide.Info.Directory.FullName);
            }
            return("<!DOCTYPE html>\n" + page.ToHtmlString());
        }
        public string RenderInstructorsNote(string unitName)
        {
            var note = course.FindInstructorNote(unitName);

            if (note == null)
            {
                return(null);
            }
            var similarSlide = course.Slides.First(x => x.Info.UnitName == unitName);
            var slide        = new Slide(new[] { new MdBlock(note.Markdown) }, new SlideInfo(unitName, similarSlide.Info.SlideFile, -1), "Заметки преподавателю", "1");
            var page         = StandaloneLayout.Page(course, slide, CreateToc(slide), GetCssFiles(), GetJsFiles());

            CopyLocalFiles(note.Markdown, similarSlide.Info.Directory.FullName);
            return("<!DOCTYPE html>\n" + page.ToHtmlString());
        }
Exemple #3
0
        private string RenderInstructorsNote(Unit unit)
        {
            var note = unit.InstructorNote;

            if (note == null)
            {
                return(null);
            }

            var similarSlide = unit.Slides.First();
            var slide        = new Slide(
                new[] { new MdBlock(note.Markdown) },
                new SlideInfo(unit, similarSlide.Info.SlideFile, -1), "Заметки преподавателю", Guid.NewGuid(),
                meta: null
                );
            var page = StandaloneLayout.Page(course, slide, CreateToc(slide), GetCssFiles(), GetJsFiles());

            CopyLocalFiles(note.Markdown, similarSlide.Info.Directory.FullName);
            return("<!DOCTYPE html>\n" + page.ToHtmlString());
        }
Exemple #4
0
        private string RenderInstructorsNote(Unit unit)
        {
            var note = unit.InstructorNote;

            if (note == null)
            {
                return(null);
            }

            var similarSlide = unit.Slides.First();
            var slide        = new Slide(new MarkdownBlock(note.Markdown))
            {
                Id    = Guid.NewGuid(),
                Title = "Заметки преподавателю",
                Info  = new SlideInfo(unit, similarSlide.Info.SlideFile, -1),
            };
            var page = StandaloneLayout.Page(course, slide, CreateToc(slide), GetCssFiles(), GetJsFiles());

            return("<!DOCTYPE html>\n" + page.ToHtmlString());
        }
Exemple #5
0
        private string RenderSlide(Slide slide)
        {
            var page = StandaloneLayout.Page(course, slide, CreateToc(slide), GetCssFiles(), GetJsFiles());

            return("<!DOCTYPE html>\n" + page.ToHtmlString());
        }