https://github.com/dubniczky/sourceless-repository
A website with text and image content without any visible source code
https://github.com/dubniczky/sourceless-repository
css html python trick website
Last synced: about 1 month ago
JSON representation
A website with text and image content without any visible source code
- Host: GitHub
- URL: https://github.com/dubniczky/sourceless-repository
- Owner: dubniczky
- License: mit
- Created: 2022-07-21T16:38:52.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-21T16:42:18.000Z (almost 4 years ago)
- Last Synced: 2025-03-31T13:32:59.550Z (about 1 year ago)
- Topics: css, html, python, trick, website
- Language: Makefile
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Sourceless Website
This website displays text content, image and styling without containing any source code
If you open the page source `Ctrl + u`, it will be empty, also selecting the page components using developer tools will yield empty styling.
## Support ❤️
If you find the project useful, please consider supporting, or contributing.
[](https://www.buymeacoffee.com/dubniczky)
## How It Works
The HTTP standard has a `Link` header attribute for linking to other websites or resources. These links may have properties describing the relationship to the given resource.
Some browsers support this relationship to be: `stylesheet`. In which case they will be loaded and applied to the current page. By using a custom FastAPI server and manually setting this header, we are able to make the browser load the stylesheet without explicit links in the html code.
When loading a webpage with no content or missing `html`, `head` or `body` tags, browsers will create these automatically. This can be used to apply styling to the `::before` and `::after` elements of the head DOM element. Styling used: [css](/static/style.css)
## Software Requirements
1. Python
1. Python Venv
1. Pip
1. Make
## Usage
### Automatic
1. Run `make`
1. Open browser: [http://127.0.0.1:8080](http://127.0.0.1:8080)
### Manual
1. `make venv` to create virtual environment.
1. `make install` install python dependencies to venv.
1. `make run` start the server.
1. Open browser: [http://127.0.0.1:8080](http://127.0.0.1:8080)
### Container
Docker has to be installed and running on your system.
1. `docker build -t srclessweb .` build container.
1. `docker run -p8080:8080 srclessweb` run container and expose to port 8080.
## Attributions
- Flower image: [pexels](https://www.pexels.com/photo/yellow-flower-on-white-surface-11431628/)
## Browser Compatibility
> Tested in: 05/2022
Loading sylesheets using the link tag is not an RFC standard.
|Browser|Version|Compatibility|
|---|---|---|
|Firefox|`99.0`|✅|
|Chrome|`101.0`|❌|
|Edge|`101.0`|❌|
|Brave|`1.38`|❌|
|Safari|`15.4`|❌|
## Screenshots
Loaded site | Source
|:-:|:-:|
 | 