# igem-editor **Repository Path**: panshangqi/igem-editor ## Basic Information - **Project Name**: igem-editor - **Description**: igem-editor 编辑器 - **Primary Language**: Unknown - **License**: CC-BY-4.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-30 - **Last Updated**: 2025-10-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Team MammothEdu-South 2025 Wiki This repository **MUST** contain all coding assets to generate your team's wiki (HTML, CSS, JavaScript, TypeScript, Python, etc). Images, photos, icons and fonts **MUST** be stored on `static.igem.wiki` using [tools.igem.org](https://tools.igem.org), and Videos **must** be embedded from [iGEM Video Universe](https://video.igem.org). For up-to-date requirements, resources, help and guidance, visit [competition.igem.org/deliverables/team-wiki](https://competition.igem.org/deliverables/team-wiki). ## Getting started You should probably only edit the files inside folders `static`, `wiki` and `wiki > pages`. 1. Open the Web IDE 2. Make the changes on the files you wish: * For the menu, change the file [menu.html](wiki/menu.html) * For the layout, change the file [layout.html](wiki/layout.html) * For the pages, change the corresponding file in the foler [pages](wiki/pages) 3. Review the changes you made 4. Once you are done, save the changes by **committing** them to the *main branch* of the repository 5. An automated script will build, test and deploy your wiki, which should take less than 30 seconds. ## About this Template ### Files The static assets are in the `static` directory. The layout and templates are in the `wiki` directory, and the pages live in the `wiki > pages` directory. Unless you are an experienced and/or adventurous human, you probably shouldn't change other files. |__ static/ -> static assets (CSS and JavaScript files only) |__ wiki/ -> Main directory for the pages and layouts |__ footer.html -> Footer that will appear in all the pages |__ layout.html -> Main layout of your wiki. All the pages will follow its structure |__ menu.html -> Menu that will appear in all the pages |__ pages/ -> Directory for all the pages |__ *.html -> Actual pages of your wiki |__ .gitignore -> Tells GitLab which files/directories should not be uploaded to the repository |__ .gitlab-ci.yml -> Automated flow for building, testing and deploying your website. |__ LICENSE -> License CC-by-4.0, all wikis are required to have this license - DO NOT MODIFY |__ README.md -> File containing the text you are reading right now |__ app.py -> Python code managing your wiki |__ dependencies.txt -> Software dependencies from the Python code ### Technologies * [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/) * [Python](https://www.python.org): Programming language * [Flask](https://palletsprojects.com/projects/flask): Python framework * [Fronzen-Flask](https://pypi.org/project/Frozen-Flask): Library that builds the wiki to be deployed as a static website * [Bootstrap](https://getbootstrap.com/docs/5.3/components): CSS and JS components used ### Building locally (advanced users) To work locally with this project, follow the steps below: #### Install ```bash git clone https://gitlab.igem.org/2025/mammothedu-south.git cd mammothedu-south python3 -m venv venv . venv/bin/activate # on Linux, MacOS; or . venv\Scripts\activate # on Windows pip install -r dependencies.txt ``` #### Execute ```bash python app.py --port=12345 --project=/Users/PSQ/pyProjects/igem-web-v1 --project_host=http://127.0.0.1:8080 ``` rsync -a --exclude='.git' igem-web-v2/* mammothedu-south datas = []; let table = document.getElementById('psq'); let trs = table.rows; for (let tr of trs) { let tds = tr.cells; let row = []; for (let td of tds) { row.push(td.textContent.trim()); console.log(td.textContent.trim()); } datas.push(row); } //下载canvas图片 // 获取canvas元素 const canvas = document.getElementById('table9'); // 检查canvas是否为空 if (!canvas) { console.error('未找到canvas元素,请检查id是否正确'); } else { try { // 将canvas转换为blob格式(更好的跨域兼容性) canvas.toBlob(function(blob) { const link = document.createElement('a'); link.download = 'canvas-image.png'; link.href = URL.createObjectURL(blob); document.body.appendChild(link); link.click(); document.body.removeChild(link); URL.revokeObjectURL(link.href); console.log('Canvas图片下载完成!'); }); } catch (error) { console.error('下载失败:', error); // 如果blob方式失败,尝试使用dataURL方式 const link = document.createElement('a'); link.download = 'canvas-image.png'; link.href = canvas.toDataURL(); document.body.appendChild(link); link.click(); document.body.removeChild(link); console.log('Canvas图片下载完成(使用dataURL方式)!'); } }