mirror of https://gitlab.com/bashrc2/epicyon
				
				
				
			About text rendering as html
							parent
							
								
									d70895c0cf
								
							
						
					
					
						commit
						778f980733
					
				| 
						 | 
				
			
			@ -11,6 +11,7 @@ from shutil import copyfile
 | 
			
		|||
from utils import getConfigParam
 | 
			
		||||
from webapp_utils import htmlHeaderWithExternalStyle
 | 
			
		||||
from webapp_utils import htmlFooter
 | 
			
		||||
from webapp_utils import markdownToHtml
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def htmlAbout(cssCache: {}, baseDir: str, httpPrefix: str,
 | 
			
		||||
| 
						 | 
				
			
			@ -30,7 +31,7 @@ def htmlAbout(cssCache: {}, baseDir: str, httpPrefix: str,
 | 
			
		|||
    aboutText = 'Information about this instance goes here.'
 | 
			
		||||
    if os.path.isfile(baseDir + '/accounts/about.md'):
 | 
			
		||||
        with open(baseDir + '/accounts/about.md', 'r') as aboutFile:
 | 
			
		||||
            aboutText = aboutFile.read()
 | 
			
		||||
            aboutText = markdownToHtml(aboutFile.read())
 | 
			
		||||
 | 
			
		||||
    aboutForm = ''
 | 
			
		||||
    cssFilename = baseDir + '/epicyon-profile.css'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,7 +17,6 @@ from webapp_utils import headerButtonsFrontScreen
 | 
			
		|||
from webapp_utils import htmlHeaderWithExternalStyle
 | 
			
		||||
from webapp_utils import htmlFooter
 | 
			
		||||
from webapp_utils import getBannerFile
 | 
			
		||||
from webapp_utils import markdownToHtml
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _linksExist(baseDir: str) -> bool:
 | 
			
		||||
| 
						 | 
				
			
			@ -416,7 +415,7 @@ def htmlEditLinks(cssCache: {}, translate: {}, baseDir: str, path: str,
 | 
			
		|||
            aboutStr = ''
 | 
			
		||||
            if os.path.isfile(aboutFilename):
 | 
			
		||||
                with open(aboutFilename, 'r') as fp:
 | 
			
		||||
                    aboutStr = markdownToHtml(fp.read())
 | 
			
		||||
                    aboutStr = fp.read()
 | 
			
		||||
 | 
			
		||||
            editLinksForm += \
 | 
			
		||||
                '<div class="container">'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue