主权项 |
1. A method for generating a digital magazine, the method comprising:
storing a plurality of sub-templates, each sub template specifying one or more positions of content items relative to each other; storing a plurality of page templates, each page template including one or more regions, each region configured to present one or more content items, one or more of the plurality of page templates including one or more regions; receiving a request to present one or more content items from one or more sources in a digital magazine; determining a display area of a client device; generating a score associated with each of the one or more page templates, a score associated with a page template based on a portion of the display area of the client device, a number of content items, characteristics of the one or more content items, an amount of modification to content items to present the content items in regions of the page template, a number of content items to be presented having types matching types associated with regions of the page template, and a number of regions in the page template; selecting a display page template based on the scores for the plurality of page templates, the selected page template including a region identifying a sub-template based on the scores; generating a score associated with one or more sub-templates based on the display area of the client device, a number of content items for presentation in the region of the display page template identifying the sub-template, an amount of modification to content items to present the content items in positions specified by the sub-template, a number of content items to be presented having types matching types associated with regions of the sub-template, and characteristics of the one or more content items; selecting a sub-template for the region of the selected page template based on the scores associated with the one or more sub-templates; and generating a section of the digital magazine for presentation via the client device, the section including one or more content items in the region identifying the sub-template based on the display sub-template and one or more content items placed in positions specified by the one or more regions of the selected page template. |