Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
49 changes: 49 additions & 0 deletions src/checklist-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -589,3 +589,52 @@ footer span {
page-break-after: avoid;
}
}

/*Pencil Icon Styling*/
.inlineIcon.edit {
background: transparent;
border: none;
position: fixed;
top: 20px;
right: 20px;
z-index: 999;
}

.edit {
background: #3498db;
}

.button {
font-family: "Open Sans";
font-size: 16px;
font-weight: 400;
display: inline-block;
color: #FFF;
border-radius: 0.25em;
text-shadow: -1px -1px 0px rgba(0, 0, 0, 0.4);
}

.inlineIcon.edit:before {
color: #3498db;
line-height: 32px;
font-size: 32px;
padding: 4px 0px;
}

.edit:before {
content: "\f040";
font-family: FontAwesome;
display: inline-block;
font-size: 1rem;
padding-right: 12px;
background: none;
color: #FFF;
}


/* Contributor section styling */
.contributor-section {
text-align: center;
}


1 change: 1 addition & 0 deletions src/checklist-track.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,4 @@ window.onclick = function () {
}
*/
}

115 changes: 68 additions & 47 deletions src/deploy/deploy.py
Original file line number Diff line number Diff line change
@@ -1,48 +1,69 @@
import os
import shutil

# Define the source directory (one level above the current directory)
source_directory = os.path.abspath(os.path.join(os.getcwd(), ".."))

# Define the destination directory
destination_directory = "deploy/production-checklist"

# Define the full path for the destination directory
destination_path = os.path.join(source_directory, destination_directory)

# Ensure the destination directory exists or create it if it doesn't
if not os.path.exists(destination_path):
os.makedirs(destination_path)

# Mapping of file extensions and their corresponding paths
file_extensions = {
".html": ".hbs"
}

# Loop through the files in the source directory
for filename in os.listdir(source_directory):
if filename == "sample-checklist-template.html":
# Skip the file named "sample.html"
continue

# Get the file extension
file_extension = os.path.splitext(filename)[1]

if file_extension in file_extensions:
# Get the new file extension and destination path
new_extension = file_extensions[file_extension]
destination_file_path = os.path.join(destination_path, "page-" + os.path.splitext(filename)[0] + new_extension)

# Read the content of the HTML file with UTF-8 encoding
with open(os.path.join(source_directory, filename), "r", encoding="utf-8") as html_file:
html_content = html_file.read()

# Update the CSS and JS file paths within the HTML content
updated_html_content = html_content.replace('checklist-style.css', '/assets/css/checklist/checklist-style.css')
updated_html_content = updated_html_content.replace('checklist-track.js', '/assets/js/checklist/checklist-track.js')

# Write the updated content to the destination file with the new extension
with open(destination_file_path, "w", encoding="utf-8") as destination_file:
destination_file.write(updated_html_content)

import os
import shutil
import subprocess

# Define the source directory (one level above the current directory)
source_directory = os.path.abspath(os.path.join(os.getcwd(), ".."))

# Define the destination directory
destination_directory = "deploy/production-checklist"

# Define the full path for the destination directory
destination_path = os.path.join(source_directory, destination_directory)

# Ensure the destination directory exists or create it if it doesn't
if not os.path.exists(destination_path):
os.makedirs(destination_path)

# Mapping of file extensions and their corresponding paths
file_extensions = {
".html": ".hbs"
}

# List of script files to be copied
script_files = ["markdown.py", "text-edition.py", "deploy.py"]

# Function to update script files from a remote repository
def update_scripts():
try:
# Update script files from the remote repository
subprocess.run(["git", "pull"])
print("Scripts updated successfully.")
except Exception as e:
print(f"Error updating scripts: {e}")

# Update script files from the remote repository
update_scripts()

# Copy script files to the destination directory
for script_file in script_files:
source_file_path = os.path.join(os.getcwd(), script_file)
destination_file_path = os.path.join(destination_path, script_file)
shutil.copy(source_file_path, destination_file_path)

# Loop through the files in the source directory
for filename in os.listdir(source_directory):
if filename == "sample-checklist-template.html":
# Skip the file named "sample.html"
continue

# Get the file extension
file_extension = os.path.splitext(filename)[1]
if file_extension in file_extensions:
# Get the new file extension and destination path
new_extension = file_extensions[file_extension]
destination_file_path = os.path.join(destination_path, "page-" + os.path.splitext(filename)[0] + new_extension)

# Read the content of the HTML file with UTF-8 encoding
with open(os.path.join(source_directory, filename), "r", encoding="utf-8") as html_file:
html_content = html_file.read()

# Update the CSS and JS file paths within the HTML content
updated_html_content = html_content.replace('checklist-style.css', '/assets/css/checklist/checklist-style.css')
updated_html_content = updated_html_content.replace('checklist-track.js', '/assets/js/checklist/checklist-track.js')

# Write the updated content to the destination file with the new extension
with open(destination_file_path, "w", encoding="utf-8") as destination_file:
destination_file.write(updated_html_content)

print("Conversion completed.")
Loading