From cc2a858ec435692f3b6b90e75a9990e585d7af84 Mon Sep 17 00:00:00 2001 From: fynks <75840152+fynks@users.noreply.github.com> Date: Fri, 13 Dec 2024 18:25:02 +0500 Subject: [PATCH] inlined css in html --- convert.sh | 20 ++++++--- docs/sitemap.xml | 14 ------ docs/styles.css | 111 +---------------------------------------------- 3 files changed, 16 insertions(+), 129 deletions(-) delete mode 100644 docs/sitemap.xml diff --git a/convert.sh b/convert.sh index 9d91137..e0b2bc0 100755 --- a/convert.sh +++ b/convert.sh @@ -19,6 +19,14 @@ if ! command -v pandoc &> /dev/null; then handle_error "pandoc is not installed. Please install it first." fi +# Check if styles.css exists +if [[ ! -f ./docs/styles.css ]]; then + handle_error "styles.css not found in ./docs. Please ensure it exists." +fi + +# Read styles.css content +INLINE_CSS=$(<./docs/styles.css) + # Create template cat > template.html << 'EOL' @@ -48,8 +56,8 @@ cat > template.html << 'EOL' EOL -# Create header with improved meta tags -cat > header.html << 'EOL' +# Create header with inline CSS and improved meta tags +cat > header.html << EOL @@ -59,9 +67,12 @@ cat > header.html << 'EOL' - + + @@ -81,7 +92,6 @@ cat > header.html << 'EOL' - EOL # Convert markdown with progress @@ -104,4 +114,4 @@ cleanup echo "✓ Conversion complete! Output saved as index.html" echo "→ Table of contents generated" echo "→ Dark mode support added" -echo "→ Accessibility features implemented" \ No newline at end of file +echo "→ Accessibility features implemented" diff --git a/docs/sitemap.xml b/docs/sitemap.xml deleted file mode 100644 index 6431204..0000000 --- a/docs/sitemap.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - https://awesome-android-root.netlify.app/ - 2024-12-06T07:12:00+00:00 - - - \ No newline at end of file diff --git a/docs/styles.css b/docs/styles.css index 64e8250..2175f7a 100644 --- a/docs/styles.css +++ b/docs/styles.css @@ -1,110 +1 @@ -:root { - --primary: #121314; - --text: #2c3338; - --text-light: #57606a; - --bg: #ffffff; - --bg-alt: #f6f8fa; - --border: #e1e4e8; - --radius: 8px; - --shadow: 0 1px 3px rgba(0,0,0,0.12); -} - -body { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; - line-height: 1.6; - max-width: 900px; - margin: 0 auto; - padding: 2rem; - color: var(--text); - background: var(--bg); -} - -h1, h2, h3, h4 { - margin-top: 2rem; - margin-bottom: 1rem; - font-weight: 600; - line-height: 1.25; - color: var(--text); -} - -h1 { font-size: 2.5rem; color: var(--primary); } -h2 { - font-size: 1.75rem; - border-bottom: 2px solid var(--border); - padding-bottom: .5rem; -} -h3 { font-size: 1.25rem; } -h4 { font-size: 1rem; } - -a { - color: var(--primary); - text-decoration: none; - transition: all 0.2s ease; - border-bottom: 1px solid transparent; -} - -a:hover { - text-decoration: underline -} -p > a:not(:has(img)) { - border-bottom: 1px solid var(--primary) -} - -code { - background: var(--bg-alt); - padding: 0.2em 0.4em; - border-radius: var(--radius); - font-family: "SF Mono", Consolas, Monaco, monospace; - font-size: 85%; -} - -pre code { - display: block; - padding: 1rem; - overflow: auto; - line-height: 1.45; - background: var(--bg-alt); - border-radius: var(--radius); - box-shadow: var(--shadow); -} - -table { - width: 100%; - border-collapse: collapse; - margin: 1rem 0; - box-shadow: var(--shadow); - border-radius: var(--radius); - overflow: hidden; -} - -th, td { - padding: 0.75rem; - text-align: left; - border: 1px solid var(--border); -} - -th { - background: var(--bg-alt); - font-weight: 600; -} - -img { - max-width: 100%; - height: auto; - border-radius: var(--radius); -} - -@media (max-width: 768px) { - body { - padding: 1rem; - } - - h1 { font-size: 2rem; } - h2 { font-size: 1.5rem; } - h3 { font-size: 1.25rem; } - - table { - display: block; - overflow-x: auto; - } -} \ No newline at end of file +:root{--primary:#121314;--text:#2c3338;--text-light:#57606a;--bg:#ffffff;--bg-alt:#f6f8fa;--border:#e1e4e8;--radius:8px;--shadow:0 1px 3px rgba(0,0,0,.12);}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;line-height:1.6;max-width:900px;margin:0 auto;padding:2rem;color:var(--text);background:var(--bg);}h1,h2,h3,h4{margin-top:2rem;margin-bottom:1rem;font-weight:600;line-height:1.25;color:var(--text);}h1{font-size:2.5rem;color:var(--primary)}h2{font-size:1.75rem;border-bottom:2px solid var(--border);padding-bottom:.5rem;}h3{font-size:1.25rem}h4{font-size:1rem}a{color:var(--primary);text-decoration:none;transition:all .2s ease;border-bottom:1px solid transparent;}a:hover{text-decoration:underline}p>a:not(:has(img)){border-bottom:1px solid var(--primary)}code{background:var(--bg-alt);padding:.2em .4em;border-radius:var(--radius);font-family:"SF Mono",Consolas,Monaco,monospace;font-size:85%;}pre code{display:block;padding:1rem;overflow:auto;line-height:1.45;background:var(--bg-alt);border-radius:var(--radius);box-shadow:var(--shadow);}table{width:100%;border-collapse:collapse;margin:1rem 0;box-shadow:var(--shadow);border-radius:var(--radius);overflow:hidden;}th,td{padding:.75rem;text-align:left;border:1px solid var(--border);}th{background:var(--bg-alt);font-weight:600;}img{max-width:100%;height:auto;border-radius:var(--radius);}@media (max-width:768px){body{padding:1rem}h1{font-size:2rem}h2{font-size:1.5rem}h3{font-size:1.25rem}table{display:block;overflow-x:auto}} \ No newline at end of file