mirror of
https://github.com/offa/android-foss.git
synced 2025-11-05 00:54:55 +05:30
Adds a HTML version of the repo (#427)
This commit is contained in:
parent
7df01d3eb8
commit
250cac4811
2 changed files with 74 additions and 0 deletions
3
android.svg
Normal file
3
android.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-android2" viewBox="0 0 16 16">
|
||||||
|
<path d="m10.213 1.471.691-1.26q.069-.124-.048-.192-.128-.057-.195.058l-.7 1.27A4.8 4.8 0 0 0 8.005.941q-1.032 0-1.956.404l-.7-1.27Q5.281-.037 5.154.02q-.117.069-.049.193l.691 1.259a4.25 4.25 0 0 0-1.673 1.476A3.7 3.7 0 0 0 3.5 5.02h9q0-1.125-.623-2.072a4.27 4.27 0 0 0-1.664-1.476ZM6.22 3.303a.37.37 0 0 1-.267.11.35.35 0 0 1-.263-.11.37.37 0 0 1-.107-.264.37.37 0 0 1 .107-.265.35.35 0 0 1 .263-.11q.155 0 .267.11a.36.36 0 0 1 .112.265.36.36 0 0 1-.112.264m4.101 0a.35.35 0 0 1-.262.11.37.37 0 0 1-.268-.11.36.36 0 0 1-.112-.264q0-.154.112-.265a.37.37 0 0 1 .268-.11q.155 0 .262.11a.37.37 0 0 1 .107.265q0 .153-.107.264M3.5 11.77q0 .441.311.75.311.306.76.307h.758l.01 2.182q0 .414.292.703a.96.96 0 0 0 .7.288.97.97 0 0 0 .71-.288.95.95 0 0 0 .292-.703v-2.182h1.343v2.182q0 .414.292.703a.97.97 0 0 0 .71.288.97.97 0 0 0 .71-.288.95.95 0 0 0 .292-.703v-2.182h.76q.436 0 .749-.308.31-.307.311-.75V5.365h-9zm10.495-6.587a.98.98 0 0 0-.702.278.9.9 0 0 0-.293.685v4.063q0 .406.293.69a.97.97 0 0 0 .702.284q.42 0 .712-.284a.92.92 0 0 0 .293-.69V6.146a.9.9 0 0 0-.293-.685 1 1 0 0 0-.712-.278m-12.702.283a1 1 0 0 1 .712-.283q.41 0 .702.283a.9.9 0 0 1 .293.68v4.063a.93.93 0 0 1-.288.69.97.97 0 0 1-.707.284 1 1 0 0 1-.712-.284.92.92 0 0 1-.293-.69V6.146q0-.396.293-.68"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
71
index.html
Normal file
71
index.html
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>Android FOSS</title>
|
||||||
|
<link rel="stylesheet" href="">
|
||||||
|
<link rel="icon" href="android.svg" type="image/svg+xml">
|
||||||
|
<style>
|
||||||
|
main
|
||||||
|
{
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.5;
|
||||||
|
width: 960px;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
select
|
||||||
|
{
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<select onchange="changeCSS( this.value )">
|
||||||
|
<option value="darkly">Darkly</option>
|
||||||
|
<option value="united">United</option>
|
||||||
|
<option value="flatly">Flatly</option>
|
||||||
|
<option value="quartz">Quartz</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<main></main>
|
||||||
|
|
||||||
|
<!-- JavaScript Library to Convert Markdown into HTML -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Marked plugin to add heading ID's -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/marked-gfm-heading-id/lib/index.umd.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Basic Settings
|
||||||
|
const defaultTheme = 'darkly';
|
||||||
|
const bootswatchVersion = '5.3.3'; // Last updated: 7 March, 2024
|
||||||
|
// Update last one only when https://www.jsdelivr.com/package/npm/bootswatch is updated.
|
||||||
|
|
||||||
|
// Configure marked.js to use Github heading ID's to allow the Contents list to function
|
||||||
|
marked.use( markedGfmHeadingId.gfmHeadingId() );
|
||||||
|
|
||||||
|
// Get the markdown file, convert it to HTML & put it inside the main tag
|
||||||
|
fetch( 'https://raw.githubusercontent.com/offa/android-foss/master/README.md' )
|
||||||
|
.then( response => response.text() )
|
||||||
|
.then( data => {
|
||||||
|
document.querySelector( 'main' ).innerHTML = marked.parse( data );
|
||||||
|
})
|
||||||
|
.catch( error => console.error( 'Error:', error ) );
|
||||||
|
|
||||||
|
// Change the theme
|
||||||
|
function changeCSS( theme )
|
||||||
|
{
|
||||||
|
document.querySelector( 'link' ).href
|
||||||
|
= `https://cdn.jsdelivr.net/npm/bootswatch@${bootswatchVersion}/dist/${theme}/bootstrap.min.css`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the default theme
|
||||||
|
changeCSS( defaultTheme );
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue