Let $d > 0$ be a squarefree integer and $K = \mathbb Q(\sqrt d)$. Dirichlet's Unit Theorem asserts that $$\mathcal O_K^* \cong \mathbb Z \times \{\pm 1 \}.$$
A generator of the free part of $\mathcal O_K^*$ (called a fundamental unit of $\mathcal O_K$) can be found by finding the smallest solution to Pell's equations $$x^2 - d y^2 = \pm 1$$ in positive integers, at least if $d \equiv 2,3 \pmod 4$. If $d \equiv 1 \pmod 4$, then we have to look at the equations $$x^2 - dy^2 = \pm 4$$ instead.
These Pell-type equations can be solved by using continued fractions.
I am looking for a reference that provides a complete treatment of the relationship between the above Pell-type equations, fundamental units, and continued fractions. Not every fact about continued fractions needs to be proved in the reference; there are plenty of good references here.
However, the reference should contain the theory for $d \equiv 1 \pmod 4$ as well, not only the cases $d \equiv 2,3 \pmod 4$; the image in this question seems to be what I'm looking for, however, the question is pretty old and I cannot find the reference by googling.