100+ copy-paste UI components in plain HTML and CSS: no dependencies, no build step.

0 downloads

dbbasic-web-native/tools/take-screenshot.py
Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-web-native.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-web-native.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-web-native.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 Add canonical.html v1.0 - The single source of truth for usability standards fb6e650 1 year ago History
take-screenshot.py · 752 bytes · 18 lines
1#!/usr/bin/env python3
2from playwright.sync_api import sync_playwright
3import os
4import sys
5
6def take_screenshot(html_file='demo-saas-landing.html', output_file='demo-fixed-layout.png'):
7 with sync_playwright() as p:
8 browser = p.chromium.launch()
9 page = browser.new_page(viewport={'width': 1920, 'height': 1080})
10 page.goto(f'file://{os.getcwd()}/{html_file}')
11 page.screenshot(path=output_file, full_page=True)
12 browser.close()
13 print(f'Screenshot saved to {output_file}')
14
15if __name__ == '__main__':
16 html_file = sys.argv[1] if len(sys.argv) > 1 else 'demo-saas-landing.html'
17 output_file = sys.argv[2] if len(sys.argv) > 2 else 'demo-fixed-layout.png'
18 take_screenshot(html_file, output_file)