make a seperate directory 'templates'
Store index.html file,
and return render_template('index.html') in server.py
from flask import render_template
@app.route('/')
def home():
return render_template('index.html')
if downloaded html file from web, it might be .htm -> change it to .html
static files needs to be inside static folder
static files: css, image, video files
specify directory in <img src= "static/ ~
<td><img src="static/angela.png" alt="angela profile picture"></td>
create a css file in static file
main.css
body {
background-color: purple
}
Link relationship to html at head part
index.html
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}">
Note: browsers like to cache -> on the same day, it won't change over one day.
solution: hard reload -> shift + refresh button
캐시
웹 캐시는 자주 쓰이는 문서의 사본을 자동으로 보관하는 HTTP 장치
Change the directories accordingly -> ctrl + R for mass change
module 461 for Chrome developer tools for modifying on screen. After editing save the html and add it to your file.
- Downloaded html template from here
- Changed SNS icons
- Resized the image
img { width: 100%; height: auto; }
I marked 70% progress in the online lecture. I've been studying for 60 days by myself. I've started it since January with 100 days challenge. My daily routine is very stable/ uniform(is there any better expression for this?) I wake up around 8am and study till noon. Except for lunch, dinner and brief breaks, I try to focus on studying. It's not difficult with help of challengers application and time recording application. Since it's winter time now, It's perfect to stay in and focus on studying. I hope I can enjoy outdoor activities and socialising by this summer!