A topological construction of the weight filtration