Customization

333 views
Skip to first unread message

Margari León

unread,
Oct 7, 2014, 7:09:20 AM10/7/14
to ica-ato...@googlegroups.com
Hello,
I would like to adapt the theme "arArchivesCanadaPlugin", but I don´t know which files should I modify. I just want to change some colours, the logo and remove some extra buttons it has on the botton of the main menu...
According to the documentation, I have to follow those steps: https://www.accesstomemory.org/en/docs/2.1/admin-manual/customization/theming/#customization-theming, but I don´t see there how to distinguish between the default theme and the one of Canada Archives.
Thank you for your help!!
Margari

Dan Gillean

unread,
Oct 7, 2014, 12:47:49 PM10/7/14
to ica-ato...@googlegroups.com
Hi Margari,

Each theme is maintained in a separate folder in the plugins directory of AtoM - arArchivesCanadaPlugin and arDominionPlugin.

If you look at the main.less file in the arArchivesCanadaPlugin (https://github.com/artefactual/atom/blob/qa/2.2.x/plugins/arArchivesCanadaPlugin/css/main.less), you can see the location of all the CSS files being imported and used for styling.

our themed plugins, like the ArchivesCanada one, are designed to extend the base theme of Dominion. So some of the arArchivesCanadaPlugin files merely extend or alter the CSS of the Dominion theme - namely, those listed as "customizations" in the arArchivesCanada main.less file (listed here or found here). For those elements not listed in those CSS files, you will have to add a new CSS file or alter the Dominion theme files directly. The main.less file inside the less folder found in the arArchivesCanadaPlugin directory (here) should also be instructive - this file changes the basic CSS in Dominion into the purple background, and different base stylings, of the ArchivesCanada theme.

Here are a few other threads that might help.

We recommend developing new themes as a new plugin. For some thoughts on plugin development in AtoM, see this thread, which includes links to Symfony's documentation on plugin development: https://groups.google.com/d/msg/ica-atom-users/pJrgjGCG0mI/RpOHYx1mxAMJ

This thread includes much of the same information shared here, but may give you another user to connect with - https://groups.google.com/d/msg/ica-atom-users/QUNFdPQ_GQw/TGuWz3qmJP8J


Note that, after you first create a new theme, you may have to manually compile the CSS from the command-line the first time. If you are using AtoM 2, you can compile the CSS from the command line, by navigating from your root folder to the new Plugin folder (e.g. here: https://github.com/artefactual/atom/tree/2.x/plugins/arDominionPlugin) and typing the command "make".

After you do this, it's a good idea to restart some of the services, clear your cache, and rebuild the search index. Here is a full list of commands to compile the CSS, restart PHP5-FPM, clear the cache, and rebuild the search index - start from your root directory:

Here's an example of compiling the CSS using the Dominion theme plugin:

Navigate to the Dominion theme plugin

   $ cd plugins/arDominionPlugin

Recompile the CSS

   $ make

Return to your root directory

   $ cd ..

   $ cd ..

Clear the cache

   $ php symfony cc

Rebuild the search index

   $ php symfony search:populate

Restart PHP5-FPM

   $ sudo service php5-fpm restart


I hope that helps get you started! Let me know how it goes, and if needed, I can always ask a developer to add more suggestions to this thread.


Cheers,

Dan Gillean, MAS, MLIS
AtoM Product Manager / Systems Analyst,
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/bdbde214-3a28-46da-b4d0-0ad9e6693720%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

José Anjos

unread,
Dec 11, 2014, 10:40:27 AM12/11/14
to ica-ato...@googlegroups.com
Hi again.
I'm trying to customize the Atom homepage.
What I pretend is just to have the "top-bar" and "site-slogan" bar and a full screen image.
I'm not familiarized with symphony framework.
I'm trying to create a new plugin by duplicating the arDominionPlugin folder and then compiling it with the steps you gave.
When I do "make" I have the fowling error:
NameError: #grid > .core > .span is undefined in /usr/share/nginx/atom2/vendor/bootstrap/less/navbar.less on line 199, column 3:
198 .navbar-fixed-bottom .container {
199 #grid > .core > .span(@gridColumns);
200 }

Thanks for any help

Jesús García Crespo

unread,
Dec 11, 2014, 11:14:47 AM12/11/14
to ica-ato...@googlegroups.com
Hi José,

The new less compiler 2.x provided by the npm package manager is not compatible with our less source code. We recently filed a ticket in our system in this regards: https://projects.artefactual.com/issues/7634. The workaround for now is to install the latest 1.x version available, try:

$ sudo npm install -g le...@1.7.5

Or something like:

$ sudo npm install -g less@<2.0.0

Then try to compile the less files again.

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.

For more options, visit https://groups.google.com/d/optout.



--
Jesús García Crespo,
Software Engineer, Artefactual Systems Inc.
http://www.artefactual.com | +1.604.527.2056

José Anjos

unread,
Dec 12, 2014, 6:16:16 AM12/12/14
to ica-ato...@googlegroups.com
Ok, I've downgraded successfully.
Then I did these steps:
1- Duplicate folder arDominionPlugin to arDominionPlugin_2
2- Edit file: config/arDominionPluginConfiguration.class.php
3- Changed 2 lines. Where it says: /plugins/arDominionPlugin/css/main.css to /plugins/arDominionPlugin_2/css/main.css
4- Compile. OK
5- Clear cache, populate, restart php5-fpm
Everything looks ok but no new theme on Themes.
Maybe I'm missing something?
Thanks

Jesús García Crespo

unread,
Dec 12, 2014, 10:41:43 AM12/12/14
to ica-ato...@googlegroups.com
Hello again,

All the classes under the new plugin have to be renamed accordingly, e.g. config/arDominionPluginConfiguration.class.php, etc... ideally you'd change the name of the file too, not just the name of the class contained. Unfortunately it's not as easy as changing the parent directory as you did. Our themes are Symfony plugins and there are certain rules and conventions that you need to follow to make it work properly.



For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages