Skip to content

Commit

Permalink
Update demo banners for Android and iOS to include direct download li…
Browse files Browse the repository at this point in the history
…nks and improve layout
  • Loading branch information
cpholguera committed Jan 18, 2025
1 parent c07dc77 commit 41a3121
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions docs/hooks/maswe-beta-banner.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,12 @@ def get_android_demo_banner(page):
artifacts_url = github_api.get_latest_successful_run()

demo_folder = page_uri.replace("MASTG/demos/android/", "https://github.com/OWASP/owasp-mastg/blob/master/demos/android/").replace(f"/{id}.md", "/")

demo_folder_link = f"<a href='{demo_folder}' target='_blank'>demo folder</a>"

banner = f"""
!!! tip "Demo"
<a href="{artifacts_url}" class="md-button md-button--primary" style="margin: 5px; min-width: 12em;">:material-download: Download {id} APK</a>
<a href="{demo_folder}" target='_blank' class="md-button md-button--primary" style="margin: 5px; min-width: 12em;">:material-folder-open: Open {id} Folder</a>
The APK file for this demo is available [here]({artifacts_url}) as "{id}.apk".
Open the {demo_folder_link}.
You can build the APK file yourself by following the instructions in the [MASTestApp-Android GitHub repository](https://github.com/cpholguera/MASTestApp-Android).
**Tip**: You can build the APK file yourself by following the instructions in the [MASTestApp-Android GitHub repository](https://github.com/cpholguera/MASTestApp-Android).
"""
return banner

Expand All @@ -187,8 +184,6 @@ def get_ios_demo_banner(page):

demo_folder = page_uri.replace("MASTG/demos/ios/", "https://github.com/OWASP/owasp-mastg/blob/master/demos/ios/").replace(f"/{id}.md", "/")

demo_folder_link = f"<a href='{demo_folder}' target='_blank'>demo folder</a>"

banner = f"""
<a href="{mastestapp_binary_url}" class="md-button md-button--primary" style="margin: 5px; min-width: 12em;">:material-download: Download {id} Binary</a>
<a href="{demo_folder}" target='_blank' class="md-button md-button--primary" style="margin: 5px; min-width: 12em;">:material-folder-open: Open {id} Folder</a>
Expand Down

0 comments on commit 41a3121

Please sign in to comment.