Using GPIOA_IDR directly looks a bit arcane, and the example can benefit from introducing gpio_get() and how to use it. The stm32f0-discovery example already does it like this.
Examples in these directories are not only for the board listed, they are simply preconfigured for those boards. If you do not find an example of the peripheral you want to use listed for your board, please look at the other boards. The differences between boards for the examples is normally only LEDs and buttons on different pins, and different memory sizes.