docs: Update screenshots in README
|
|
@ -1,7 +1,7 @@
|
|||
updatescreenshots:
|
||||
repo-common-take-screenshot mainpage-darkop http://localhost:1337/ 1024 680 --dark
|
||||
repo-common-take-screenshot mainpage-laptop http://localhost:1337/ 1024 680
|
||||
repo-common-take-screenshot mainpage-phone http://localhost:1337/ 600 1160
|
||||
SCREENSHOT_DIR=screenshots SHOT_WIDTH=1024 SHOT_HEIGHT=680 repo-helper screenshot mainpage-darkop http://localhost:1337/ --width 1024 --height 680 --dark --script resize_viewport.py
|
||||
SCREENSHOT_DIR=screenshots SHOT_WIDTH=1024 SHOT_HEIGHT=680 repo-helper screenshot mainpage-laptop http://localhost:1337/ --width 1024 --height 680 --script resize_viewport.py
|
||||
SCREENSHOT_DIR=screenshots SHOT_WIDTH=600 SHOT_HEIGHT=1160 repo-helper screenshot mainpage-phone http://localhost:1337/ --width 600 --height 1160 --script resize_viewport.py
|
||||
repo-common-image-framer
|
||||
|
||||
.PHONY: updatescreenshots
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
import os
|
||||
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.support.ui import WebDriverWait
|
||||
|
||||
from repo_helper.screenshot import set_viewport_size
|
||||
|
||||
|
||||
def run(driver):
|
||||
WebDriverWait(driver, 30).until(
|
||||
lambda d: bool(d.find_element(By.TAG_NAME, "body").get_attribute("loaded-dashboard"))
|
||||
)
|
||||
width = int(os.environ["SHOT_WIDTH"])
|
||||
height = int(os.environ["SHOT_HEIGHT"])
|
||||
set_viewport_size(driver, width, height)
|
||||
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 165 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 165 KiB |
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 167 KiB |