Hi Canuck 87!
Gonna try to answer your questions.
Question 1: The first two flights are LH codeshare flights, but booked through the Air Canada website. Will the miles be granted based on the LH fare class? or the AC fare class?
From AP website
Mile accumulation
* Charter flights and code-share flights operated by any Lufthansa code-share partner other than Star Alliance airlines are not eligible.
** Intra-European Flights are defined as flights within domestic Germany, domestic Italy, between domestic Germany or domestic Italy and Albania, Austria, Belarus, Belgium, Bosnia-Herzegovina, Bulgaria, Croatia, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Great Britain, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Macedonia, Malta, Moldavia, Netherlands, Norway, Poland, Portugal (excl. Madeira), Romania, Russia, Serbia-Montenegro, Slovakia, Slovenia, Spain (excl. Canary Islands), Sweden, Switzerland, Turkey and Ukraine.
† For Lufthansa code-share flights operated by another Star Alliance airline, refer to the Aeroplan Miles section of the carrier operating the flight.
‡ Based on actual miles flown.
§ Aeroplan Miles and Aeroplan Flight Segments accumulated on Lufthansa, including all class of service bonuses, count towards obtaining Air Canada Top-Tier status.
Question 2: The AC website also mentioned 1 mile per $2 spent on the website. Is that offered in addition to the miles flown?
Yes, however those miles will only be regular, non-status qualifying miles.
They will help add to your AP total miles account, so you could redeem for flights, car rentals, toasters

etc.
The miles you actually fly will help you get status, these promotional miles you get for booking on AC won't.